Loading Forky
LOADING FORKE...
The 4-layer review pipeline
Sign up
DocsReview & qualityThe 4-layer review pipeline

Review & quality

5 min read

The 4-layer review pipeline

Every PR runs the same gauntlet before a founder ever sees it.

The framing matters: AI is an intelligent context generator, not a judge. It summarises, flags concerns with evidence, and scores against structured criteria — but in V1 it never autonomously approves or rejects. The owner makes the final call.

The four layers

Review pipeline
L1Automated validation

build · tests · lint · scope · security

L2Context assembly

task · criteria · diff · history

L3AI review

structured verdict via Claude

L4Risk scoring

auto-approve · owner · reviewer

Each layer can stop a submission before it reaches the owner.

Layer 1 — Automated validation

Build, tests, lint, type-check, security scan (Semgrep), file-scope validation, and the FORKE_SUBMISSION.md completeness check — all run in a sandboxed container in ~30 seconds. Any failure is an auto-reject with the specific reason shown to you. No AI is called, so a failing build costs nothing. This is the biggest cost saving and the fastest quality gate.

Layer 2 — Context assembly

Forke builds the AI prompt from exactly what matters: the task description and acceptance criteria, the git diff (changed files only — never the whole repo), repo patterns detected when the mirror was created, the automated results, and your trust score and history. Good context is what makes the verdict meaningful.

Layer 3 — AI review

Claude reads the assembled context and returns a strict JSON verdict: task-completion score (0–10), code-quality score (0–10), architecture fit (0–10), security status, up to five concrete issues, up to three positives, a plain-English summary, a recommendation, and a confidence score. Low confidence escalates to a human regardless of the other scores.

Layer 4 — Risk scoring

A composite 0–100 score from the AI verdict, task criticality, and your history decides routing:

Risk scoreRouting
0–30Auto-approve eligible (low-risk, simple tasks)
31–70Owner review — verdict card shown, owner decides
71–100Trusted reviewer queue first, then owner
Note
Auto-approval is off by default in V1 — it's enabled only after the scoring is validated on 500+ tasks. Until then, every submission reaches a human.