<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/XuBm0I2TU" -->

---
title: Hybrid Automated Code Review: Deterministic AST Rules + LLMs
description: A two-tier CI code review architecture combines deterministic static analysis (ESLint AST rules and the TypeScript compiler) with an LLM-based semantic...
canonical: https://daily.dev/posts/xubm0i2tu
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Hybrid Automated Code Review: Deterministic AST Rules + LLMs | daily.dev
og:description: A two-tier CI code review architecture combines deterministic static analysis (ESLint AST rules and the TypeScript compiler) with an LLM-based semantic...
og:url: https://daily.dev/posts/xubm0i2tu
og:image: https://api.daily.dev/og/posts/XuBm0I2TU.png
og:image:alt: Post cover image
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Hybrid Automated Code Review: Deterministic AST Rules + LLMs

**[Ragunathan Maniraj](https://daily.dev/sources/4j1ho_fff)** · [@ragu](https://daily.dev/ragu) · 1 upvotes · 0 comments

## Summary

A two-tier CI code review architecture combines deterministic static analysis (ESLint AST rules and the TypeScript compiler) with an LLM-based semantic reviewer gated behind that first tier. Tier 1 catches syntactic issues and short-circuits the pipeline before any LLM call if errors are found, saving cost and latency. Tier 2 extracts structured diff chunks via a custom parser, batches them within a token budget, and sends them to an LLM constrained to a strict JSON schema output (validated with Zod), de-duplicating against Tier 1 findings before posting inline PR comments via the GitHub REST API. The full walkthrough includes the GitHub Actions workflow YAML, a Node.js/TypeScript orchestrator script, a diff parser, security considerations (SHA validation, minimal permissions, avoiding untrusted input in shell commands), and cost/tuning guidance around model choice, temperature, and token budgets.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.sitepoint.com/build-hybrid-automated-code-review-deterministic-rules-llms>

## Similar posts on daily.dev

- [Build Automated PR Verification Gates for AI Code](https://daily.dev/posts/build-automated-pr-verification-gates-for-ai-code-lrynfep5j) · SitePoint · 0 upvotes · 0 comments
- [Linter integration with Copilot code review now in public preview](https://daily.dev/posts/linter-integration-with-copilot-code-review-now-in-public-preview-wspm2tt8d) · GitHub Changelog · 0 upvotes · 0 comments
- [The two-pass compiler is back – this time, it’s fixing AI code generation](https://daily.dev/posts/the-two-pass-compiler-is-back-this-time-it-s-fixing-ai-code-generation-itqmjdmpd) · InfoWorld · 0 upvotes · 0 comments
- [LLM Security Automation Isn’t a Drop-In Scanner Yet](https://daily.dev/posts/llm-security-automation-isn-t-a-drop-in-scanner-yet-08iduwsiq) · Liran Tal · 0 upvotes · 0 comments
- [AI Pull Request Security: AST Audit Harness in GitHub Actions](https://daily.dev/posts/ai-pull-request-security-ast-audit-harness-in-github-actions-d0knnt0pu) · SitePoint · 1 upvotes · 0 comments

---

Tags: [#javascript](https://daily.dev/tags/javascript), [#llm](https://daily.dev/tags/llm), [#typescript](https://daily.dev/tags/typescript), [#github-actions](https://daily.dev/tags/github-actions), [#code-review](https://daily.dev/tags/code-review)

[View this post on daily.dev](https://daily.dev/posts/xubm0i2tu)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"DiscussionForumPosting","mainEntityOfPage":"https://daily.dev/posts/xubm0i2tu","headline":"Hybrid Automated Code Review: Deterministic AST Rules + LLMs","text":"Shared: Hybrid Automated Code Review: Deterministic AST Rules + LLMs","url":"https://daily.dev/posts/xubm0i2tu","datePublished":"2026-09-15T15:39:20.660Z","dateModified":"2026-09-15T15:39:20.665Z","author":{"@type":"Person","name":"Ragunathan Maniraj","url":"https://daily.dev/ragu","image":"https://avatars.githubusercontent.com/u/13572570?v=4","description":"A JavaScript Backend developer ","interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"EndorseAction"},"userInteractionCount":1880}},"image":"https://media.daily.dev/image/upload/s--qPvKM23u--/f_auto/v1722860399/public/Placeholder%2009","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":1},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"sharedContent":{"@type":"WebPage","url":"https://api.daily.dev/r/CPB0Eabf8"},"isPartOf":{"@type":"WebPage","url":"https://daily.dev/sources/4j1ho_fff","name":"Ragunathan Maniraj"}}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Ragunathan Maniraj","item":"https://daily.dev/sources/4j1ho_fff"},{"@type":"ListItem","position":3,"name":"Hybrid Automated Code Review: Deterministic AST Rules + LLMs"}]}
```

