How It Works

HowItWorks

Zero retention, Tree-sitter AST parsing, and in-memory vector intelligence.

Technical Architecture • Deep Dive

Under the Hood: The Four-Stage Review Engine

For engineers and security teams who want to inspect the exact cryptographic checks, Tree-sitter AST queries, and quota-smart relational context assembly.

STAGE 01STAGE 02STAGE 03STAGE 04
STAGE 01 • CONNECTStep 01 of 04

Connect Your Repository

One-click official GitHub App connection

Install once in under a minute. Zero servers or YAML configs.

Think of GitCaptain like adding an experienced senior engineer into your team’s code reviews. Authorize the official GitHub App with a single click. You choose whether to protect your entire organization or test on just one specific repository.

Zero Setup Friction: No background daemons to configure, no manual webhooks to wire, and zero YAML files.
Strict Minimal Access: Read-only access to Pull Requests. We never touch production branches or billing.
Zero Workflow Change: Your developers continue opening standard GitHub PRs without learning a new UI.
Minimal read-only PR permissions • Verified GitHub App
STAGE 02 • TRIGGERStep 02 of 04

Developer Opens a PR

Automated GitHub webhook notification

No commands to run. GitHub triggers the review automatically.

Whenever anyone creates or updates a Pull Request, GitHub securely notifies GitCaptain. Only the changed code diff is sent—your full commit history, issues, and main branches remain completely untouched.

Only Changed Lines Sent: Your main branch code and full commit history remain completely untouched.
Cryptographic Verification: Constant-time HMAC SHA-256 signatures guarantee the request genuinely came from GitHub.
No Commands Needed: Developers never have to run terminal CLI commands or visit external websites.
Only changed lines are inspected • HMAC SHA-256 verified
STAGE 03 • INSPECTStep 03 of 04

Isolated RAM Analysis

Zero-persistence Linux RAM sandbox

Runs purely in volatile RAM. 0 bytes written to hard drive.

A secure worker spins up in temporary Linux RAM. It analyzes grammatical syntax structures (not just plain text lines) and queries your own private AI API key (BYOK). Your proprietary code is never stored on disk and never used to train public AI models.

100% Volatile Memory: Your code runs exclusively in Linux tmpfs memory and is never written to a disk or database.
Syntax Tree Parsing: Understands real functions, variables, and cross-file ripple effects using Tree-sitter.
Private BYOK Gateway: Directly uses your private AI API key. Token costs are pure, and models never train on your code.
0 bytes saved to hard drive • Private BYOK AI key
STAGE 04 • REVIEWStep 04 of 04

Instant GitHub Feedback

Inline suggestions & immediate RAM purge

Clear review comments in GitHub. Memory wiped instantly.

Helpful, line-by-line comments with one-click fix buttons appear directly inside your GitHub Pull Request. The moment the review is dispatched, the temporary Linux RAM worker is unmounted and wiped clean—leaving zero trace.

One-Click Mergeable Fixes: Developers click "Commit suggestion" directly inside GitHub to resolve findings instantly.
Instant RAM Purge: The review sandbox unmounts immediately and memory is reclaimed by the kernel. 0 bytes remain.
Sub-2 Second Turnaround: Reviews arrive in seconds, before human teammates even open the PR notification.
RAM wiped clean instantly • 1-click mergeable in GitHub
Interactive Demonstration

Real-World Code Understanding in Action

Explore three distinct scenarios showing how syntax intelligence catches critical bugs that regular linters and raw text diffs overlook.

Target File:

src/middleware/auth.ts

Type: Security & Error HandlingSeverity: HighRisk Score: 78/100
UNIFIED DIFF (PR PATCH)SYNTAX HIGHLIGHTED
@@ -34,7 +34,9 @@ export async function authenticateRequest(req: Request) {
const token = req.headers.get('authorization')?.replace('Bearer ', '');
if (!token) throw new UnauthorizedError();
- const user = await verifyJwt(token);
+ // Potential unhandled Promise rejection and session bypass
+ const user = verifyJwt(token); // Missing await keyword
+ req.context = { user };
return next();
}
SYNTAX STRUCTURE IDENTIFIED
(call_expression function: (identifier "verifyJwt") arguments: (arguments (identifier "token")))
GitCaptain Automated Inline Review
Posted via GitHub REST API

Critical bug: `verifyJwt` is an asynchronous function returned without `await`. In JavaScript/TypeScript, an unhandled Promise truthy check will pass downstream middleware, resulting in unauthenticated request execution.

Suggested Replacement:
- const user = verifyJwt(token);
+ const user = await verifyJwt(token);
Benchmark Comparison

Architecture Matrix: Syntax Intelligence vs Linters vs Generic LLMs

Why syntax tree intelligence and quota-aware context outperform generic chat prompts and rigid regex rules.

Evaluation DimensionTraditional LintersGeneric LLM BotsGitCaptain In-Memory AST
Core MechanismRegex patterns & static token regexesRaw diff text dumped into generic promptTree-sitter CST + Whole-Repo Dependency Graph
Cross-File AwarenessSingle-file only (zero import awareness)Hallucinated or truncated due to token ceilingsFull import blast radius & caller ripple tracking
Hallucination RateZero (strictly rule-bound)High (cites nonexistent libraries/functions)Near-zero (grounded in verified syntax node ranges)
Token EfficiencyN/A (No LLM calls)Wasteful (burns tokens on whitespace & comments)Extreme (sends only AST-distilled semantic nodes)
Context AssemblyNoneExpensive full-vector embedding lookupsQuota-aware direct PostgreSQL lookups (0 embed calls)
Execution Latency< 500ms10s to 45s (frequent timeouts)Sub-2 seconds end-to-end pipeline
Code Privacy & RetentionLocal workstation onlyStored in provider cloud logs or model memory100% Ephemeral Linux tmpfs sandboxes (0 bytes retained)
Trust & Sovereignty

Cryptographic Zero-Retention Guarantees

Engineering guarantees built into every layer of our execution infrastructure.

Volatile tmpfs Sandboxes

Review workers operate inside temporary RAM volumes (`tmpfs`). Zero code is ever written to persistent disk storage. When the process halts, the memory is instantly reclaimed by Linux kernel paging.

AES-256 Key Encryption

Provider API keys are encrypted at rest using AES-256-GCM authenticated encryption. Keys are decrypted strictly in volatile RAM for the webhook execution and are never logged or exported.

Deterministic Rulesets

Teams configure deterministic syntax gates via `.gitcaptain.json` (maximum complexity, forbidden libraries, mandatory docstrings). These rules are evaluated before LLM inference.

Ready to Deploy?

Connect Your Repository in Under Two Minutes

Free forever with your own API keys. Keep your code private, secure, and syntax-verified on every pull request.