<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Shrijith Venkatramana</title>
    <description>The latest articles on DEV Community by Shrijith Venkatramana (@shrsv).</description>
    <link>https://dev.to/shrsv</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1001514%2F17b7d334-44b1-417a-9268-346e6a34988a.jpg</url>
      <title>DEV Community: Shrijith Venkatramana</title>
      <link>https://dev.to/shrsv</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/shrsv"/>
    <language>en</language>
    <item>
      <title>Introducing LiveReview: World's First Generally Available Risk-Aware Code Review System</title>
      <dc:creator>Shrijith Venkatramana</dc:creator>
      <pubDate>Sat, 07 Nov 2026 06:41:35 +0000</pubDate>
      <link>https://dev.to/shrsv/introducing-livereview-worlds-first-generally-available-risk-aware-code-review-system-46eg</link>
      <guid>https://dev.to/shrsv/introducing-livereview-worlds-first-generally-available-risk-aware-code-review-system-46eg</guid>
      <description>&lt;p&gt;In February, you helped &lt;strong&gt;git-lrc&lt;/strong&gt; reach #3 Product of the Day on Product Hunt. Thank you.&lt;/p&gt;

&lt;p&gt;git-lrc fixed one problem: engineers committing AI-written code they had not read. It put a review in front of every commit, right in the terminal.&lt;/p&gt;

&lt;p&gt;As teams adopted it, a bigger problem showed up one step later, at the pull request.&lt;/p&gt;

&lt;p&gt;AI made code cheap to write. Review stayed expensive. Every PR waited in the same queue, for the same few senior engineers. A renamed variable and a rewritten payment flow got the same amount of attention. Seniors became the bottleneck. They skimmed. Risky changes slipped through.&lt;/p&gt;

&lt;p&gt;Today we are launching &lt;strong&gt;LiveReview&lt;/strong&gt;: a risk-aware code review system built to fix exactly that.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://www.producthunt.com/products/livereview?launch=livereview" rel="noopener noreferrer"&gt;Vote for LiveReview on Product Hunt →&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If this problem is familiar, an upvote and a comment helps more engineering teams find this approach. It is the single best way to support this launch.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Watch the demo:&lt;/strong&gt; &lt;a href="https://github.com/user-attachments/assets/7ebae4b8-22ed-4572-bcfe-d938a8d13ca7" rel="noopener noreferrer"&gt;LiveReview auto-approving a low-risk change while routing a risky change to a human reviewer.&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  LiveReview auto-approves your safest 30-50% of pull requests
&lt;/h2&gt;

&lt;p&gt;Every pull request gets a risk score. The lowest-risk 30-50% are approved automatically. The rest go to the right human, in the right order, ranked by how much they actually matter.&lt;/p&gt;

&lt;h2&gt;
  
  
  How LiveReview differs from other AI reviewers
&lt;/h2&gt;

&lt;p&gt;Most tools in this space pick one of two jobs: find issues, or check style. LiveReview is built to be the layer that decides whether a human needs to look at all, and ranks what matters when they do.&lt;/p&gt;

&lt;p&gt;Here is what actually changes when you compare LiveReview against CodeRabbit, Greptile, SonarQube, Claude Code review, GitHub Copilot review, and Cursor Bugbot, feature by feature, not by marketing claim:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Auto-approves safe PRs.&lt;/strong&gt; LiveReview approves the lowest-risk 30-50% of PRs under your policy; the rest go to a human. CodeRabbit offers this too, opt-in, when threads are resolved, checks pass, and risk is under your limit. Greptile's is beta, and only on a clean 5/5 review. SonarQube, Claude Code review, and Cursor Bugbot do not approve at all — a quality gate passes or fails, or a person has to click approve. Copilot has a public-preview approval, off by default, with undocumented criteria.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Learns from your own production incidents and reverts.&lt;/strong&gt; This is where LiveReview stands alone: every revert or incident retrains your organization's own model. None of the six alternatives are documented as feeding production outcomes back into the review itself.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Lets you try a policy on past PRs first.&lt;/strong&gt; Replay a draft auto-approve policy against your recent PRs before it goes live. Not documented for any of the other six tools.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Reports an approval calibration.&lt;/strong&gt; Approved vs. blocked per stage, override rate, and false-approve rate — a scorecard for the policy itself. Not documented elsewhere.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Shows production impact in numbers.&lt;/strong&gt; PRs approved without a human, and the false-approve rate — approved changes later reverted or tied to an incident. CodeRabbit reports bugs caught and merge time, not production outcomes. SonarQube reports code-quality metrics, not production outcomes.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Blast radius of each change.&lt;/strong&gt; A code graph scores how far each change reaches. CodeRabbit has blast-radius context on its Advanced plan. Greptile and SonarQube find ripple effects or taint paths without a blast-radius score. Claude Code and Copilot read surrounding code but don't score it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Summary decks and PR quizzes (Cognitive Coverage).&lt;/strong&gt; A short slide-style summary of the review, and a quiz that checks the author actually understood the change. None of the six alternatives offer either.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Ask for any chart or report, in plain language (Livi).&lt;/strong&gt; CodeRabbit and SonarQube ship fixed dashboards and scheduled reports; Greptile's MCP data can be wired into a chart by your own coding agent. None let you just ask, in Slack or Teams, the way Livi does.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Fair, predictable pricing.&lt;/strong&gt; Fixed monthly bands by reviewed lines of code, unlimited users. CodeRabbit bills per seat (

&lt;span class="katex-element"&gt;
  &lt;span class="katex"&gt;&lt;span class="katex-mathml"&gt;&lt;/span&gt;&lt;span class="katex-html"&gt;&lt;span class="base"&gt;&lt;span class="strut"&gt;&lt;/span&gt;&lt;span class="mord"&gt;24&lt;/span&gt;&lt;span class="mspace"&gt;&lt;/span&gt;&lt;span class="mbin"&gt;−&lt;/span&gt;&lt;span class="mspace"&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="base"&gt;&lt;span class="strut"&gt;&lt;/span&gt;&lt;span class="mord"&gt;72&lt;/span&gt;&lt;span class="mclose"&gt;)&lt;/span&gt;&lt;span class="mord mathnormal"&gt;pl&lt;/span&gt;&lt;span class="mord mathnormal"&gt;u&lt;/span&gt;&lt;span class="mord mathnormal"&gt;s&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;/span&gt;
0.25 per file over the allowance. Claude Code review is token-billed, about 
&lt;span class="katex-element"&gt;
  &lt;span class="katex"&gt;&lt;span class="katex-mathml"&gt;&lt;/span&gt;&lt;span class="katex-html"&gt;&lt;span class="base"&gt;&lt;span class="strut"&gt;&lt;/span&gt;&lt;span class="mord"&gt;15&lt;/span&gt;&lt;span class="mspace"&gt;&lt;/span&gt;&lt;span class="mbin"&gt;−&lt;/span&gt;&lt;span class="mspace"&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="base"&gt;&lt;span class="strut"&gt;&lt;/span&gt;&lt;span class="mord"&gt;25&lt;/span&gt;&lt;span class="mord mathnormal"&gt;p&lt;/span&gt;&lt;span class="mord mathnormal"&gt;erre&lt;/span&gt;&lt;span class="mord mathnormal"&gt;v&lt;/span&gt;&lt;span class="mord mathnormal"&gt;i&lt;/span&gt;&lt;span class="mord mathnormal"&gt;e&lt;/span&gt;&lt;span class="mord mathnormal"&gt;w&lt;/span&gt;&lt;span class="mord"&gt;.&lt;/span&gt;&lt;span class="mord mathnormal"&gt;C&lt;/span&gt;&lt;span class="mord mathnormal"&gt;u&lt;/span&gt;&lt;span class="mord mathnormal"&gt;rsor&lt;/span&gt;&lt;span class="mord mathnormal"&gt;B&lt;/span&gt;&lt;span class="mord mathnormal"&gt;ug&lt;/span&gt;&lt;span class="mord mathnormal"&gt;b&lt;/span&gt;&lt;span class="mord mathnormal"&gt;o&lt;/span&gt;&lt;span class="mord mathnormal"&gt;t&lt;/span&gt;&lt;span class="mord mathnormal"&gt;i&lt;/span&gt;&lt;span class="mord mathnormal"&gt;s&lt;/span&gt;&lt;span class="mord mathnormal"&gt;u&lt;/span&gt;&lt;span class="mord mathnormal"&gt;s&lt;/span&gt;&lt;span class="mord mathnormal"&gt;a&lt;/span&gt;&lt;span class="mord mathnormal"&gt;g&lt;/span&gt;&lt;span class="mord mathnormal"&gt;e&lt;/span&gt;&lt;span class="mspace"&gt;&lt;/span&gt;&lt;span class="mbin"&gt;−&lt;/span&gt;&lt;span class="mspace"&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="base"&gt;&lt;span class="strut"&gt;&lt;/span&gt;&lt;span class="mord mathnormal"&gt;ba&lt;/span&gt;&lt;span class="mord mathnormal"&gt;se&lt;/span&gt;&lt;span class="mord mathnormal"&gt;d&lt;/span&gt;&lt;span class="mpunct"&gt;,&lt;/span&gt;&lt;span class="mspace"&gt;&lt;/span&gt;&lt;span class="mord mathnormal"&gt;ab&lt;/span&gt;&lt;span class="mord mathnormal"&gt;o&lt;/span&gt;&lt;span class="mord mathnormal"&gt;u&lt;/span&gt;&lt;span class="mord mathnormal"&gt;t&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;/span&gt;
1-1.50 per review. Copilot and Cursor review are both billed per user on top of that.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Source-available on GitHub, self-hostable, free to start.&lt;/strong&gt; SonarQube has a Community Build; CodeRabbit, Greptile, Claude Code, Copilot, and Cursor Bugbot do not publish their source.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Most of the alternatives find issues and leave the approval decision to a person. LiveReview makes the "does a human need to look at this at all" decision itself, backs it with your own production outcome data, and only then prioritizes what's left for the humans who do look. See the &lt;a href="https://hexmos.com/livereview/compare" rel="noopener noreferrer"&gt;full feature-by-feature comparison&lt;/a&gt; for every row.&lt;/p&gt;

&lt;h2&gt;
  
  
  The problem: reviews did not scale with AI
&lt;/h2&gt;

&lt;p&gt;Most AI code review tools add more comments to the pull request. More comments is not the goal. Fewer incidents, fewer rollbacks, and less senior reviewer time are the goal. We measure LiveReview by production outcomes, not by comment count.&lt;/p&gt;

&lt;p&gt;LiveReview follows the approach behind Meta's internal AI review system, RADAR: score every change for risk, fast-track the safe ones, and route the risky ones to the right reviewers. At Meta, this approach led to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;50× fewer&lt;/strong&gt; production incidents&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;3× fewer&lt;/strong&gt; rollbacks&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;35% faster&lt;/strong&gt; reviews&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;LiveReview brings the same idea to any team, on any git provider, self-hosted and free.&lt;/p&gt;

&lt;h2&gt;
  
  
  How LiveReview scores risk
&lt;/h2&gt;

&lt;p&gt;Every pull request gets one risk score, built from three signals:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Semantic LLM analysis&lt;/strong&gt; — what the change actually does, in plain language.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A custom ML model&lt;/strong&gt; — trained on your own production incidents, rollbacks, and overrides, not a generic dataset.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Static graph-based codebase analysis&lt;/strong&gt; — how far the change reaches through your call graph, and what it touches.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The loop runs like this:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Track outcomes.&lt;/strong&gt; Trace production incidents and rollbacks back to the commits and reviews behind them.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Learn from the data.&lt;/strong&gt; Combine those outcomes with LLM analysis, static checks, and ML signals into one risk score per change.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Automate selectively.&lt;/strong&gt; Auto-approve the lowest-risk 30-50% of changes. Choose a conservative, balanced, or aggressive policy. Risky or uncertain changes still go to a human.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Keep improving.&lt;/strong&gt; Track incidents, false approvals, and overrides, and tighten or loosen the policy as real data comes in.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The result: your reviewers stop reading every line of every diff, and start spending their full attention on the 50-70% of changes that actually carry risk.&lt;/p&gt;

&lt;h2&gt;
  
  
  Risk inside the diff, not just risk per PR
&lt;/h2&gt;

&lt;p&gt;A PR-level score is not enough. A single pull request can mix a one-line change to an authorization check with three hundred lines of UI polish. LiveReview scores every hunk inside the diff for &lt;strong&gt;blast radius&lt;/strong&gt;: how far a change reaches through your call graph, how much persistent state it touches, and how well it is tested.&lt;/p&gt;

&lt;p&gt;A 3-line change to a shared auth check can outrank a 300-line UI tweak. Your reviewer's attention goes to the riskiest code first, not spread evenly across the diff.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;The exact math, not a black box&lt;/th&gt;
&lt;th&gt;Every factor behind the score&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fv1hf7lhtq507ftb8v08c.webp" alt="Risk score breakdown shown in the diff viewer" width="800" height="675"&gt;&lt;/td&gt;
&lt;td&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fvq85lkybqth131dsg8s5.webp" alt="Every signal that feeds the blast radius score" width="800" height="578"&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Two scores feed the ranking:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Blast Radius&lt;/strong&gt; — how many other places call this code, whether it writes to a database, and whether its callers sit in other, unrelated parts of the codebase.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Review Priority&lt;/strong&gt; — how many paths the logic can take, how deeply loops nest, how many other functions it calls into, and whether it has tests.&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Score badge, with full breakdown&lt;/th&gt;
&lt;th&gt;The whole diff, ranked by risk&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fmj3qf00c7ypdwuhwkm29.png" alt="A single hunk's risk score, with breakdown" width="800" height="279"&gt;&lt;/td&gt;
&lt;td&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fyxm6dzaxl29fibzr1x4c.png" alt="Every hunk in a diff, ranked by blast radius" width="800" height="491"&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  Checkpoints at every stage, not just the PR
&lt;/h2&gt;

&lt;p&gt;AI writes code faster than any human reviews it by hand. LiveReview gives you a checkpoint at every stage where that code could reach production, and you turn on only the stages that matter per repository:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Stage&lt;/th&gt;
&lt;th&gt;What happens&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Commit&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;git lrc review&lt;/code&gt; checks your staged changes before the commit happens, in your terminal.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Before Push&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;LiveReview checks one last time before code leaves your machine. Skips are explicit and stay in the git log.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;MR / PR&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;A full AI review posts as comments, with a Blast Radius and Review Priority score on every hunk. Works across GitHub, GitLab, Bitbucket, Gitea, and Azure DevOps.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;CI / CD&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;A webhook triggers a review on every push. A CI/CD Gate, written as one &lt;code&gt;jq&lt;/code&gt; rule, decides whether the result blocks the merge.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Scheduled Checks&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Periodic sweeps catch drift in code nobody has touched recently.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Not every repository needs the same depth. A throwaway repo is fine with commit-only checks. Payments, auth, and core infrastructure deserve the full harness: commit, push, PR, CI/CD, and scheduled, together.&lt;/p&gt;

&lt;h2&gt;
  
  
  Keeping engineers in touch with what AI wrote
&lt;/h2&gt;

&lt;p&gt;A fast review pipeline still leaves one risk: engineers approving code they never really understood. &lt;strong&gt;Cognitive Coverage&lt;/strong&gt; closes that gap.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Summary decks&lt;/strong&gt; — a 60-second slide summary of what changed, why it matters, and what risks were flagged, generated automatically for every review.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;PR quizzes&lt;/strong&gt; — a short quiz, generated straight from the diff, before the change is committed. It takes under a minute, and it tells you exactly how much of the change a human actually understood, not just whether an AI reviewed it.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fgc9cyjpop2oun9je10a1.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fgc9cyjpop2oun9je10a1.gif" alt="A 60-second summary deck, generated automatically for every review" width="600" height="472"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Every finding is also browsable in the &lt;strong&gt;Issue Navigator&lt;/strong&gt;, filterable by severity and category, with a one-click send to your AI coding agent to fix.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F308810ltyqytemixhrhl.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F308810ltyqytemixhrhl.gif" alt="Issue Navigator: every finding, filterable by severity and category" width="600" height="394"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Livi: ask your engineering data a question
&lt;/h2&gt;

&lt;p&gt;LiveReview tracks every review against a 10-category, 100+ pattern risk taxonomy: reliability, correctness, performance, scalability, security, compliance, maintainability, architecture, developer experience, and cost. That data is useless locked inside a dashboard nobody opens. &lt;strong&gt;Livi&lt;/strong&gt; is the assistant that makes it usable in plain English, on the web or in Slack, Teams, and Discord.&lt;/p&gt;

&lt;p&gt;Ask Livi things like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;"Is LiveReview adoption increasing across the org?"&lt;/li&gt;
&lt;li&gt;"Which repos are gaining or losing engineering velocity?"&lt;/li&gt;
&lt;li&gt;"Which files keep showing up with issues?"&lt;/li&gt;
&lt;li&gt;"How much does LiveReview cost us per day?"&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fxim173906irlcq2c2jn1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fxim173906irlcq2c2jn1.png" alt="Livi answers engineering questions with a chart, pulled from your own data" width="600" height="454"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Livi backs over 50 chart types across adoption, repository health, engineer activity, review quality, cost, and trust, so an engineering leader gets a real answer instead of a guess.&lt;/p&gt;

&lt;h2&gt;
  
  
  CI/CD Gates: your rule, not a preset
&lt;/h2&gt;

&lt;p&gt;A generic "block on critical severity" checkbox never matches how a team actually weighs risk. &lt;strong&gt;CI/CD Gates&lt;/strong&gt; let you write the exact condition in &lt;code&gt;jq&lt;/code&gt;, against the real findings from a review, and wire it into any pipeline as one HTTP call.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fhc82nhyw14nk9w3wqu3k.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fhc82nhyw14nk9w3wqu3k.png" alt="A list of named CI/CD gate rulesets, each with its own jq rule" width="800" height="394"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A security-first team can block on any security finding at all. A fast-moving startup can block only on correctness and UX bugs, and let style debt through for now. Both are one &lt;code&gt;jq&lt;/code&gt; expression against the same findings document, whether the review came from the web UI, &lt;code&gt;git-lrc&lt;/code&gt;, CI/CD, or the API.&lt;/p&gt;

&lt;h2&gt;
  
  
  LiveReview is free and self-hostable
&lt;/h2&gt;

&lt;p&gt;Run it on your own infrastructure. No seats, no per-review bill that climbs as your team grows.&lt;/p&gt;

&lt;p&gt;We are launching LiveReview on Product Hunt today.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://www.producthunt.com/products/livereview?launch=livereview" rel="noopener noreferrer"&gt;Vote for LiveReview on Product Hunt →&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If this problem is familiar, an upvote and a comment is the single best way to help more engineering teams discover this approach.&lt;/p&gt;

&lt;p&gt;Which 30% of your pull requests would you trust to auto-approve? Tell us in the Product Hunt comments.&lt;/p&gt;

</description>
      <category>aicodereview</category>
      <category>coderabbitalternative</category>
      <category>radar</category>
      <category>riskawarereview</category>
    </item>
    <item>
      <title>LeanPort: Bringing Lean 4 Verified Modules Into Golang</title>
      <dc:creator>Shrijith Venkatramana</dc:creator>
      <pubDate>Wed, 21 Oct 2026 20:44:32 +0000</pubDate>
      <link>https://dev.to/shrsv/leanport-put-your-critical-go-rules-in-lean-keep-your-go-build-boring-33fc</link>
      <guid>https://dev.to/shrsv/leanport-put-your-critical-go-rules-in-lean-keep-your-go-build-boring-33fc</guid>
      <description>&lt;p&gt;&lt;em&gt;Hello, I'm Shrijith Venkatramana, and I'm building LiveReview — a blast-radius aware AI code review built for your business-critical systems. &lt;a href="https://github.com/HexmosTech/LiveReview/" rel="noopener noreferrer"&gt;Star us&lt;/a&gt; to help devs discover the project, give it a try, and share your feedback to help improve the product.&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;A permission check can fit in five lines and still be one of the most consequential functions in a service.&lt;/p&gt;

&lt;p&gt;Can a resource owner read the audit log? Does an admin flag count before authentication? What should happen when a caller passes action code &lt;code&gt;255&lt;/code&gt;? These are small rules, but a mistake can expose data or block a legitimate operation.&lt;/p&gt;

&lt;p&gt;Tests answer these questions for the inputs we try. Formal verification lets us state a rule precisely and prove properties about every input in its modeled domain.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/shrsv/LeanPort" rel="noopener noreferrer"&gt;LeanPort&lt;/a&gt; is a small tool with a specific aim: write decision logic and proofs in Lean 4, then consume the result from Go as an ordinary package. The rest of your application can stay Go.&lt;/p&gt;

&lt;h2&gt;
  
  
  The rule is small; the consequences aren't
&lt;/h2&gt;

&lt;p&gt;Formal verification has a long history, but it has often carried a large integration cost. In 2009, Gerwin Klein and colleagues published work on seL4, a microkernel whose implementation was checked against a formal specification. Their paper is valuable for another reason: it lists what the proof assumes, including the correctness of the compiler, assembly, boot code, cache management, and hardware.&lt;/p&gt;

&lt;p&gt;That is the useful lesson for application developers. Verification is not a magic label applied to an entire system. It is a precise claim about a modeled part of a system, under stated assumptions.&lt;/p&gt;

&lt;p&gt;LeanPort applies the idea to a much smaller unit: a function that decides whether an operation is allowed, whether a quota transition is valid, or whether a protocol state change preserves an invariant. Such functions are often pure, full of boundary cases, and important enough that a mistaken rule has a disproportionate cost.&lt;/p&gt;

&lt;h2&gt;
  
  
  The workflow: proofs in Lean, a Go package out
&lt;/h2&gt;

&lt;p&gt;Lean 4 is both a programming language and an interactive theorem prover. A definition can be executable code; a theorem states a proposition about that code; and Lean checks the proof term. LeanPort packages that workflow so application developers do not need to manage the foreign-function interface by hand.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fcmsqjh2xm9mqgvzxk822.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fcmsqjh2xm9mqgvzxk822.png" alt="LeanPort build pipeline" width="800" height="236"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The pipeline is deliberately split into a maintainer path and a consumer path:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A maintainer edits the Lean policy, proofs, and C-facing boundary. &lt;code&gt;leanport check&lt;/code&gt; runs Lean's checker and rejects unproved &lt;code&gt;sorry&lt;/code&gt; or &lt;code&gt;admit&lt;/code&gt; holes.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;leanport build&lt;/code&gt; compiles Lean to C, builds a static archive, and generates the C/cgo bridge plus an idiomatic Go API.&lt;/li&gt;
&lt;li&gt;The generated package and archive are committed to the repository. The application imports the Go package like any other internal dependency.&lt;/li&gt;
&lt;li&gt;A downstream build needs Go, cgo, and a C toolchain. It does not need Lean, Lake, elan, or the LeanPort CLI.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The project principle is simple: &lt;strong&gt;&lt;code&gt;leanport build&lt;/code&gt; may be complicated; &lt;code&gt;go build&lt;/code&gt; should stay boring.&lt;/strong&gt; The generated files are an output, not a second implementation to edit by hand.&lt;/p&gt;

&lt;h2&gt;
  
  
  Start with a policy you can inspect
&lt;/h2&gt;

&lt;p&gt;The repository's &lt;code&gt;permctl&lt;/code&gt; tutorial builds a command-line tool around an authorization policy with four effective access levels and five actions:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Access level&lt;/th&gt;
&lt;th&gt;create&lt;/th&gt;
&lt;th&gt;read&lt;/th&gt;
&lt;th&gt;update&lt;/th&gt;
&lt;th&gt;delete&lt;/th&gt;
&lt;th&gt;viewAudit&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;unauthenticated&lt;/td&gt;
&lt;td&gt;deny&lt;/td&gt;
&lt;td&gt;deny&lt;/td&gt;
&lt;td&gt;deny&lt;/td&gt;
&lt;td&gt;deny&lt;/td&gt;
&lt;td&gt;deny&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;member&lt;/td&gt;
&lt;td&gt;allow&lt;/td&gt;
&lt;td&gt;deny&lt;/td&gt;
&lt;td&gt;deny&lt;/td&gt;
&lt;td&gt;deny&lt;/td&gt;
&lt;td&gt;deny&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;owner of this resource&lt;/td&gt;
&lt;td&gt;deny&lt;/td&gt;
&lt;td&gt;allow&lt;/td&gt;
&lt;td&gt;allow&lt;/td&gt;
&lt;td&gt;allow&lt;/td&gt;
&lt;td&gt;deny&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;admin&lt;/td&gt;
&lt;td&gt;allow&lt;/td&gt;
&lt;td&gt;allow&lt;/td&gt;
&lt;td&gt;allow&lt;/td&gt;
&lt;td&gt;allow&lt;/td&gt;
&lt;td&gt;allow&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Ownership is a fact about the resource being accessed, not a global role. The Lean function therefore receives facts such as &lt;code&gt;authenticated&lt;/code&gt;, &lt;code&gt;isAdmin&lt;/code&gt;, and &lt;code&gt;ownsResource&lt;/code&gt;, plus the requested action. It does not trust a client-supplied role string.&lt;/p&gt;

&lt;p&gt;One of the tutorial's theorems says that audit access is exactly equivalent to being authenticated and an administrator:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight lean"&gt;&lt;code&gt;&lt;span class="k"&gt;theorem&lt;/span&gt; &lt;span class="n"&gt;audit_requires_admin&lt;/span&gt; (&lt;span class="n"&gt;a&lt;/span&gt; &lt;span class="n"&gt;adm&lt;/span&gt; &lt;span class="n"&gt;own&lt;/span&gt; : &lt;span class="n"&gt;Bool&lt;/span&gt;) :
    &lt;span class="n"&gt;authorize&lt;/span&gt; &lt;span class="n"&gt;a&lt;/span&gt; &lt;span class="n"&gt;adm&lt;/span&gt; &lt;span class="n"&gt;own&lt;/span&gt; &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;viewAudit&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; (&lt;span class="n"&gt;a&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="n"&gt;adm&lt;/span&gt;) := &lt;span class="k"&gt;by&lt;/span&gt;
  &lt;span class="n"&gt;cases&lt;/span&gt; &lt;span class="n"&gt;a&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;cases&lt;/span&gt; &lt;span class="n"&gt;adm&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;cases&lt;/span&gt; &lt;span class="n"&gt;own&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;rfl&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Read that in plain English: for every combination of the three Boolean inputs, &lt;code&gt;viewAudit&lt;/code&gt; is allowed precisely when &lt;code&gt;a&lt;/code&gt; and &lt;code&gt;adm&lt;/code&gt; are both true. The &lt;code&gt;own&lt;/code&gt; flag cannot grant audit access. Lean checks this theorem against the &lt;code&gt;authorize&lt;/code&gt; definition; if the implementation changes so the claim no longer follows, the proof stops checking.&lt;/p&gt;

&lt;p&gt;The generated Go call stays straightforward:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight go"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="s"&gt;"example.com/permctl/internal/verified/authz"&lt;/span&gt;

&lt;span class="n"&gt;allowed&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="n"&gt;authz&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Authorize&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;authenticated&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;isAdmin&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;ownsResource&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;authz&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Update&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;In the checked-in tutorial, the Lean policy has ten machine-checked theorems, and the Go command's conformance check reports 39 runtime checks. The theorem and the tests do different jobs: one reasons about a stated property of the definition; the other exercises the generated binding and application behavior.&lt;/p&gt;
&lt;h2&gt;
  
  
  What proof adds over tests
&lt;/h2&gt;

&lt;p&gt;For this policy, three Boolean inputs and five valid actions produce &lt;code&gt;2^3 * 5 = 40&lt;/code&gt; flag/action combinations. That is small enough to test exhaustively, and the tutorial does test many of the important cases. In a real system, however, inputs often include combinations of resource attributes, account states, quota counters, timestamps, retries, and workflow transitions. The state space grows quickly, and regression tests tend to concentrate on cases someone thought to write down.&lt;/p&gt;

&lt;p&gt;A theorem can quantify over every value in its domain. For example:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;an unauthenticated caller is denied every action;&lt;/li&gt;
&lt;li&gt;an owner cannot read the audit log;&lt;/li&gt;
&lt;li&gt;an unauthenticated caller cannot become an admin by setting flags;&lt;/li&gt;
&lt;li&gt;a quota update preserves a stated upper bound.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is not a claim that formal proofs replace testing. Tests still matter for parsing, I/O, the command-line interface, database integration, and other behavior outside the theorem. The distinction is scope: tests run examples; proofs establish the proposition you wrote, for the inputs and assumptions the model covers.&lt;/p&gt;

&lt;p&gt;LeanPort also has an explicit failure path. Add an unproved &lt;code&gt;sorry&lt;/code&gt; to the tutorial's proof file and &lt;code&gt;leanport check&lt;/code&gt; exits non-zero. That makes the proof obligation usable in CI rather than merely a note in a design document.&lt;/p&gt;
&lt;h2&gt;
  
  
  The boundary is part of the design
&lt;/h2&gt;

&lt;p&gt;A verified function is useful only if the production program calls it correctly. LeanPort keeps the boundary narrow: Lean owns the policy and proofs; LeanPort generates a C adapter and a cgo wrapper; Go calls the generated API. LeanPort does not translate Lean source into Go source.&lt;/p&gt;

&lt;p&gt;The adapter is total and fails closed. The tutorial encodes action values as small integers; an unknown action code returns the deny result rather than panicking or accidentally authorizing a request. That is a small example of treating malformed boundary inputs as part of the specification.&lt;/p&gt;

&lt;p&gt;The native artifact size depends on the types that cross the boundary. In the Linux/amd64 example, a scalar-only, runtime-free archive is about 27 KB, and the tutorial binary is about 2.3 MB. An example using &lt;code&gt;String&lt;/code&gt; or &lt;code&gt;ByteArray&lt;/code&gt; links Lean's runtime into the archive, which is about 29 MB in the current example. Think of these as measured examples, not a benchmark: the principal difference is whether the Lean runtime is needed.&lt;/p&gt;

&lt;p&gt;There are practical constraints in the current v0.1.1 release:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The generator supports scalars, strings, and byte arrays. Records, arrays, &lt;code&gt;Option&lt;/code&gt;, and &lt;code&gt;Except&lt;/code&gt; have ABI mappings validated but do not yet have code generation.&lt;/li&gt;
&lt;li&gt;cgo and a compatible C compiler are required, so a pure-Go build with &lt;code&gt;CGO_ENABLED=0&lt;/code&gt; cannot link the generated package.&lt;/li&gt;
&lt;li&gt;Lean's C ABI is unstable. LeanPort records the toolchain version and generated artifact digests; after changing Lean code, bindings, or toolchain versions, rerun &lt;code&gt;leanport check&lt;/code&gt; and &lt;code&gt;leanport build&lt;/code&gt; and commit the generated output.&lt;/li&gt;
&lt;li&gt;The proof covers the modeled decision logic, not the entire application. Authentication data, route-to-action mapping, database consistency, and deployment need their own controls unless they are explicitly brought into the model.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This boundary discipline echoes the seL4 story: a strong proof becomes more useful when its assumptions are visible. A formal theorem about the wrong specification is still the wrong business rule.&lt;/p&gt;
&lt;h2&gt;
  
  
  The economics and operations
&lt;/h2&gt;

&lt;p&gt;Formalization has an upfront cost. It is most promising when a rule changes repeatedly, when its failures are expensive, and when its behavior can be stated clearly enough to prove.&lt;/p&gt;

&lt;p&gt;A rough first-year break-even model, measured in engineering hours, is:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;V * (p_before - p_after) * C &amp;gt; F + V * M&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;where:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;V&lt;/code&gt; is the number of changes to the rule per year;&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;p_before&lt;/code&gt; is the probability of a target logic defect escaping the current process per change;&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;p_after&lt;/code&gt; is the residual probability after formalization, including specification mistakes and gaps outside the model;&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;C&lt;/code&gt; is the average cost of such a defect in engineering hours;&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;F&lt;/code&gt; is the one-time cost of writing the specification and proofs;&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;M&lt;/code&gt; is the additional proof-maintenance effort per change.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Consider illustrative numbers, not LeanPort measurements: 24 changes per year, a reduction in the target defect probability from 5% to 1%, and an average incident cost of 40 engineering hours. The expected avoided cost is &lt;code&gt;24 * (0.05 - 0.01) * 40 = 38.4&lt;/code&gt; hours. If the initial formalization costs 20 hours and each change adds half an hour of proof maintenance, first-year effort is &lt;code&gt;20 + 24 * 0.5 = 32&lt;/code&gt; hours. Under those assumptions, formalization clears the first-year break-even point.&lt;/p&gt;

&lt;p&gt;The probabilities are placeholders, not universal empirical rates. The model also excludes the value of stronger assurance in high-consequence systems, and it cannot account for errors in an incomplete or mistaken specification. Use data from your own incidents and change history where possible.&lt;/p&gt;

&lt;p&gt;Operationally, LeanPort separates the slower verification/build step from ordinary Go development. Maintainers run &lt;code&gt;leanport check &amp;amp;&amp;amp; leanport build&lt;/code&gt; after changing the Lean code or binding configuration, and commit the regenerated package. Consumer CI can run normal Go tests and builds against that committed artifact. The project pins the Lean toolchain and includes diagnostics to make mismatches visible; Nix support can also help pin the Go and C toolchains.&lt;/p&gt;
&lt;h2&gt;
  
  
  Try it: pick one rule worth proving
&lt;/h2&gt;

&lt;p&gt;Start with the &lt;a href="https://github.com/shrsv/LeanPort" rel="noopener noreferrer"&gt;LeanPort repository&lt;/a&gt; and its &lt;a href="https://github.com/shrsv/LeanPort/tree/main/tutorial/permctl" rel="noopener noreferrer"&gt;end-to-end &lt;code&gt;permctl&lt;/code&gt; tutorial&lt;/a&gt;. With LeanPort installed, try the full loop from the tutorial:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;leanport check
leanport build
go &lt;span class="nb"&gt;test&lt;/span&gt; ./...
go build &lt;span class="nt"&gt;-o&lt;/span&gt; permctl ./cmd/permctl
./permctl verify
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The best first candidate is rarely an entire application. Choose one compact rule with high consequence: authorization, pricing, quota enforcement, a state transition, or a protocol invariant. Make the intended behavior explicit, prove the property you care about, and keep the rest of the application in its existing language and architecture.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Which rule in your Go service would you formalize first: authorization, billing, quotas, or a state machine?&lt;/strong&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  References
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/shrsv/LeanPort" rel="noopener noreferrer"&gt;LeanPort: verified Lean 4 modules for Go&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://dl.acm.org/doi/10.1007/978-3-030-79876-5_37" rel="noopener noreferrer"&gt;Lean 4 as a theorem prover and programming language&lt;/a&gt; — Leonardo de Moura and Sebastian Ullrich, CADE 2021.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://dl.acm.org/doi/10.1145/1629575.1629596" rel="noopener noreferrer"&gt;The seL4 microkernel and machine-checked formal verification&lt;/a&gt; — Gerwin Klein et al., SOSP 2009.&lt;/li&gt;
&lt;/ul&gt;



&lt;p&gt;&lt;em&gt;&lt;br&gt;
Your team's attention is limited, and the deluge of AI-generated code is making it harder to keep production reliable and secure without slowing you down.&lt;/em&gt;&lt;/p&gt;
&lt;em&gt;

&lt;p&gt;I'm building &lt;strong&gt;LiveReview&lt;/strong&gt;, a blast-radius aware AI code review built for your business-critical systems.&lt;/p&gt;

&lt;p&gt;Instead of presenting every diff with equal emphasis, &lt;strong&gt;LiveReview scores each change by blast radius — how far its impact reaches through your call graph — so you can focus attention where it actually matters.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Spend code review effort where business risk is highest — not spread evenly across every diff.&lt;/p&gt;

&lt;p&gt;⭐ Star it on GitHub: &lt;br&gt;
&lt;/p&gt;
&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://assets.dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/HexmosTech" rel="noopener noreferrer"&gt;
        HexmosTech
      &lt;/a&gt; / &lt;a href="https://github.com/HexmosTech/LiveReview" rel="noopener noreferrer"&gt;
        LiveReview
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      Risk-Aware AI Code Review for Business-Critical Systems
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;&lt;p&gt;&lt;a rel="noopener noreferrer" href="https://github.com/HexmosTech/LiveReview/./assets/gfx/png/logo-with-text.png"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2FHexmosTech%2FLiveReview%2FHEAD%2F.%2Fassets%2Fgfx%2Fpng%2Flogo-with-text.png" alt="LiveReview" height="80"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/HexmosTech/LiveReview/actions/workflows/gitleaks.yml" rel="noopener noreferrer"&gt;&lt;img alt="gitleaks.yml" title="gitleaks.yml: Secret scanning workflow" src="https://github.com/HexmosTech/LiveReview/actions/workflows/gitleaks.yml/badge.svg"&gt;&lt;/a&gt;&amp;nbsp;&lt;a href="https://github.com/HexmosTech/LiveReview/actions/workflows/osv-scanner.yml" rel="noopener noreferrer"&gt;&lt;img alt="osv-scanner.yml" title="osv-scanner.yml: Dependency vulnerability scan" src="https://github.com/HexmosTech/LiveReview/actions/workflows/osv-scanner.yml/badge.svg"&gt;&lt;/a&gt;&amp;nbsp;&lt;a href="https://github.com/HexmosTech/LiveReview/actions/workflows/govulncheck.yml" rel="noopener noreferrer"&gt;&lt;img alt="govulncheck.yml" title="govulncheck.yml: Go vulnerability check" src="https://github.com/HexmosTech/LiveReview/actions/workflows/govulncheck.yml/badge.svg"&gt;&lt;/a&gt;&amp;nbsp;&lt;a href="https://github.com/HexmosTech/LiveReview/actions/workflows/semgrep.yml" rel="noopener noreferrer"&gt;&lt;img alt="semgrep.yml" title="semgrep.yml: Static analysis security scan" src="https://github.com/HexmosTech/LiveReview/actions/workflows/semgrep.yml/badge.svg"&gt;&lt;/a&gt;&amp;nbsp;&lt;a rel="noopener noreferrer" href="https://github.com/HexmosTech/LiveReview/./assets/gfx/dependabot-enabled.svg"&gt;&lt;img alt="dependabot-enabled" title="dependabot-enabled: Automated dependency updates are enabled" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2FHexmosTech%2FLiveReview%2FHEAD%2F.%2Fassets%2Fgfx%2Fdependabot-enabled.svg"&gt;&lt;/a&gt;&amp;nbsp;&lt;a href="https://github.com/HexmosTech/LiveReview/actions/workflows/mcp-testcases.yml" rel="noopener noreferrer"&gt;&lt;img alt="mcp-testcases.yml" title="mcp-testcases.yml: MCP integration test suite" src="https://github.com/HexmosTech/LiveReview/actions/workflows/mcp-testcases.yml/badge.svg"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;LiveReview: Risk-Aware AI Code Review for Business-Critical Systems&lt;/h1&gt;
&lt;/div&gt;

&lt;p&gt;LiveReview is built for engineering teams that ship often, but also care about keeping production stable for customers. It approves some 40-50% of low-risk changes automatically, and it gives your team the tools to handle the rest:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Understand risky changes faster.&lt;/li&gt;
&lt;li&gt;Fix problems in those changes, with human attention directed to the work that needs it.&lt;/li&gt;
&lt;li&gt;Enforce your engineering standards.&lt;/li&gt;
&lt;li&gt;Learn from production outcomes, such as incidents, rollbacks, and queue wait times.&lt;/li&gt;
&lt;li&gt;Improve the review process over time and make it more efficient.&lt;/li&gt;
&lt;li&gt;Connect to the major engineering tools that your team already uses.&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Auto-Approve: Ship the Safe 50% Without a Human&lt;/h2&gt;
&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Auto-Approve Upto 50% of Your Pull Requests, Safely.&lt;/strong&gt; Risk scoring decides which MRs/PRs are safe enough to ship without a human, so your team only spends review time on risky and critical changes.&lt;/p&gt;


  
    
    &lt;span class="m-1"&gt;demo.mp4&lt;/span&gt;
    
  

  

  


&lt;p&gt;&lt;i&gt;LiveReview auto-approving a low-risk change while&lt;/i&gt;…&lt;/p&gt;&lt;/div&gt;


&lt;/div&gt;
&lt;br&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/HexmosTech/LiveReview" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;br&gt;
&lt;/div&gt;
&lt;br&gt;


&lt;p&gt;&lt;b&gt;Click below to try LiveReview with your codebase:&lt;/b&gt;&lt;/p&gt;

&lt;/em&gt;&lt;p&gt;&lt;em&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://hexmos.com/livereview" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fvls0pq7nymbrll98je6s.png" alt="LiveReview Banner" width="800" height="240"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>webdev</category>
      <category>programming</category>
      <category>productivity</category>
    </item>
    <item>
      <title>Lean for Developers: Turn Program Requirements into Theorems</title>
      <dc:creator>Shrijith Venkatramana</dc:creator>
      <pubDate>Fri, 16 Oct 2026 19:59:46 +0000</pubDate>
      <link>https://dev.to/shrsv/lean-for-developers-turn-program-requirements-into-theorems-1npg</link>
      <guid>https://dev.to/shrsv/lean-for-developers-turn-program-requirements-into-theorems-1npg</guid>
      <description>&lt;p&gt;&lt;em&gt;Hello, I'm Shrijith Venkatramana, and I'm building LiveReview — a blast-radius aware AI code review built for your business-critical systems. &lt;a href="https://github.com/HexmosTech/LiveReview/" rel="noopener noreferrer"&gt;Star us&lt;/a&gt; to help devs discover the project, give it a try, and share your feedback to help improve the product.&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;A test suite can pass while a program still violates an invariant nobody thought to test.&lt;/p&gt;

&lt;p&gt;A counter exceeds its limit. A retry handler executes a payment twice. A pagination function silently skips records. A resource allocator assigns more capacity than the system has available.&lt;/p&gt;

&lt;p&gt;These bugs often survive because tests examine particular executions while requirements describe what must hold across many possible executions.&lt;/p&gt;

&lt;p&gt;What if you could express a requirement as a mathematical proposition, implement the behavior, and ask a computer to verify that your implementation satisfies that proposition?&lt;/p&gt;

&lt;p&gt;That is the idea behind &lt;strong&gt;Lean&lt;/strong&gt;, a programming language and interactive theorem prover. Lean lets developers define functions, express their properties mathematically, and construct machine-checked proofs about those properties.&lt;/p&gt;

&lt;p&gt;You do not need to formalize an entire application to use it. Start with one function, one invariant, and one proof.&lt;/p&gt;

&lt;h2&gt;
  
  
  Tests check examples; specifications define obligations
&lt;/h2&gt;

&lt;p&gt;Consider a function that increments a counter without allowing it to exceed a configured limit.&lt;/p&gt;

&lt;p&gt;An ordinary test suite might cover these cases:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The counter increases when it is below the limit.&lt;/li&gt;
&lt;li&gt;The counter stays at the limit when it reaches the limit.&lt;/li&gt;
&lt;li&gt;The counter does not exceed the limit when given an unexpectedly large input.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These are useful tests. But suppose the function accepts integers in a large domain. How many inputs should you test? Ten? A thousand? A million?&lt;/p&gt;

&lt;p&gt;For a function over unbounded mathematical integers, exhaustive enumeration is impossible.&lt;/p&gt;

&lt;p&gt;Property-based testing improves coverage by generating many inputs and checking general properties. Formal verification takes a different approach: it attempts to establish a property for every input in the mathematical domain described by the specification.&lt;/p&gt;

&lt;p&gt;The distinction is between testing selected executions and proving a proposition about all executions represented by a model.&lt;/p&gt;

&lt;p&gt;This approach has a long history. In 1969, computer scientist C. A. R. Hoare published &lt;em&gt;An Axiomatic Basis for Computer Programming&lt;/em&gt;, helping establish a systematic foundation for reasoning about program correctness.&lt;/p&gt;

&lt;p&gt;One of the central ideas associated with this work is the Hoare triple:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;{P} C {Q}&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Here, &lt;code&gt;P&lt;/code&gt; is a precondition, &lt;code&gt;C&lt;/code&gt; is a command, and &lt;code&gt;Q&lt;/code&gt; is a postcondition.&lt;/p&gt;

&lt;p&gt;Read it as: if &lt;code&gt;P&lt;/code&gt; holds before executing &lt;code&gt;C&lt;/code&gt;, then a terminating execution of &lt;code&gt;C&lt;/code&gt; establishes &lt;code&gt;Q&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;For our counter, we might write:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;{current &amp;lt; limit} increment(current) {result = current + 1}&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;This describes the increment behavior when the counter is below the limit. It does not specify the other cases, such as what happens when the counter has already reached its limit.&lt;/p&gt;

&lt;p&gt;A complete specification must cover those cases as well.&lt;/p&gt;

&lt;p&gt;Lean provides a language in which we can represent these requirements precisely and have a proof checker verify the resulting arguments.&lt;/p&gt;

&lt;h2&gt;
  
  
  Translate the requirement into a mathematical contract
&lt;/h2&gt;

&lt;p&gt;Let's begin with three requirements:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The result must never exceed the limit.&lt;/li&gt;
&lt;li&gt;When the current counter is below the limit, increment it by one.&lt;/li&gt;
&lt;li&gt;When the current counter is at or above the limit, return the limit.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;We can express the implementation in Lean:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight lean"&gt;&lt;code&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="n"&gt;boundedInc&lt;/span&gt; (&lt;span class="n"&gt;limit&lt;/span&gt; &lt;span class="n"&gt;current&lt;/span&gt; : &lt;span class="n"&gt;Nat&lt;/span&gt;) : &lt;span class="n"&gt;Nat&lt;/span&gt; :=
  &lt;span class="n"&gt;if&lt;/span&gt; &lt;span class="n"&gt;current&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="n"&gt;limit&lt;/span&gt; &lt;span class="n"&gt;then&lt;/span&gt; &lt;span class="n"&gt;current&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="n"&gt;else&lt;/span&gt; &lt;span class="n"&gt;limit&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;A few details matter here.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Nat&lt;/code&gt; is Lean's type of natural numbers: &lt;code&gt;0&lt;/code&gt;, &lt;code&gt;1&lt;/code&gt;, &lt;code&gt;2&lt;/code&gt;, and so on. The function receives two natural numbers and returns another natural number.&lt;/p&gt;

&lt;p&gt;The expression &lt;code&gt;if current &amp;lt; limit then ... else ...&lt;/code&gt; selects one of two branches, depending on the comparison.&lt;/p&gt;

&lt;p&gt;Now let's specify the required behavior independently of the implementation.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight lean"&gt;&lt;code&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="n"&gt;BoundedIncSpec&lt;/span&gt; (&lt;span class="n"&gt;limit&lt;/span&gt; &lt;span class="n"&gt;current&lt;/span&gt; &lt;span class="n"&gt;result&lt;/span&gt; : &lt;span class="n"&gt;Nat&lt;/span&gt;) : &lt;span class="kt"&gt;Prop&lt;/span&gt; :=
  &lt;span class="n"&gt;result&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="n"&gt;limit&lt;/span&gt; &lt;span class="o"&gt;∧&lt;/span&gt;
  (&lt;span class="n"&gt;current&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="n"&gt;limit&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;current&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;) &lt;span class="o"&gt;∧&lt;/span&gt;
  (&lt;span class="n"&gt;limit&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="n"&gt;current&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;limit&lt;/span&gt;)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;This definition introduces three obligations.&lt;/p&gt;

&lt;p&gt;The expression &lt;code&gt;result &amp;lt;= limit&lt;/code&gt; says that the result must stay within the limit.&lt;/p&gt;

&lt;p&gt;The symbol &lt;code&gt;∧&lt;/code&gt; means logical AND: both propositions must hold.&lt;/p&gt;

&lt;p&gt;The expression &lt;code&gt;P -&amp;gt; Q&lt;/code&gt; means that if proposition &lt;code&gt;P&lt;/code&gt; holds, proposition &lt;code&gt;Q&lt;/code&gt; must follow.&lt;/p&gt;

&lt;p&gt;Finally, &lt;code&gt;Prop&lt;/code&gt; is Lean's type of propositions. The definition &lt;code&gt;BoundedIncSpec&lt;/code&gt; describes a proposition about the relationship between the inputs and the result.&lt;/p&gt;

&lt;p&gt;Notice that &lt;code&gt;result&lt;/code&gt; is an independent parameter. We have described what constitutes a correct result without assuming how the result is calculated.&lt;/p&gt;

&lt;p&gt;This separation matters. The same specification could be satisfied by different implementations: a conditional expression, a library function, or a more complicated implementation optimized for a particular environment.&lt;/p&gt;

&lt;p&gt;A specification describes the obligation. An implementation supplies the mechanism.&lt;/p&gt;

&lt;p&gt;One subtlety deserves attention: our specification is deliberately tailored to natural numbers and the stated requirements. It does not say that the function must preserve information about how far an input exceeded the limit. That is intentional. Formal specification forces us to distinguish essential requirements from incidental implementation details.&lt;/p&gt;
&lt;h2&gt;
  
  
  Prove that the implementation satisfies the contract
&lt;/h2&gt;

&lt;p&gt;We now have a function and a specification. Can Lean establish that the function satisfies the specification for every possible pair of natural numbers?&lt;/p&gt;

&lt;p&gt;Here is a complete example for a Lean project using Mathlib, Lean's mathematical library.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight lean"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="n"&gt;Mathlib&lt;/span&gt;

&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="n"&gt;boundedInc&lt;/span&gt; (&lt;span class="n"&gt;limit&lt;/span&gt; &lt;span class="n"&gt;current&lt;/span&gt; : &lt;span class="n"&gt;Nat&lt;/span&gt;) : &lt;span class="n"&gt;Nat&lt;/span&gt; :=
  &lt;span class="n"&gt;if&lt;/span&gt; &lt;span class="n"&gt;current&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="n"&gt;limit&lt;/span&gt; &lt;span class="n"&gt;then&lt;/span&gt; &lt;span class="n"&gt;current&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="n"&gt;else&lt;/span&gt; &lt;span class="n"&gt;limit&lt;/span&gt;

&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="n"&gt;BoundedIncSpec&lt;/span&gt; (&lt;span class="n"&gt;limit&lt;/span&gt; &lt;span class="n"&gt;current&lt;/span&gt; &lt;span class="n"&gt;result&lt;/span&gt; : &lt;span class="n"&gt;Nat&lt;/span&gt;) : &lt;span class="kt"&gt;Prop&lt;/span&gt; :=
  &lt;span class="n"&gt;result&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="n"&gt;limit&lt;/span&gt; &lt;span class="o"&gt;∧&lt;/span&gt;
  (&lt;span class="n"&gt;current&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="n"&gt;limit&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;current&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;) &lt;span class="o"&gt;∧&lt;/span&gt;
  (&lt;span class="n"&gt;limit&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="n"&gt;current&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;limit&lt;/span&gt;)

&lt;span class="k"&gt;theorem&lt;/span&gt; &lt;span class="n"&gt;boundedInc_le_limit&lt;/span&gt; (&lt;span class="n"&gt;limit&lt;/span&gt; &lt;span class="n"&gt;current&lt;/span&gt; : &lt;span class="n"&gt;Nat&lt;/span&gt;) :
    &lt;span class="n"&gt;boundedInc&lt;/span&gt; &lt;span class="n"&gt;limit&lt;/span&gt; &lt;span class="n"&gt;current&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="n"&gt;limit&lt;/span&gt; := &lt;span class="k"&gt;by&lt;/span&gt;
  &lt;span class="n"&gt;unfold&lt;/span&gt; &lt;span class="n"&gt;boundedInc&lt;/span&gt;
  &lt;span class="n"&gt;split_ifs&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;omega&lt;/span&gt;

&lt;span class="k"&gt;theorem&lt;/span&gt; &lt;span class="n"&gt;boundedInc_eq_succ&lt;/span&gt; (&lt;span class="n"&gt;limit&lt;/span&gt; &lt;span class="n"&gt;current&lt;/span&gt; : &lt;span class="n"&gt;Nat&lt;/span&gt;)
    (&lt;span class="n"&gt;h&lt;/span&gt; : &lt;span class="n"&gt;current&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="n"&gt;limit&lt;/span&gt;) :
    &lt;span class="n"&gt;boundedInc&lt;/span&gt; &lt;span class="n"&gt;limit&lt;/span&gt; &lt;span class="n"&gt;current&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;current&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt; := &lt;span class="k"&gt;by&lt;/span&gt;
  &lt;span class="n"&gt;simp&lt;/span&gt; [&lt;span class="n"&gt;boundedInc&lt;/span&gt;, &lt;span class="n"&gt;h&lt;/span&gt;]

&lt;span class="k"&gt;theorem&lt;/span&gt; &lt;span class="n"&gt;boundedInc_eq_limit&lt;/span&gt; (&lt;span class="n"&gt;limit&lt;/span&gt; &lt;span class="n"&gt;current&lt;/span&gt; : &lt;span class="n"&gt;Nat&lt;/span&gt;)
    (&lt;span class="n"&gt;h&lt;/span&gt; : &lt;span class="n"&gt;limit&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="n"&gt;current&lt;/span&gt;) :
    &lt;span class="n"&gt;boundedInc&lt;/span&gt; &lt;span class="n"&gt;limit&lt;/span&gt; &lt;span class="n"&gt;current&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;limit&lt;/span&gt; := &lt;span class="k"&gt;by&lt;/span&gt;
  &lt;span class="k"&gt;have&lt;/span&gt; &lt;span class="n"&gt;h&lt;/span&gt;&lt;span class="err"&gt;'&lt;/span&gt; : &lt;span class="o"&gt;¬&lt;/span&gt; &lt;span class="n"&gt;current&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="n"&gt;limit&lt;/span&gt; := &lt;span class="k"&gt;by&lt;/span&gt; &lt;span class="n"&gt;omega&lt;/span&gt;
  &lt;span class="n"&gt;simp&lt;/span&gt; [&lt;span class="n"&gt;boundedInc&lt;/span&gt;, &lt;span class="n"&gt;h&lt;/span&gt;&lt;span class="err"&gt;'&lt;/span&gt;]

&lt;span class="k"&gt;theorem&lt;/span&gt; &lt;span class="n"&gt;boundedInc_correct&lt;/span&gt; (&lt;span class="n"&gt;limit&lt;/span&gt; &lt;span class="n"&gt;current&lt;/span&gt; : &lt;span class="n"&gt;Nat&lt;/span&gt;) :
    &lt;span class="n"&gt;BoundedIncSpec&lt;/span&gt; &lt;span class="n"&gt;limit&lt;/span&gt; &lt;span class="n"&gt;current&lt;/span&gt; (&lt;span class="n"&gt;boundedInc&lt;/span&gt; &lt;span class="n"&gt;limit&lt;/span&gt; &lt;span class="n"&gt;current&lt;/span&gt;) := &lt;span class="k"&gt;by&lt;/span&gt;
  &lt;span class="n"&gt;unfold&lt;/span&gt; &lt;span class="n"&gt;BoundedIncSpec&lt;/span&gt;
  &lt;span class="n"&gt;constructor&lt;/span&gt;
  &lt;span class="err"&gt;·&lt;/span&gt; &lt;span class="n"&gt;exact&lt;/span&gt; &lt;span class="n"&gt;boundedInc_le_limit&lt;/span&gt; &lt;span class="n"&gt;limit&lt;/span&gt; &lt;span class="n"&gt;current&lt;/span&gt;
  &lt;span class="n"&gt;constructor&lt;/span&gt;
  &lt;span class="err"&gt;·&lt;/span&gt; &lt;span class="n"&gt;intro&lt;/span&gt; &lt;span class="n"&gt;h&lt;/span&gt;
    &lt;span class="n"&gt;exact&lt;/span&gt; &lt;span class="n"&gt;boundedInc_eq_succ&lt;/span&gt; &lt;span class="n"&gt;limit&lt;/span&gt; &lt;span class="n"&gt;current&lt;/span&gt; &lt;span class="n"&gt;h&lt;/span&gt;
  &lt;span class="err"&gt;·&lt;/span&gt; &lt;span class="n"&gt;intro&lt;/span&gt; &lt;span class="n"&gt;h&lt;/span&gt;
    &lt;span class="n"&gt;exact&lt;/span&gt; &lt;span class="n"&gt;boundedInc_eq_limit&lt;/span&gt; &lt;span class="n"&gt;limit&lt;/span&gt; &lt;span class="n"&gt;current&lt;/span&gt; &lt;span class="n"&gt;h&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The main result is the final theorem:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight lean"&gt;&lt;code&gt;&lt;span class="k"&gt;theorem&lt;/span&gt; &lt;span class="n"&gt;boundedInc_correct&lt;/span&gt; (&lt;span class="n"&gt;limit&lt;/span&gt; &lt;span class="n"&gt;current&lt;/span&gt; : &lt;span class="n"&gt;Nat&lt;/span&gt;) :
    &lt;span class="n"&gt;BoundedIncSpec&lt;/span&gt; &lt;span class="n"&gt;limit&lt;/span&gt; &lt;span class="n"&gt;current&lt;/span&gt; (&lt;span class="n"&gt;boundedInc&lt;/span&gt; &lt;span class="n"&gt;limit&lt;/span&gt; &lt;span class="n"&gt;current&lt;/span&gt;)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;It says that for every natural-number limit and every natural-number counter value, the result of &lt;code&gt;boundedInc&lt;/code&gt; satisfies the specification.&lt;/p&gt;

&lt;p&gt;There is no finite test set here. The theorem covers the entire declared input domain.&lt;/p&gt;

&lt;p&gt;How does the proof work?&lt;/p&gt;

&lt;p&gt;First, &lt;code&gt;boundedInc_le_limit&lt;/code&gt; establishes that the result never exceeds the limit. The &lt;code&gt;unfold&lt;/code&gt; tactic exposes the function definition. &lt;code&gt;split_ifs&lt;/code&gt; separates the two branches of the conditional, and &lt;code&gt;omega&lt;/code&gt; solves the resulting natural-number arithmetic obligations.&lt;/p&gt;

&lt;p&gt;Next, &lt;code&gt;boundedInc_eq_succ&lt;/code&gt; proves the increment behavior under its precondition. The &lt;code&gt;simp&lt;/code&gt; tactic simplifies the conditional using the supplied hypothesis.&lt;/p&gt;

&lt;p&gt;Then, &lt;code&gt;boundedInc_eq_limit&lt;/code&gt; proves the other branch. Given that the limit is less than or equal to the current value, &lt;code&gt;omega&lt;/code&gt; establishes that the condition &lt;code&gt;current &amp;lt; limit&lt;/code&gt; cannot hold.&lt;/p&gt;

&lt;p&gt;Finally, &lt;code&gt;boundedInc_correct&lt;/code&gt; combines these three results. The &lt;code&gt;constructor&lt;/code&gt; tactic decomposes the conjunction into its component obligations. Each obligation is discharged by one of the preceding theorems.&lt;/p&gt;

&lt;p&gt;The keyword &lt;code&gt;by&lt;/code&gt; introduces a proof constructed using tactics. Lean checks that the resulting proof establishes the stated proposition.&lt;/p&gt;

&lt;p&gt;The tactics are convenient ways of constructing proofs; they are not substitutes for proof checking. Lean's trusted kernel checks the resulting proof terms.&lt;/p&gt;

&lt;p&gt;The distinction is fundamental: the machine is not merely accepting a developer's assertion that the function is correct. It checks a formal argument that the implementation satisfies the proposition.&lt;/p&gt;
&lt;h2&gt;
  
  
  Understand exactly what the proof establishes
&lt;/h2&gt;

&lt;p&gt;It is tempting to interpret a verified function as a guarantee that the corresponding production feature cannot fail. That conclusion would be too broad.&lt;/p&gt;

&lt;p&gt;Our theorem proves a property of a mathematical function over natural numbers. It does not prove that a production implementation using a 32-bit integer behaves identically.&lt;/p&gt;

&lt;p&gt;A 32-bit unsigned integer has a finite representable range. Depending on the language and implementation, arithmetic near the boundary may wrap, trap, or follow other specified behavior. Lean's &lt;code&gt;Nat&lt;/code&gt; does not impose that machine-level limit.&lt;/p&gt;

&lt;p&gt;To verify the production version, we would need a model that represents the relevant integer bounds and behavior, then establish the corresponding properties of that model and the implementation.&lt;/p&gt;

&lt;p&gt;The same distinction applies to external systems. A proof about an authorization function does not automatically prove that a database transaction commits atomically, that a remote identity provider returns trustworthy data, or that a network retry cannot duplicate an external side effect.&lt;/p&gt;

&lt;p&gt;Those are separate obligations.&lt;/p&gt;

&lt;p&gt;A useful verification project therefore makes its assumptions and boundaries explicit.&lt;/p&gt;

&lt;p&gt;What does the function assume about its inputs? Which properties are established by the proof? Which properties depend on the runtime, compiler, database, or external services?&lt;/p&gt;

&lt;p&gt;These questions are not peripheral details. They determine what assurance the proof actually provides.&lt;/p&gt;

&lt;p&gt;Lean's architecture helps with this distinction. The language combines programming and theorem proving within a type-theoretic framework, and its kernel checks proof terms produced with the help of tactics.&lt;/p&gt;

&lt;p&gt;That design allows developers to use automation without treating the automation itself as the ultimate authority on correctness.&lt;/p&gt;

&lt;p&gt;There is another limitation worth understanding: &lt;strong&gt;a formally verified implementation can satisfy an incorrect specification perfectly.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Suppose the business requirement says a customer must never withdraw more than their available balance. A developer mistakenly specifies that a withdrawal must never exceed the original balance at account creation. Lean might help prove the latter property, but it would not establish that the business requirement had been captured correctly.&lt;/p&gt;

&lt;p&gt;Formal verification reduces ambiguity in the specification and provides evidence about its implementation. Human judgment remains necessary to determine whether the specification describes the system we actually want.&lt;/p&gt;
&lt;h2&gt;
  
  
  Move from function contracts to state invariants
&lt;/h2&gt;

&lt;p&gt;Many important software properties concern not just the output of a function, but how a system's state changes over time.&lt;/p&gt;

&lt;p&gt;Consider inventory management.&lt;/p&gt;

&lt;p&gt;An application tracks how many units of a product are available and how many have been reserved. When a customer places an order, the system must transfer units from available inventory to reserved inventory.&lt;/p&gt;

&lt;p&gt;Two requirements are immediate:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A reservation must not consume more units than are available.&lt;/li&gt;
&lt;li&gt;A successful reservation must conserve the total number of tracked units.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;We can represent the state as a structure:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight lean"&gt;&lt;code&gt;&lt;span class="n"&gt;structure&lt;/span&gt; &lt;span class="n"&gt;Inventory&lt;/span&gt; &lt;span class="n"&gt;where&lt;/span&gt;
  &lt;span class="n"&gt;available&lt;/span&gt; : &lt;span class="n"&gt;Nat&lt;/span&gt;
  &lt;span class="n"&gt;reserved&lt;/span&gt; : &lt;span class="n"&gt;Nat&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The first field counts available units; the second counts reserved units.&lt;/p&gt;

&lt;p&gt;Next, define the reservation operation. If sufficient inventory exists, it returns the updated state. Otherwise, it fails.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight lean"&gt;&lt;code&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="n"&gt;reserve&lt;/span&gt; (&lt;span class="n"&gt;i&lt;/span&gt; : &lt;span class="n"&gt;Inventory&lt;/span&gt;) (&lt;span class="n"&gt;qty&lt;/span&gt; : &lt;span class="n"&gt;Nat&lt;/span&gt;) : &lt;span class="n"&gt;Option&lt;/span&gt; &lt;span class="n"&gt;Inventory&lt;/span&gt; :=
  &lt;span class="n"&gt;if&lt;/span&gt; &lt;span class="n"&gt;qty&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;available&lt;/span&gt; &lt;span class="n"&gt;then&lt;/span&gt;
    &lt;span class="n"&gt;some&lt;/span&gt; &lt;span class="err"&gt;{&lt;/span&gt;
      &lt;span class="n"&gt;available&lt;/span&gt; := &lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;available&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;qty&lt;/span&gt;
      &lt;span class="n"&gt;reserved&lt;/span&gt; := &lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;reserved&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;qty&lt;/span&gt;
    &lt;span class="err"&gt;}&lt;/span&gt;
  &lt;span class="n"&gt;else&lt;/span&gt;
    &lt;span class="n"&gt;none&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;&lt;code&gt;Option Inventory&lt;/code&gt; represents either a successful result (&lt;code&gt;some updatedInventory&lt;/code&gt;) or failure (&lt;code&gt;none&lt;/code&gt;).&lt;/p&gt;

&lt;p&gt;The operation subtracts the requested quantity from the available inventory and adds it to the reserved inventory. It performs no update when the requested quantity is too large.&lt;/p&gt;

&lt;p&gt;Now we can express a useful invariant: whenever the operation succeeds, the sum of available and reserved inventory remains unchanged.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight lean"&gt;&lt;code&gt;&lt;span class="k"&gt;theorem&lt;/span&gt; &lt;span class="n"&gt;reserve_preserves_total&lt;/span&gt;
    (&lt;span class="n"&gt;i&lt;/span&gt; : &lt;span class="n"&gt;Inventory&lt;/span&gt;) (&lt;span class="n"&gt;qty&lt;/span&gt; : &lt;span class="n"&gt;Nat&lt;/span&gt;) (&lt;span class="n"&gt;next&lt;/span&gt; : &lt;span class="n"&gt;Inventory&lt;/span&gt;)
    (&lt;span class="n"&gt;h&lt;/span&gt; : &lt;span class="n"&gt;reserve&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="n"&gt;qty&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;some&lt;/span&gt; &lt;span class="n"&gt;next&lt;/span&gt;) :
    &lt;span class="n"&gt;next&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;available&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;next&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;reserved&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt;
      &lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;available&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;reserved&lt;/span&gt; := &lt;span class="k"&gt;by&lt;/span&gt;
  &lt;span class="n"&gt;unfold&lt;/span&gt; &lt;span class="n"&gt;reserve&lt;/span&gt; &lt;span class="n"&gt;at&lt;/span&gt; &lt;span class="n"&gt;h&lt;/span&gt;
  &lt;span class="n"&gt;split_ifs&lt;/span&gt; &lt;span class="n"&gt;at&lt;/span&gt; &lt;span class="n"&gt;h&lt;/span&gt; &lt;span class="k"&gt;with&lt;/span&gt; &lt;span class="n"&gt;hEnough&lt;/span&gt;
  &lt;span class="err"&gt;·&lt;/span&gt; &lt;span class="n"&gt;injection&lt;/span&gt; &lt;span class="n"&gt;h&lt;/span&gt; &lt;span class="k"&gt;with&lt;/span&gt; &lt;span class="n"&gt;hNext&lt;/span&gt;
    &lt;span class="n"&gt;cases&lt;/span&gt; &lt;span class="n"&gt;hNext&lt;/span&gt;
    &lt;span class="n"&gt;simp&lt;/span&gt;
    &lt;span class="n"&gt;omega&lt;/span&gt;
  &lt;span class="err"&gt;·&lt;/span&gt; &lt;span class="n"&gt;simp&lt;/span&gt; &lt;span class="n"&gt;at&lt;/span&gt; &lt;span class="n"&gt;h&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The theorem does not merely test a reservation of three units or ten units. It covers every natural-number inventory state and every requested quantity. It says that if the operation returns a successful result, the total tracked inventory is conserved.&lt;/p&gt;

&lt;p&gt;The key assumption is that the result of &lt;code&gt;reserve&lt;/code&gt; equals &lt;code&gt;some next&lt;/code&gt;. In the successful branch, Lean can use that equality to identify the returned state with the state constructed by the implementation. The arithmetic proof then follows from the condition that the requested quantity did not exceed the available inventory.&lt;/p&gt;

&lt;p&gt;This example demonstrates why it is useful to think in terms of invariants.&lt;/p&gt;

&lt;p&gt;A state invariant is a property that should remain true across permitted state transitions. Examples include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The sum of reserved and available resources remains constant.&lt;/li&gt;
&lt;li&gt;A financial balance never becomes negative.&lt;/li&gt;
&lt;li&gt;A completed order cannot return to the pending state.&lt;/li&gt;
&lt;li&gt;A user cannot gain permissions through an unauthorized transition.&lt;/li&gt;
&lt;li&gt;A distributed protocol never reaches a forbidden combination of states, under its formal assumptions.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In production, inventory correctness involves additional concerns such as database transactions, concurrent reservations, inventory adjustments, and retries. The theorem above proves only a property of the modeled operation. It does not establish that a real database-backed application implements that operation atomically.&lt;/p&gt;

&lt;p&gt;Even so, the proof provides a precise foundation around which to build the rest of the verification effort.&lt;/p&gt;

&lt;p&gt;This is a useful pattern for developers: isolate the state transition, write down what must remain true, and prove that each permitted transition preserves the invariant. For a system with many transitions, the proof structure can follow the design of the system itself.&lt;/p&gt;
&lt;h2&gt;
  
  
  Integrate specification into the development workflow
&lt;/h2&gt;

&lt;p&gt;A proof is most useful when it is part of the regular engineering process rather than an isolated research exercise.&lt;/p&gt;

&lt;p&gt;One workable process looks like this:&lt;/p&gt;

&lt;p&gt;:::mermaid&lt;br&gt;
flowchart TD&lt;br&gt;
    A["Write the requirement"] --&amp;gt; B["Define the model and contract"]&lt;br&gt;
    B --&amp;gt; C["Implement the function"]&lt;br&gt;
    C --&amp;gt; D["Prove the contract"]&lt;br&gt;
    D --&amp;gt; E{"Does Lean accept the proof?"}&lt;br&gt;
    E --&amp;gt;|No| F["Review the code, proof, and specification"]&lt;br&gt;
    F --&amp;gt; D&lt;br&gt;
    E --&amp;gt;|Yes| G["Review assumptions and system boundaries"]&lt;br&gt;
    G --&amp;gt; H["Run tests and verification in CI"]&lt;br&gt;
:::&lt;/p&gt;

&lt;p&gt;Start with a pure function: a function whose output depends only on its inputs and that has no external side effects. Pure functions are easier to specify because their behavior can be described without modeling a database, network connection, clock, or mutable environment.&lt;/p&gt;

&lt;p&gt;For an existing application, identify a calculation or state transition and separate it from the surrounding I/O where practical. Define its inputs, outputs, and invariants in Lean. Prove the desired properties and keep those definitions and proofs alongside the implementation.&lt;/p&gt;

&lt;p&gt;Then add the relevant build and verification commands to continuous integration. If a code change makes a theorem unprovable, the verification build should fail.&lt;/p&gt;

&lt;p&gt;This is valuable because it turns an invariant into an explicit engineering constraint. Instead of relying on every future developer to remember why a particular condition matters, the team maintains a checked proposition that must continue to hold.&lt;/p&gt;

&lt;p&gt;Formalization can also improve code review. A reviewer can examine the specification independently of the implementation and ask whether it captures the intended behavior. A second review can focus on the proof and its assumptions.&lt;/p&gt;

&lt;p&gt;The separation makes two different questions visible:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Are we implementing the right requirement?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Does the implementation satisfy that requirement?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Those questions are related, but they are not interchangeable.&lt;/p&gt;

&lt;p&gt;Testing remains part of this workflow. Unit tests exercise concrete examples, integration tests examine interactions with dependencies, and operational monitoring reveals behavior in the deployed environment. Lean contributes another form of evidence: a proof about the modeled properties of the code.&lt;/p&gt;

&lt;p&gt;A practical adoption strategy is to begin with one small component, integrate its proof into the build, and expand only when the approach proves useful to the team.&lt;/p&gt;
&lt;h2&gt;
  
  
  Start with one invariant
&lt;/h2&gt;

&lt;p&gt;The most effective first Lean project is probably not a complete application or an attempt to verify every line of an existing codebase.&lt;/p&gt;

&lt;p&gt;Choose a function with a meaningful invariant: a bounded counter, a pagination helper, a resource allocator, a validation routine, or a state transition. State the requirement precisely, encode the implementation, and prove that the implementation satisfies it.&lt;/p&gt;

&lt;p&gt;The broader idea has been around since the foundations of program logic. Lean makes this style of reasoning available in a modern programming environment, bringing together executable definitions, mathematical propositions, proof automation, and machine-checked proofs.&lt;/p&gt;

&lt;p&gt;The shift is from documenting what code is supposed to do to encoding a requirement that a machine can check against a formal model of the implementation.&lt;/p&gt;

&lt;p&gt;The scope of the guarantee depends on the quality of the specification and the boundary of the model. That makes choosing the right invariant an important engineering task in its own right.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Which invariant in your codebase would be most valuable to turn into a machine-checked theorem?&lt;/strong&gt;&lt;/p&gt;



&lt;p&gt;&lt;em&gt;&lt;br&gt;
Your team's attention is limited, and the deluge of AI-generated code is making it harder to keep production reliable and secure without slowing you down.&lt;/em&gt;&lt;/p&gt;
&lt;em&gt;

&lt;p&gt;I'm building &lt;strong&gt;LiveReview&lt;/strong&gt;, a blast-radius aware AI code review built for your business-critical systems.&lt;/p&gt;

&lt;p&gt;Instead of presenting every diff with equal emphasis, &lt;strong&gt;LiveReview scores each change by blast radius — how far its impact reaches through your call graph — so you can focus attention where it actually matters.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Spend code review effort where business risk is highest — not spread evenly across every diff.&lt;/p&gt;

&lt;p&gt;⭐ Star it on GitHub: &lt;br&gt;
&lt;/p&gt;
&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://assets.dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/HexmosTech" rel="noopener noreferrer"&gt;
        HexmosTech
      &lt;/a&gt; / &lt;a href="https://github.com/HexmosTech/LiveReview" rel="noopener noreferrer"&gt;
        LiveReview
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      Risk-Aware AI Code Review for Business-Critical Systems
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;&lt;p&gt;&lt;a rel="noopener noreferrer" href="https://github.com/HexmosTech/LiveReview/./assets/gfx/png/logo-with-text.png"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2FHexmosTech%2FLiveReview%2FHEAD%2F.%2Fassets%2Fgfx%2Fpng%2Flogo-with-text.png" alt="LiveReview" height="80"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/HexmosTech/LiveReview/actions/workflows/gitleaks.yml" rel="noopener noreferrer"&gt;&lt;img alt="gitleaks.yml" title="gitleaks.yml: Secret scanning workflow" src="https://github.com/HexmosTech/LiveReview/actions/workflows/gitleaks.yml/badge.svg"&gt;&lt;/a&gt;&amp;nbsp;&lt;a href="https://github.com/HexmosTech/LiveReview/actions/workflows/osv-scanner.yml" rel="noopener noreferrer"&gt;&lt;img alt="osv-scanner.yml" title="osv-scanner.yml: Dependency vulnerability scan" src="https://github.com/HexmosTech/LiveReview/actions/workflows/osv-scanner.yml/badge.svg"&gt;&lt;/a&gt;&amp;nbsp;&lt;a href="https://github.com/HexmosTech/LiveReview/actions/workflows/govulncheck.yml" rel="noopener noreferrer"&gt;&lt;img alt="govulncheck.yml" title="govulncheck.yml: Go vulnerability check" src="https://github.com/HexmosTech/LiveReview/actions/workflows/govulncheck.yml/badge.svg"&gt;&lt;/a&gt;&amp;nbsp;&lt;a href="https://github.com/HexmosTech/LiveReview/actions/workflows/semgrep.yml" rel="noopener noreferrer"&gt;&lt;img alt="semgrep.yml" title="semgrep.yml: Static analysis security scan" src="https://github.com/HexmosTech/LiveReview/actions/workflows/semgrep.yml/badge.svg"&gt;&lt;/a&gt;&amp;nbsp;&lt;a rel="noopener noreferrer" href="https://github.com/HexmosTech/LiveReview/./assets/gfx/dependabot-enabled.svg"&gt;&lt;img alt="dependabot-enabled" title="dependabot-enabled: Automated dependency updates are enabled" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2FHexmosTech%2FLiveReview%2FHEAD%2F.%2Fassets%2Fgfx%2Fdependabot-enabled.svg"&gt;&lt;/a&gt;&amp;nbsp;&lt;a href="https://github.com/HexmosTech/LiveReview/actions/workflows/mcp-testcases.yml" rel="noopener noreferrer"&gt;&lt;img alt="mcp-testcases.yml" title="mcp-testcases.yml: MCP integration test suite" src="https://github.com/HexmosTech/LiveReview/actions/workflows/mcp-testcases.yml/badge.svg"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;LiveReview: Risk-Aware AI Code Review for Business-Critical Systems&lt;/h1&gt;
&lt;/div&gt;

&lt;p&gt;LiveReview is built for engineering teams that ship often, but also care about keeping production stable for customers. It approves some 40-50% of low-risk changes automatically, and it gives your team the tools to handle the rest:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Understand risky changes faster.&lt;/li&gt;
&lt;li&gt;Fix problems in those changes, with human attention directed to the work that needs it.&lt;/li&gt;
&lt;li&gt;Enforce your engineering standards.&lt;/li&gt;
&lt;li&gt;Learn from production outcomes, such as incidents, rollbacks, and queue wait times.&lt;/li&gt;
&lt;li&gt;Improve the review process over time and make it more efficient.&lt;/li&gt;
&lt;li&gt;Connect to the major engineering tools that your team already uses.&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Auto-Approve: Ship the Safe 50% Without a Human&lt;/h2&gt;
&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Auto-Approve Upto 50% of Your Pull Requests, Safely.&lt;/strong&gt; Risk scoring decides which MRs/PRs are safe enough to ship without a human, so your team only spends review time on risky and critical changes.&lt;/p&gt;


  
    
    &lt;span class="m-1"&gt;demo.mp4&lt;/span&gt;
    
  

  

  


&lt;p&gt;&lt;i&gt;LiveReview auto-approving a low-risk change while&lt;/i&gt;…&lt;/p&gt;&lt;/div&gt;


&lt;/div&gt;
&lt;br&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/HexmosTech/LiveReview" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;br&gt;
&lt;/div&gt;
&lt;br&gt;


&lt;p&gt;&lt;b&gt;Click below to try LiveReview with your codebase:&lt;/b&gt;&lt;/p&gt;

&lt;/em&gt;&lt;p&gt;&lt;em&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://hexmos.com/livereview" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fvls0pq7nymbrll98je6s.png" alt="LiveReview Banner" width="800" height="240"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>webdev</category>
      <category>programming</category>
      <category>productivity</category>
    </item>
    <item>
      <title>How Meta Reduced Code Review Load While Maintaining Production Reliability</title>
      <dc:creator>Shrijith Venkatramana</dc:creator>
      <pubDate>Sun, 11 Oct 2026 18:44:20 +0000</pubDate>
      <link>https://dev.to/shrsv/how-meta-reduced-code-review-load-while-maintaining-production-reliability-4kcj</link>
      <guid>https://dev.to/shrsv/how-meta-reduced-code-review-load-while-maintaining-production-reliability-4kcj</guid>
      <description>&lt;p&gt;&lt;em&gt;Hello, I'm Shrijith Venkatramana, and I'm building LiveReview — a blast-radius aware AI code review built for your business-critical systems. &lt;a href="https://github.com/HexmosTech/LiveReview/" rel="noopener noreferrer"&gt;Star us&lt;/a&gt; to help devs discover the project, give it a try, and share your feedback to help improve the product.&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;AI coding agents have created a peculiar problem for software engineering: writing code is getting cheaper, but establishing that the code is safe to ship still requires scarce human attention.&lt;/p&gt;

&lt;p&gt;At Meta, this problem became measurable. Over one year, significant lines of code per human-landed diff increased by 105.9%, while diffs per developer per month increased by 51%. More than 80% of the increase in diff volume was attributed to agentic AI.&lt;/p&gt;

&lt;p&gt;Meanwhile, the share of diffs reviewed within 24 hours was declining. Some large engineering groups had thousands of pending reviews.&lt;/p&gt;

&lt;p&gt;Meta's response was to automate a specific class of code reviews rather than attempt to automate all of them.&lt;/p&gt;

&lt;p&gt;The system, called RADAR (Risk Aware Diff Auto Review), combines machine-learned risk scores, LLM-based code review, deterministic checks, and conservative eligibility policies. Its central idea is simple: &lt;strong&gt;let low-risk changes proceed through automated verification, and reserve human attention for changes that need human judgment.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In their 2026 paper, &lt;em&gt;Automating Low-Risk Code Review at Meta: RADAR, Risk Calibration, and Review Efficiency&lt;/em&gt;, Chris Adams, Nachiappan Nagappan, Peter Rigby, and their colleagues report results from more than 535,000 RADAR-reviewed diffs.&lt;/p&gt;

&lt;p&gt;The reported outcomes are worth understanding in detail: the system reduced review latency while exhibiting substantially lower revert and production-incident rates than non-RADAR changes.&lt;/p&gt;

&lt;p&gt;Here is how it works, why the design matters, and what engineering teams can learn from it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Code generation scaled faster than code review
&lt;/h2&gt;

&lt;p&gt;Code review has always served several purposes: finding defects, maintaining consistency, sharing knowledge, and making engineers accountable for changes.&lt;/p&gt;

&lt;p&gt;But these benefits come with an operational cost. Every change entering a review queue competes for attention from someone who must understand its context, inspect its implementation, and decide whether it is safe to merge.&lt;/p&gt;

&lt;p&gt;AI agents change the economics of this process.&lt;/p&gt;

&lt;p&gt;Consider a developer who previously produced five diffs per day and now produces ten with coding agents. If each diff still requires the same human review effort, review demand doubles even if the developer's working hours remain constant.&lt;/p&gt;

&lt;p&gt;At Meta, the pressure was larger than a simple increase in the number of changes. Significant lines of code per human-landed diff had increased by 105.9%, too. Larger changes can demand more review effort, although lines of code alone are an imperfect measure of complexity.&lt;/p&gt;

&lt;p&gt;The result was a capacity mismatch:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Code production became cheaper and faster.&lt;/li&gt;
&lt;li&gt;Human review capacity remained constrained by attention and calendar time.&lt;/li&gt;
&lt;li&gt;Review queues grew, and timely reviews became less common.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is a queueing problem as much as a tooling problem. If changes arrive faster than reviewers can process them, the queue grows. Adding more code-generation capacity can make the bottleneck worse.&lt;/p&gt;

&lt;p&gt;Meta's approach was to change which changes consume human review capacity.&lt;/p&gt;

&lt;p&gt;Routine formatting changes, dead-code removal, mechanical refactoring, and similar low-risk work can often be verified through a combination of deterministic checks and automated semantic inspection. Changes involving security, business logic, or substantial architectural decisions deserve more scrutiny.&lt;/p&gt;

&lt;p&gt;The objective is to allocate review effort according to risk rather than treat every diff as equally deserving of human attention.&lt;/p&gt;

&lt;h2&gt;
  
  
  RADAR is a funnel, not an LLM with merge permissions
&lt;/h2&gt;

&lt;p&gt;RADAR does not simply ask an LLM whether a patch looks safe and then merge whatever it approves.&lt;/p&gt;

&lt;p&gt;It uses multiple stages, with different rules depending on who or what produced the change.&lt;/p&gt;

&lt;p&gt;Meta already had RACER, its GenAI-powered code-editing and refactoring system. Developers can delegate tasks such as dead-code removal, framework migrations, complexity reduction, lint fixes, and test generation to RACER. The system generates diffs in a sandbox, runs verification, and submits changes for review.&lt;/p&gt;

&lt;p&gt;RADAR adds an automated path for qualifying changes to progress through review and landing.&lt;/p&gt;

&lt;p&gt;The pipeline combines three important kinds of evidence:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Static eligibility and safety checks.&lt;/strong&gt; These enforce hard constraints involving the source of a change, its scope, review requirements, and restricted areas of the codebase.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Diff Risk Score (DRS).&lt;/strong&gt; This machine-learning model estimates the risk associated with a change, primarily its likelihood of contributing to a production incident. Its purpose is to identify changes that should be excluded from automated approval.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Automated Code Review (ACR).&lt;/strong&gt; An LLM-based review agent examines the actual code changes, looking for safe patterns and signals of defects or risk. It can distinguish a large mechanical refactor from a change that modifies important behavior in ways that require human judgment.&lt;/p&gt;

&lt;p&gt;All applicable gates must pass.&lt;/p&gt;

&lt;p&gt;A failure at any stage sends the change to the appropriate human-review path. Certain deterministic codemods have a separate, more permissive route after the transformation itself has been approved.&lt;/p&gt;

&lt;p&gt;The distinction matters. Static rules can enforce known constraints but cannot understand every semantic consequence of a change. An LLM can interpret code behavior but should not be the only safety mechanism. A risk model can prioritize changes but cannot prove that a particular patch is correct.&lt;/p&gt;

&lt;p&gt;RADAR combines these mechanisms instead of asking one component to solve the entire problem.&lt;/p&gt;

&lt;h2&gt;
  
  
  Risk calibration determines how much work gets automated
&lt;/h2&gt;

&lt;p&gt;The most consequential design decision is the risk threshold.&lt;/p&gt;

&lt;p&gt;DRS expresses a change's risk as a percentile. A threshold of P5 admits only the lowest-risk 5% of changes under the relevant scoring distribution. P20 admits the lowest-risk 20%, and P50 admits the lowest-risk 50%.&lt;/p&gt;

&lt;p&gt;These are eligibility thresholds, not guarantees that a given percentage of all submitted diffs will be approved. Changes must still satisfy the remaining requirements.&lt;/p&gt;

&lt;p&gt;A stricter threshold reduces the number of changes eligible for automation. A more permissive threshold increases potential coverage, but also exposes the system to more risk.&lt;/p&gt;

&lt;p&gt;Meta's paper reports an operational policy change from P25 to P50. After calibration, the RADAR approval rate reached 60.31%, while the RADAR Verification pass rate was 26.31%.&lt;/p&gt;

&lt;p&gt;Why can the approval rate exceed the risk-score percentile?&lt;/p&gt;

&lt;p&gt;Because the two numbers measure different things. P50 describes the risk-score eligibility boundary. The 60.31% figure measures the approval rate among the relevant eligible diffs, according to the paper's metric definition. They are not interchangeable measures of overall codebase coverage.&lt;/p&gt;

&lt;p&gt;A simple hypothetical illustrates the underlying economics.&lt;/p&gt;

&lt;p&gt;Suppose a team receives 10,000 diffs each month, and each human review consumes 20 minutes of reviewer time.&lt;/p&gt;

&lt;p&gt;If 30% of those diffs can safely bypass human review, the system eliminates 3,000 manual reviews:&lt;/p&gt;

&lt;p&gt;3,000 diffs x 20 minutes = 60,000 minutes&lt;/p&gt;

&lt;p&gt;60,000 / 60 = 1,000 reviewer-hours&lt;/p&gt;

&lt;p&gt;That is approximately 125 eight-hour workdays of reviewer capacity per month.&lt;/p&gt;

&lt;p&gt;This is an illustrative calculation, not Meta's measured labor savings. It assumes that every qualifying diff would otherwise receive a 20-minute review and that automated review does not create equivalent additional human work elsewhere.&lt;/p&gt;

&lt;p&gt;The broader point is that even partial automation can have a meaningful operational effect when applied to a high-volume workflow.&lt;/p&gt;

&lt;p&gt;Risk calibration makes this a controllable trade-off. An organization can begin with a conservative threshold, observe production outcomes, and expand automation as evidence accumulates.&lt;/p&gt;

&lt;h2&gt;
  
  
  Reliability comes from layered controls and operational discipline
&lt;/h2&gt;

&lt;p&gt;The system's safety design goes beyond scoring individual diffs.&lt;/p&gt;

&lt;p&gt;For AI-generated changes, RADAR uses the ACE (AI Commit Eligibility) pipeline. Eligible changes must pass safety checks, satisfy the applicable DRS threshold, and pass automated code review.&lt;/p&gt;

&lt;p&gt;RACER runbooks receive additional controls because different automated tasks have different operational histories.&lt;/p&gt;

&lt;p&gt;Each runbook must demonstrate an acceptable record over a 60-day lookback window, including zero production incidents and low revert and human-rejection rates. The system also imposes per-runbook daily limits, configurable risk thresholds, and denylisting for runbooks or sensitive use cases that should not be allowed to land automatically.&lt;/p&gt;

&lt;p&gt;Established runbooks can receive more permissive thresholds and higher volume limits. The paper describes limits reaching 2,000 diffs per day for high-volume use cases.&lt;/p&gt;

&lt;p&gt;This is a useful distinction between &lt;em&gt;model confidence&lt;/em&gt; and &lt;em&gt;operational confidence&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;A model may judge an individual change to be low-risk. The organization must also establish that the process generating that change is trustworthy, that its historical performance supports the decision, and that its volume cannot overwhelm downstream systems.&lt;/p&gt;

&lt;p&gt;The human-authored path has its own safeguards. RADAR Verification can allow eligible changes to ship with deferred review. RADAR Approval applies stricter criteria to determine whether that review can be waived entirely. Authors retain control over whether to use the automated path or request human review.&lt;/p&gt;

&lt;p&gt;For automated bot changes, the paper also describes a configurable landing delay, during which a human can reject a pending change.&lt;/p&gt;

&lt;p&gt;These controls make the system operationally governable. Teams can expand or pause automation, restrict particular sources, and adjust risk policies without treating the LLM as an unquestionable authority.&lt;/p&gt;

&lt;p&gt;The resulting architecture is closer to a risk-managed production pipeline than a conventional code-review chatbot.&lt;/p&gt;

&lt;h2&gt;
  
  
  The production numbers: more throughput, fewer incidents
&lt;/h2&gt;

&lt;p&gt;The paper reports the following outcomes for RADAR.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Metric&lt;/th&gt;
&lt;th&gt;Reported result&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Diffs reviewed by RADAR&lt;/td&gt;
&lt;td&gt;535,290&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Diffs landed by RADAR&lt;/td&gt;
&lt;td&gt;331,720&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Peak daily review throughput&lt;/td&gt;
&lt;td&gt;25,000+ diffs&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;RADAR approval rate after calibration&lt;/td&gt;
&lt;td&gt;60.31%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;RADAR Verification pass rate&lt;/td&gt;
&lt;td&gt;26.31%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Revert rate relative to non-RADAR diffs&lt;/td&gt;
&lt;td&gt;1/3&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Production-incident rate relative to non-RADAR diffs&lt;/td&gt;
&lt;td&gt;1/50&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The safety figures deserve careful interpretation.&lt;/p&gt;

&lt;p&gt;RADAR-reviewed changes had approximately one-third the revert rate of non-RADAR changes and one-fiftieth the production-incident rate. The paper reports statistically significant differences for these comparisons.&lt;/p&gt;

&lt;p&gt;These results are consistent with the system selecting changes that are safer to automate. They do not establish that automated review itself caused the lower incident rate.&lt;/p&gt;

&lt;p&gt;Selection is central to the design: RADAR deliberately accepts only changes meeting eligibility requirements and risk criteria. The RADAR population therefore differs from the non-RADAR population before the review process even begins.&lt;/p&gt;

&lt;p&gt;That is a feature of the system, but it complicates causal interpretation.&lt;/p&gt;

&lt;p&gt;The authors also note that production incidents were manually reviewed by domain experts, and none of the incidents in the reported analysis were judged to have been detected by a human reviewer. That observation is useful context, although it does not establish that human review would never have caught any of those defects.&lt;/p&gt;

&lt;p&gt;The right conclusion is that RADAR demonstrated substantial production-scale automation with strong observed safety outcomes. It would be premature to conclude that LLM-based review universally outperforms human review.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why review latency fell: a queueing and economic perspective
&lt;/h2&gt;

&lt;p&gt;The paper reports two distinct efficiency outcomes for RADAR-handled changes compared with human-reviewed diffs:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Median time to close was reduced by over 330%, as reported by the authors.&lt;/li&gt;
&lt;li&gt;Median diff review wall time was reduced by 35%.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The first metric measures elapsed time from publication to closure. The second measures time spent waiting for and undergoing review.&lt;/p&gt;

&lt;p&gt;These measures capture different bottlenecks. A diff may wait for a reviewer, undergo several rounds of feedback, and then wait again. Automating eligible changes removes much of their dependence on reviewer availability.&lt;/p&gt;

&lt;p&gt;There is a terminology caveat worth noting: a conventional percentage reduction cannot exceed 100%. The paper's reported “over 330% reduction” in time to close should therefore be interpreted using the authors' reported comparison rather than as a literal reduction in elapsed time. The 35% reduction in review wall time is more straightforward to interpret.&lt;/p&gt;

&lt;p&gt;Consider the queueing dynamics. Let:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;lambda&lt;/code&gt; = the rate at which diffs arrive.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;mu&lt;/code&gt; = the rate at which the review system can process them.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;When arrival demand approaches or exceeds effective review capacity, waiting times can rise sharply. Increasing reviewer capacity helps, but so does removing eligible changes from the human queue.&lt;/p&gt;

&lt;p&gt;RADAR effectively reduces the arrival rate seen by human reviewers:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;lambda_human = lambda_total x (1 - p)&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Here, &lt;code&gt;p&lt;/code&gt; is the fraction of incoming diffs that are safely handled without human review. This is a simplified model: it assumes the automated fraction is stable and ignores differences in review effort between changes.&lt;/p&gt;

&lt;p&gt;If 40% of changes qualify, the human queue receives only 60% of the original volume, assuming all else remains constant.&lt;/p&gt;

&lt;p&gt;That does not mean total engineering cost falls by exactly 40%. Automation introduces compute, model-inference, validation, and operational costs. Some rejected diffs still need human review. Teams must also monitor incidents and maintain the eligibility policies.&lt;/p&gt;

&lt;p&gt;The economic value comes from reallocating expensive human attention. Reviewers can spend more time on architecture, security, business logic, and difficult debugging, rather than routine changes that are amenable to automated verification.&lt;/p&gt;

&lt;p&gt;In that sense, RADAR is a form of capacity engineering: it changes the demand placed on a constrained resource rather than relying exclusively on increasing that resource's supply.&lt;/p&gt;

&lt;h2&gt;
  
  
  What engineering teams can learn from Meta's approach
&lt;/h2&gt;

&lt;p&gt;The paper's findings suggest several practical principles for organizations adopting coding agents.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Start with a narrow automation envelope.&lt;/strong&gt; Identify recurring changes with clear correctness criteria: mechanical migrations, dead-code removal, formatting, and similarly constrained tasks. Do not begin by allowing unrestricted automated merges.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Separate risk prediction from semantic review.&lt;/strong&gt; A risk score, static checks, and an LLM-based review agent answer different questions. Combining them provides more useful control than treating any one signal as sufficient.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Evaluate automation sources independently.&lt;/strong&gt; A proven deterministic transformation and an experimental coding agent should not inherit the same permissions merely because both produce diffs. Track each workflow's incident history, reverts, rejection rates, and volume.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Make risk thresholds operational controls.&lt;/strong&gt; Start conservatively. Increase coverage only when the measured outcomes justify it, and preserve the ability to disable a source or return changes to human review.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Measure reliability and throughput together.&lt;/strong&gt; Approval rates and time savings alone can reward an unsafe system. Monitor production incidents, reverts, validation failures, and the share of changes that actually reach production.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Treat the results as organization-specific.&lt;/strong&gt; Meta operates a large monorepo with extensive testing, established deployment controls, and mature review infrastructure. A smaller organization with weaker tests or less reliable rollback mechanisms should expect different outcomes.&lt;/p&gt;

&lt;p&gt;There is also an important limit to the evidence. The paper uses production telemetry, observational comparisons, and a difference-in-differences-style analysis of efficiency outcomes rather than randomized assignment. The authors acknowledge that the findings may not generalize directly to other repositories and engineering environments.&lt;/p&gt;

&lt;p&gt;That makes the study valuable as an account of a production system and its measured outcomes, rather than a universal benchmark for the quality of AI code review.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion: automate the routine, preserve attention for the consequential
&lt;/h2&gt;

&lt;p&gt;Meta's RADAR illustrates a different way to think about AI-assisted software engineering.&lt;/p&gt;

&lt;p&gt;The challenge is no longer just generating correct code. It is maintaining a review process that can keep pace with the volume of changes that coding agents produce.&lt;/p&gt;

&lt;p&gt;RADAR addresses this by making automated review conditional on risk, source history, eligibility rules, semantic analysis, and deterministic validation. Its production deployment processed more than half a million diffs, landed more than 331,000, and exhibited substantially lower revert and production-incident rates than non-RADAR changes.&lt;/p&gt;

&lt;p&gt;The deeper engineering lesson is that reliable automation depends on controlling where it operates, how its permissions expand, and what happens when a change fails a safety gate.&lt;/p&gt;

&lt;p&gt;As AI agents become more productive, human review may become more valuable precisely because it can be concentrated on the changes where judgment matters most.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Discussion question:&lt;/strong&gt; If you were introducing risk-aware code review in your organization, which changes would you allow to land without human review first—and what production evidence would you require before expanding that scope?&lt;/p&gt;




&lt;p&gt;&lt;em&gt;&lt;br&gt;
Your team's attention is limited, and the deluge of AI-generated code is making it harder to keep production reliable and secure without slowing you down.&lt;/em&gt;&lt;/p&gt;
&lt;em&gt;

&lt;p&gt;I'm building &lt;strong&gt;LiveReview&lt;/strong&gt;, a blast-radius aware AI code review built for your business-critical systems.&lt;/p&gt;

&lt;p&gt;Instead of presenting every diff with equal emphasis, &lt;strong&gt;LiveReview scores each change by blast radius — how far its impact reaches through your call graph — so you can focus attention where it actually matters.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Spend code review effort where business risk is highest — not spread evenly across every diff.&lt;/p&gt;

&lt;p&gt;⭐ Star it on GitHub: &lt;br&gt;
&lt;/p&gt;
&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://assets.dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/HexmosTech" rel="noopener noreferrer"&gt;
        HexmosTech
      &lt;/a&gt; / &lt;a href="https://github.com/HexmosTech/LiveReview" rel="noopener noreferrer"&gt;
        LiveReview
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      Blast-Radius Aware AI Code Review for Business-Critical Systems
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;&lt;p&gt;&lt;a rel="noopener noreferrer" href="https://github.com/HexmosTech/LiveReview/./assets/gfx/png/logo-with-text.png"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2FHexmosTech%2FLiveReview%2FHEAD%2F.%2Fassets%2Fgfx%2Fpng%2Flogo-with-text.png" alt="LiveReview" height="80"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/HexmosTech/LiveReview/actions/workflows/gitleaks.yml" rel="noopener noreferrer"&gt;&lt;img alt="gitleaks.yml" title="gitleaks.yml: Secret scanning workflow" src="https://github.com/HexmosTech/LiveReview/actions/workflows/gitleaks.yml/badge.svg"&gt;&lt;/a&gt;&amp;nbsp;&lt;a href="https://github.com/HexmosTech/LiveReview/actions/workflows/osv-scanner.yml" rel="noopener noreferrer"&gt;&lt;img alt="osv-scanner.yml" title="osv-scanner.yml: Dependency vulnerability scan" src="https://github.com/HexmosTech/LiveReview/actions/workflows/osv-scanner.yml/badge.svg"&gt;&lt;/a&gt;&amp;nbsp;&lt;a href="https://github.com/HexmosTech/LiveReview/actions/workflows/govulncheck.yml" rel="noopener noreferrer"&gt;&lt;img alt="govulncheck.yml" title="govulncheck.yml: Go vulnerability check" src="https://github.com/HexmosTech/LiveReview/actions/workflows/govulncheck.yml/badge.svg"&gt;&lt;/a&gt;&amp;nbsp;&lt;a href="https://github.com/HexmosTech/LiveReview/actions/workflows/semgrep.yml" rel="noopener noreferrer"&gt;&lt;img alt="semgrep.yml" title="semgrep.yml: Static analysis security scan" src="https://github.com/HexmosTech/LiveReview/actions/workflows/semgrep.yml/badge.svg"&gt;&lt;/a&gt;&amp;nbsp;&lt;a rel="noopener noreferrer" href="https://github.com/HexmosTech/LiveReview/./assets/gfx/dependabot-enabled.svg"&gt;&lt;img alt="dependabot-enabled" title="dependabot-enabled: Automated dependency updates are enabled" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2FHexmosTech%2FLiveReview%2FHEAD%2F.%2Fassets%2Fgfx%2Fdependabot-enabled.svg"&gt;&lt;/a&gt;&amp;nbsp;&lt;a href="https://github.com/HexmosTech/LiveReview/actions/workflows/mcp-testcases.yml" rel="noopener noreferrer"&gt;&lt;img alt="mcp-testcases.yml" title="mcp-testcases.yml: MCP integration test suite" src="https://github.com/HexmosTech/LiveReview/actions/workflows/mcp-testcases.yml/badge.svg"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;LiveReview: Risk-Aware AI Code Review for Business-Critical Systems&lt;/h1&gt;
&lt;/div&gt;
&lt;p&gt;LiveReview is an AI code reviewer that scores every hunk of a diff by &lt;strong&gt;blast radius&lt;/strong&gt;: how far a change reaches through your call graph, how much persistent state it touches, and how well-tested it is. A 3-line change to a shared auth check can outrank a 300-line UI tweak. Your team's attention goes to the highest-risk code first, not spread evenly across every diff.&lt;/p&gt;

  
    
    &lt;span class="m-1"&gt;blast-radius-demo.mp4&lt;/span&gt;
  

  

  


&lt;p&gt;&lt;i&gt;LiveReview's Blast Radius &amp;amp; Review Priority scoring, live in the diff viewer.&lt;/i&gt;&lt;/p&gt;
&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;The exact math, not a black box&lt;/th&gt;
&lt;th&gt;Visualize blast radius at a glance&lt;/th&gt;
&lt;th&gt;Every factor that feeds the score&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a rel="noopener noreferrer" href="https://github.com/HexmosTech/LiveReview/./assets/screenshots/blast-radius/new-risk-score-3.webp"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fraw.githubusercontent.com%2FHexmosTech%2FLiveReview%2FHEAD%2F.%2Fassets%2Fscreenshots%2Fblast-radius%2Fnew-risk-score-3.webp" width="280"&gt;&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;a rel="noopener noreferrer" href="https://github.com/HexmosTech/LiveReview/./assets/screenshots/blast-radius/new-risk-score-4.webp"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fraw.githubusercontent.com%2FHexmosTech%2FLiveReview%2FHEAD%2F.%2Fassets%2Fscreenshots%2Fblast-radius%2Fnew-risk-score-4.webp" width="280"&gt;&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;a rel="noopener noreferrer" href="https://github.com/HexmosTech/LiveReview/./assets/screenshots/blast-radius/new-risk-score-2.webp"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fraw.githubusercontent.com%2FHexmosTech%2FLiveReview%2FHEAD%2F.%2Fassets%2Fscreenshots%2Fblast-radius%2Fnew-risk-score-2.webp" width="280"&gt;&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

How does Blast Radius scoring work? (a more technical explanation)
&lt;p&gt;&lt;strong&gt;Here's the goal:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A 3-line fix in a function used by 40 other files, that also writes to a database, should score high.&lt;/li&gt;
&lt;li&gt;A 300-line UI change in one file, fully covered by tests…&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/HexmosTech/LiveReview" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;&lt;b&gt;Click below to try LiveReview with your codebase:&lt;/b&gt;&lt;/p&gt;

&lt;/em&gt;&lt;p&gt;&lt;em&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://hexmos.com/livereview" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fvls0pq7nymbrll98je6s.png" alt="LiveReview Banner" width="800" height="240"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>webdev</category>
      <category>programming</category>
      <category>productivity</category>
    </item>
    <item>
      <title>How DeepWiki Works: Turning a Codebase into a Searchable Mental Model</title>
      <dc:creator>Shrijith Venkatramana</dc:creator>
      <pubDate>Tue, 06 Oct 2026 19:47:14 +0000</pubDate>
      <link>https://dev.to/shrsv/how-deepwiki-works-turning-a-codebase-into-a-searchable-mental-model-21jm</link>
      <guid>https://dev.to/shrsv/how-deepwiki-works-turning-a-codebase-into-a-searchable-mental-model-21jm</guid>
      <description>&lt;p&gt;&lt;em&gt;Hello, I'm Shrijith Venkatramana, and I'm building LiveReview — a blast-radius aware AI code review built for your business-critical systems. &lt;a href="https://github.com/HexmosTech/LiveReview/" rel="noopener noreferrer"&gt;Star us&lt;/a&gt; to help devs discover the project, give it a try, and share your feedback to help improve the product.&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;An unfamiliar codebase does not feel difficult because it contains 100,000 lines of code.&lt;/p&gt;

&lt;p&gt;It feels difficult because you do not know which 500 lines matter.&lt;/p&gt;

&lt;p&gt;That is the problem DeepWiki is really solving.&lt;/p&gt;

&lt;p&gt;When Cognition launched DeepWiki in May 2025, it described it as the public version of its internal wiki product. The basic interaction was  simple: take a GitHub URL, replace &lt;code&gt;github.com&lt;/code&gt; with &lt;code&gt;deepwiki.com&lt;/code&gt;, and get a generated wiki you can ask questions about. Cognition said more than 50,000 public repositories had already been indexed, including projects such as the Model Context Protocol and LangChain.&lt;/p&gt;

&lt;p&gt;The interesting part is what has to happen between the URL and the answer.&lt;/p&gt;

&lt;p&gt;DeepWiki cannot simply throw an entire repository into an LLM context window and say "explain this."&lt;/p&gt;

&lt;p&gt;Instead, it builds several representations of the codebase:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;                 Git repository
                       |
              clone / scan / filter
                       |
          +------------+------------+
          |                         |
    structural view            semantic index
    file tree + README          chunks + embeddings
          |                         |
          v                         v
   wiki structure                 FAISS
          |                         |
          +------------+------------+
                       |
                retrieved context
                       |
                       v
                     LLM
                       |
          +------------+------------+
          |                         |
      wiki pages                  answers
      + diagrams               + citations
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The open DeepWiki-Open implementation gives us a useful way to inspect these mechanics. It should not be treated as Cognition's proprietary production source code; rather, it is an inspectable implementation of the same general product architecture.&lt;/p&gt;
&lt;h2&gt;
  
  
  Code understanding is an attention problem
&lt;/h2&gt;

&lt;p&gt;There is a long history behind this idea.&lt;/p&gt;

&lt;p&gt;In a 2012 observational study of 28 professional developers across seven companies, developers were found to use recurring comprehension strategies, often tried to avoid program comprehension as a task in itself, and frequently preferred face-to-face communication to documentation. The important point is that understanding software competes with the actual maintenance task the developer is trying to perform.&lt;/p&gt;

&lt;p&gt;Suppose I ask:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;How does authentication work in this repository?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;There may be relevant code in:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;src/auth/
api/middleware/
api/routes/
models/user.py
config/security.py
tests/auth/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The hard part is selecting the evidence.&lt;/p&gt;

&lt;p&gt;A human engineer does this by building a mental model:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Request
  -&amp;gt; middleware
  -&amp;gt; token validation
  -&amp;gt; user lookup
  -&amp;gt; authorization
  -&amp;gt; handler
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Only after this map exists does it become easy to dive into individual functions.&lt;/p&gt;

&lt;p&gt;DeepWiki's architecture reflects the same decomposition.&lt;/p&gt;

&lt;p&gt;There is a global representation of the repository that answers:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;What exists, and how should I organize it?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;And there is a retrieval representation that answers:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Which pieces are relevant to this particular question?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That distinction is the key to understanding the system.&lt;/p&gt;
&lt;h2&gt;
  
  
  DeepWiki builds two maps of the repository
&lt;/h2&gt;

&lt;p&gt;Think of the first representation as a documentation outline and the second as a semantic search engine.&lt;/p&gt;

&lt;p&gt;The documentation outline is hierarchical:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Repository
  |
  +-- Architecture
  |     +-- Request lifecycle
  |     +-- Data layer
  |     +-- Authentication
  |
  +-- Core modules
  |     +-- API
  |     +-- Services
  |     +-- Workers
  |
  +-- Deployment
        +-- Docker
        +-- CI/CD
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The semantic index is much flatter:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;chunk_001 -&amp;gt; src/api/router.py
chunk_002 -&amp;gt; src/auth/token.py
chunk_003 -&amp;gt; src/services/user.py
chunk_004 -&amp;gt; tests/auth/test_token.py
...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Each chunk gets converted into a vector.&lt;/p&gt;

&lt;p&gt;This is important because the two structures optimize different tasks.&lt;/p&gt;

&lt;p&gt;A hierarchy gives you coverage and navigation. A vector index gives you fast semantic lookup.&lt;/p&gt;

&lt;p&gt;Cognition later pushed this idea another step by exposing DeepWiki through an MCP server. The official server provides programmatic operations such as &lt;code&gt;ask_question&lt;/code&gt;, &lt;code&gt;read_wiki_contents&lt;/code&gt;, and &lt;code&gt;read_wiki_structure&lt;/code&gt;. In other words, the wiki is becoming an interface for software agents as well as a web page for humans.&lt;/p&gt;

&lt;p&gt;This is a useful mental model:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;DeepWiki is not primarily generating documentation. It is building an externalized representation of a codebase that humans and agents can query.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That is a more powerful way to think about it.&lt;/p&gt;
&lt;h2&gt;
  
  
  Before the LLM writes, the code gets indexed
&lt;/h2&gt;

&lt;p&gt;Now we can look at the first genuinely technical stage.&lt;/p&gt;

&lt;p&gt;The open implementation starts by getting the repository locally. For remote repositories it can use Git and supports shallow cloning, which reduces unnecessary history and transfer cost.&lt;/p&gt;

&lt;p&gt;It then walks the repository, filters files and directories, and turns source files into documents.&lt;/p&gt;

&lt;p&gt;One practical constraint immediately appears: tokenization.&lt;/p&gt;

&lt;p&gt;The implementation tracks token counts and keeps embedding chunks within a configured maximum, with &lt;code&gt;MAX_EMBEDDING_TOKENS&lt;/code&gt; defaulting to 8192.&lt;/p&gt;

&lt;p&gt;Why does this matter?&lt;/p&gt;

&lt;p&gt;Consider a repository with 100,000 lines of code.&lt;/p&gt;

&lt;p&gt;A rough estimate might be:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;100,000 lines
x 5 to 10 tokens / line
-----------------------
500,000 to 1,000,000 tokens
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Sending the whole repository to an LLM for every question would be wasteful even for very large-context models.&lt;/p&gt;

&lt;p&gt;Instead, suppose the repository becomes 1,000 chunks.&lt;/p&gt;

&lt;p&gt;Each chunk is embedded:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;chunk -&amp;gt; embedding model -&amp;gt; vector
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;If the embedding dimension is 1,536, then storing the raw float32 vectors takes roughly:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;1,000 vectors
x 1,536 dimensions
x 4 bytes
----------------
~6 MB
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;That is tiny compared with the original source tree.&lt;/p&gt;

&lt;p&gt;The vectors are therefore an inexpensive reusable index.&lt;/p&gt;

&lt;p&gt;The implementation also keeps metadata with each chunk, including things such as:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;file_path
is_code
token_count
line information
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The line tracking is important because retrieval is only useful if you can get back from:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;"this chunk looks relevant"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;to:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;src/auth/token.py, lines 84-121
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;This is one of the places where the system stops looking like a simple "LLM wrapper" and starts looking like a conventional search system.&lt;/p&gt;

&lt;p&gt;The historical connection here is semantic code search.&lt;/p&gt;

&lt;p&gt;In 2019, a few academics published CodeSearchNet, a corpus containing about six million functions across six programming languages, together with expert relevance judgments for natural-language queries. They framed the central challenge exactly this way: natural language and programming-language expressions describe the same concepts using very different vocabulary.&lt;/p&gt;

&lt;p&gt;DeepWiki sits on the same basic bridge:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;"where are users authenticated?"
              |
              v
        query embedding
              |
              v
       nearest code chunks
              |
              v
        language model
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h2&gt;
  
  
  DeepWiki plans the wiki before generating the wiki
&lt;/h2&gt;

&lt;p&gt;This is perhaps the most important architectural decision.&lt;/p&gt;

&lt;p&gt;A naive system might do:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;repository -&amp;gt; LLM -&amp;gt; giant documentation
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;DeepWiki-Open instead performs an intermediate planning step.&lt;/p&gt;

&lt;p&gt;It first reads the repository structure and README, then asks the LLM to produce a machine-readable wiki structure.&lt;/p&gt;

&lt;p&gt;Conceptually:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight xml"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;wiki_structure&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;section&lt;/span&gt; &lt;span class="na"&gt;title=&lt;/span&gt;&lt;span class="s"&gt;"Architecture"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;page&lt;/span&gt; &lt;span class="na"&gt;title=&lt;/span&gt;&lt;span class="s"&gt;"Request Lifecycle"&lt;/span&gt;
          &lt;span class="na"&gt;importance=&lt;/span&gt;&lt;span class="s"&gt;"high"&lt;/span&gt;
          &lt;span class="na"&gt;files=&lt;/span&gt;&lt;span class="s"&gt;"api/main.py,api/routers/..."&lt;/span&gt;&lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;page&lt;/span&gt; &lt;span class="na"&gt;title=&lt;/span&gt;&lt;span class="s"&gt;"Data Layer"&lt;/span&gt;
          &lt;span class="na"&gt;importance=&lt;/span&gt;&lt;span class="s"&gt;"high"&lt;/span&gt;
          &lt;span class="na"&gt;files=&lt;/span&gt;&lt;span class="s"&gt;"api/repository.py,..."&lt;/span&gt;&lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;/section&amp;gt;&lt;/span&gt;

  &lt;span class="nt"&gt;&amp;lt;section&lt;/span&gt; &lt;span class="na"&gt;title=&lt;/span&gt;&lt;span class="s"&gt;"Deployment"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    ...
  &lt;span class="nt"&gt;&amp;lt;/section&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/wiki_structure&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The actual implementation uses an XML structure containing sections and pages. A &lt;code&gt;WikiPage&lt;/code&gt; carries information such as its title, importance, related pages, and the source file paths that should provide its context.&lt;/p&gt;

&lt;p&gt;This is a form of coarse-to-fine generation:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;repository
    |
    v
global structure
    |
    +---- page A -&amp;gt; relevant files -&amp;gt; generation
    |
    +---- page B -&amp;gt; relevant files -&amp;gt; generation
    |
    +---- page C -&amp;gt; relevant files -&amp;gt; generation
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The advantage is that each individual generation problem becomes much smaller.&lt;/p&gt;

&lt;p&gt;Suppose the model decides there should be 25 pages.&lt;/p&gt;

&lt;p&gt;Rather than asking one model call to understand and document the entire repository, you can make roughly 25 focused generation problems.&lt;/p&gt;

&lt;p&gt;The page prompt can then say, in effect:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;You are writing the "Authentication" page.

Relevant files:
  api/auth.py
  middleware/security.py
  models/user.py

Explain:
  - how authentication starts
  - how credentials are validated
  - where identity is stored
  - important failure paths
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;That is a much more constrained task.&lt;/p&gt;

&lt;p&gt;The open implementation goes further. Page prompts ask the model to identify the source files used for the explanation and impose formatting requirements for diagrams. The generated links are subsequently normalized into repository-specific URLs.&lt;/p&gt;

&lt;p&gt;And there is a nice engineering detail hiding underneath all of this: the parser assumes the model can fail.&lt;/p&gt;

&lt;p&gt;The structure parser strips formatting artifacts and has regex fallbacks when strict XML parsing fails, including cases where the model output gets truncated.&lt;/p&gt;
&lt;h2&gt;
  
  
  Questions are answered by retrieval (rather than memory)
&lt;/h2&gt;

&lt;p&gt;Once the repository has been indexed, answering a question becomes a classic RAG pipeline.&lt;/p&gt;

&lt;p&gt;The open implementation's flow is roughly:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;user query
    |
    v
query embedding
    |
    v
FAISS top-k retrieval
    |
    v
relevant code chunks
    |
    +---- conversation history
    |
    v
prompt builder
    |
    v
LLM
    |
    v
answer
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The mathematics is straightforward.&lt;/p&gt;

&lt;p&gt;Let the query embedding be:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;q = [q1, q2, ..., qd]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;and a code chunk embedding be:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;x = [x1, x2, ..., xd]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;A common similarity measure is cosine similarity:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cos(q, x) = (q dot x) / (||q|| ||x||)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The intuition is simply:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Do the query and this code chunk point in a similar direction in semantic space?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;For example, a developer asks:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Where is the GitHub access token used?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;A lexical search might miss a function called:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="nf"&gt;authenticate_repository&lt;/span&gt;&lt;span class="p"&gt;(...)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;because the words "access token" do not appear in the function name.&lt;/p&gt;

&lt;p&gt;A semantic embedding can put concepts such as:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;access token
OAuth credential
repository authentication
private clone
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;near one another.&lt;/p&gt;

&lt;p&gt;Suppose there are 5,000 chunks and the embeddings have 1,536 dimensions.&lt;/p&gt;

&lt;p&gt;A flat exact scan is roughly:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;5,000 x 1,536
~= 7.7 million dimension comparisons
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;That is quite manageable in optimized native code. For much larger indexes, approximate nearest-neighbor structures can reduce the search work further.&lt;/p&gt;

&lt;p&gt;The academic foundation for this style of architecture was laid out explicitly by Patrick Lewis and colleagues in the 2020 RAG paper. Their formulation combines a model's learned parametric memory with an external non-parametric memory represented by a dense vector index. The language model does the reasoning and generation; retrieval supplies the changing, inspectable evidence.&lt;/p&gt;

&lt;p&gt;DeepWiki-Open follows this basic pattern, although its implementation is an application architecture rather than a direct reproduction of the RAG research model.&lt;/p&gt;

&lt;p&gt;There is also a more expensive mode.&lt;/p&gt;

&lt;p&gt;Its Deep Research path runs multiple iterations, with separate stages for planning, intermediate updates and final synthesis. In the inspected implementation, the loop can traverse the repository repeatedly, up to five iterations.&lt;/p&gt;

&lt;p&gt;So the modes form something like:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Fast
  query -&amp;gt; retrieve -&amp;gt; answer

Deep Research
  query
    -&amp;gt; plan
    -&amp;gt; retrieve
    -&amp;gt; inspect
    -&amp;gt; refine
    -&amp;gt; retrieve again
    -&amp;gt; synthesize

Codemap
  query
    -&amp;gt; retrieve
    -&amp;gt; generate skeleton
    -&amp;gt; enrich sections
    -&amp;gt; ground citations
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Codemap is particularly interesting.&lt;/p&gt;

&lt;p&gt;The implementation first creates a skeleton, then enriches it with prose and diagrams. It does not simply trust the line numbers produced by the LLM. Instead, it can read the actual file, search for the cited snippet, and recover the real line range.&lt;/p&gt;

&lt;p&gt;That creates a three-step chain:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;LLM says:
  "this claim comes from foo.py"

        |
        v

system reads foo.py

        |
        v

system locates the snippet

        |
        v

citation points to actual lines
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;This is a small but important shift.&lt;/p&gt;

&lt;p&gt;The model is allowed to propose evidence.&lt;/p&gt;

&lt;p&gt;The deterministic program decides whether that evidence actually exists.&lt;/p&gt;

&lt;p&gt;That principle generalizes far beyond documentation systems.&lt;/p&gt;
&lt;h2&gt;
  
  
  The hard part at scale is orchestration
&lt;/h2&gt;

&lt;p&gt;Once you view DeepWiki as an indexing and generation system, the operational design starts to make sense.&lt;/p&gt;

&lt;p&gt;Wiki generation is too slow to treat as a normal HTTP request.&lt;/p&gt;

&lt;p&gt;The open implementation therefore has a &lt;code&gt;TaskRegistry&lt;/code&gt; and &lt;code&gt;WikiTask&lt;/code&gt; state machine:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;PENDING
   |
INDEXING
   |
DETERMINING_STRUCTURE
   |
GENERATING
   |
COMPLETED / FAILED
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The frontend receives progress through Server-Sent Events.&lt;/p&gt;

&lt;p&gt;This sounds like UI plumbing, but it is actually part of the product architecture.&lt;/p&gt;

&lt;p&gt;A repository wiki might require:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;clone
+ scan
+ embedding
+ structure generation
+ N page generations
+ post-processing
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;That can take long enough that a synchronous request would be the wrong abstraction.&lt;/p&gt;

&lt;p&gt;The implementation also places explicit limits around concurrency.&lt;/p&gt;

&lt;p&gt;The global wiki-task concurrency defaults to roughly half the available CPU cores, while the RAG layer separately uses a semaphore with a default concurrency of four.&lt;/p&gt;

&lt;p&gt;That gives us a simple throughput model.&lt;/p&gt;

&lt;p&gt;Suppose:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;P = 24 pages
C = 8 concurrent page generations
t = 20 seconds average per page
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Ignoring model-provider throttling and uneven page sizes:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;T ~= ceil(P / C) x t
  ~= 3 x 20
  ~= 60 seconds
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Serial execution would be:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;24 x 20 = 480 seconds
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;So concurrency changes the economics of documentation generation dramatically.&lt;/p&gt;

&lt;p&gt;But concurrency also creates failure modes.&lt;/p&gt;

&lt;p&gt;The test suite in the open implementation contains two revealing cases:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;test_submit_joins_active_task
test_page_failure_yields_placeholder_but_completes
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The first prevents two requests for the same repository from kicking off duplicate work.&lt;/p&gt;

&lt;p&gt;The second says that if one page fails, the entire wiki should still finish.&lt;/p&gt;

&lt;p&gt;That is exactly the sort of detail you expect in a real asynchronous system. The expensive operation is the whole repository, so a single failed page should degrade one output rather than invalidate the entire job.&lt;/p&gt;

&lt;p&gt;Caching is the other half of this economics.&lt;/p&gt;

&lt;p&gt;The open implementation stores generated wikis in a local cache keyed by repository information such as host, owner, repository and language.&lt;/p&gt;

&lt;p&gt;That creates a simple business equation:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cost per repository
  =
  clone cost
  + embedding cost
  + structure-generation cost
  + page-generation cost
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The first two are largely preprocessing costs.&lt;/p&gt;

&lt;p&gt;The expensive recurring component is usually generation:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;generation cost
  ~ sum over pages of
      (retrieved input tokens + output tokens)
      x model price
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Imagine:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;25 pages
x 6 retrieved chunks/page
x 700 tokens/chunk
-------------------
105,000 retrieved input tokens
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;That is only an illustrative calculation. Actual context sizes, prompts, retries and outputs can move the number substantially.&lt;/p&gt;

&lt;p&gt;The key architectural consequence is independent of the exact price:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;You want to pay the expensive model cost once, then reuse the resulting representations many times.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That is why a wiki can make sense as a persistent artifact rather than regenerating an explanation on every question.&lt;/p&gt;

&lt;p&gt;Cognition made this economics explicit in April 2026 when it said higher-quality DeepWiki generation modes would be usage-priced because these workflows consume meaningful compute, while the existing baseline generation experience would remain free.&lt;/p&gt;

&lt;p&gt;The deeper idea is that DeepWiki is doing something closer to compilation than chat.&lt;/p&gt;

&lt;p&gt;A compiler spends compute up front to create an intermediate representation so subsequent operations become cheaper.&lt;/p&gt;

&lt;p&gt;DeepWiki spends compute up front to create:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;repository
   -&amp;gt; structural representation
   -&amp;gt; semantic representation
   -&amp;gt; generated documentation
   -&amp;gt; cached knowledge
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Then later questions can operate on those artifacts instead of repeatedly starting from raw source.&lt;/p&gt;
&lt;h2&gt;
  
  
  Conclusion: the wiki is really a cache for software understanding
&lt;/h2&gt;

&lt;p&gt;The easiest way to misunderstand DeepWiki is to think of it as:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"An LLM that writes documentation."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The more useful mental model is:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"A system that compiles a codebase into representations optimized for human and machine understanding."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The pieces line up:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Git repository
    |
    +--&amp;gt; file tree + README
    |        |
    |        +--&amp;gt; wiki structure
    |                 |
    |                 +--&amp;gt; generated pages
    |
    +--&amp;gt; chunks
             |
             +--&amp;gt; embeddings
                      |
                      +--&amp;gt; semantic retrieval
                               |
                               +--&amp;gt; RAG answers
                               +--&amp;gt; deep research
                               +--&amp;gt; codemaps
                               +--&amp;gt; citations
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;And this explains why the architecture has so many seemingly mundane components.&lt;/p&gt;

&lt;p&gt;The embeddings matter because the repository is too large to read every time.&lt;/p&gt;

&lt;p&gt;The wiki structure matters because search alone does not give you a coherent global model.&lt;/p&gt;

&lt;p&gt;The task registry matters because generation takes time.&lt;/p&gt;

&lt;p&gt;The cache matters because generation costs money.&lt;/p&gt;

&lt;p&gt;The citation grounding matters because an LLM's claim that "this is line 84" is not evidence that line 84 actually contains the claim.&lt;/p&gt;

&lt;p&gt;The parser fallbacks matter because models sometimes emit malformed structured output.&lt;/p&gt;

&lt;p&gt;The whole system is therefore a combination of old ideas and new capabilities: information retrieval, software indexing, asynchronous job processing, caching, and program comprehension, with an LLM sitting in the middle as the component that turns selected code into explanations.&lt;/p&gt;

&lt;p&gt;That may also be the larger pattern for AI software engineering.&lt;/p&gt;

&lt;p&gt;The winning systems may be less about giving a model more context and more about building better representations of the context before the model ever sees it.&lt;/p&gt;

&lt;p&gt;What would you add to DeepWiki's representation of a codebase before trusting it with a 500,000-line monorepo: dependency graphs, Git history, runtime traces, tests, production telemetry, or something else?&lt;/p&gt;



&lt;p&gt;&lt;em&gt;&lt;br&gt;
Your team's attention is limited, and the deluge of AI-generated code is making it harder to keep production reliable and secure without slowing you down.&lt;/em&gt;&lt;/p&gt;
&lt;em&gt;

&lt;p&gt;I'm building &lt;strong&gt;LiveReview&lt;/strong&gt;, a blast-radius aware AI code review built for your business-critical systems.&lt;/p&gt;

&lt;p&gt;Instead of presenting every diff with equal emphasis, &lt;strong&gt;LiveReview scores each change by blast radius — how far its impact reaches through your call graph — so you can focus attention where it actually matters.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Spend code review effort where business risk is highest — not spread evenly across every diff.&lt;/p&gt;

&lt;p&gt;⭐ Star it on GitHub: &lt;br&gt;
&lt;/p&gt;
&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://assets.dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/HexmosTech" rel="noopener noreferrer"&gt;
        HexmosTech
      &lt;/a&gt; / &lt;a href="https://github.com/HexmosTech/LiveReview" rel="noopener noreferrer"&gt;
        LiveReview
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      Blast-Radius Aware AI Code Review for Business-Critical Systems
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;&lt;p&gt;&lt;a rel="noopener noreferrer" href="https://github.com/HexmosTech/LiveReview/./assets/gfx/png/logo-with-text.png"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2FHexmosTech%2FLiveReview%2FHEAD%2F.%2Fassets%2Fgfx%2Fpng%2Flogo-with-text.png" alt="LiveReview" height="80"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/HexmosTech/LiveReview/actions/workflows/gitleaks.yml" rel="noopener noreferrer"&gt;&lt;img alt="gitleaks.yml" title="gitleaks.yml: Secret scanning workflow" src="https://github.com/HexmosTech/LiveReview/actions/workflows/gitleaks.yml/badge.svg"&gt;&lt;/a&gt;&amp;nbsp;&lt;a href="https://github.com/HexmosTech/LiveReview/actions/workflows/osv-scanner.yml" rel="noopener noreferrer"&gt;&lt;img alt="osv-scanner.yml" title="osv-scanner.yml: Dependency vulnerability scan" src="https://github.com/HexmosTech/LiveReview/actions/workflows/osv-scanner.yml/badge.svg"&gt;&lt;/a&gt;&amp;nbsp;&lt;a href="https://github.com/HexmosTech/LiveReview/actions/workflows/govulncheck.yml" rel="noopener noreferrer"&gt;&lt;img alt="govulncheck.yml" title="govulncheck.yml: Go vulnerability check" src="https://github.com/HexmosTech/LiveReview/actions/workflows/govulncheck.yml/badge.svg"&gt;&lt;/a&gt;&amp;nbsp;&lt;a href="https://github.com/HexmosTech/LiveReview/actions/workflows/semgrep.yml" rel="noopener noreferrer"&gt;&lt;img alt="semgrep.yml" title="semgrep.yml: Static analysis security scan" src="https://github.com/HexmosTech/LiveReview/actions/workflows/semgrep.yml/badge.svg"&gt;&lt;/a&gt;&amp;nbsp;&lt;a rel="noopener noreferrer" href="https://github.com/HexmosTech/LiveReview/./assets/gfx/dependabot-enabled.svg"&gt;&lt;img alt="dependabot-enabled" title="dependabot-enabled: Automated dependency updates are enabled" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2FHexmosTech%2FLiveReview%2FHEAD%2F.%2Fassets%2Fgfx%2Fdependabot-enabled.svg"&gt;&lt;/a&gt;&amp;nbsp;&lt;a href="https://github.com/HexmosTech/LiveReview/actions/workflows/mcp-testcases.yml" rel="noopener noreferrer"&gt;&lt;img alt="mcp-testcases.yml" title="mcp-testcases.yml: MCP integration test suite" src="https://github.com/HexmosTech/LiveReview/actions/workflows/mcp-testcases.yml/badge.svg"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;LiveReview: Blast-Radius Aware AI Code Review for Business-Critical Systems&lt;/h1&gt;
&lt;/div&gt;

&lt;p&gt;LiveReview is an AI code reviewer that scores every hunk of a diff by &lt;strong&gt;blast radius&lt;/strong&gt;: how far a change reaches through your call graph, how much persistent state it touches, and how well-tested it is. A 3-line change to a shared auth check can outrank a 300-line UI tweak. Your team's attention goes to the highest-risk code first, not spread evenly across every diff.&lt;/p&gt;


  
    
    &lt;span class="m-1"&gt;blast-radius-demo.mp4&lt;/span&gt;
  

  

  


&lt;p&gt;&lt;i&gt;LiveReview's Blast Radius &amp;amp; Review Priority scoring, live in the diff viewer.&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;&lt;div class="table-wrapper-paragraph"&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;table&gt;

&lt;thead&gt;

&lt;tr&gt;

&lt;th&gt;The exact math, not a black box&lt;/th&gt;

&lt;th&gt;Visualize blast radius at a glance&lt;/th&gt;

&lt;th&gt;Every factor that feeds the score&lt;/th&gt;

&lt;/tr&gt;

&lt;/thead&gt;

&lt;tbody&gt;

&lt;tr&gt;

&lt;td&gt;&lt;a rel="noopener noreferrer" href="https://github.com/HexmosTech/LiveReview/./assets/screenshots/blast-radius/new-risk-score-3.webp"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fraw.githubusercontent.com%2FHexmosTech%2FLiveReview%2FHEAD%2F.%2Fassets%2Fscreenshots%2Fblast-radius%2Fnew-risk-score-3.webp" width="280"&gt;&lt;/a&gt;&lt;/td&gt;

&lt;td&gt;&lt;a rel="noopener noreferrer" href="https://github.com/HexmosTech/LiveReview/./assets/screenshots/blast-radius/new-risk-score-4.webp"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fraw.githubusercontent.com%2FHexmosTech%2FLiveReview%2FHEAD%2F.%2Fassets%2Fscreenshots%2Fblast-radius%2Fnew-risk-score-4.webp" width="280"&gt;&lt;/a&gt;&lt;/td&gt;

&lt;td&gt;&lt;a rel="noopener noreferrer" href="https://github.com/HexmosTech/LiveReview/./assets/screenshots/blast-radius/new-risk-score-2.webp"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fraw.githubusercontent.com%2FHexmosTech%2FLiveReview%2FHEAD%2F.%2Fassets%2Fscreenshots%2Fblast-radius%2Fnew-risk-score-2.webp" width="280"&gt;&lt;/a&gt;&lt;/td&gt;

&lt;/tr&gt;

&lt;/tbody&gt;

&lt;/table&gt;&lt;/div&gt;&lt;br&gt;
&lt;p&gt;&lt;/p&gt;

How does Blast Radius scoring work? (a more technical explanation)

&lt;p&gt;&lt;strong&gt;Here's the goal:&lt;/strong&gt;&lt;/p&gt;


&lt;ul&gt;

&lt;li&gt;A 3-line fix in a function used by 40 other files, that also writes to a database, should score high.&lt;/li&gt;

&lt;li&gt;A 300-line UI change in one file, fully covered by…&lt;/li&gt;

&lt;/ul&gt;&lt;/div&gt;
&lt;br&gt;
  &lt;/div&gt;
&lt;br&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/HexmosTech/LiveReview" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;br&gt;
&lt;/div&gt;
&lt;br&gt;


&lt;p&gt;&lt;b&gt;Click below to try LiveReview with your codebase:&lt;/b&gt;&lt;/p&gt;

&lt;/em&gt;&lt;p&gt;&lt;em&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://hexmos.com/livereview" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fvls0pq7nymbrll98je6s.png" alt="LiveReview Banner" width="800" height="240"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>webdev</category>
      <category>programming</category>
      <category>productivity</category>
    </item>
    <item>
      <title>Blender for Developers: 15 Concepts Explained Simply</title>
      <dc:creator>Shrijith Venkatramana</dc:creator>
      <pubDate>Sat, 03 Oct 2026 19:49:10 +0000</pubDate>
      <link>https://dev.to/shrsv/blender-for-developers-15-concepts-explained-simply-24f6</link>
      <guid>https://dev.to/shrsv/blender-for-developers-15-concepts-explained-simply-24f6</guid>
      <description>&lt;p&gt;&lt;em&gt;Hello, I'm Shrijith Venkatramana, and I'm building LiveReview — a blast-radius aware AI code review built for your business-critical systems. &lt;a href="https://github.com/HexmosTech/LiveReview/" rel="noopener noreferrer"&gt;Star us&lt;/a&gt; to help devs discover the project, give it a try, and share your feedback to help improve the product.&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;You already understand objects, trees, transforms, interpolation, pipelines, coordinate systems, and data structures.&lt;/p&gt;

&lt;p&gt;Then you open Blender.&lt;/p&gt;

&lt;p&gt;Suddenly there are meshes, vertices, normals, modifiers, F-curves, armatures, constraints, materials, world space, local space, UVs, nodes, render engines, and approximately 700 buttons.&lt;/p&gt;

&lt;p&gt;The underlying ideas are much smaller than the interface makes them appear.&lt;/p&gt;

&lt;p&gt;A useful way to think about Blender is:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Blender is a system for describing a scene as data, transforming that data over time, and finally projecting it into pixels.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That is much closer to a software system than to a drawing program.&lt;/p&gt;

&lt;p&gt;This article picks 15 concepts from the Blender vocabulary that give you the most leverage for making small animations. The terminology follows the Blender 5.2 LTS glossary.&lt;/p&gt;

&lt;p&gt;I will use a simple running example: imagine a cube-shaped owl mascot that jumps into frame, looks at the camera, hops onto a platform, and points at some text.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Start With the Right Mental Model
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Object
&lt;/h3&gt;

&lt;p&gt;An &lt;strong&gt;Object&lt;/strong&gt; is Blender's container for something that exists in the scene: a mesh, curve, camera, light, armature, and so on.&lt;/p&gt;

&lt;p&gt;For a developer, think of it roughly as an entity with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;object
    transform
    data
    relationships
    modifiers
    animation
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;A cube in Blender isn't fundamentally "a cube."&lt;/p&gt;

&lt;p&gt;It is an object whose underlying data happens to be a cube-shaped mesh.&lt;/p&gt;

&lt;p&gt;That distinction becomes important very quickly.&lt;/p&gt;

&lt;p&gt;Suppose your owl has two identical eyeballs.&lt;/p&gt;

&lt;p&gt;You can have:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Eye_Left  ----\
               -&amp;gt; same mesh data
Eye_Right ----/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The two objects can have different positions and rotations while sharing the same underlying geometry.&lt;/p&gt;

&lt;p&gt;This is one reason Blender can represent a complicated scene without duplicating everything.&lt;/p&gt;
&lt;h3&gt;
  
  
  2. Data-blocks
&lt;/h3&gt;

&lt;p&gt;Blender calls its fundamental named pieces of reusable file data &lt;strong&gt;data-blocks&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Meshes, materials, armatures, node trees and animation actions are examples. The glossary explicitly describes data-blocks as the base units of data in a &lt;code&gt;.blend&lt;/code&gt; file.&lt;/p&gt;

&lt;p&gt;This is much easier to understand if you think like a programmer.&lt;/p&gt;

&lt;p&gt;Imagine:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Object A -&amp;gt; Mesh #17
Object B -&amp;gt; Mesh #17
Object C -&amp;gt; Mesh #23
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The objects are instances/references to data.&lt;/p&gt;

&lt;p&gt;This explains many Blender behaviors that otherwise seem strange:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;changing an object's transform does not necessarily modify its mesh&lt;/li&gt;
&lt;li&gt;two objects can share geometry&lt;/li&gt;
&lt;li&gt;materials can be reused&lt;/li&gt;
&lt;li&gt;animation data is stored separately&lt;/li&gt;
&lt;li&gt;linked data can be reused across files&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Blender itself grew out of an in-house production tool at Ton Roosendaal's Dutch animation studio NeoGeo. The first Blender source files date to January 2, 1994. The original motivation was partly practical: make a 3D production system where repeated changes from clients were easier to manage.&lt;/p&gt;

&lt;p&gt;That history explains something about Blender's architecture: it was built around manipulating a production scene, rather than merely drawing individual pictures.&lt;/p&gt;
&lt;h3&gt;
  
  
  3. Transform + Local Space + World Space
&lt;/h3&gt;

&lt;p&gt;Every object has a &lt;strong&gt;transform&lt;/strong&gt;:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;location
rotation
scale
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Conceptually, you are applying a transformation to geometry.&lt;/p&gt;

&lt;p&gt;A simplified matrix view is:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;p_world = M * p_local
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;where:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;p_local = point in object's coordinate system
M       = object's transformation matrix
p_world = point in world coordinates
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;So if your owl's eye is at:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;local position = (0.2, 0.0, 0.1)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;and the owl itself moves across the scene, the eye can move with it without changing its local coordinates.&lt;/p&gt;

&lt;p&gt;This is exactly the same reason hierarchical transforms exist in graphics engines.&lt;/p&gt;

&lt;p&gt;A common developer mistake is to ask:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"Why is this object at &lt;code&gt;(2, 3, 5)&lt;/code&gt; when I set its position to &lt;code&gt;(0, 0, 0)&lt;/code&gt;?"&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Often the answer is that &lt;code&gt;(0,0,0)&lt;/code&gt; is being interpreted in a different coordinate system.&lt;/p&gt;

&lt;p&gt;Blender distinguishes &lt;strong&gt;world space&lt;/strong&gt; from &lt;strong&gt;local space&lt;/strong&gt; in roughly the same way a game engine does. &lt;/p&gt;

&lt;p&gt;One more reason to understand transforms: rotation.&lt;/p&gt;

&lt;p&gt;Euler rotations are intuitive:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;rotate X
rotate Y
rotate Z
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;but the order matters. In certain orientations, two rotation axes can line up and you get &lt;strong&gt;gimbal lock&lt;/strong&gt;. &lt;/p&gt;

&lt;p&gt;Quaternions exist partly because representing and interpolating 3D rotations directly with three sequential Euler angles has these problems.&lt;/p&gt;

&lt;p&gt;You don't need quaternion mathematics to make your first animation.&lt;/p&gt;

&lt;p&gt;You do need to know that rotation representation is a mathematical choice rather than merely a UI preference.&lt;/p&gt;
&lt;h2&gt;
  
  
  2. Geometry Is Data, Not a Picture
&lt;/h2&gt;
&lt;h3&gt;
  
  
  4. Mesh
&lt;/h3&gt;

&lt;p&gt;A &lt;strong&gt;mesh&lt;/strong&gt; is the classic polygonal representation of a 3D shape:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;vertices
edges
faces
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The glossary defines a mesh exactly this way.&lt;/p&gt;

&lt;p&gt;Think of it as a graph embedded in 3D.&lt;/p&gt;

&lt;p&gt;A cube might contain:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;8 vertices
12 edges
6 faces
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The faces are what give the object a surface.&lt;/p&gt;

&lt;p&gt;This leads naturally to the next concept.&lt;/p&gt;
&lt;h3&gt;
  
  
  5. Topology
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Topology&lt;/strong&gt; is the arrangement of those vertices, edges and faces.&lt;/p&gt;

&lt;p&gt;Geometry tells you things such as:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;"this vertex is here"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Topology tells you:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;"this vertex is connected to these vertices"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;That distinction becomes extremely important when deforming objects.&lt;/p&gt;

&lt;p&gt;Suppose your owl is just a hard cube.&lt;/p&gt;

&lt;p&gt;Topology barely matters.&lt;/p&gt;

&lt;p&gt;Now suppose you want to turn the cube into a character whose face bends when it speaks.&lt;/p&gt;

&lt;p&gt;Suddenly topology matters enormously.&lt;/p&gt;

&lt;p&gt;A rough debugging invariant for a closed genus-0 mesh is Euler's formula:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;V - E + F = 2
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;For a cube:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;V = 8
E = 12
F = 6

8 - 12 + 6 = 2
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;This doesn't tell you whether a model is aesthetically good.&lt;/p&gt;

&lt;p&gt;It tells you that the connectivity has certain mathematical properties.&lt;/p&gt;

&lt;p&gt;A torus, for example, has a different topology:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;V - E + F = 0
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;This is one reason graphics programmers sometimes find topology easier to understand than artists do initially: it is literally a graph-structure problem.&lt;/p&gt;
&lt;h3&gt;
  
  
  6. Normals
&lt;/h3&gt;

&lt;p&gt;A &lt;strong&gt;normal&lt;/strong&gt; is a unit vector perpendicular to a surface.&lt;/p&gt;

&lt;p&gt;Why should you care about a vector sticking out of a polygon?&lt;/p&gt;

&lt;p&gt;Because lighting cares.&lt;/p&gt;

&lt;p&gt;For a simplified diffuse lighting model:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;brightness ~ max(0, N dot L)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;where:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;N = surface normal
L = direction toward the light
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;If the surface faces the light:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;N dot L ≈ 1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;If it is perpendicular:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;N dot L ≈ 0
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;If it points away:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;N dot L &amp;lt; 0
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;and the contribution is clamped to zero.&lt;/p&gt;

&lt;p&gt;So a huge portion of what your eye interprets as "shape" is actually a consequence of geometry plus normals plus lighting.&lt;/p&gt;

&lt;p&gt;This also explains why a model can look completely broken after a seemingly harmless edit: sometimes the geometry is fine but the normals are inconsistent.&lt;/p&gt;
&lt;h2&gt;
  
  
  3. Modifiers: Treat Geometry Like a Pipeline
&lt;/h2&gt;
&lt;h3&gt;
  
  
  7. Modifiers
&lt;/h3&gt;

&lt;p&gt;A &lt;strong&gt;modifier&lt;/strong&gt; is a non-destructive operation applied on top of existing data.&lt;/p&gt;

&lt;p&gt;This is one of Blender's most useful ideas.&lt;/p&gt;

&lt;p&gt;Instead of:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;mesh -&amp;gt; permanently modify mesh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;you can have:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;base mesh
   |
   v
bevel
   |
   v
subdivision
   |
   v
other modifier
   |
   v
final geometry
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;This is almost exactly how a compiler pipeline or image-processing pipeline feels.&lt;/p&gt;

&lt;p&gt;You preserve a relatively simple source representation and derive progressively richer representations from it.&lt;/p&gt;

&lt;p&gt;That has a major operational benefit:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Keep the source representation cheap to edit.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3&gt;
  
  
  8. Bevel
&lt;/h3&gt;

&lt;p&gt;A &lt;strong&gt;bevel&lt;/strong&gt; rounds or chamfers an edge.&lt;/p&gt;

&lt;p&gt;This sounds trivial.&lt;/p&gt;

&lt;p&gt;It is one of the highest-return techniques in product animation.&lt;/p&gt;

&lt;p&gt;Compare:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sharp cube
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;with:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;slightly rounded cube
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The second catches highlights differently and therefore looks much more like a manufactured object.&lt;/p&gt;

&lt;p&gt;This matters because the real world almost never contains perfectly sharp macroscopic edges.&lt;/p&gt;

&lt;p&gt;A two-minute bevel can therefore produce more perceptual improvement than hours of adding geometric detail elsewhere.&lt;/p&gt;

&lt;p&gt;For your cube owl, you might start with:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cube
+ bevel
+ material
+ light
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;and already have something usable.&lt;/p&gt;
&lt;h3&gt;
  
  
  9. Subdivision Surface
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Subdivision Surface&lt;/strong&gt; takes a relatively low-poly mesh and generates a smoother higher-poly surface.&lt;/p&gt;

&lt;p&gt;The important intuition is:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;You are specifying a coarse control structure and asking an algorithm to construct a smoother surface from it.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This goes back to Ed Catmull and Jim Clark's 1978 work on recursively generated B-spline surfaces for arbitrary topological meshes. Their paper is one of the foundations of the subdivision-surface approach used throughout computer graphics.&lt;/p&gt;

&lt;p&gt;The cost is straightforward.&lt;/p&gt;

&lt;p&gt;A subdivision step roughly turns:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;1 quad -&amp;gt; 4 quads
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;So if you start with 10,000 faces:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;10,000
   -&amp;gt;
40,000
   -&amp;gt;
160,000
   -&amp;gt;
640,000
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Three levels means roughly 64x as many faces as the starting mesh.&lt;/p&gt;

&lt;p&gt;This is a recurring graphics lesson:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;A small-looking visual operation can create a huge amount of underlying computation.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;For simple product animation, you usually want the lowest-resolution base mesh that gives you enough control, and let modifiers generate detail later.&lt;/p&gt;
&lt;h2&gt;
  
  
  4. The Camera Turns 3D Into 2D
&lt;/h2&gt;
&lt;h3&gt;
  
  
  10. Shading
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Shading&lt;/strong&gt; is the process of determining how surfaces appear under lighting.&lt;/p&gt;

&lt;p&gt;Developers sometimes approach materials backwards:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;"What color should this object be?"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;A better question is:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;"How should this surface interact with light?"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Two objects can have the same base color but look completely different because one is:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;smooth + glossy
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;and another is:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;rough + diffuse
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The glossary distinguishes diffuse light, specular light, roughness and related material concepts.  &lt;/p&gt;

&lt;p&gt;This is why lighting is part of modeling.&lt;/p&gt;

&lt;p&gt;A perfectly modeled object under poor lighting can look worse than a simple object under good lighting.&lt;/p&gt;
&lt;h3&gt;
  
  
  11. Camera Projection
&lt;/h3&gt;

&lt;p&gt;A camera decides how the 3D world becomes a 2D image.&lt;/p&gt;

&lt;p&gt;There are two important projections:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;perspective
orthographic
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;In perspective projection, objects farther away look smaller.&lt;/p&gt;

&lt;p&gt;A simplified relationship is:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;x_screen ~ f * x / z
y_screen ~ f * y / z
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;So if:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;z doubles
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;then the projected size is approximately:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;half
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;This is why a road converges toward the horizon and why a face looks larger when a camera gets close.&lt;/p&gt;

&lt;p&gt;In orthographic projection, distance does not produce the same scale change. The mapping is conceptually closer to:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;x_screen ~ s * x
y_screen ~ s * y
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The Blender glossary defines perspective projection by rays converging through an observer point, while orthographic projection uses parallel viewing lines.&lt;/p&gt;

&lt;p&gt;For a technical product video, orthographic projection can sometimes give the clean "diagram" feeling.&lt;/p&gt;

&lt;p&gt;Perspective gives the familiar photographic feeling.&lt;/p&gt;
&lt;h3&gt;
  
  
  12. Ray Tracing
&lt;/h3&gt;

&lt;p&gt;Ray tracing asks a simple question:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;If light travels through this scene, what happens when it hits things?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;A ray may:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;hit -&amp;gt; reflect
hit -&amp;gt; refract
hit -&amp;gt; absorb
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;and continue.&lt;/p&gt;

&lt;p&gt;That is the conceptual basis of ray-traced rendering.&lt;/p&gt;

&lt;p&gt;The naive algorithm is expensive.&lt;/p&gt;

&lt;p&gt;If you have:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;R rays
N triangles
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;then checking every ray against every triangle gives roughly:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;R * N
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;intersection tests.&lt;/p&gt;

&lt;p&gt;A scene with:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;1,000,000 triangles
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;and billions of rays would obviously be unpleasant.&lt;/p&gt;

&lt;p&gt;This is why structures such as a &lt;strong&gt;BVH&lt;/strong&gt;, or Bounding Volume Hierarchy, exist. Instead of testing a ray against every triangle immediately, the renderer first tests hierarchical bounding volumes and eliminates large portions of the scene.&lt;/p&gt;

&lt;p&gt;This is a familiar software-engineering pattern:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;brute force
    -&amp;gt;
spatial index
    -&amp;gt;
avoid work
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Databases have indexes.&lt;/p&gt;

&lt;p&gt;Compilers have intermediate representations.&lt;/p&gt;

&lt;p&gt;Graphics renderers have acceleration structures such as BVHs.&lt;/p&gt;
&lt;h2&gt;
  
  
  5. Animation Is a Function of Time
&lt;/h2&gt;

&lt;p&gt;Here is the biggest conceptual jump for a programmer coming into Blender.&lt;/p&gt;

&lt;p&gt;Animation is not:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;frame 1
frame 2
frame 3
frame 4
...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;It is:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;property = f(time)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Blender's animation system is built around exactly this idea.&lt;/p&gt;
&lt;h3&gt;
  
  
  13. Keyframes
&lt;/h3&gt;

&lt;p&gt;A &lt;strong&gt;keyframe&lt;/strong&gt; specifies a property at a particular frame.&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;frame 1   -&amp;gt; location.z = 0
frame 20  -&amp;gt; location.z = 3
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;You do not normally specify frames 2 through 19.&lt;/p&gt;

&lt;p&gt;You specify the important states.&lt;/p&gt;

&lt;p&gt;This idea has a direct historical connection to traditional animation. Senior animators created important poses, while other artists filled in the intermediate frames.&lt;/p&gt;

&lt;p&gt;John Lasseter's 1987 paper, "Principles of Traditional Animation Applied to 3D Computer Animation," described how these traditional animation ideas transfer into 3D computer animation. He discussed principles such as squash and stretch, timing and anticipation using examples including &lt;em&gt;Luxo Jr.&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;So when you place two keyframes and let Blender fill in the motion, you are using a very old animation production idea implemented as a mathematical system.&lt;/p&gt;
&lt;h3&gt;
  
  
  14. F-Curves and Interpolation
&lt;/h3&gt;

&lt;p&gt;Blender stores the changing value of an animated property in an &lt;strong&gt;F-Curve&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Think:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;time -&amp;gt; property value
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;frame 0   -&amp;gt; x = 0
frame 25  -&amp;gt; x = 10
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The system computes the values between them.&lt;/p&gt;

&lt;p&gt;The Blender manual describes F-Curves as curves representing animated property values, with time on one axis and the property's value on the other.&lt;/p&gt;

&lt;p&gt;This is where animation becomes mathematically interesting.&lt;/p&gt;

&lt;p&gt;A Bézier curve can be written as:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;B(t) =
    (1-t)^3 P0
  + 3(1-t)^2 t P1
  + 3(1-t)t^2 P2
  + t^3 P3

0 &amp;lt;= t &amp;lt;= 1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;You don't normally calculate this yourself.&lt;/p&gt;

&lt;p&gt;The important intuition is that:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;P0, P3 = where the motion starts and ends
P1, P2 = influence the shape of the motion
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;That means you are effectively programming velocity and acceleration without explicitly writing a physics simulation.&lt;/p&gt;

&lt;p&gt;Consider your owl jumping.&lt;/p&gt;

&lt;p&gt;You might specify:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;frame 1  -&amp;gt; z = 0
frame 12 -&amp;gt; z = 2
frame 24 -&amp;gt; z = 0
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;A linear interpolation produces something mechanical.&lt;/p&gt;

&lt;p&gt;A carefully shaped F-Curve can make the motion:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;slow
  -&amp;gt;
fast
  -&amp;gt;
slow
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;which your visual system interprets as intentional movement.&lt;/p&gt;

&lt;p&gt;The mathematics is simple.&lt;/p&gt;

&lt;p&gt;The difficult part is choosing the function.&lt;/p&gt;

&lt;p&gt;That is why good animation is closer to control-system design than to drawing.&lt;/p&gt;
&lt;h2&gt;
  
  
  6. Constraints and Relationships: Build the System Once
&lt;/h2&gt;
&lt;h3&gt;
  
  
  15. Parenting and Constraints
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Parenting&lt;/strong&gt; creates a relationship in which one object affects another. A child inherits relevant transformations from its parent.&lt;/p&gt;

&lt;p&gt;Suppose your owl has:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Owl
 |
 +-- Eye_Left
 +-- Eye_Right
 +-- Beak
 +-- Wing_Left
 +-- Wing_Right
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;If you move the owl, everything moves with it.&lt;/p&gt;

&lt;p&gt;You don't need six independent animations.&lt;/p&gt;

&lt;p&gt;This is another familiar programming pattern:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;parent transform
      |
      +--&amp;gt; child transform
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Then there are &lt;strong&gt;constraints&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;A constraint says, roughly:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;"derive this object's behavior from some other thing."
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Camera
   |
   +-- look at --&amp;gt; Owl
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;or:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Eye
   |
   +-- track --&amp;gt; Target
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The important mental shift is:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Keyframes describe values. Constraints describe relationships.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That distinction becomes increasingly valuable as a scene grows.&lt;/p&gt;

&lt;p&gt;Imagine manually animating a camera to follow the owl.&lt;/p&gt;

&lt;p&gt;You might keyframe:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;frame 1
frame 10
frame 20
frame 30
...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;But if the owl's path changes, the camera animation becomes invalid.&lt;/p&gt;

&lt;p&gt;A constraint instead captures:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;camera orientation = function(target position)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Now the owl can move differently and the camera can continue following it.&lt;/p&gt;

&lt;p&gt;This is essentially dependency management.&lt;/p&gt;

&lt;p&gt;Blender's constraint system even distinguishes between world, local, pose and other spaces, because the mathematical frame in which a relationship is evaluated changes the result.&lt;/p&gt;
&lt;h3&gt;
  
  
  What about Armatures and IK?
&lt;/h3&gt;

&lt;p&gt;If you move from a cube mascot to an articulated character, you eventually encounter &lt;strong&gt;armatures&lt;/strong&gt;, &lt;strong&gt;bones&lt;/strong&gt;, and &lt;strong&gt;inverse kinematics&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;An armature is a skeleton-like structure made of bones used to control how a character or object moves.&lt;/p&gt;

&lt;p&gt;With forward kinematics:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;shoulder
   -&amp;gt;
elbow
   -&amp;gt;
hand
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;you move the parent and the children follow.&lt;/p&gt;

&lt;p&gt;With inverse kinematics:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;hand target
    -&amp;gt;
elbow position
    -&amp;gt;
shoulder rotation
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;you specify the result and the system solves backward through the chain. &lt;/p&gt;

&lt;p&gt;For a simple product animation, you may never need IK.&lt;/p&gt;

&lt;p&gt;That is an important productivity lesson:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Learn the concepts your animation actually requires.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;A cube owl pointing at a screen can often be built with objects, transforms, keyframes and constraints.&lt;/p&gt;

&lt;p&gt;You don't need to build a Pixar-style character rig merely because Blender has one.&lt;/p&gt;
&lt;h2&gt;
  
  
  7. The Production Loop: Pixels Have a Price
&lt;/h2&gt;

&lt;p&gt;Once you understand the preceding concepts, Blender becomes much easier to reason about as a pipeline:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;scene data
   |
   v
geometry
   |
   v
modifiers
   |
   v
camera
   |
   v
shading + lighting
   |
   v
render
   |
   v
image
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Animation adds another dimension:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;time
 |
 +----&amp;gt; transforms
 |
 +----&amp;gt; materials
 |
 +----&amp;gt; camera
 |
 +----&amp;gt; constraints
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The final result is still just a sequence of images.&lt;/p&gt;

&lt;p&gt;And that has a very simple operational consequence.&lt;/p&gt;

&lt;p&gt;Suppose you make a 10-second video at 30 FPS:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;10 * 30 = 300 frames
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;At 1920 x 1080:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;1920 * 1080 = 2,073,600 pixels/frame
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Therefore the entire video contains approximately:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;2,073,600 * 300
= 622,080,000 pixels
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;So your "10-second animation" is actually around &lt;strong&gt;622 million pixel outputs&lt;/strong&gt; before accounting for multiple samples, reflections, transparency, shadows, motion blur, depth of field and other rendering work.&lt;/p&gt;

&lt;p&gt;That is why render economics matter.&lt;/p&gt;

&lt;p&gt;A rough mental model is:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;total render time
    ~
number of frames
*
time per frame
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;If a frame takes 20 seconds:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;300 * 20 sec
= 6,000 sec
= 100 minutes
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Cutting frame time from 20 seconds to 10 seconds saves roughly 50 minutes.&lt;/p&gt;

&lt;p&gt;But reducing the frame count from 300 to 150 does the same thing.&lt;/p&gt;

&lt;p&gt;This is why production graphics has a lot in common with systems engineering.&lt;/p&gt;

&lt;p&gt;You are constantly trading:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;quality
geometry
samples
resolution
memory
time
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;against one another.&lt;/p&gt;

&lt;p&gt;And this leads to a useful rule for small animations:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Optimize the pipeline, not individual frames.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;A badly structured scene that takes 40 seconds per frame is a 200-minute problem.&lt;/p&gt;

&lt;p&gt;A well-structured scene that takes 5 seconds per frame is a 25-minute problem.&lt;/p&gt;
&lt;h2&gt;
  
  
  The 15 Concepts in One Mental Model
&lt;/h2&gt;

&lt;p&gt;You can compress almost the entire article into this:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;1.  Object
        |
2.  Data-block
        |
3.  Transform / coordinate space
        |
4.  Mesh
        |
5.  Topology
        |
6.  Normal
        |
7.  Modifier
        |
8.  Bevel
        |
9.  Subdivision
        |
10. Shading
        |
11. Camera projection
        |
12. Ray tracing
        |
13. Keyframes
        |
14. F-Curves / interpolation
        |
15. Parenting / constraints
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;And then remember the fundamental developer abstraction:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;scene = data + relationships + functions(time) + renderer
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Once you see Blender this way, the interface becomes much less mysterious.&lt;/p&gt;

&lt;p&gt;You aren't learning thousands of buttons.&lt;/p&gt;

&lt;p&gt;You are learning a fairly small set of abstractions that happen to have a very large UI wrapped around them.&lt;/p&gt;

&lt;p&gt;Blender itself is a good historical example of why these abstractions matter. It began as a production tool inside NeoGeo, became a commercial product through NaN, and after NaN collapsed in 2002, Ton Roosendaal's "Free Blender" campaign raised enough money to buy back the rights and release the software as GPL open source on October 13, 2002.&lt;/p&gt;

&lt;p&gt;The interesting part is that much of the software's complexity exists to let you describe increasingly complicated scenes without manually specifying every consequence.&lt;/p&gt;

&lt;p&gt;That is exactly the kind of abstraction developers should appreciate.&lt;/p&gt;
&lt;h3&gt;
  
  
  The practical takeaway
&lt;/h3&gt;

&lt;p&gt;For a first useful animation, learn these operations:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;add object
move object
rotate object
scale object
bevel object
apply material
place camera
place light
add keyframes
edit F-curves
parent objects
add a constraint
render
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;You can make a remarkable amount of professional-looking motion before touching fluids, particles, simulations, sculpting, UV workflows, character rigs or procedural geometry.&lt;/p&gt;

&lt;p&gt;That is probably the right place to start.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What Blender concept took you the longest to understand, even though it turned out to be conceptually simple?&lt;/strong&gt;&lt;/p&gt;



&lt;p&gt;&lt;em&gt;&lt;br&gt;
Your team's attention is limited, and the deluge of AI-generated code is making it harder to keep production reliable and secure without slowing you down.&lt;/em&gt;&lt;/p&gt;
&lt;em&gt;

&lt;p&gt;I'm building &lt;strong&gt;LiveReview&lt;/strong&gt;, a blast-radius aware AI code review built for your business-critical systems.&lt;/p&gt;

&lt;p&gt;Instead of presenting every diff with equal emphasis, &lt;strong&gt;LiveReview scores each change by blast radius — how far its impact reaches through your call graph — so you can focus attention where it actually matters.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Spend code review effort where business risk is highest — not spread evenly across every diff.&lt;/p&gt;

&lt;p&gt;⭐ Star it on GitHub: &lt;br&gt;
&lt;/p&gt;
&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://assets.dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/HexmosTech" rel="noopener noreferrer"&gt;
        HexmosTech
      &lt;/a&gt; / &lt;a href="https://github.com/HexmosTech/LiveReview" rel="noopener noreferrer"&gt;
        LiveReview
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      Blast-Radius Aware AI Code Review for Business-Critical Systems
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;&lt;p&gt;&lt;a rel="noopener noreferrer" href="https://github.com/HexmosTech/LiveReview/./assets/gfx/png/logo-with-text.png"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2FHexmosTech%2FLiveReview%2FHEAD%2F.%2Fassets%2Fgfx%2Fpng%2Flogo-with-text.png" alt="LiveReview" height="80"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/HexmosTech/LiveReview/actions/workflows/gitleaks.yml" rel="noopener noreferrer"&gt;&lt;img alt="gitleaks.yml" title="gitleaks.yml: Secret scanning workflow" src="https://github.com/HexmosTech/LiveReview/actions/workflows/gitleaks.yml/badge.svg"&gt;&lt;/a&gt;&amp;nbsp;&lt;a href="https://github.com/HexmosTech/LiveReview/actions/workflows/osv-scanner.yml" rel="noopener noreferrer"&gt;&lt;img alt="osv-scanner.yml" title="osv-scanner.yml: Dependency vulnerability scan" src="https://github.com/HexmosTech/LiveReview/actions/workflows/osv-scanner.yml/badge.svg"&gt;&lt;/a&gt;&amp;nbsp;&lt;a href="https://github.com/HexmosTech/LiveReview/actions/workflows/govulncheck.yml" rel="noopener noreferrer"&gt;&lt;img alt="govulncheck.yml" title="govulncheck.yml: Go vulnerability check" src="https://github.com/HexmosTech/LiveReview/actions/workflows/govulncheck.yml/badge.svg"&gt;&lt;/a&gt;&amp;nbsp;&lt;a href="https://github.com/HexmosTech/LiveReview/actions/workflows/semgrep.yml" rel="noopener noreferrer"&gt;&lt;img alt="semgrep.yml" title="semgrep.yml: Static analysis security scan" src="https://github.com/HexmosTech/LiveReview/actions/workflows/semgrep.yml/badge.svg"&gt;&lt;/a&gt;&amp;nbsp;&lt;a rel="noopener noreferrer" href="https://github.com/HexmosTech/LiveReview/./assets/gfx/dependabot-enabled.svg"&gt;&lt;img alt="dependabot-enabled" title="dependabot-enabled: Automated dependency updates are enabled" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2FHexmosTech%2FLiveReview%2FHEAD%2F.%2Fassets%2Fgfx%2Fdependabot-enabled.svg"&gt;&lt;/a&gt;&amp;nbsp;&lt;a href="https://github.com/HexmosTech/LiveReview/actions/workflows/mcp-testcases.yml" rel="noopener noreferrer"&gt;&lt;img alt="mcp-testcases.yml" title="mcp-testcases.yml: MCP integration test suite" src="https://github.com/HexmosTech/LiveReview/actions/workflows/mcp-testcases.yml/badge.svg"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;LiveReview: Blast-Radius Aware AI Code Review for Business-Critical Systems&lt;/h1&gt;
&lt;/div&gt;

&lt;p&gt;LiveReview is an AI code reviewer that scores every hunk of a diff by &lt;strong&gt;blast radius&lt;/strong&gt;: how far a change reaches through your call graph, how much persistent state it touches, and how well-tested it is. A 3-line change to a shared auth check can outrank a 300-line UI tweak. Your team's attention goes to the highest-risk code first, not spread evenly across every diff.&lt;/p&gt;


  
    
    &lt;span class="m-1"&gt;blast-radius-demo.mp4&lt;/span&gt;
  

  

  


&lt;p&gt;&lt;i&gt;LiveReview's Blast Radius &amp;amp; Review Priority scoring, live in the diff viewer.&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;&lt;div class="table-wrapper-paragraph"&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;table&gt;

&lt;thead&gt;

&lt;tr&gt;

&lt;th&gt;The exact math, not a black box&lt;/th&gt;

&lt;th&gt;Visualize blast radius at a glance&lt;/th&gt;

&lt;th&gt;Every factor that feeds the score&lt;/th&gt;

&lt;/tr&gt;

&lt;/thead&gt;

&lt;tbody&gt;

&lt;tr&gt;

&lt;td&gt;&lt;a rel="noopener noreferrer" href="https://github.com/HexmosTech/LiveReview/./assets/screenshots/blast-radius/new-risk-score-3.webp"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fraw.githubusercontent.com%2FHexmosTech%2FLiveReview%2FHEAD%2F.%2Fassets%2Fscreenshots%2Fblast-radius%2Fnew-risk-score-3.webp" width="280"&gt;&lt;/a&gt;&lt;/td&gt;

&lt;td&gt;&lt;a rel="noopener noreferrer" href="https://github.com/HexmosTech/LiveReview/./assets/screenshots/blast-radius/new-risk-score-4.webp"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fraw.githubusercontent.com%2FHexmosTech%2FLiveReview%2FHEAD%2F.%2Fassets%2Fscreenshots%2Fblast-radius%2Fnew-risk-score-4.webp" width="280"&gt;&lt;/a&gt;&lt;/td&gt;

&lt;td&gt;&lt;a rel="noopener noreferrer" href="https://github.com/HexmosTech/LiveReview/./assets/screenshots/blast-radius/new-risk-score-2.webp"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fraw.githubusercontent.com%2FHexmosTech%2FLiveReview%2FHEAD%2F.%2Fassets%2Fscreenshots%2Fblast-radius%2Fnew-risk-score-2.webp" width="280"&gt;&lt;/a&gt;&lt;/td&gt;

&lt;/tr&gt;

&lt;/tbody&gt;

&lt;/table&gt;&lt;/div&gt;&lt;br&gt;
&lt;p&gt;&lt;/p&gt;

How does Blast Radius scoring work? (a more technical explanation)

&lt;p&gt;&lt;strong&gt;Here's the goal:&lt;/strong&gt;&lt;/p&gt;


&lt;ul&gt;

&lt;li&gt;A 3-line fix in a function used by 40 other files, that also writes to a database, should score high.&lt;/li&gt;

&lt;li&gt;A 300-line UI change in one file, fully covered by…&lt;/li&gt;

&lt;/ul&gt;&lt;/div&gt;
&lt;br&gt;
  &lt;/div&gt;
&lt;br&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/HexmosTech/LiveReview" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;br&gt;
&lt;/div&gt;
&lt;br&gt;


&lt;p&gt;&lt;b&gt;Click below to try LiveReview with your codebase:&lt;/b&gt;&lt;/p&gt;

&lt;/em&gt;&lt;p&gt;&lt;em&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://hexmos.com/livereview" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fvls0pq7nymbrll98je6s.png" alt="LiveReview Banner" width="800" height="240"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>webdev</category>
      <category>productivity</category>
      <category>programming</category>
    </item>
    <item>
      <title>How chDB Turns Ephemeral Agent State into Durable Memory</title>
      <dc:creator>Shrijith Venkatramana</dc:creator>
      <pubDate>Wed, 30 Sep 2026 19:44:34 +0000</pubDate>
      <link>https://dev.to/shrsv/how-chdb-turns-ephemeral-agent-state-into-durable-memory-1nde</link>
      <guid>https://dev.to/shrsv/how-chdb-turns-ephemeral-agent-state-into-durable-memory-1nde</guid>
      <description>&lt;p&gt;&lt;em&gt;Hello, I'm Shrijith Venkatramana, and I'm building LiveReview — a blast-radius aware AI code review built for your business-critical systems. &lt;a href="https://github.com/HexmosTech/LiveReview/" rel="noopener noreferrer"&gt;Star us&lt;/a&gt; to help devs discover the project, give it a try, and share your feedback to help improve the product.&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;Agent memory sounds like an LLM problem until you actually deploy an agent.&lt;/p&gt;

&lt;p&gt;A useful agent needs to retain things such as:&lt;/p&gt;

&lt;p&gt;project conventions&lt;br&gt;
previous decisions&lt;br&gt;
tool results&lt;br&gt;
failed approaches&lt;br&gt;
user preferences&lt;br&gt;
investigation history&lt;/p&gt;

&lt;p&gt;Now put that agent inside a temporary CI runner or Lambda or sandbox.&lt;/p&gt;

&lt;p&gt;Where does all of that state live?&lt;/p&gt;

&lt;p&gt;A file works well until you need the agent to move to another machine. A remote database solves portability, but introduces a network dependency for every read and write.&lt;/p&gt;

&lt;p&gt;chDB Durable occupies the space between the two.&lt;/p&gt;

&lt;p&gt;It keeps the database embedded and local, while using object storage as the durable backing layer.&lt;/p&gt;

&lt;p&gt;This becomes common as agents move between laptops, CI runners, sandboxes, containers, and short-lived cloud machines. A local agent can accumulate weeks of useful state: project conventions, user preferences, tool failures, corrected assumptions, previous decisions, and the evidence behind those decisions.&lt;/p&gt;

&lt;p&gt;A SQLite file can preserve some of this.&lt;/p&gt;

&lt;p&gt;A remote Postgres or ClickHouse server can preserve much more.&lt;/p&gt;

&lt;p&gt;But there is a useful middle ground:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Keep the database local for fast reads, while making its state durable in object storage.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;That is the idea behind the new &lt;strong&gt;chDB Durable Layer&lt;/strong&gt;.&lt;/p&gt;
&lt;h2&gt;
  
  
  1. Agent memory is becoming a database problem
&lt;/h2&gt;

&lt;p&gt;A useful way to think about an agent is as a loop:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;observe
  -&amp;gt; reason
  -&amp;gt; act
  -&amp;gt; observe
  -&amp;gt; reason
  -&amp;gt; act
  -&amp;gt; ...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Memory sits across this loop.&lt;/p&gt;

&lt;p&gt;The simplest implementation is often a list of messages:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;messages&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;User prefers uv over Poetry&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;The checkout service runs in eu-west-1&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Do not modify migrations during deployment&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Eventually that becomes insufficient.&lt;/p&gt;

&lt;p&gt;Suppose an agent originally learns:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Deploy checkout-api to eu-west-1.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Later, someone changes the infrastructure:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Deploy checkout-api to eu-central-1.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;What should the agent store?&lt;/p&gt;

&lt;p&gt;Just the new answer?&lt;/p&gt;

&lt;p&gt;Or also:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;old belief
new belief
who changed it
when it changed
why it changed
what evidence supported it
which agent used the old belief
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;This is where the problem starts looking much more like a database than a prompt.&lt;/p&gt;

&lt;p&gt;The research literature has been moving in this direction for several years. MemGPT, for example, explicitly treats an LLM agent as a system with multiple memory tiers and a mechanism for moving information between them. The underlying idea is familiar from operating systems: fast working memory is valuable, but larger persistent state must exist somewhere else.&lt;/p&gt;

&lt;p&gt;Agent memory is therefore partly a &lt;strong&gt;data placement problem&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The interesting question becomes:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Where should the agent's durable state live?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;
  
  
  2. The SQLite-to-server spectrum has a missing middle
&lt;/h2&gt;

&lt;p&gt;There are several obvious answers.&lt;/p&gt;
&lt;h3&gt;
  
  
  Local SQLite
&lt;/h3&gt;

&lt;p&gt;For a small agent, SQLite is excellent.&lt;/p&gt;

&lt;p&gt;It is embedded, transactional, mature, and requires no server.&lt;/p&gt;

&lt;p&gt;An agent can checkpoint its state:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;agent process
    |
    v
SQLite file
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The problem appears when memory becomes historical and analytical.&lt;/p&gt;

&lt;p&gt;You start wanting queries such as:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="n"&gt;project&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;count&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;tool_events&lt;/span&gt;
&lt;span class="k"&gt;GROUP&lt;/span&gt; &lt;span class="k"&gt;BY&lt;/span&gt; &lt;span class="n"&gt;project&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Or:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt;
&lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;memory_history&lt;/span&gt;
&lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="n"&gt;memory_id&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'deployment-region'&lt;/span&gt;
&lt;span class="k"&gt;ORDER&lt;/span&gt; &lt;span class="k"&gt;BY&lt;/span&gt; &lt;span class="k"&gt;version&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Or:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;sum&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;tokens&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="k"&gt;sum&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;cost&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;events&lt;/span&gt;
&lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="n"&gt;created_at&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;=&lt;/span&gt; &lt;span class="n"&gt;today&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mi"&gt;7&lt;/span&gt;
&lt;span class="k"&gt;GROUP&lt;/span&gt; &lt;span class="k"&gt;BY&lt;/span&gt; &lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;That is a different workload from "save my current checkpoint."&lt;/p&gt;
&lt;h3&gt;
  
  
  SQLite plus replication
&lt;/h3&gt;

&lt;p&gt;You can replicate SQLite's WAL to object storage.&lt;/p&gt;

&lt;p&gt;That solves the single-disk durability problem.&lt;/p&gt;

&lt;p&gt;But now there is another component in the deployment:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;agent
  |
SQLite
  |
replication process
  |
object storage
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;There is more operational machinery, and the underlying database is still fundamentally a transactional row store.&lt;/p&gt;
&lt;h3&gt;
  
  
  Remote database
&lt;/h3&gt;

&lt;p&gt;The other solution is to put memory into Postgres, pgvector, ClickHouse, or a managed memory platform.&lt;/p&gt;

&lt;p&gt;This solves portability and shared access.&lt;/p&gt;

&lt;p&gt;The architecture becomes:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;agent
   |
network
   |
database server
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Now every recall is potentially a remote operation.&lt;/p&gt;

&lt;p&gt;For a conventional application, this is often perfectly reasonable.&lt;/p&gt;

&lt;p&gt;For an agent, the distinction matters because one user request can generate many sequential tool calls.&lt;/p&gt;

&lt;p&gt;If an agent makes 10 data-access operations and each introduces 50 ms of network latency:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;10 * 50 ms = 500 ms
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Half a second appears before counting model inference.&lt;/p&gt;

&lt;p&gt;And that is the optimistic case. Retries, connection failures, authentication, network jitter, and service saturation add another dimension.&lt;/p&gt;
&lt;h3&gt;
  
  
  Embedded analytical database
&lt;/h3&gt;

&lt;p&gt;Now consider chDB.&lt;/p&gt;

&lt;p&gt;It puts the ClickHouse query engine inside the application process.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;agent process
    |
   chDB
    |
local database
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;This gives the agent SQL, columnar storage, analytical queries, and local execution without requiring a database server.&lt;/p&gt;

&lt;p&gt;But one problem remains:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The database is still attached to the machine.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This was the problem the chDB Durable Layer was designed to address.&lt;/p&gt;
&lt;h2&gt;
  
  
  3. The idea: local working copy, durable object
&lt;/h2&gt;

&lt;p&gt;The architecture is simple enough to draw on a whiteboard:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;                 object storage
              authoritative state
                     |
             flush / checkpoint
                     |
                     v
+---------------------------------------+
|              Agent process            |
|                                       |
|      chDB + local MergeTree           |
|                                       |
|      recall -&amp;gt; local SQL query        |
|      writes -&amp;gt; local WAL buffer       |
|                                       |
+---------------------------------------+
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The crucial distinction is between the &lt;strong&gt;working copy&lt;/strong&gt; and the &lt;strong&gt;authoritative copy&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The agent queries its local chDB database.&lt;/p&gt;

&lt;p&gt;Object storage holds the durable state.&lt;/p&gt;

&lt;p&gt;When the agent needs to publish changes, it calls:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;obj&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;flush&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;When it wants to create a new base snapshot and shorten future recovery:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;obj&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;checkpoint&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The result is an interesting deployment shape:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;No database server
No persistent volume requirement
No replication sidecar
No network call for every recall
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The durable object has an identity.&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;s3://my-agent-state/agent-memory
└── acme-checkout-api
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The namespace is the storage root.&lt;/p&gt;

&lt;p&gt;The object is one complete chDB database.&lt;/p&gt;

&lt;p&gt;That object can later be opened on another machine.&lt;/p&gt;

&lt;p&gt;This is particularly useful for agents because their compute environment is increasingly disposable.&lt;/p&gt;

&lt;p&gt;Imagine:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Laptop
   |
   | develop
   v
CI runner
   |
   | test
   v
sandbox
   |
   | reproduce bug
   v
another machine
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The runtime can disappear.&lt;/p&gt;

&lt;p&gt;The agent's accumulated state does not have to.&lt;/p&gt;
&lt;h2&gt;
  
  
  4. What actually happens during durability?
&lt;/h2&gt;

&lt;p&gt;The interesting engineering is underneath the small API.&lt;/p&gt;

&lt;p&gt;There are four concepts to keep in your head.&lt;/p&gt;
&lt;h3&gt;
  
  
  &lt;code&gt;execute()&lt;/code&gt;: mutate locally
&lt;/h3&gt;

&lt;p&gt;An operation such as:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;obj&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;execute&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;INSERT INTO memories VALUES (...)&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;changes the local working database.&lt;/p&gt;

&lt;p&gt;The mutation enters the WAL buffer.&lt;/p&gt;

&lt;p&gt;It has not necessarily become durable yet.&lt;/p&gt;
&lt;h3&gt;
  
  
  &lt;code&gt;flush()&lt;/code&gt;: make a promise real
&lt;/h3&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;obj&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;flush&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;is the durability boundary.&lt;/p&gt;

&lt;p&gt;When it returns, the writes covered by that flush have reached object storage.&lt;/p&gt;

&lt;p&gt;That gives application code an important semantic rule:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;execute()
    = "I changed my local memory."

flush()
    = "I promise this memory survived the machine."
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;For an agent API, this distinction matters.&lt;/p&gt;

&lt;p&gt;Consider a tool:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;remember("The deployment region is eu-central-1")
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Returning success immediately after &lt;code&gt;execute()&lt;/code&gt; means the tool may claim to have remembered something that disappears when the sandbox disappears.&lt;/p&gt;

&lt;p&gt;Returning success only after &lt;code&gt;flush()&lt;/code&gt; gives the tool an actual durability guarantee.&lt;/p&gt;
&lt;h3&gt;
  
  
  &lt;code&gt;checkpoint()&lt;/code&gt;: create a new base
&lt;/h3&gt;

&lt;p&gt;Between checkpoints, the durable state consists conceptually of:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;base snapshot
+
WAL segments
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Recovery therefore looks like:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;restore base
+
replay committed WAL
=
current database
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;As the WAL grows, recovery has more work to do.&lt;/p&gt;

&lt;p&gt;A checkpoint folds the current state into a new base.&lt;/p&gt;

&lt;p&gt;So there is a tradeoff:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;frequent checkpoint
    -&amp;gt; more transfer work
    -&amp;gt; shorter recovery

infrequent checkpoint
    -&amp;gt; less transfer work
    -&amp;gt; more WAL replay
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;This is a familiar database systems tradeoff appearing inside an agent architecture.&lt;/p&gt;
&lt;h3&gt;
  
  
  &lt;code&gt;head.json&lt;/code&gt;: who owns the database?
&lt;/h3&gt;

&lt;p&gt;There is another problem.&lt;/p&gt;

&lt;p&gt;Suppose two workers open:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;acme-checkout-api
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;at the same time.&lt;/p&gt;

&lt;p&gt;Both could believe:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;"I am the writer."
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;That is dangerous.&lt;/p&gt;

&lt;p&gt;Durable uses a head record with conditional writes to establish lease and fencing semantics.&lt;/p&gt;

&lt;p&gt;At a high level:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;read current head = version 17

writer A:
    CAS(17 -&amp;gt; 18)  succeeds

writer B:
    CAS(17 -&amp;gt; 18)  fails
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Only one process becomes the current writer.&lt;/p&gt;

&lt;p&gt;This gives Durable a deliberate constraint:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;one writer per object.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;That is a useful property for a per-user or per-project agent brain.&lt;/p&gt;

&lt;p&gt;It is a poor fit for a team database in which ten independent processes continuously update the same object.&lt;/p&gt;
&lt;h2&gt;
  
  
  5. Store memory as history, not as one giant document
&lt;/h2&gt;

&lt;p&gt;This is where using an analytical database becomes interesting.&lt;/p&gt;

&lt;p&gt;A naive memory system might have:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;memory.json
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;A more useful design has several relations:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;memories
memory_history
raw_transcripts
events
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;CREATE&lt;/span&gt; &lt;span class="k"&gt;TABLE&lt;/span&gt; &lt;span class="n"&gt;memory_history&lt;/span&gt;
&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;memory_id&lt;/span&gt; &lt;span class="n"&gt;String&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="k"&gt;version&lt;/span&gt; &lt;span class="n"&gt;UInt32&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;op&lt;/span&gt; &lt;span class="n"&gt;LowCardinality&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;String&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
    &lt;span class="n"&gt;content&lt;/span&gt; &lt;span class="n"&gt;String&lt;/span&gt; &lt;span class="n"&gt;CODEC&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ZSTD&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;)),&lt;/span&gt;
    &lt;span class="n"&gt;edited_by&lt;/span&gt; &lt;span class="n"&gt;String&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;edited_at&lt;/span&gt; &lt;span class="n"&gt;DateTime64&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'UTC'&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
    &lt;span class="n"&gt;prev_id&lt;/span&gt; &lt;span class="n"&gt;String&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;note&lt;/span&gt; &lt;span class="n"&gt;String&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;ENGINE&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;MergeTree&lt;/span&gt;
&lt;span class="k"&gt;ORDER&lt;/span&gt; &lt;span class="k"&gt;BY&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;memory_id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;version&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;edited_at&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Now a revision does not destroy the original fact.&lt;/p&gt;

&lt;p&gt;Instead:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;version 1:
Deploy checkout-api to eu-west-1.

version 2:
Deploy checkout-api to eu-central-1.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;You can query the current state.&lt;/p&gt;

&lt;p&gt;You can also query the history.&lt;/p&gt;

&lt;p&gt;You can even ask:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Why did the agent believe this?

Which evidence produced the belief?

When did the belief change?

How often was this memory recalled?

Did those recalls actually help?
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;That last class of questions is important.&lt;/p&gt;

&lt;p&gt;A memory system should eventually become capable of analyzing its own memory.&lt;/p&gt;

&lt;p&gt;That is naturally expressed with SQL.&lt;/p&gt;
&lt;h3&gt;
  
  
  Raw evidence and actual memory are different
&lt;/h3&gt;

&lt;p&gt;One especially useful distinction in the ClickMem design is between &lt;strong&gt;evidence&lt;/strong&gt; and &lt;strong&gt;memory&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;A transcript may contain:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;User:
"Maybe the service is in eu-west-1?"

Tool:
"Deployment failed."

Agent:
"Let's inspect the infrastructure."
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;None of that necessarily deserves promotion into long-term memory.&lt;/p&gt;

&lt;p&gt;Instead:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;raw_transcripts
    = searchable evidence

memories
    = curated beliefs
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;This reduces a common failure mode of memory systems:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;every conversation
    -&amp;gt; memory
    -&amp;gt; future behavior
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;A transient mistake then becomes persistent behavior.&lt;/p&gt;

&lt;p&gt;The alternative is:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;conversation
    -&amp;gt; evidence
    -&amp;gt; evaluation
    -&amp;gt; memory
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;That resembles the observation/retrieval/reflection pattern explored in early generative-agent research, but gives the resulting state a conventional data model.&lt;/p&gt;
&lt;h2&gt;
  
  
  6. The math, storage economics, and operational tradeoffs
&lt;/h2&gt;

&lt;p&gt;There are two pieces of mathematics worth understanding.&lt;/p&gt;
&lt;h3&gt;
  
  
  Semantic recall
&lt;/h3&gt;

&lt;p&gt;Suppose every memory has an embedding vector &lt;code&gt;m&lt;/code&gt;, and the current task has query vector &lt;code&gt;q&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;A common semantic score is cosine similarity:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;score(q, m) = (q dot m) / (||q|| ||m||)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The intuition is simple:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;same direction
    -&amp;gt; high similarity

different direction
    -&amp;gt; low similarity
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;A memory query can therefore look like:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;1. Filter project
2. Filter active memories
3. Generate semantic candidates
4. Rank candidates
5. Return top K
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;For a brute-force scan with:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;N memories
D embedding dimensions
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;the rough amount of dot-product work is:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;N * D
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;N = 100,000 memories
D = 1,536

N * D
= 153,600,000
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;That is roughly 154 million multiply-add terms for a full scan.&lt;/p&gt;

&lt;p&gt;Whether that is acceptable depends on hardware, query frequency, and filtering. The useful observation is that memory retrieval is a data-processing problem, so the choice between prefiltering, vector indexes, approximate nearest-neighbor methods, and brute-force scans becomes a database engineering decision.&lt;/p&gt;

&lt;p&gt;chDB already provides the local analytical machinery around the embedding column; the durability layer does not need to know whether your recall logic is lexical, vector-based, temporal, or some combination.&lt;/p&gt;
&lt;h3&gt;
  
  
  Storage is often cheaper than the memory architecture makes it look
&lt;/h3&gt;

&lt;p&gt;ClickHouse published an instructive experiment using a 1.45 GB Claude Code transcript sample containing 213,721 rows.&lt;/p&gt;

&lt;p&gt;Loaded into MergeTree:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ZSTD(3): 521 MiB
LZ4:     991 MiB
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;So the ZSTD representation is roughly:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;521 / 1,383 ~= 0.38
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;or about a &lt;strong&gt;62% reduction&lt;/strong&gt; relative to the original binary size.&lt;/p&gt;

&lt;p&gt;There was another useful observation:&lt;/p&gt;

&lt;p&gt;The screenshots represented only about 0.8% of rows, but roughly two-thirds of the bytes.&lt;/p&gt;

&lt;p&gt;That leads to a practical rule:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;textual history -&amp;gt; compress in the database

large binary objects
    -&amp;gt; keep outside the table
    -&amp;gt; store object keys in the database
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Otherwise your screenshots, audio, or video become part of every checkpoint.&lt;/p&gt;
&lt;h3&gt;
  
  
  A rough storage-cost calculation
&lt;/h3&gt;

&lt;p&gt;Suppose an agent eventually accumulates:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;0.5 GiB compressed durable state
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Using an illustrative S3 Standard rate of:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$0.023 / GB-month
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;the raw storage component is approximately:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;0.5 * 0.023
= $0.0115/month
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;about one cent per month.&lt;/p&gt;

&lt;p&gt;That is not a complete cloud bill. PUT/GET requests, transfer, replication, and the exact storage class and region all matter.&lt;/p&gt;

&lt;p&gt;But the calculation exposes something useful:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;For small per-agent memory stores, storage bytes are unlikely to be the expensive part.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The architectural costs are more likely to come from:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;inference
network calls
database operations
operational complexity
recovery behavior
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;This is why a one-bucket architecture can be attractive.&lt;/p&gt;

&lt;p&gt;Instead of paying continuously for:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;database server
connection pool
database operations
persistent volumes
replication sidecars
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;you retain a local process and pay for durable state only at explicit boundaries.&lt;/p&gt;

&lt;p&gt;The tradeoff is that you now own the lifecycle:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;IAM
bucket policies
encryption
object naming
retention
flush policy
checkpoint policy
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;That is a much smaller operational surface than operating a database cluster, but it is still an engineering responsibility.&lt;/p&gt;
&lt;h2&gt;
  
  
  7. When should developers use Durable?
&lt;/h2&gt;

&lt;p&gt;The cleanest decision rule is based on the shape of the workload.&lt;/p&gt;

&lt;p&gt;Use plain local chDB when:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;the state is disposable
or
the state never leaves one machine
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Use a transactional store when:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;you mainly need checkpoints
and
you do little historical analysis
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Use a server database when:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;many writers
many clients
centralized governance
large working sets
continuous shared access
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The Durable Layer fits the middle:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;one logical owner
+
local analytical queries
+
append-heavy history
+
portable durable state
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;A useful deployment might look like:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;                   S3 / GCS / Azure
                         |
                 durable agent object
                         |
          +--------------+--------------+
          |                             |
       laptop                         CI runner
          |                             |
       chDB                          chDB
          |                             |
      local SQL                     local SQL
          |                             |
       recall                         recall
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The database moves.&lt;/p&gt;

&lt;p&gt;The query engine stays embedded.&lt;/p&gt;

&lt;p&gt;The service layer disappears.&lt;/p&gt;

&lt;p&gt;And the boundary between "memory" and "data engineering" becomes much thinner.&lt;/p&gt;

&lt;p&gt;There is also a nice historical symmetry here.&lt;/p&gt;

&lt;p&gt;ClickHouse itself began at Yandex under Alexey Milovidov and colleagues as an attempt to generate real-time analytical reports from continuously arriving, non-aggregated data. Its early production system eventually became the engine behind Yandex.Metrica.&lt;/p&gt;

&lt;p&gt;Years later, the same broad philosophy is useful for agents:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;keep the raw history
store it efficiently
query it later
derive answers from the history
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The difference is that the data is now an agent's experiences rather than web analytics.&lt;/p&gt;

&lt;p&gt;That may be one of the more useful ways to think about agent memory.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Memory is a database that happens to influence future decisions.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;And once you view it that way, persistence, provenance, revision history, compression, query latency, leases, checkpoints, and recovery stop looking like infrastructure details. They become part of the agent's cognitive architecture.&lt;/p&gt;

&lt;p&gt;The chDB Durable Layer is interesting because it gives developers a missing deployment primitive:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;embedded analytical state
+
portable durability
+
object storage
+
no database server
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The result is a local agent brain that can survive the machine that created it.&lt;/p&gt;

&lt;p&gt;What do you think the right primitive for long-lived agent memory should be: a vector store, a transactional database, or an analytical database with durable local state?&lt;/p&gt;



&lt;p&gt;&lt;em&gt;&lt;br&gt;
Your team's attention is limited, and the deluge of AI-generated code is making it harder to keep production reliable and secure without slowing you down.&lt;/em&gt;&lt;/p&gt;
&lt;em&gt;

&lt;p&gt;I'm building &lt;strong&gt;LiveReview&lt;/strong&gt;, a blast-radius aware AI code review built for your business-critical systems.&lt;/p&gt;

&lt;p&gt;Instead of presenting every diff with equal emphasis, &lt;strong&gt;LiveReview scores each change by blast radius — how far its impact reaches through your call graph — so you can focus attention where it actually matters.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Spend code review effort where business risk is highest — not spread evenly across every diff.&lt;/p&gt;

&lt;p&gt;⭐ Star it on GitHub: &lt;br&gt;
&lt;/p&gt;
&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://assets.dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/HexmosTech" rel="noopener noreferrer"&gt;
        HexmosTech
      &lt;/a&gt; / &lt;a href="https://github.com/HexmosTech/LiveReview" rel="noopener noreferrer"&gt;
        LiveReview
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      Blast-Radius Aware AI Code Review for Business-Critical Systems
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;&lt;p&gt;&lt;a rel="noopener noreferrer" href="https://github.com/HexmosTech/LiveReview/./assets/gfx/png/logo-with-text.png"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2FHexmosTech%2FLiveReview%2FHEAD%2F.%2Fassets%2Fgfx%2Fpng%2Flogo-with-text.png" alt="LiveReview" height="80"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/HexmosTech/LiveReview/actions/workflows/gitleaks.yml" rel="noopener noreferrer"&gt;&lt;img alt="gitleaks.yml" title="gitleaks.yml: Secret scanning workflow" src="https://github.com/HexmosTech/LiveReview/actions/workflows/gitleaks.yml/badge.svg"&gt;&lt;/a&gt;&amp;nbsp;&lt;a href="https://github.com/HexmosTech/LiveReview/actions/workflows/osv-scanner.yml" rel="noopener noreferrer"&gt;&lt;img alt="osv-scanner.yml" title="osv-scanner.yml: Dependency vulnerability scan" src="https://github.com/HexmosTech/LiveReview/actions/workflows/osv-scanner.yml/badge.svg"&gt;&lt;/a&gt;&amp;nbsp;&lt;a href="https://github.com/HexmosTech/LiveReview/actions/workflows/govulncheck.yml" rel="noopener noreferrer"&gt;&lt;img alt="govulncheck.yml" title="govulncheck.yml: Go vulnerability check" src="https://github.com/HexmosTech/LiveReview/actions/workflows/govulncheck.yml/badge.svg"&gt;&lt;/a&gt;&amp;nbsp;&lt;a href="https://github.com/HexmosTech/LiveReview/actions/workflows/semgrep.yml" rel="noopener noreferrer"&gt;&lt;img alt="semgrep.yml" title="semgrep.yml: Static analysis security scan" src="https://github.com/HexmosTech/LiveReview/actions/workflows/semgrep.yml/badge.svg"&gt;&lt;/a&gt;&amp;nbsp;&lt;a rel="noopener noreferrer" href="https://github.com/HexmosTech/LiveReview/./assets/gfx/dependabot-enabled.svg"&gt;&lt;img alt="dependabot-enabled" title="dependabot-enabled: Automated dependency updates are enabled" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2FHexmosTech%2FLiveReview%2FHEAD%2F.%2Fassets%2Fgfx%2Fdependabot-enabled.svg"&gt;&lt;/a&gt;&amp;nbsp;&lt;a href="https://github.com/HexmosTech/LiveReview/actions/workflows/mcp-testcases.yml" rel="noopener noreferrer"&gt;&lt;img alt="mcp-testcases.yml" title="mcp-testcases.yml: MCP integration test suite" src="https://github.com/HexmosTech/LiveReview/actions/workflows/mcp-testcases.yml/badge.svg"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;LiveReview: Blast-Radius Aware AI Code Review for Business-Critical Systems&lt;/h1&gt;
&lt;/div&gt;

&lt;p&gt;LiveReview is an AI code reviewer that scores every hunk of a diff by &lt;strong&gt;blast radius&lt;/strong&gt;: how far a change reaches through your call graph, how much persistent state it touches, and how well-tested it is. A 3-line change to a shared auth check can outrank a 300-line UI tweak. Your team's attention goes to the highest-risk code first, not spread evenly across every diff.&lt;/p&gt;


  
    
    &lt;span class="m-1"&gt;blast-radius-demo.mp4&lt;/span&gt;
  

  

  


&lt;p&gt;&lt;i&gt;LiveReview's Blast Radius &amp;amp; Review Priority scoring, live in the diff viewer.&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;&lt;div class="table-wrapper-paragraph"&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;table&gt;

&lt;thead&gt;

&lt;tr&gt;

&lt;th&gt;The exact math, not a black box&lt;/th&gt;

&lt;th&gt;Visualize blast radius at a glance&lt;/th&gt;

&lt;th&gt;Every factor that feeds the score&lt;/th&gt;

&lt;/tr&gt;

&lt;/thead&gt;

&lt;tbody&gt;

&lt;tr&gt;

&lt;td&gt;&lt;a rel="noopener noreferrer" href="https://github.com/HexmosTech/LiveReview/./assets/screenshots/blast-radius/new-risk-score-3.webp"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fraw.githubusercontent.com%2FHexmosTech%2FLiveReview%2FHEAD%2F.%2Fassets%2Fscreenshots%2Fblast-radius%2Fnew-risk-score-3.webp" width="280"&gt;&lt;/a&gt;&lt;/td&gt;

&lt;td&gt;&lt;a rel="noopener noreferrer" href="https://github.com/HexmosTech/LiveReview/./assets/screenshots/blast-radius/new-risk-score-4.webp"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fraw.githubusercontent.com%2FHexmosTech%2FLiveReview%2FHEAD%2F.%2Fassets%2Fscreenshots%2Fblast-radius%2Fnew-risk-score-4.webp" width="280"&gt;&lt;/a&gt;&lt;/td&gt;

&lt;td&gt;&lt;a rel="noopener noreferrer" href="https://github.com/HexmosTech/LiveReview/./assets/screenshots/blast-radius/new-risk-score-2.webp"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fraw.githubusercontent.com%2FHexmosTech%2FLiveReview%2FHEAD%2F.%2Fassets%2Fscreenshots%2Fblast-radius%2Fnew-risk-score-2.webp" width="280"&gt;&lt;/a&gt;&lt;/td&gt;

&lt;/tr&gt;

&lt;/tbody&gt;

&lt;/table&gt;&lt;/div&gt;&lt;br&gt;
&lt;p&gt;&lt;/p&gt;

How does Blast Radius scoring work? (a more technical explanation)

&lt;p&gt;&lt;strong&gt;Here's the goal:&lt;/strong&gt;&lt;/p&gt;


&lt;ul&gt;

&lt;li&gt;A 3-line fix in a function used by 40 other files, that also writes to a database, should score high.&lt;/li&gt;

&lt;li&gt;A 300-line UI change in one file, fully covered by…&lt;/li&gt;

&lt;/ul&gt;&lt;/div&gt;
&lt;br&gt;
  &lt;/div&gt;
&lt;br&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/HexmosTech/LiveReview" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;br&gt;
&lt;/div&gt;
&lt;br&gt;


&lt;p&gt;&lt;b&gt;Click below to try LiveReview with your codebase:&lt;/b&gt;&lt;/p&gt;

&lt;/em&gt;&lt;p&gt;&lt;em&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://hexmos.com/livereview" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fvls0pq7nymbrll98je6s.png" alt="LiveReview Banner" width="800" height="240"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>webdev</category>
      <category>productivity</category>
      <category>programming</category>
    </item>
    <item>
      <title>OpenShell: Building a Security Boundary Around AI Agents</title>
      <dc:creator>Shrijith Venkatramana</dc:creator>
      <pubDate>Tue, 29 Sep 2026 20:26:45 +0000</pubDate>
      <link>https://dev.to/shrsv/openshell-building-a-security-boundary-around-ai-agents-35f8</link>
      <guid>https://dev.to/shrsv/openshell-building-a-security-boundary-around-ai-agents-35f8</guid>
      <description>&lt;p&gt;&lt;em&gt;Hello, I'm Shrijith Venkatramana, and I'm building LiveReview — a blast-radius aware AI code review built for your business-critical systems. &lt;a href="https://github.com/HexmosTech/LiveReview/" rel="noopener noreferrer"&gt;Star us&lt;/a&gt; to help devs discover the project, give it a try, and share your feedback to help improve the product.&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;An AI coding agent with shell access has crossed a boundary that a chatbot never crossed.&lt;/p&gt;

&lt;p&gt;A chatbot can suggest:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;rm -rf /important/directory
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;An agent can actually run it.&lt;/p&gt;

&lt;p&gt;It can read your repository, inspect environment variables, install packages, call external APIs, modify configuration, create files, launch subprocesses and keep doing all of this after you have stopped watching.&lt;/p&gt;

&lt;p&gt;That changes the security problem.&lt;/p&gt;

&lt;p&gt;The old question was:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“Can I trust this program?”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The more useful question for agents becomes:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“What happens when this program cannot be trusted for the next ten minutes?”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That is the problem NVIDIA &lt;a href="https://github.com/NVIDIA/OpenShell" rel="noopener noreferrer"&gt;OpenShell&lt;/a&gt; is trying to solve.&lt;/p&gt;

&lt;p&gt;OpenShell is a runtime for autonomous AI agents. The important architectural idea is simple:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Put the security boundary outside the agent.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The agent gets a sandbox. The sandbox gets a policy. The operating system and runtime enforce that policy.&lt;/p&gt;

&lt;p&gt;This article looks at why that distinction matters, how OpenShell works, what its policy model looks like, and where the economics and engineering trade-offs appear.&lt;/p&gt;

&lt;p&gt;At the time of writing, the latest OpenShell release is 0.1.1, while NVIDIA's documentation still describes the software as alpha. So think of this as an architectural tour of an emerging runtime, not a production certification.&lt;/p&gt;
&lt;h2&gt;
  
  
  1. An AI agent is starting to look like a foreign process on your machine
&lt;/h2&gt;

&lt;p&gt;Traditional software usually has a relatively stable authority model.&lt;/p&gt;

&lt;p&gt;You install a compiler. The compiler can read your source tree.&lt;/p&gt;

&lt;p&gt;You run a test suite. The test runner can access whatever the test process can access.&lt;/p&gt;

&lt;p&gt;You start a server. The server has the permissions you gave its Unix user.&lt;/p&gt;

&lt;p&gt;With an AI agent, the software is producing the next action dynamically.&lt;/p&gt;

&lt;p&gt;A coding agent might do this:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;read issue
    ↓
inspect repository
    ↓
search documentation
    ↓
install dependency
    ↓
run tests
    ↓
discover failure
    ↓
modify code
    ↓
run shell command
    ↓
call GitHub API
    ↓
spawn another process
    ↓
try another approach
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The problem is not that any individual operation is unusual.&lt;/p&gt;

&lt;p&gt;The problem is &lt;strong&gt;composition&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;An agent can combine five individually reasonable permissions into a dangerous capability.&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;read ~/.config
+
read environment variables
+
execute Python
+
internet access
+
GitHub token
=
potential credential exfiltration
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The model does not need to be malicious for this to matter.&lt;/p&gt;

&lt;p&gt;A prompt injection buried inside a README can tell the agent to inspect a local file. A package installation step can execute arbitrary code. A tool response can contain instructions that compete with the original task.&lt;/p&gt;

&lt;p&gt;This is exactly the sort of environment studied in &lt;a href="https://proceedings.neurips.cc/paper_files/paper/2024/hash/97091a5177d8dc64b1da8bf3e1f6fb54-Abstract-Datasets_and_Benchmarks_Track.html" rel="noopener noreferrer"&gt;AgentDojo&lt;/a&gt;, which evaluated tool-using agents against adversarial content. The benchmark contained 97 realistic tasks and 629 security test cases involving things such as email, banking and travel workflows.&lt;/p&gt;

&lt;p&gt;The important lesson is architectural:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Prompt-level instructions are not a sufficient security boundary for a process that can act on the world.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;That is why OpenShell is interesting.&lt;/p&gt;

&lt;p&gt;It does not try to make the model perfectly trustworthy.&lt;/p&gt;

&lt;p&gt;It assumes the opposite.&lt;/p&gt;
&lt;h2&gt;
  
  
  2. Sandboxing is an old operating-systems idea
&lt;/h2&gt;

&lt;p&gt;OpenShell may sound like an AI-specific security invention, but its central idea is much older than neural networks.&lt;/p&gt;

&lt;p&gt;In 1975, Jerome Saltzer and Michael Schroeder published &lt;em&gt;The Protection of Information in Computer Systems&lt;/em&gt;. Among the principles they discussed were &lt;strong&gt;least privilege&lt;/strong&gt; and &lt;strong&gt;fail-safe defaults&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The intuition is straightforward:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Give a program only the authority required for its job, and make access unavailable unless it has been explicitly granted.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The same philosophy appears in the browser.&lt;/p&gt;

&lt;p&gt;When Google Chrome shipped in 2008, Adam Barth, Collin Jackson, Charlie Reis and the Chrome team described a design in which rendering happened in restricted processes while a more privileged browser process mediated access to the outside world.&lt;/p&gt;

&lt;p&gt;The reason was practical.&lt;/p&gt;

&lt;p&gt;If an attacker found a vulnerability in the renderer, arbitrary code execution inside the renderer should still have limited access to the machine.&lt;/p&gt;

&lt;p&gt;That distinction is worth remembering:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Compromised process
        ≠
Compromised machine
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;OpenShell is applying a similar idea to agents.&lt;/p&gt;

&lt;p&gt;You can think of it as:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;AI agent
    |
    | requests
    v
sandbox boundary
    |
    +---- filesystem policy
    +---- process policy
    +---- network policy
    +---- credential policy
    |
    v
host / enterprise infrastructure
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The agent is allowed to be wrong.&lt;/p&gt;

&lt;p&gt;The security boundary is supposed to remain correct anyway.&lt;/p&gt;

&lt;p&gt;This is a very different philosophy from:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;System prompt:
"Never access secrets."
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;That is an instruction.&lt;/p&gt;

&lt;p&gt;A sandbox policy is an enforcement mechanism.&lt;/p&gt;
&lt;h2&gt;
  
  
  3. OpenShell's mental model: the browser tab for agents
&lt;/h2&gt;

&lt;p&gt;NVIDIA describes OpenShell using a useful analogy: the browser tab.&lt;/p&gt;

&lt;p&gt;A browser tab is not allowed to behave like an arbitrary native process with unrestricted access to your computer.&lt;/p&gt;

&lt;p&gt;It operates inside a bounded environment.&lt;/p&gt;

&lt;p&gt;OpenShell tries to give an agent the same relationship with the host.&lt;/p&gt;

&lt;p&gt;You can launch an agent such as Claude Code inside a sandbox:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;openshell sandbox create &lt;span class="nt"&gt;--&lt;/span&gt; claude
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The architecture then separates several responsibilities.&lt;/p&gt;

&lt;p&gt;There is a &lt;strong&gt;gateway&lt;/strong&gt;, which acts as the control plane.&lt;/p&gt;

&lt;p&gt;There is a &lt;strong&gt;sandbox&lt;/strong&gt;, where the workload executes.&lt;/p&gt;

&lt;p&gt;There is a &lt;strong&gt;supervisor&lt;/strong&gt;, which lives on the trusted side of the workload boundary and mediates privileged operations.&lt;/p&gt;

&lt;p&gt;The agent itself becomes a child process inside this environment.&lt;/p&gt;

&lt;p&gt;Conceptually:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;                     CONTROL PLANE
                          |
                       Gateway
                          |
                 policy / providers
                          |
              +-----------+-----------+
              |                       |
        Supervisor                Supervisor
              |                       |
        Sandbox A                 Sandbox B
              |                       |
        Claude Code              Codex
              |                       |
          processes              processes
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The distinction between the supervisor and the agent is important.&lt;/p&gt;

&lt;p&gt;The agent should not control the mechanism that controls the agent.&lt;/p&gt;

&lt;p&gt;That is analogous to putting authentication checks outside the application instead of asking the application to certify that its own requests are safe.&lt;/p&gt;

&lt;p&gt;This is one of the strongest parts of the design.&lt;/p&gt;

&lt;p&gt;If the agent modifies its own source code, installs a new package, spawns a child process or becomes confused by prompt injection, those actions still encounter the external enforcement boundary.&lt;/p&gt;

&lt;p&gt;OpenShell currently exposes several runtime backends, including Docker, Podman, Kubernetes and VM-backed execution. The exact isolation machinery varies, but the policy model is intended to remain stable.&lt;/p&gt;
&lt;h2&gt;
  
  
  4. The interesting part is the policy: an agent gets a capability graph
&lt;/h2&gt;

&lt;p&gt;A useful way to think about an OpenShell policy is as a graph.&lt;/p&gt;

&lt;p&gt;Let:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;F = filesystem permissions
N = network destinations
P = executable/process identities
S = credential bindings
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The agent's actual capability set is roughly a subset of:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;F × N × P × S
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;This is not a formal security metric. It is a useful mental model.&lt;/p&gt;

&lt;p&gt;Imagine an agent has:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;3 executable identities
4 network endpoints
2 HTTP operation classes
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;That gives at most:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;3 × 4 × 2 = 24
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;meaningful executable-to-endpoint-to-operation combinations to reason about.&lt;/p&gt;

&lt;p&gt;With unrestricted outbound networking, the number of possible destinations becomes effectively unbounded from the policy's point of view.&lt;/p&gt;

&lt;p&gt;That is the value of least privilege: &lt;strong&gt;reduce the graph before you have to reason about its behavior.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A simplified policy can look like this:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;version&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1&lt;/span&gt;

&lt;span class="na"&gt;filesystem_policy&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;include_workdir&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;
  &lt;span class="na"&gt;read_only&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;/usr&lt;/span&gt;
    &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;/lib&lt;/span&gt;
    &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;/etc&lt;/span&gt;
  &lt;span class="na"&gt;read_write&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;/tmp&lt;/span&gt;

&lt;span class="na"&gt;landlock&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;compatibility&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;best_effort&lt;/span&gt;

&lt;span class="na"&gt;network_policies&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;github_api&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;github-api-readonly&lt;/span&gt;

    &lt;span class="na"&gt;endpoints&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;host&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;api.github.com&lt;/span&gt;
        &lt;span class="na"&gt;port&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;443&lt;/span&gt;
        &lt;span class="na"&gt;protocol&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;rest&lt;/span&gt;
        &lt;span class="na"&gt;enforcement&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;enforce&lt;/span&gt;
        &lt;span class="na"&gt;access&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;read-only&lt;/span&gt;

    &lt;span class="na"&gt;binaries&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;path&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;/usr/bin/curl&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;path&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;/usr/bin/gh&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;This says something considerably stronger than:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;"The agent should probably only use GitHub."
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;It says:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;These binaries
    ↓
may connect to
    ↓
this endpoint
    ↓
using
    ↓
these permitted operations
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;OpenShell can go further and constrain HTTP methods and paths.&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;network_policies&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;

  &lt;span class="na"&gt;github_repository_api&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;

    &lt;span class="na"&gt;endpoints&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;host&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;api.github.com&lt;/span&gt;
        &lt;span class="na"&gt;port&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;443&lt;/span&gt;
        &lt;span class="na"&gt;protocol&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;rest&lt;/span&gt;
        &lt;span class="na"&gt;enforcement&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;enforce&lt;/span&gt;

        &lt;span class="na"&gt;rules&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
          &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;allow&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
              &lt;span class="na"&gt;method&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;*"&lt;/span&gt;
              &lt;span class="na"&gt;path&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;/repos/acme/project/**"&lt;/span&gt;

        &lt;span class="na"&gt;deny_rules&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
          &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;method&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;*"&lt;/span&gt;
            &lt;span class="na"&gt;path&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;/repos/acme/project/hooks"&lt;/span&gt;

          &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;method&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;*"&lt;/span&gt;
            &lt;span class="na"&gt;path&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;/repos/acme/project/hooks/**"&lt;/span&gt;

    &lt;span class="na"&gt;binaries&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;path&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;/usr/bin/gh&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Now you are describing something closer to an application firewall:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;binary
+
host
+
port
+
protocol
+
HTTP method
+
path
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;This matters because an agent does not merely need “Internet access.”&lt;/p&gt;

&lt;p&gt;It often needs one very specific network action.&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;GET /repos/acme/project/issues
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;is a very different capability from:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;POST /repos/acme/project/hooks
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The second might enable an entirely different class of side effect.&lt;/p&gt;

&lt;p&gt;This is where agent security starts looking less like prompt engineering and more like operating-system protection.&lt;/p&gt;
&lt;h2&gt;
  
  
  5. Under the hood, OpenShell combines several old security mechanisms
&lt;/h2&gt;

&lt;p&gt;The interesting technical detail is that OpenShell does not depend on a single sandbox primitive.&lt;/p&gt;

&lt;p&gt;It layers multiple controls.&lt;/p&gt;
&lt;h3&gt;
  
  
  Filesystem: Landlock
&lt;/h3&gt;

&lt;p&gt;OpenShell uses Linux Landlock to constrain filesystem access.&lt;/p&gt;

&lt;p&gt;Conceptually:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;read:
    /usr
    /lib
    /etc

read/write:
    /sandbox
    /tmp

everything else:
    deny
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;This is implemented at the kernel level.&lt;/p&gt;

&lt;p&gt;That matters because the agent cannot simply decide:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Ignore the policy.&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;and turn it off from inside the process.&lt;/p&gt;

&lt;p&gt;The current implementation distinguishes between static filesystem/process controls and dynamic network controls. Filesystem restrictions are established when the sandbox starts, while network policy can be changed while the sandbox is running.&lt;/p&gt;
&lt;h3&gt;
  
  
  Processes: reduced privilege
&lt;/h3&gt;

&lt;p&gt;The workload runs as an unprivileged identity with reduced capabilities.&lt;/p&gt;

&lt;p&gt;OpenShell's architecture explicitly aims to avoid giving the agent Linux capabilities inside the workload.&lt;/p&gt;

&lt;p&gt;The point is defense in depth.&lt;/p&gt;

&lt;p&gt;Suppose the agent contains a vulnerability.&lt;/p&gt;

&lt;p&gt;Suppose the agent executes malicious code.&lt;/p&gt;

&lt;p&gt;Suppose a dependency behaves badly.&lt;/p&gt;

&lt;p&gt;The resulting process still has a restricted operating-system authority.&lt;/p&gt;
&lt;h3&gt;
  
  
  Network: deny first
&lt;/h3&gt;

&lt;p&gt;This may be the most important practical control.&lt;/p&gt;

&lt;p&gt;Outbound networking starts from a deny-by-default posture.&lt;/p&gt;

&lt;p&gt;Connections are mediated through the OpenShell network path, where policy can inspect the destination, calling executable and, for supported protocols, higher-level HTTP operations.&lt;/p&gt;

&lt;p&gt;That allows a policy like:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/usr/bin/gh
    -&amp;gt; api.github.com:443
    -&amp;gt; GET
    -&amp;gt; /repos/acme/project/**
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;while denying:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/usr/bin/gh
    -&amp;gt; random-attacker.example
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;and potentially:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/usr/bin/gh
    -&amp;gt; api.github.com
    -&amp;gt; POST /hooks
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The current architecture also tracks executable identity using the executable's observed path and SHA-256 digest. That closes an interesting hole:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;allowed binary
    ↓
replace binary
    ↓
same path
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;A path alone is weaker than:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;path + executable identity
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;because otherwise an allowed executable could potentially be replaced by another program.&lt;/p&gt;
&lt;h3&gt;
  
  
  Credentials: give the agent access without handing it the secret
&lt;/h3&gt;

&lt;p&gt;This is particularly relevant for coding agents.&lt;/p&gt;

&lt;p&gt;Suppose your agent needs a GitHub token.&lt;/p&gt;

&lt;p&gt;The naive approach is:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;GITHUB_TOKEN&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;...
claude
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Now the process has the secret.&lt;/p&gt;

&lt;p&gt;Any code it executes may potentially inspect it.&lt;/p&gt;

&lt;p&gt;OpenShell instead has a provider model in which credentials can be stored outside the sandbox and bound to authorized endpoints.&lt;/p&gt;

&lt;p&gt;Conceptually:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Agent
  |
  | "call GitHub"
  v
OpenShell policy
  |
  | allowed?
  v
credential binding
  |
  v
GitHub
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The agent can get the capability without necessarily getting the raw credential as ordinary application data.&lt;/p&gt;

&lt;p&gt;This is a much better abstraction for autonomous software.&lt;/p&gt;

&lt;p&gt;The question becomes:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“Which service may this workload access?”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;rather than:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“How do I smuggle the password into this process?”&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;
  
  
  6. The operational challenge is allowing autonomy without turning policy into babysitting
&lt;/h2&gt;

&lt;p&gt;There is an uncomfortable tension here.&lt;/p&gt;

&lt;p&gt;A very restrictive agent may be safe but useless.&lt;/p&gt;

&lt;p&gt;Imagine an agent starts working and discovers it needs:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;registry.npmjs.org
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;but the network is denied.&lt;/p&gt;

&lt;p&gt;You have two choices.&lt;/p&gt;

&lt;p&gt;The old approach is:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;developer notices failure
    ↓
opens policy file
    ↓
adds endpoint
    ↓
restarts things
    ↓
agent continues
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;That becomes expensive very quickly.&lt;/p&gt;

&lt;p&gt;OpenShell has a &lt;strong&gt;policy advisor&lt;/strong&gt; workflow that turns a denied request into a proposed policy change.&lt;/p&gt;

&lt;p&gt;The important property is that the agent can propose the permission, but the proposal does not automatically become policy.&lt;/p&gt;

&lt;p&gt;Conceptually:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;agent request
    ↓
DENY
    ↓
agent explains:
"I need registry.npmjs.org"
    ↓
policy proposal
    ↓
validation / review
    ↓
APPROVE
    ↓
live policy update
    ↓
retry
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;This preserves a useful separation:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;agent proposes
human authorizes
runtime enforces
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;OpenShell also includes a policy prover. The current implementation models policy, credentials and binary capabilities and uses formal reasoning to identify changes such as newly reachable credentialed destinations.&lt;/p&gt;

&lt;p&gt;That introduces an interesting idea:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;security policy itself becomes something you can analyze mechanically.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;You can think of the prover as asking questions such as:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Did this change introduce a new credentialed path?

Did this change introduce a new capability?

Did this change make a previously inaccessible endpoint reachable?
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;This is much more tractable than trying to prove that an LLM will never make a bad decision.&lt;/p&gt;
&lt;h3&gt;
  
  
  A small economics calculation
&lt;/h3&gt;

&lt;p&gt;Suppose an agent generates:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;20 permission requests/day
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;and each one takes:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;20 seconds
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;of human attention.&lt;/p&gt;

&lt;p&gt;Then:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;20 × 20 sec = 400 sec
             ≈ 6.7 min/day
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;For one agent, that is manageable.&lt;/p&gt;

&lt;p&gt;Now suppose you operate 100 agents:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;100 × 20 × 20 sec
= 40,000 sec/day
≈ 11.1 hours/day
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The exact numbers are hypothetical, but the operational principle is real:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;the cost of agent security depends heavily on how often humans must intervene.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A policy system therefore has to optimize for two things at once:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;minimal authority
+
minimal interruption
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;That is why live policy updates, narrow proposals, deterministic checks and audit logs are more interesting than simply putting the agent in Docker and stopping there.&lt;/p&gt;
&lt;h3&gt;
  
  
  Auditability matters too
&lt;/h3&gt;

&lt;p&gt;OpenShell records structured security events for things such as:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;allowed network access
denied network access
policy changes
security findings
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;That gives operations teams a way to answer:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;What did the agent try to do?

What did the runtime allow?

What did the runtime deny?

Which policy allowed it?

Which executable made the request?
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;For autonomous systems, this starts looking like observability for authority rather than merely observability for performance.&lt;/p&gt;

&lt;p&gt;A distributed system has traces for:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;request A -&amp;gt; service B -&amp;gt; database C
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;An agent runtime needs something similar for:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;agent -&amp;gt; binary -&amp;gt; endpoint -&amp;gt; credential -&amp;gt; action
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h2&gt;
  
  
  7. What OpenShell does not solve
&lt;/h2&gt;

&lt;p&gt;The sandbox boundary is powerful precisely because it has a clear scope.&lt;/p&gt;

&lt;p&gt;It also has clear limits.&lt;/p&gt;

&lt;p&gt;Suppose you allow:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;agent -&amp;gt; api.github.com
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The sandbox cannot infer whether the agent &lt;em&gt;should&lt;/em&gt; create a repository release.&lt;/p&gt;

&lt;p&gt;That is an application-level authorization problem.&lt;/p&gt;

&lt;p&gt;Similarly, if you allow:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;agent -&amp;gt; your production API
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;then the sandbox cannot magically determine whether:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;DELETE /customers/123
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;was semantically appropriate.&lt;/p&gt;

&lt;p&gt;There are at least four different layers of security:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;1. Model behavior
2. Agent/application behavior
3. Runtime containment
4. Infrastructure authorization
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;OpenShell mainly strengthens layer 3 and connects it to parts of layers 2 and 4.&lt;/p&gt;

&lt;p&gt;It does not make the model trustworthy.&lt;/p&gt;

&lt;p&gt;It does not eliminate prompt injection.&lt;/p&gt;

&lt;p&gt;It does not eliminate supply-chain attacks.&lt;/p&gt;

&lt;p&gt;It does not guarantee that an allowed API call is logically correct.&lt;/p&gt;

&lt;p&gt;It does not make a kernel vulnerability disappear.&lt;/p&gt;

&lt;p&gt;And a sandbox is only as good as the isolation boundary beneath it.&lt;/p&gt;

&lt;p&gt;This is another lesson from decades of systems security: &lt;strong&gt;containment reduces the consequences of failure; it does not make failure impossible.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The browser analogy is useful again.&lt;/p&gt;

&lt;p&gt;Chrome's sandbox did not make browsers bug-free.&lt;/p&gt;

&lt;p&gt;It changed the consequence of a renderer compromise.&lt;/p&gt;

&lt;p&gt;That is the right way to think about an agent sandbox.&lt;/p&gt;

&lt;p&gt;The agent may still go wrong.&lt;/p&gt;

&lt;p&gt;The question is whether “the agent went wrong” means:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;bad code in /tmp
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;or:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;production database deleted
AWS credentials exfiltrated
private repositories copied
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Those are very different failure domains.&lt;/p&gt;
&lt;h3&gt;
  
  
  The larger idea
&lt;/h3&gt;

&lt;p&gt;AI agents are slowly turning software from:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;programs that execute instructions
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;into:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;programs that continuously choose instructions
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Once that happens, the operating system becomes relevant again.&lt;/p&gt;

&lt;p&gt;The shell becomes relevant.&lt;/p&gt;

&lt;p&gt;Permissions become relevant.&lt;/p&gt;

&lt;p&gt;Process identity becomes relevant.&lt;/p&gt;

&lt;p&gt;Credential boundaries become relevant.&lt;/p&gt;

&lt;p&gt;Audit logs become relevant.&lt;/p&gt;

&lt;p&gt;Least privilege becomes relevant.&lt;/p&gt;

&lt;p&gt;In other words, many of the ideas that operating-systems and security engineers have worked on for decades suddenly become central to AI engineering.&lt;/p&gt;

&lt;p&gt;OpenShell is interesting because it treats the agent as a potentially untrusted process and asks a very old systems question:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;What authority does this process actually need?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That is a much more scalable question than asking the model to behave itself.&lt;/p&gt;

&lt;p&gt;For a developer, the mental shift is simple:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Before:

AI agent
   |
   +---- full machine
   +---- full filesystem
   +---- full network
   +---- credentials

After:

AI agent
   |
   v
OpenShell sandbox
   |
   +---- specific files
   +---- specific binaries
   +---- specific endpoints
   +---- specific API operations
   +---- specific credentials
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The real promise of agentic software may therefore depend less on making agents perfectly aligned and more on making them &lt;strong&gt;containable when they are wrong&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;And that is an old engineering trick.&lt;/p&gt;

&lt;p&gt;We learned it from browsers.&lt;/p&gt;

&lt;p&gt;We learned it from operating systems.&lt;/p&gt;

&lt;p&gt;We are now applying it to machines that can reason about what to do next.&lt;/p&gt;
&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;The deepest idea behind OpenShell is not Docker, Landlock, seccomp or YAML.&lt;/p&gt;

&lt;p&gt;It is the decision to move trust &lt;strong&gt;outside the agent&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Once an autonomous system can execute arbitrary code, persistent memory, external tools and network calls, “please behave” stops being a sufficient security architecture.&lt;/p&gt;

&lt;p&gt;A better model is:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Give the agent enough authority to be useful.

Put the authority behind a boundary it cannot rewrite.

Make that boundary explicit.

Make changes reviewable.

Make violations observable.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;That is the basic architecture required when software starts acting more like an autonomous operator than a traditional program.&lt;/p&gt;

&lt;p&gt;The interesting question for developers is no longer whether agents will get shell access.&lt;/p&gt;

&lt;p&gt;They already are.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The interesting question is: what is the smallest world you are willing to let an agent operate in?&lt;/strong&gt;&lt;/p&gt;



&lt;p&gt;&lt;em&gt;&lt;br&gt;
Your team's attention is limited, and the deluge of AI-generated code is making it harder to keep production reliable and secure without slowing you down.&lt;/em&gt;&lt;/p&gt;
&lt;em&gt;

&lt;p&gt;I'm building &lt;strong&gt;LiveReview&lt;/strong&gt;, a blast-radius aware AI code review built for your business-critical systems.&lt;/p&gt;

&lt;p&gt;Instead of presenting every diff with equal emphasis, &lt;strong&gt;LiveReview scores each change by blast radius — how far its impact reaches through your call graph — so you can focus attention where it actually matters.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Spend code review effort where business risk is highest — not spread evenly across every diff.&lt;/p&gt;

&lt;p&gt;⭐ Star it on GitHub: &lt;br&gt;
&lt;/p&gt;
&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://assets.dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/HexmosTech" rel="noopener noreferrer"&gt;
        HexmosTech
      &lt;/a&gt; / &lt;a href="https://github.com/HexmosTech/LiveReview" rel="noopener noreferrer"&gt;
        LiveReview
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      Blast-Radius Aware AI Code Review for Business-Critical Systems
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;&lt;p&gt;&lt;a rel="noopener noreferrer" href="https://github.com/HexmosTech/LiveReview/./assets/gfx/png/logo-with-text.png"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2FHexmosTech%2FLiveReview%2FHEAD%2F.%2Fassets%2Fgfx%2Fpng%2Flogo-with-text.png" alt="LiveReview" height="80"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/HexmosTech/LiveReview/actions/workflows/gitleaks.yml" rel="noopener noreferrer"&gt;&lt;img alt="gitleaks.yml" title="gitleaks.yml: Secret scanning workflow" src="https://github.com/HexmosTech/LiveReview/actions/workflows/gitleaks.yml/badge.svg"&gt;&lt;/a&gt;&amp;nbsp;&lt;a href="https://github.com/HexmosTech/LiveReview/actions/workflows/osv-scanner.yml" rel="noopener noreferrer"&gt;&lt;img alt="osv-scanner.yml" title="osv-scanner.yml: Dependency vulnerability scan" src="https://github.com/HexmosTech/LiveReview/actions/workflows/osv-scanner.yml/badge.svg"&gt;&lt;/a&gt;&amp;nbsp;&lt;a href="https://github.com/HexmosTech/LiveReview/actions/workflows/govulncheck.yml" rel="noopener noreferrer"&gt;&lt;img alt="govulncheck.yml" title="govulncheck.yml: Go vulnerability check" src="https://github.com/HexmosTech/LiveReview/actions/workflows/govulncheck.yml/badge.svg"&gt;&lt;/a&gt;&amp;nbsp;&lt;a href="https://github.com/HexmosTech/LiveReview/actions/workflows/semgrep.yml" rel="noopener noreferrer"&gt;&lt;img alt="semgrep.yml" title="semgrep.yml: Static analysis security scan" src="https://github.com/HexmosTech/LiveReview/actions/workflows/semgrep.yml/badge.svg"&gt;&lt;/a&gt;&amp;nbsp;&lt;a rel="noopener noreferrer" href="https://github.com/HexmosTech/LiveReview/./assets/gfx/dependabot-enabled.svg"&gt;&lt;img alt="dependabot-enabled" title="dependabot-enabled: Automated dependency updates are enabled" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2FHexmosTech%2FLiveReview%2FHEAD%2F.%2Fassets%2Fgfx%2Fdependabot-enabled.svg"&gt;&lt;/a&gt;&amp;nbsp;&lt;a href="https://github.com/HexmosTech/LiveReview/actions/workflows/mcp-testcases.yml" rel="noopener noreferrer"&gt;&lt;img alt="mcp-testcases.yml" title="mcp-testcases.yml: MCP integration test suite" src="https://github.com/HexmosTech/LiveReview/actions/workflows/mcp-testcases.yml/badge.svg"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;LiveReview: Blast-Radius Aware AI Code Review for Business-Critical Systems&lt;/h1&gt;
&lt;/div&gt;

&lt;p&gt;LiveReview is an AI code reviewer that scores every hunk of a diff by &lt;strong&gt;blast radius&lt;/strong&gt;: how far a change reaches through your call graph, how much persistent state it touches, and how well-tested it is. A 3-line change to a shared auth check can outrank a 300-line UI tweak. Your team's attention goes to the highest-risk code first, not spread evenly across every diff.&lt;/p&gt;


  
    
    &lt;span class="m-1"&gt;blast-radius-demo.mp4&lt;/span&gt;
  

  

  


&lt;p&gt;&lt;i&gt;LiveReview's Blast Radius &amp;amp; Review Priority scoring, live in the diff viewer.&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;&lt;div class="table-wrapper-paragraph"&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;table&gt;

&lt;thead&gt;

&lt;tr&gt;

&lt;th&gt;The exact math, not a black box&lt;/th&gt;

&lt;th&gt;Visualize blast radius at a glance&lt;/th&gt;

&lt;th&gt;Every factor that feeds the score&lt;/th&gt;

&lt;/tr&gt;

&lt;/thead&gt;

&lt;tbody&gt;

&lt;tr&gt;

&lt;td&gt;&lt;a rel="noopener noreferrer" href="https://github.com/HexmosTech/LiveReview/./assets/screenshots/blast-radius/new-risk-score-3.webp"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fraw.githubusercontent.com%2FHexmosTech%2FLiveReview%2FHEAD%2F.%2Fassets%2Fscreenshots%2Fblast-radius%2Fnew-risk-score-3.webp" width="280"&gt;&lt;/a&gt;&lt;/td&gt;

&lt;td&gt;&lt;a rel="noopener noreferrer" href="https://github.com/HexmosTech/LiveReview/./assets/screenshots/blast-radius/new-risk-score-4.webp"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fraw.githubusercontent.com%2FHexmosTech%2FLiveReview%2FHEAD%2F.%2Fassets%2Fscreenshots%2Fblast-radius%2Fnew-risk-score-4.webp" width="280"&gt;&lt;/a&gt;&lt;/td&gt;

&lt;td&gt;&lt;a rel="noopener noreferrer" href="https://github.com/HexmosTech/LiveReview/./assets/screenshots/blast-radius/new-risk-score-2.webp"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fraw.githubusercontent.com%2FHexmosTech%2FLiveReview%2FHEAD%2F.%2Fassets%2Fscreenshots%2Fblast-radius%2Fnew-risk-score-2.webp" width="280"&gt;&lt;/a&gt;&lt;/td&gt;

&lt;/tr&gt;

&lt;/tbody&gt;

&lt;/table&gt;&lt;/div&gt;&lt;br&gt;
&lt;p&gt;&lt;/p&gt;

How does Blast Radius scoring work? (a more technical explanation)

&lt;p&gt;&lt;strong&gt;Here's the goal:&lt;/strong&gt;&lt;/p&gt;


&lt;ul&gt;

&lt;li&gt;A 3-line fix in a function used by 40 other files, that also writes to a database, should score high.&lt;/li&gt;

&lt;li&gt;A 300-line UI change in one file, fully covered by…&lt;/li&gt;

&lt;/ul&gt;&lt;/div&gt;
&lt;br&gt;
  &lt;/div&gt;
&lt;br&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/HexmosTech/LiveReview" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;br&gt;
&lt;/div&gt;
&lt;br&gt;


&lt;p&gt;&lt;b&gt;Click below to try LiveReview with your codebase:&lt;/b&gt;&lt;/p&gt;

&lt;/em&gt;&lt;p&gt;&lt;em&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://hexmos.com/livereview" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fvls0pq7nymbrll98je6s.png" alt="LiveReview Banner" width="800" height="240"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>webdev</category>
      <category>programming</category>
      <category>productivity</category>
    </item>
    <item>
      <title>Gisting: Compressing LLM Agent Context</title>
      <dc:creator>Shrijith Venkatramana</dc:creator>
      <pubDate>Mon, 28 Sep 2026 20:10:17 +0000</pubDate>
      <link>https://dev.to/shrsv/gisting-compressing-llm-agent-context-196n</link>
      <guid>https://dev.to/shrsv/gisting-compressing-llm-agent-context-196n</guid>
      <description>&lt;p&gt;&lt;em&gt;Hello, I'm Shrijith Venkatramana, and I'm building LiveReview — a blast-radius aware AI code review built for your business-critical systems. &lt;a href="https://github.com/HexmosTech/LiveReview/" rel="noopener noreferrer"&gt;Star us&lt;/a&gt; to help devs discover the project, give it a try, and share your feedback to help improve the product.&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;An AI agent can remember too much.&lt;/p&gt;

&lt;p&gt;That sounds like a strange problem. More context should mean more information, so more context should mean a better agent.&lt;/p&gt;

&lt;p&gt;In practice, the opposite can happen.&lt;/p&gt;

&lt;p&gt;A coding agent may start with a system prompt, repository conventions, an issue, a few files, tool outputs, test failures, and then accumulate dozens of turns of its own reasoning. By turn 30, the agent may be carrying 30,000 tokens of history to answer a question that depends on 2,000 of them.&lt;/p&gt;

&lt;p&gt;The engineering problem is therefore:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;How do we preserve the useful state of a long context while throwing away most of the tokens?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;One answer is &lt;strong&gt;gisting&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Gisting treats a long context as something that can be compressed into a much smaller representation and then reused.&lt;/p&gt;

&lt;p&gt;The idea has an interesting history. In 2023, Jesse Mu, Xiang Lisa Li, and Noah Goodman published &lt;em&gt;Learning to Compress Prompts with Gist Tokens&lt;/em&gt; at NeurIPS. Their motivating example was almost mundane: a fixed instruction prompt gets encoded again and again, even though its meaning has not changed. Their solution was to train the model itself to turn the prompt into a few internal "gist" tokens.&lt;/p&gt;

&lt;p&gt;For agents, this idea becomes much more interesting.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. The real problem is context, not memory
&lt;/h2&gt;

&lt;p&gt;Consider a coding agent working on this task:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Fix the authentication bug in the payments service.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The agent might accumulate:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;System instructions                         1,500 tokens
Repository instructions                     2,000
Issue description                             800
Relevant source files                       4,500
Tool output                                 3,000
Turn 1                                       1,200
Turn 2                                       1,800
Turn 3                                       2,100
Turn 4                                       2,400
...
Turn 15                                      2,000
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Eventually:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Total context ~= 25,000 tokens
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Yet much of that history is redundant.&lt;/p&gt;

&lt;p&gt;The agent does not need to remember:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;"I opened auth.py."

"I then searched for validate_token."

"Then I inspected line 84."

"Then I ran pytest."

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;What it really needs is something closer to:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Relevant state:
- Authentication uses JWT tokens.
- Token validation happens in auth.py:84.
- The failure occurs when expired tokens are refreshed.
- The refresh path bypasses validate_token().
- tests/test_auth.py reproduces the bug.
- A patch was attempted but failed because refresh_token() expects
  a normalized subject claim.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The first representation is &lt;strong&gt;history&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The second is &lt;strong&gt;state&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Gisting is the attempt to move from the first representation toward the second.&lt;/p&gt;

&lt;p&gt;This is a useful way to think about agent context:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Raw history
    |
    v
Compression
    |
    v
Compact representation
    |
    v
Future reasoning
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The goal is not to preserve every word.&lt;/p&gt;

&lt;p&gt;The goal is to preserve the information required for future computation.&lt;/p&gt;
&lt;h2&gt;
  
  
  2. What gisting actually is
&lt;/h2&gt;

&lt;p&gt;There are two ideas that are often mixed together.&lt;/p&gt;
&lt;h3&gt;
  
  
  Text summarization
&lt;/h3&gt;

&lt;p&gt;A normal agent might ask an LLM:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Summarize the previous 20 turns in 800 tokens.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The result is ordinary natural language:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;The user is debugging JWT refresh behavior...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;This can be passed to almost any LLM.&lt;/p&gt;
&lt;h3&gt;
  
  
  Learned gist tokens
&lt;/h3&gt;

&lt;p&gt;The original &lt;strong&gt;gisting&lt;/strong&gt; paper does something different.&lt;/p&gt;

&lt;p&gt;Suppose the original prompt is:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;t = [t1, t2, ..., tn]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The model inserts a small number of special tokens:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;t1 t2 ... tn &amp;lt;G1&amp;gt; &amp;lt;G2&amp;gt; ... &amp;lt;Gk&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The Transformer is trained with an attention mask that forces later tokens to access the earlier prompt only through the gist tokens.&lt;/p&gt;

&lt;p&gt;Conceptually:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Original prompt
      |
      v
[G1] [G2] [G3] [G4]
      |
      v
Future input
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The gist tokens therefore become a bottleneck.&lt;/p&gt;

&lt;p&gt;The model has to learn:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"What information from this prompt must survive so that I can perform the task later?"&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The important detail is that these are &lt;strong&gt;internal model representations&lt;/strong&gt;, not miniature English summaries.&lt;/p&gt;

&lt;p&gt;The paper trained LLaMA-7B and FLAN-T5-XXL models and reported prompt compression of up to 26x, with reductions in FLOPs and storage while retaining similar output quality on its evaluations.&lt;/p&gt;

&lt;p&gt;This is closer to learned memory than to summarization.&lt;/p&gt;
&lt;h2&gt;
  
  
  3. Why the attention mask matters
&lt;/h2&gt;

&lt;p&gt;This is the clever part of the original method.&lt;/p&gt;

&lt;p&gt;Without any restriction, the model can cheat.&lt;/p&gt;

&lt;p&gt;Imagine:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Prompt:
"Translate the following text into French."

Gist tokens:
&amp;lt;G1&amp;gt; &amp;lt;G2&amp;gt;

Input:
"The cat is sleeping."
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;If the later input can still directly attend to the original prompt, the model has no reason to encode anything into &lt;code&gt;&amp;lt;G1&amp;gt;&lt;/code&gt; and &lt;code&gt;&amp;lt;G2&amp;gt;&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;So gisting changes the attention pattern.&lt;/p&gt;

&lt;p&gt;Normally, later tokens can attend to previous tokens:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Prompt ----------------------&amp;gt; Future tokens
       \                     /
        \                   /
         Gist tokens ------&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;With gist masking:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Prompt ---&amp;gt; Gist tokens ---&amp;gt; Future tokens
                 ^
                 |
        compressed information
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The future part cannot directly look back at the original prompt.&lt;/p&gt;

&lt;p&gt;That creates a training pressure:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;If the future needs information,
the information must pass through the gist.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;This is essentially a learned information bottleneck.&lt;/p&gt;

&lt;p&gt;The authors point out that the masking change is very small at the implementation level: the model architecture does not need to become a new neural architecture. The attention pattern is changed so the model learns the compression behavior during instruction tuning.&lt;/p&gt;

&lt;p&gt;That distinction matters.&lt;/p&gt;

&lt;p&gt;Gisting is not:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;summary = model(prompt)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;It is:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;gist = learned_compressor(prompt)
output = model(gist, new_input)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;where &lt;code&gt;gist&lt;/code&gt; is represented inside the Transformer's activation space.&lt;/p&gt;
&lt;h2&gt;
  
  
  4. The economics are simple
&lt;/h2&gt;

&lt;p&gt;The reason engineers should care about this is mathematical.&lt;/p&gt;

&lt;p&gt;For a standard Transformer, self-attention over &lt;code&gt;n&lt;/code&gt; input tokens has roughly:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;O(n^2)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;attention complexity during the prefill phase.&lt;/p&gt;

&lt;p&gt;During generation, cached keys and values change the picture. Each newly generated token still needs to attend across the existing context, so the attention work is roughly proportional to:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;O(n)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;per generated token.&lt;/p&gt;

&lt;p&gt;That means an agent with a huge context pays repeatedly for the same historical information.&lt;/p&gt;

&lt;p&gt;Suppose:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Original context = 12,000 tokens
Compressed context = 1,000 tokens
Future generation = 300 tokens
Number of turns = 20
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Ignoring constants and other model costs, the context-attention work associated with generation is approximately:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Full history:

12,000 * 300 * 20
= 72,000,000

Compressed:

1,000 * 300 * 20
= 6,000,000
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;So the difference is:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;66,000,000
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;context-token attention interactions.&lt;/p&gt;

&lt;p&gt;That is a 12x reduction in the context length seen by every generated token.&lt;/p&gt;

&lt;p&gt;There is a catch: compression itself costs compute.&lt;/p&gt;

&lt;p&gt;So gisting only makes economic sense when the compressed representation is reused enough times.&lt;/p&gt;

&lt;p&gt;Let:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Ccompress = cost of creating the gist

Cfull = cost of processing the full context per future turn

Cgist = cost of processing the compressed context per future turn

R = number of future reuses
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Gisting pays off when:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Ccompress + R * Cgist &amp;lt; R * Cfull
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;or:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;R &amp;gt; Ccompress / (Cfull - Cgist)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;This gives an important systems principle:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Compression is an amortization problem.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;A 20-token system prompt used once does not need elaborate compression.&lt;/p&gt;

&lt;p&gt;A 20,000-token agent history reused for another 40 turns is a different engineering problem.&lt;/p&gt;

&lt;p&gt;The same logic applies to token billing.&lt;/p&gt;

&lt;p&gt;Suppose compression reduces each future request by 11,000 input tokens and the agent makes 20 requests:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;11,000 * 20
= 220,000 input tokens saved
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;At an input price of &lt;code&gt;P&lt;/code&gt; dollars per million tokens:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Savings = 0.22 * P dollars
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The exact dollar value depends on the model and pricing, but the scaling argument does not.&lt;/p&gt;
&lt;h2&gt;
  
  
  5. Where this becomes useful for agents
&lt;/h2&gt;

&lt;p&gt;An agent has several different kinds of context.&lt;/p&gt;

&lt;p&gt;They should not all be compressed in the same way.&lt;/p&gt;
&lt;h3&gt;
  
  
  Stable instructions
&lt;/h3&gt;

&lt;p&gt;Examples:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Coding conventions
Security policies
Tool usage rules
Output format
Repository architecture rules
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;These are excellent candidates for caching or learned compression because they are reused repeatedly.&lt;/p&gt;
&lt;h3&gt;
  
  
  Episodic history
&lt;/h3&gt;

&lt;p&gt;Examples:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Previous tool calls
Previous failed approaches
Old intermediate reasoning
Past conversation turns
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;This is where context gisting becomes useful.&lt;/p&gt;

&lt;p&gt;The agent can periodically replace:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Turn 1
Turn 2
Turn 3
...
Turn 18
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;with:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Agent state as of turn 18
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h3&gt;
  
  
  Exact evidence
&lt;/h3&gt;

&lt;p&gt;This category is different:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Database rows
Source-code lines
Exception messages
API responses
Financial values
Configuration values
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Compressing these aggressively can be dangerous.&lt;/p&gt;

&lt;p&gt;An agent may need the exact string:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;"expected audience=payments-api"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;A summary such as:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;"The JWT audience configuration was incorrect."
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;is semantically close but operationally weaker.&lt;/p&gt;

&lt;p&gt;This suggests a useful architecture:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;             Agent Context
                  |
       +----------+----------+
       |          |          |
    Stable      Episodic    Exact
    context      state      evidence
       |          |          |
    Cache       Gist/       Retrieve
                 summary     on demand
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;In other words, gisting should usually reduce the &lt;strong&gt;working context&lt;/strong&gt;, not become the only copy of the information.&lt;/p&gt;

&lt;p&gt;For a coding agent, a sensible system might look like:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;                    +----------------+
                    | Agent          |
                    +-------+--------+
                            |
             +--------------+--------------+
             |              |              |
             v              v              v
        System rules    Agent gist     Retrieved code
             |              |              |
             +--------------+--------------+
                            |
                            v
                       LLM context
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The gist remembers the trajectory.&lt;/p&gt;

&lt;p&gt;Retrieval restores exact facts.&lt;/p&gt;

&lt;p&gt;The current user request provides the immediate objective.&lt;/p&gt;
&lt;h2&gt;
  
  
  6. The compression bottleneck can destroy information
&lt;/h2&gt;

&lt;p&gt;There is a fundamental problem with any lossy context compression:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;The compressor does not know what the future question will be.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Suppose an agent summarizes a debugging session:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;We fixed the OAuth callback bug.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;That sounds useful.&lt;/p&gt;

&lt;p&gt;Three turns later the user asks:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Which exact redirect URI caused the failure?
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The answer may already have disappeared from the compressed representation.&lt;/p&gt;

&lt;p&gt;This is why context compression behaves differently from ordinary text summarization.&lt;/p&gt;

&lt;p&gt;A summary can preserve semantic meaning while destroying &lt;strong&gt;future utility&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Recent evaluations of gist-token compression found several failure patterns, including information being lost at segment boundaries, information that is locally surprising being dropped, and information being degraded across multiple compression stages. The 2025 ACL study also found that gist-based compression can perform well on some retrieval and long-document tasks while struggling on tasks requiring precise recall.&lt;/p&gt;

&lt;p&gt;This leads to an important engineering rule:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Do not ask:

"What is important?"

Ask:

"What information might future computation require?"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Those are different questions.&lt;/p&gt;

&lt;p&gt;For an agent, one practical response is to preserve certain classes of information explicitly:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Goals
Decisions
Constraints
Open questions
Identifiers
Errors
Exact values
Files changed
Commands executed
Artifacts produced
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Then allow everything else to enter the compressed state.&lt;/p&gt;

&lt;p&gt;A useful pattern is:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Gist:
    high-level state and reasoning

Retrieval store:
    exact historical evidence

Current context:
    current task and retrieved evidence
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;That is much safer than:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;100,000 tokens
       |
       v
800-token summary
       |
       v
delete everything
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h2&gt;
  
  
  7. Gisting changes the architecture of an agent
&lt;/h2&gt;

&lt;p&gt;Once context is treated as a compressible state, an agent starts to look less like a chatbot and more like a state machine.&lt;/p&gt;

&lt;p&gt;Instead of:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;history = history + new_turn
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;you can think in terms of:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;state_(t+1) = compress(state_t, observation_t)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;and later:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;action_t = model(state_t, current_observation_t)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;This is a much more scalable abstraction.&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;             ┌──────────────┐
             │ Current task │
             └──────┬───────┘
                    |
                    v
             ┌──────────────┐
             │ Agent model  │
             └──────┬───────┘
                    |
                    v
             ┌──────────────┐
             │ Tool actions │
             └──────┬───────┘
                    |
                    v
             ┌──────────────┐
             │ Observations │
             └──────┬───────┘
                    |
                    v
             ┌──────────────┐
             │   Gisting    │
             └──────┬───────┘
                    |
                    v
             ┌──────────────┐
             │ Compact state│
             └──────────────┘
                    |
                    └──────&amp;gt; next turn
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;This is the deeper idea behind gisting.&lt;/p&gt;

&lt;p&gt;The agent does not need to carry its entire past forward.&lt;/p&gt;

&lt;p&gt;It needs to carry forward a representation of its past that remains useful for future actions.&lt;/p&gt;

&lt;p&gt;That is a very different mental model from simply "increase the context window."&lt;/p&gt;

&lt;p&gt;There is also an important practical limitation: the original learned gist-token approach produces model-specific internal representations. An application using a closed LLM API generally cannot take those hidden activations and feed them back later as arbitrary input. For API-based systems, natural-language compression methods such as &lt;a href="https://aclanthology.org/2023.emnlp-main.825/" rel="noopener noreferrer"&gt;prompt compression&lt;/a&gt; are therefore often easier to deploy, while true gist-token methods are more natural when you control the model and inference stack. Work on long-context compression has also shown that gist-style methods can degrade as the context becomes longer, so compression ratio alone is not a sufficient metric.&lt;/p&gt;

&lt;p&gt;The interesting engineering question is therefore not:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"How large should the context window be?"&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;It is:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"What is the smallest representation of the agent's past that preserves the information needed for future computation?"&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That is the problem gisting puts on the table.&lt;/p&gt;

&lt;p&gt;And once agents become long-running systems, that problem starts to look less like prompt engineering and more like designing a memory hierarchy.&lt;/p&gt;
&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;LLM agents are often built around an implicit assumption:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;More history = more intelligence
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;A better model may be:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;More relevant state = more intelligence
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Gisting is one attempt to make that transition.&lt;/p&gt;

&lt;p&gt;It treats context as a representation that can be compressed, cached, and reused rather than as an ever-growing transcript.&lt;/p&gt;

&lt;p&gt;The next generation of agents may therefore have something resembling:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;working memory
episodic memory
compressed state
retrievable evidence
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;rather than one giant conversation buffer.&lt;/p&gt;

&lt;p&gt;That raises an interesting question for anyone building agents:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What information should an agent be allowed to forget?&lt;/strong&gt;&lt;/p&gt;



&lt;p&gt;&lt;em&gt;&lt;br&gt;
Your team's attention is limited, and the deluge of AI-generated code is making it harder to keep production reliable and secure without slowing you down.&lt;/em&gt;&lt;/p&gt;
&lt;em&gt;

&lt;p&gt;I'm building &lt;strong&gt;LiveReview&lt;/strong&gt;, a blast-radius aware AI code review built for your business-critical systems.&lt;/p&gt;

&lt;p&gt;Instead of presenting every diff with equal emphasis, &lt;strong&gt;LiveReview scores each change by blast radius — how far its impact reaches through your call graph — so you can focus attention where it actually matters.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Spend code review effort where business risk is highest — not spread evenly across every diff.&lt;/p&gt;

&lt;p&gt;⭐ Star it on GitHub: &lt;br&gt;
&lt;/p&gt;
&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://assets.dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/HexmosTech" rel="noopener noreferrer"&gt;
        HexmosTech
      &lt;/a&gt; / &lt;a href="https://github.com/HexmosTech/LiveReview" rel="noopener noreferrer"&gt;
        LiveReview
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      Blast-Radius Aware AI Code Review for Business-Critical Systems
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;&lt;p&gt;&lt;a rel="noopener noreferrer" href="https://github.com/HexmosTech/LiveReview/./assets/gfx/png/logo-with-text.png"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2FHexmosTech%2FLiveReview%2FHEAD%2F.%2Fassets%2Fgfx%2Fpng%2Flogo-with-text.png" alt="LiveReview" height="80"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/HexmosTech/LiveReview/actions/workflows/gitleaks.yml" rel="noopener noreferrer"&gt;&lt;img alt="gitleaks.yml" title="gitleaks.yml: Secret scanning workflow" src="https://github.com/HexmosTech/LiveReview/actions/workflows/gitleaks.yml/badge.svg"&gt;&lt;/a&gt;&amp;nbsp;&lt;a href="https://github.com/HexmosTech/LiveReview/actions/workflows/osv-scanner.yml" rel="noopener noreferrer"&gt;&lt;img alt="osv-scanner.yml" title="osv-scanner.yml: Dependency vulnerability scan" src="https://github.com/HexmosTech/LiveReview/actions/workflows/osv-scanner.yml/badge.svg"&gt;&lt;/a&gt;&amp;nbsp;&lt;a href="https://github.com/HexmosTech/LiveReview/actions/workflows/govulncheck.yml" rel="noopener noreferrer"&gt;&lt;img alt="govulncheck.yml" title="govulncheck.yml: Go vulnerability check" src="https://github.com/HexmosTech/LiveReview/actions/workflows/govulncheck.yml/badge.svg"&gt;&lt;/a&gt;&amp;nbsp;&lt;a href="https://github.com/HexmosTech/LiveReview/actions/workflows/semgrep.yml" rel="noopener noreferrer"&gt;&lt;img alt="semgrep.yml" title="semgrep.yml: Static analysis security scan" src="https://github.com/HexmosTech/LiveReview/actions/workflows/semgrep.yml/badge.svg"&gt;&lt;/a&gt;&amp;nbsp;&lt;a rel="noopener noreferrer" href="https://github.com/HexmosTech/LiveReview/./assets/gfx/dependabot-enabled.svg"&gt;&lt;img alt="dependabot-enabled" title="dependabot-enabled: Automated dependency updates are enabled" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2FHexmosTech%2FLiveReview%2FHEAD%2F.%2Fassets%2Fgfx%2Fdependabot-enabled.svg"&gt;&lt;/a&gt;&amp;nbsp;&lt;a href="https://github.com/HexmosTech/LiveReview/actions/workflows/mcp-testcases.yml" rel="noopener noreferrer"&gt;&lt;img alt="mcp-testcases.yml" title="mcp-testcases.yml: MCP integration test suite" src="https://github.com/HexmosTech/LiveReview/actions/workflows/mcp-testcases.yml/badge.svg"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;LiveReview: Blast-Radius Aware AI Code Review for Business-Critical Systems&lt;/h1&gt;
&lt;/div&gt;

&lt;p&gt;LiveReview is an AI code reviewer that scores every hunk of a diff by &lt;strong&gt;blast radius&lt;/strong&gt;: how far a change reaches through your call graph, how much persistent state it touches, and how well-tested it is. A 3-line change to a shared auth check can outrank a 300-line UI tweak. Your team's attention goes to the highest-risk code first, not spread evenly across every diff.&lt;/p&gt;


  
    
    &lt;span class="m-1"&gt;blast-radius-demo.mp4&lt;/span&gt;
  

  

  


&lt;p&gt;&lt;i&gt;LiveReview's Blast Radius &amp;amp; Review Priority scoring, live in the diff viewer.&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;&lt;div class="table-wrapper-paragraph"&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;table&gt;

&lt;thead&gt;

&lt;tr&gt;

&lt;th&gt;The exact math, not a black box&lt;/th&gt;

&lt;th&gt;Visualize blast radius at a glance&lt;/th&gt;

&lt;th&gt;Every factor that feeds the score&lt;/th&gt;

&lt;/tr&gt;

&lt;/thead&gt;

&lt;tbody&gt;

&lt;tr&gt;

&lt;td&gt;&lt;a rel="noopener noreferrer" href="https://github.com/HexmosTech/LiveReview/./assets/screenshots/blast-radius/new-risk-score-3.webp"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fraw.githubusercontent.com%2FHexmosTech%2FLiveReview%2FHEAD%2F.%2Fassets%2Fscreenshots%2Fblast-radius%2Fnew-risk-score-3.webp" width="280"&gt;&lt;/a&gt;&lt;/td&gt;

&lt;td&gt;&lt;a rel="noopener noreferrer" href="https://github.com/HexmosTech/LiveReview/./assets/screenshots/blast-radius/new-risk-score-4.webp"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fraw.githubusercontent.com%2FHexmosTech%2FLiveReview%2FHEAD%2F.%2Fassets%2Fscreenshots%2Fblast-radius%2Fnew-risk-score-4.webp" width="280"&gt;&lt;/a&gt;&lt;/td&gt;

&lt;td&gt;&lt;a rel="noopener noreferrer" href="https://github.com/HexmosTech/LiveReview/./assets/screenshots/blast-radius/new-risk-score-2.webp"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fraw.githubusercontent.com%2FHexmosTech%2FLiveReview%2FHEAD%2F.%2Fassets%2Fscreenshots%2Fblast-radius%2Fnew-risk-score-2.webp" width="280"&gt;&lt;/a&gt;&lt;/td&gt;

&lt;/tr&gt;

&lt;/tbody&gt;

&lt;/table&gt;&lt;/div&gt;&lt;br&gt;
&lt;p&gt;&lt;/p&gt;

How does Blast Radius scoring work? (a more technical explanation)

&lt;p&gt;&lt;strong&gt;Here's the goal:&lt;/strong&gt;&lt;/p&gt;


&lt;ul&gt;

&lt;li&gt;A 3-line fix in a function used by 40 other files, that also writes to a database, should score high.&lt;/li&gt;

&lt;li&gt;A 300-line UI change in one file, fully covered by…&lt;/li&gt;

&lt;/ul&gt;&lt;/div&gt;
&lt;br&gt;
  &lt;/div&gt;
&lt;br&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/HexmosTech/LiveReview" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;br&gt;
&lt;/div&gt;
&lt;br&gt;


&lt;p&gt;&lt;b&gt;Click below to try LiveReview with your codebase:&lt;/b&gt;&lt;/p&gt;

&lt;/em&gt;&lt;p&gt;&lt;em&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://hexmos.com/livereview" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fvls0pq7nymbrll98je6s.png" alt="LiveReview Banner" width="800" height="240"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>webdev</category>
      <category>programming</category>
      <category>productivity</category>
    </item>
    <item>
      <title>Hard Negative Mining: Teaching an LLM What "Almost Right" Looks Like</title>
      <dc:creator>Shrijith Venkatramana</dc:creator>
      <pubDate>Sun, 27 Sep 2026 19:48:07 +0000</pubDate>
      <link>https://dev.to/shrsv/hard-negative-mining-teaching-an-llm-what-almost-right-looks-like-37k8</link>
      <guid>https://dev.to/shrsv/hard-negative-mining-teaching-an-llm-what-almost-right-looks-like-37k8</guid>
      <description>&lt;p&gt;&lt;em&gt;Hello, I'm Shrijith Venkatramana, and I'm building LiveReview — a blast-radius aware AI code review built for your business-critical systems. &lt;a href="https://github.com/HexmosTech/LiveReview/" rel="noopener noreferrer"&gt;Star us&lt;/a&gt; to help devs discover the project, give it a try, and share your feedback to help improve the product.&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;A model learns surprisingly little from examples that are obviously wrong.&lt;/p&gt;

&lt;p&gt;Suppose you are training a retrieval model with:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Query: "How do I rotate an AWS IAM access key?"&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;And your negative example is:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"How do I resize a Kubernetes pod?"&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The model can separate these easily. One is about IAM credentials; the other is about Kubernetes.&lt;/p&gt;

&lt;p&gt;Now give it:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"How do I create an AWS IAM access key?"&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That is a much more interesting negative.&lt;/p&gt;

&lt;p&gt;It uses the same vocabulary. It concerns the same object. It may even appear in the right neighborhood of the embedding space.&lt;/p&gt;

&lt;p&gt;But it answers a different question.&lt;/p&gt;

&lt;p&gt;This is the basic idea behind &lt;strong&gt;hard negative mining&lt;/strong&gt;: instead of teaching a model merely what is wrong, deliberately show it things that are &lt;em&gt;almost right&lt;/em&gt; and force it to learn the distinction.&lt;/p&gt;

&lt;p&gt;The technique became important in computer vision with work such as FaceNet, and later became a major component of dense text retrieval. The interesting part for LLM developers is that the same idea now appears in RAG, semantic search, reranking, embedding training, preference data, and other systems where the model must distinguish between closely related alternatives. (&lt;a href="https://www.cv-foundation.org/openaccess/content_cvpr_2015/html/Schroff_FaceNet_A_Unified_2015_CVPR_paper.html" rel="noopener noreferrer"&gt;CV Foundation&lt;/a&gt;)&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Easy negatives are cheap—and often useless
&lt;/h2&gt;

&lt;p&gt;Imagine you have a query &lt;code&gt;q&lt;/code&gt;, a relevant document &lt;code&gt;d+&lt;/code&gt;, and an irrelevant document &lt;code&gt;d-&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;A contrastive training objective wants:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;similarity(q, d+) &amp;gt; similarity(q, d-)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;An easy negative might already be far away:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;similarity(q, d+) = 0.82
similarity(q, d-) = 0.12
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;There is little ambiguity.&lt;/p&gt;

&lt;p&gt;The model already knows that the two things are different.&lt;/p&gt;

&lt;p&gt;A hard negative could look like:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;similarity(q, d+) = 0.82
similarity(q, d-) = 0.76
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Now the model has a real problem.&lt;/p&gt;

&lt;p&gt;Why does this matter?&lt;/p&gt;

&lt;p&gt;Because retrieval systems rarely fail by retrieving something completely unrelated.&lt;/p&gt;

&lt;p&gt;They fail by retrieving:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;the wrong version of a library&lt;/li&gt;
&lt;li&gt;the wrong API endpoint&lt;/li&gt;
&lt;li&gt;a document about installation instead of configuration&lt;/li&gt;
&lt;li&gt;a description of creating something instead of deleting it&lt;/li&gt;
&lt;li&gt;a closely related bug with a different root cause&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In production, the enemy is usually &lt;strong&gt;semantic confusion&lt;/strong&gt;, not semantic ignorance.&lt;/p&gt;

&lt;p&gt;Hard negative mining turns that confusion into training data.&lt;/p&gt;
&lt;h2&gt;
  
  
  2. The idea predates LLMs
&lt;/h2&gt;

&lt;p&gt;The underlying idea is older than language models.&lt;/p&gt;

&lt;p&gt;In 2015, Florian Schroff, Dmitry Kalenichenko and James Philbin published FaceNet. They trained a neural network to map faces into an embedding space where images of the same person were close together and different people were far apart.&lt;/p&gt;

&lt;p&gt;The important engineering problem was choosing which examples to train on.&lt;/p&gt;

&lt;p&gt;Suppose you have:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;anchor   = Alice's face
positive = another image of Alice
negative = Bob's face
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;A completely different-looking Bob is not particularly useful.&lt;/p&gt;

&lt;p&gt;The interesting negative is a Bob who looks sufficiently similar to Alice to make the distinction difficult.&lt;/p&gt;

&lt;p&gt;FaceNet therefore used online triplet mining, progressively selecting difficult examples during training. The paper describes this as a way of increasing the difficulty of the triplets as the network improves. (&lt;a href="https://www.cv-foundation.org/openaccess/content_cvpr_2015/html/Schroff_FaceNet_A_Unified_2015_CVPR_paper.html" rel="noopener noreferrer"&gt;CV Foundation&lt;/a&gt;)&lt;/p&gt;

&lt;p&gt;A few years later, the same logic became important in text retrieval.&lt;/p&gt;

&lt;p&gt;Karpukhin and colleagues' 2020 Dense Passage Retrieval work showed that a relatively simple dual-encoder could produce effective dense retrieval for open-domain question answering. But there was a problem: what you use as a negative during training determines what distinctions the retriever learns. (&lt;a href="https://aclanthology.org/2020.emnlp-main.550/" rel="noopener noreferrer"&gt;ACL Anthology&lt;/a&gt;)&lt;/p&gt;

&lt;p&gt;Then came ANCE from Microsoft researchers including Lee Xiong and Chenyan Xiong.&lt;/p&gt;

&lt;p&gt;Their observation was particularly important:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The negatives used during training often did not resemble the documents the model would actually confuse during inference.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Their solution was to use an approximate-nearest-neighbor index to retrieve difficult negatives using the model itself, and periodically refresh that index as the model changed. In other words, the model was used to discover the mistakes that the next version of the model needed to learn from. (&lt;a href="https://arxiv.org/abs/2007.00808" rel="noopener noreferrer"&gt;arXiv&lt;/a&gt;)&lt;/p&gt;

&lt;p&gt;That creates an interesting feedback loop:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;train model
    |
    v
model retrieves difficult documents
    |
    v
use those as negatives
    |
    v
train model again
    |
    v
model discovers new difficult documents
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Hard negative mining is therefore partly a &lt;strong&gt;data-generation strategy&lt;/strong&gt; and partly an &lt;strong&gt;optimization strategy&lt;/strong&gt;.&lt;/p&gt;
&lt;h2&gt;
  
  
  3. Where hard negatives appear in an LLM system
&lt;/h2&gt;

&lt;p&gt;You do not usually "hard-negative mine an LLM" in the same sense that you mine negatives for a classifier.&lt;/p&gt;

&lt;p&gt;The technique is most useful when an LLM system has to &lt;strong&gt;rank, retrieve, compare, or distinguish&lt;/strong&gt; things.&lt;/p&gt;

&lt;p&gt;Consider a typical RAG pipeline:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;user query
    |
    v
embedding model
    |
    v
vector database
    |
    v
top 20 passages
    |
    v
reranker
    |
    v
top 5 passages
    |
    v
LLM
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;There are several places where hard negatives matter.&lt;/p&gt;
&lt;h3&gt;
  
  
  Embedding models
&lt;/h3&gt;

&lt;p&gt;You train:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;query -&amp;gt; relevant passage
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;and contrast it against:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;query -&amp;gt; similar but irrelevant passage
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;This teaches the embedding space to preserve the distinctions your application actually cares about.&lt;/p&gt;
&lt;h3&gt;
  
  
  Rerankers
&lt;/h3&gt;

&lt;p&gt;Suppose the retriever returns:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;1. PostgreSQL deadlock troubleshooting
2. PostgreSQL transaction rollback
3. PostgreSQL isolation levels
4. PostgreSQL connection pooling
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;A reranker needs to understand why #1 answers the query while #3 is merely related.&lt;/p&gt;

&lt;p&gt;That makes #2 and #3 substantially more useful negatives than an article about Kubernetes.&lt;/p&gt;
&lt;h3&gt;
  
  
  Recommendation and semantic matching
&lt;/h3&gt;

&lt;p&gt;The same pattern appears in:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;query -&amp;gt; document
user -&amp;gt; product
question -&amp;gt; answer
bug report -&amp;gt; solution
code change -&amp;gt; relevant documentation
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Whenever the challenge is distinguishing nearby alternatives, hard negatives are valuable.&lt;/p&gt;

&lt;p&gt;This is also why systems such as RocketQA explicitly incorporated denoised hard negatives alongside cross-batch negatives and data augmentation when training dense passage retrievers. (&lt;a href="https://aclanthology.org/2021.naacl-main.466/" rel="noopener noreferrer"&gt;ACL Anthology&lt;/a&gt;)&lt;/p&gt;
&lt;h2&gt;
  
  
  4. How do you actually mine a hard negative?
&lt;/h2&gt;

&lt;p&gt;The simplest method is almost embarrassingly straightforward.&lt;/p&gt;

&lt;p&gt;Take your current model and ask:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"What documents does this model think are relevant?"&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Suppose your training example is:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;q  = "How do I configure PostgreSQL connection pooling?"
d+ = "PgBouncer configuration guide"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Run the query through your retriever.&lt;/p&gt;

&lt;p&gt;It produces:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;1. PgBouncer configuration guide       0.91
2. PostgreSQL connection pooling       0.89
3. PostgreSQL connection management    0.87
4. PostgreSQL authentication           0.71
5. PostgreSQL installation             0.62
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;After removing the known positive, candidates #2 and #3 are excellent places to look for hard negatives.&lt;/p&gt;

&lt;p&gt;A basic mining procedure is:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;for each (q, d+):

    candidates = retrieve(q, corpus, top_k=100)

    candidates = remove(candidates, d+)

    hard_negatives = top candidates
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;But there is a major trap.&lt;/p&gt;
&lt;h3&gt;
  
  
  Hard does not mean wrong
&lt;/h3&gt;

&lt;p&gt;A document can be highly similar because it is actually relevant.&lt;/p&gt;

&lt;p&gt;That gives you a &lt;strong&gt;false negative&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Query:
"How do I rotate an AWS access key?"

Positive:
"Rotating IAM access keys"

Candidate:
"IAM access key security best practices"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;You might classify the candidate as irrelevant simply because it does not contain the exact answer.&lt;/p&gt;

&lt;p&gt;But it may still be legitimately useful.&lt;/p&gt;

&lt;p&gt;Training the model to push it away could damage the retrieval space.&lt;/p&gt;

&lt;p&gt;This is one of the reasons RocketQA introduced &lt;strong&gt;denoising&lt;/strong&gt; for hard negatives rather than simply taking the nearest documents blindly. Later work on dense retrieval has continued to treat false-negative removal as an important part of hard-negative construction. (&lt;a href="https://aclanthology.org/2021.naacl-main.466/" rel="noopener noreferrer"&gt;ACL Anthology&lt;/a&gt;)&lt;/p&gt;

&lt;p&gt;A practical production pipeline therefore looks more like:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;BM25 / embedding retrieval
          |
          v
    100 candidates
          |
          v
remove known positives
          |
          v
cross-encoder / LLM judge
          |
          v
remove probable false negatives
          |
          v
     hard negatives
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;This is considerably more useful than simply selecting the nearest vectors.&lt;/p&gt;
&lt;h2&gt;
  
  
  5. The math: why hard negatives produce more gradient
&lt;/h2&gt;

&lt;p&gt;Consider a simple contrastive objective.&lt;/p&gt;

&lt;p&gt;For query &lt;code&gt;q&lt;/code&gt;, positive &lt;code&gt;d+&lt;/code&gt;, and negatives &lt;code&gt;d1 ... dn&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;L = -log(
      exp(sim(q,d+) / T)
      --------------------------------
      exp(sim(q,d+) / T) +
      sum_i exp(sim(q,di) / T)
    )
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;where:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sim(q,d) = similarity between query and document
T        = temperature
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;You do not need to memorize the equation.&lt;/p&gt;

&lt;p&gt;Think of it as a competition.&lt;/p&gt;

&lt;p&gt;The model gets rewarded when the positive takes most of the probability mass.&lt;/p&gt;

&lt;p&gt;Suppose:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;positive = 0.90
negative A = 0.20
negative B = 0.10
negative C = 0.05
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The positive is already winning comfortably.&lt;/p&gt;

&lt;p&gt;Now consider:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;positive = 0.90
negative A = 0.87
negative B = 0.25
negative C = 0.10
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Negative A is creating a much larger training signal.&lt;/p&gt;

&lt;p&gt;The model must figure out:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"What feature distinguishes these two things?"&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That is exactly the behavior we want.&lt;/p&gt;

&lt;p&gt;There is a useful geometric interpretation.&lt;/p&gt;

&lt;p&gt;Imagine the embedding space as a map:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;                       unrelated
                          *
                    *
              *             *

        positive *
                  \

                   * hard negative
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Easy negatives teach the model about broad regions.&lt;/p&gt;

&lt;p&gt;Hard negatives teach it about the &lt;strong&gt;decision boundary&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;That distinction becomes especially important as the model gets better.&lt;/p&gt;

&lt;p&gt;Early in training:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;easy negatives -&amp;gt; useful
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Later:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;easy negatives -&amp;gt; mostly redundant
hard negatives -&amp;gt; increasingly valuable
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;This is the same basic intuition behind ANCE's dynamic mining: use the evolving model to find examples near its current retrieval boundary. (&lt;a href="https://arxiv.org/abs/2007.00808" rel="noopener noreferrer"&gt;arXiv&lt;/a&gt;)&lt;/p&gt;
&lt;h2&gt;
  
  
  6. The operational economics are a little counterintuitive
&lt;/h2&gt;

&lt;p&gt;Hard negative mining costs compute.&lt;/p&gt;

&lt;p&gt;Suppose you have:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;1,000,000 training queries
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;and you want:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;20 hard negatives / query
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;You now have roughly:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;20,000,000 candidate relationships
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The expensive part is often not training itself.&lt;/p&gt;

&lt;p&gt;It is &lt;strong&gt;finding and validating those negatives&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;There are several ways to control the cost.&lt;/p&gt;
&lt;h3&gt;
  
  
  Start with cheap retrieval
&lt;/h3&gt;

&lt;p&gt;Use BM25 or an existing embedding model to retrieve:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;top 100
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Then only send a small candidate set to a more expensive judge.&lt;/p&gt;

&lt;p&gt;You do not need an LLM to examine one million documents per query.&lt;/p&gt;
&lt;h3&gt;
  
  
  Mine periodically
&lt;/h3&gt;

&lt;p&gt;You also rarely need to regenerate the negatives after every optimization step.&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;train
 -&amp;gt; mine
 -&amp;gt; train
 -&amp;gt; mine
 -&amp;gt; train
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;rather than:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;train
 -&amp;gt; mine
 -&amp;gt; train
 -&amp;gt; mine
 -&amp;gt; train
 -&amp;gt; mine
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;ANCE is an interesting example of this engineering compromise: it uses an asynchronously refreshed approximate-nearest-neighbor index instead of rebuilding everything synchronously after every parameter update. (&lt;a href="https://arxiv.org/abs/2007.00808" rel="noopener noreferrer"&gt;arXiv&lt;/a&gt;)&lt;/p&gt;
&lt;h3&gt;
  
  
  Use a teacher to manufacture useful mistakes
&lt;/h3&gt;

&lt;p&gt;Suppose an expensive cross-encoder can score a candidate at:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;0.97 relevant
0.84 relevant
0.31 relevant
0.02 relevant
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The useful region may be around:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;0.4 - 0.8
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The 0.02 example teaches almost nothing.&lt;/p&gt;

&lt;p&gt;The 0.97 example may actually be another positive.&lt;/p&gt;

&lt;p&gt;The middle examples are where the information density is.&lt;/p&gt;

&lt;p&gt;So the goal is not:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"Find the hardest possible negative."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;It is:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Find negatives that are difficult enough to produce useful learning without becoming mislabeled positives.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That is a much better engineering objective.&lt;/p&gt;
&lt;h2&gt;
  
  
  7. A practical recipe for developers
&lt;/h2&gt;

&lt;p&gt;Suppose you are building a retrieval system for a company's internal engineering documentation.&lt;/p&gt;

&lt;p&gt;You have:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;10,000 queries
50,000 documents
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Start with ordinary positive examples:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;(query, relevant_document)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Then:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 1: Retrieve candidates&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;For every query:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;top 50 using BM25
top 50 using embeddings
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Union them.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 2: Remove obvious positives&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Remove the labeled document and documents known to answer the same question.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 3: Score candidates&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Use a cross-encoder or sufficiently capable LLM judge.&lt;/p&gt;

&lt;p&gt;Ask something like:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Given the query and document,
does this document directly answer the query?

Return:
RELEVANT
IRRELEVANT
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;&lt;strong&gt;Step 4: Keep the confusing ones&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Construct something like:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;positive:
"How to rotate PostgreSQL credentials"

hard negative:
"How to rotate PostgreSQL TLS certificates"

hard negative:
"How to reset PostgreSQL passwords"

easy negative:
"How to install PostgreSQL"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;&lt;strong&gt;Step 5: Train&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Use the positive and selected negatives in your contrastive objective.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 6: Re-mine&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;After the model improves, ask it again what it gets confused by.&lt;/p&gt;

&lt;p&gt;The old hard negatives may become easy.&lt;/p&gt;

&lt;p&gt;New hard negatives will emerge.&lt;/p&gt;

&lt;p&gt;That gives you a virtuous cycle:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;better model
    -&amp;gt;
better mistakes
    -&amp;gt;
better training data
    -&amp;gt;
better model
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;And that is the deeper lesson of hard negative mining.&lt;/p&gt;

&lt;p&gt;You are not merely collecting more examples.&lt;/p&gt;

&lt;p&gt;You are collecting &lt;strong&gt;the examples that expose the current limits of the model&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;For LLM systems, that can be more valuable than adding another 10 million random training examples.&lt;/p&gt;

&lt;p&gt;The interesting question is therefore:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;When building your next RAG or retrieval system, would you rather collect more data—or deliberately collect the mistakes your current model is already making?&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;
  
  
  References
&lt;/h2&gt;



&lt;p&gt;&lt;em&gt;&lt;br&gt;
Your team's attention is limited, and the deluge of AI-generated code is making it harder to keep production reliable and secure without slowing you down.&lt;/em&gt;&lt;/p&gt;
&lt;em&gt;

&lt;p&gt;I'm building &lt;strong&gt;LiveReview&lt;/strong&gt;, a blast-radius aware AI code review built for your business-critical systems.&lt;/p&gt;

&lt;p&gt;Instead of presenting every diff with equal emphasis, &lt;strong&gt;LiveReview scores each change by blast radius — how far its impact reaches through your call graph — so you can focus attention where it actually matters.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Spend code review effort where business risk is highest — not spread evenly across every diff.&lt;/p&gt;

&lt;p&gt;⭐ Star it on GitHub: &lt;br&gt;
&lt;/p&gt;
&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://assets.dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/HexmosTech" rel="noopener noreferrer"&gt;
        HexmosTech
      &lt;/a&gt; / &lt;a href="https://github.com/HexmosTech/LiveReview" rel="noopener noreferrer"&gt;
        LiveReview
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      Blast-Radius Aware AI Code Review for Business-Critical Systems
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;&lt;p&gt;&lt;a rel="noopener noreferrer" href="https://github.com/HexmosTech/LiveReview/./assets/gfx/png/logo-with-text.png"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2FHexmosTech%2FLiveReview%2FHEAD%2F.%2Fassets%2Fgfx%2Fpng%2Flogo-with-text.png" alt="LiveReview" height="80"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/HexmosTech/LiveReview/actions/workflows/gitleaks.yml" rel="noopener noreferrer"&gt;&lt;img alt="gitleaks.yml" title="gitleaks.yml: Secret scanning workflow" src="https://github.com/HexmosTech/LiveReview/actions/workflows/gitleaks.yml/badge.svg"&gt;&lt;/a&gt;&amp;nbsp;&lt;a href="https://github.com/HexmosTech/LiveReview/actions/workflows/osv-scanner.yml" rel="noopener noreferrer"&gt;&lt;img alt="osv-scanner.yml" title="osv-scanner.yml: Dependency vulnerability scan" src="https://github.com/HexmosTech/LiveReview/actions/workflows/osv-scanner.yml/badge.svg"&gt;&lt;/a&gt;&amp;nbsp;&lt;a href="https://github.com/HexmosTech/LiveReview/actions/workflows/govulncheck.yml" rel="noopener noreferrer"&gt;&lt;img alt="govulncheck.yml" title="govulncheck.yml: Go vulnerability check" src="https://github.com/HexmosTech/LiveReview/actions/workflows/govulncheck.yml/badge.svg"&gt;&lt;/a&gt;&amp;nbsp;&lt;a href="https://github.com/HexmosTech/LiveReview/actions/workflows/semgrep.yml" rel="noopener noreferrer"&gt;&lt;img alt="semgrep.yml" title="semgrep.yml: Static analysis security scan" src="https://github.com/HexmosTech/LiveReview/actions/workflows/semgrep.yml/badge.svg"&gt;&lt;/a&gt;&amp;nbsp;&lt;a rel="noopener noreferrer" href="https://github.com/HexmosTech/LiveReview/./assets/gfx/dependabot-enabled.svg"&gt;&lt;img alt="dependabot-enabled" title="dependabot-enabled: Automated dependency updates are enabled" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2FHexmosTech%2FLiveReview%2FHEAD%2F.%2Fassets%2Fgfx%2Fdependabot-enabled.svg"&gt;&lt;/a&gt;&amp;nbsp;&lt;a href="https://github.com/HexmosTech/LiveReview/actions/workflows/mcp-testcases.yml" rel="noopener noreferrer"&gt;&lt;img alt="mcp-testcases.yml" title="mcp-testcases.yml: MCP integration test suite" src="https://github.com/HexmosTech/LiveReview/actions/workflows/mcp-testcases.yml/badge.svg"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;LiveReview: Blast-Radius Aware AI Code Review for Business-Critical Systems&lt;/h1&gt;
&lt;/div&gt;

&lt;p&gt;LiveReview is an AI code reviewer that scores every hunk of a diff by &lt;strong&gt;blast radius&lt;/strong&gt;: how far a change reaches through your call graph, how much persistent state it touches, and how well-tested it is. A 3-line change to a shared auth check can outrank a 300-line UI tweak. Your team's attention goes to the highest-risk code first, not spread evenly across every diff.&lt;/p&gt;


  
    
    &lt;span class="m-1"&gt;blast-radius-demo.mp4&lt;/span&gt;
  

  

  


&lt;p&gt;&lt;i&gt;LiveReview's Blast Radius &amp;amp; Review Priority scoring, live in the diff viewer.&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;&lt;div class="table-wrapper-paragraph"&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;table&gt;

&lt;thead&gt;

&lt;tr&gt;

&lt;th&gt;The exact math, not a black box&lt;/th&gt;

&lt;th&gt;Visualize blast radius at a glance&lt;/th&gt;

&lt;th&gt;Every factor that feeds the score&lt;/th&gt;

&lt;/tr&gt;

&lt;/thead&gt;

&lt;tbody&gt;

&lt;tr&gt;

&lt;td&gt;&lt;a rel="noopener noreferrer" href="https://github.com/HexmosTech/LiveReview/./assets/screenshots/blast-radius/new-risk-score-3.webp"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fraw.githubusercontent.com%2FHexmosTech%2FLiveReview%2FHEAD%2F.%2Fassets%2Fscreenshots%2Fblast-radius%2Fnew-risk-score-3.webp" width="280"&gt;&lt;/a&gt;&lt;/td&gt;

&lt;td&gt;&lt;a rel="noopener noreferrer" href="https://github.com/HexmosTech/LiveReview/./assets/screenshots/blast-radius/new-risk-score-4.webp"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fraw.githubusercontent.com%2FHexmosTech%2FLiveReview%2FHEAD%2F.%2Fassets%2Fscreenshots%2Fblast-radius%2Fnew-risk-score-4.webp" width="280"&gt;&lt;/a&gt;&lt;/td&gt;

&lt;td&gt;&lt;a rel="noopener noreferrer" href="https://github.com/HexmosTech/LiveReview/./assets/screenshots/blast-radius/new-risk-score-2.webp"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fraw.githubusercontent.com%2FHexmosTech%2FLiveReview%2FHEAD%2F.%2Fassets%2Fscreenshots%2Fblast-radius%2Fnew-risk-score-2.webp" width="280"&gt;&lt;/a&gt;&lt;/td&gt;

&lt;/tr&gt;

&lt;/tbody&gt;

&lt;/table&gt;&lt;/div&gt;&lt;br&gt;
&lt;p&gt;&lt;/p&gt;

How does Blast Radius scoring work? (a more technical explanation)

&lt;p&gt;&lt;strong&gt;Here's the goal:&lt;/strong&gt;&lt;/p&gt;


&lt;ul&gt;

&lt;li&gt;A 3-line fix in a function used by 40 other files, that also writes to a database, should score high.&lt;/li&gt;

&lt;li&gt;A 300-line UI change in one file, fully covered by…&lt;/li&gt;

&lt;/ul&gt;&lt;/div&gt;
&lt;br&gt;
  &lt;/div&gt;
&lt;br&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/HexmosTech/LiveReview" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;br&gt;
&lt;/div&gt;
&lt;br&gt;


&lt;p&gt;&lt;b&gt;Click below to try LiveReview with your codebase:&lt;/b&gt;&lt;/p&gt;

&lt;/em&gt;&lt;p&gt;&lt;em&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://hexmos.com/livereview" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fvls0pq7nymbrll98je6s.png" alt="LiveReview Banner" width="800" height="240"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>webdev</category>
      <category>programming</category>
      <category>productivity</category>
    </item>
    <item>
      <title>Using MTP to Accelerate RL Training of LLMs</title>
      <dc:creator>Shrijith Venkatramana</dc:creator>
      <pubDate>Sat, 26 Sep 2026 20:27:10 +0000</pubDate>
      <link>https://dev.to/shrsv/using-mtp-to-accelerate-rl-training-of-llms-4c19</link>
      <guid>https://dev.to/shrsv/using-mtp-to-accelerate-rl-training-of-llms-4c19</guid>
      <description>&lt;p&gt;&lt;em&gt;Hello, I'm Shrijith Venkatramana, and I'm building LiveReview — a blast-radius aware AI code review built for your business-critical systems. &lt;a href="https://github.com/HexmosTech/LiveReview/" rel="noopener noreferrer"&gt;Star us&lt;/a&gt; to help devs discover the project, give it a try, and share your feedback to help improve the product.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;A modern reasoning LLM may spend most of its training time doing something that looks almost trivial:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Generate token.

Generate token.

...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Then score the trajectory.&lt;/p&gt;

&lt;p&gt;Then update the model.&lt;/p&gt;

&lt;p&gt;The optimizer is doing serious work, the GPU cluster is expensive, and the environment may be running thousands of parallel tasks.&lt;/p&gt;

&lt;p&gt;Yet the rollout stage can still reduce to a long chain of sequential token-generation steps.&lt;/p&gt;

&lt;p&gt;This is where Multi-Token Prediction (MTP) becomes interesting.&lt;/p&gt;

&lt;p&gt;MTP is usually introduced as a training objective: instead of predicting only the next token, train the model to predict several future tokens.&lt;/p&gt;

&lt;p&gt;But there is a second interpretation that matters for reinforcement learning:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;MTP can turn the model into its own small draft model.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That means a reasoning model can propose several tokens cheaply, while the full model verifies them in parallel.&lt;/p&gt;

&lt;p&gt;For RL, where generating trajectories is often the dominant cost, this changes the economics of the training loop.&lt;/p&gt;

&lt;p&gt;The recent MiMo-V2-Flash technical report from Xiaomi's LLM-Core team makes this connection explicit, describing MTP as a way to accelerate RL rollouts, improve utilization with small batches, and reduce the cost of long-tail trajectories. Their final model uses three lightweight MTP layers and reports an acceptance length of up to 3.6 tokens and decoding speedups of up to 2.6x in their evaluation setup.&lt;/p&gt;

&lt;p&gt;Let's unpack how this works.&lt;/p&gt;
&lt;h2&gt;
  
  
  1. The RL training loop has an awkward bottleneck
&lt;/h2&gt;

&lt;p&gt;Consider a simplified RL setup for mathematical reasoning.&lt;/p&gt;

&lt;p&gt;You give the model:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Solve:

If 3x + 7 = 22, what is x?
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The model generates:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;We need to isolate x.
3x = 22 - 7
3x = 15
x = 5
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;A verifier checks the answer.&lt;/p&gt;

&lt;p&gt;If the answer is correct, the trajectory gets a positive reward.&lt;/p&gt;

&lt;p&gt;The trainer then updates the policy.&lt;/p&gt;

&lt;p&gt;At scale, the loop looks roughly like this:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;prompt
  |
  v
rollout / generation
  |
  v
environment / verifier
  |
  v
reward
  |
  v
policy update
  |
  +-------&amp;gt; next rollout
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The problem is that rollout generation is autoregressive.&lt;/p&gt;

&lt;p&gt;To produce token t+1, the model needs token t.&lt;/p&gt;

&lt;p&gt;So generating 1,000 tokens is approximately 1,000 sequential decoding steps.&lt;/p&gt;

&lt;p&gt;You can add more prompts to a batch, but there is a limit. Reasoning trajectories are highly variable in length.&lt;/p&gt;

&lt;p&gt;One sample might finish in 200 tokens.&lt;/p&gt;

&lt;p&gt;Another might continue for 8,000.&lt;/p&gt;

&lt;p&gt;Eventually you get the classic distributed-systems problem:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;GPU 1:  done
GPU 2:  done
GPU 3:  still generating...
GPU 4:  still generating...
GPU 5:  done

       ^ idle GPUs ^
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The MiMo-V2-Flash report explicitly calls out this long-tail behavior. In small-batch RL, trajectories can approach batch size 1, leaving substantial GPU capacity unused.&lt;/p&gt;

&lt;p&gt;This creates an uncomfortable situation:&lt;/p&gt;

&lt;p&gt;You may have enough aggregate compute.&lt;/p&gt;

&lt;p&gt;What you lack is enough parallel work at each moment.&lt;/p&gt;
&lt;h2&gt;
  
  
  2. MTP: make the model predict several tokens at once
&lt;/h2&gt;

&lt;p&gt;The usual language-model objective is next-token prediction.&lt;/p&gt;

&lt;p&gt;Given:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;x1, x2, x3, ..., xt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;the model predicts:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;P(x[t+1] | x[1:t])
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;With MTP, the model also learns to predict future tokens:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;P(x[t+1] | x[1:t])
P(x[t+2] | x[1:t])
P(x[t+3] | x[1:t])
...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The important architectural idea is that these predictions can share the expensive transformer trunk.&lt;/p&gt;

&lt;p&gt;A useful mental model is:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;                 +--&amp;gt; token t+1
hidden state ----+--&amp;gt; token t+2
                 +--&amp;gt; token t+3
                 +--&amp;gt; token t+4
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Instead of running four completely independent copies of the model, you reuse the expensive computation that produced the hidden state.&lt;/p&gt;

&lt;p&gt;This idea was studied systematically by Fabian Gloeckle and colleagues in 2024. They trained models with multiple prediction heads and found both training-quality improvements and substantial inference acceleration. Their 13B models showed higher HumanEval and MBPP performance than comparable next-token models, while models trained for 4-token prediction were reported to run up to 3x faster at inference in their experiments.&lt;/p&gt;

&lt;p&gt;This gives MTP two possible roles:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;MTP during training
    |
    +--&amp;gt; richer training objective

MTP during inference
    |
    +--&amp;gt; draft several future tokens
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The second role is what becomes useful for RL.&lt;/p&gt;
&lt;h2&gt;
  
  
  3. MTP becomes speculative decoding
&lt;/h2&gt;

&lt;p&gt;The connection becomes clearer if we look at speculative decoding.&lt;/p&gt;

&lt;p&gt;In 2022, Yaniv Leviathan, Matan Kalman, and Yossi Matias introduced speculative decoding as a way to accelerate autoregressive generation.&lt;/p&gt;

&lt;p&gt;The basic trick is simple:&lt;/p&gt;

&lt;p&gt;Instead of asking the expensive model for one token:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;big model -&amp;gt; token 1
big model -&amp;gt; token 2
big model -&amp;gt; token 3
big model -&amp;gt; token 4
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;use a cheap model to propose several:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;small model -&amp;gt; token 1, token 2, token 3, token 4
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Then ask the big model to verify them together.&lt;/p&gt;

&lt;p&gt;If the proposed tokens are correct, several autoregressive steps collapse into one expensive verification pass.&lt;/p&gt;

&lt;p&gt;The key observation in the original work was that difficult generation contains local sequences that are comparatively easy to predict. Speculative decoding exploits that redundancy. The authors demonstrated 2x-3x acceleration on T5-XXL while preserving the output distribution.&lt;/p&gt;

&lt;p&gt;Now replace the separate draft model with MTP heads attached to the same model.&lt;/p&gt;

&lt;p&gt;You get:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;                    +--&amp;gt; draft token 1
                    +--&amp;gt; draft token 2
main model state ---+--&amp;gt; draft token 3
                    +--&amp;gt; draft token 4
                              |
                              v
                       main model verifies
                              |
                              v
                         accepted tokens
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;This is attractive because the draft model is already inside the model.&lt;/p&gt;

&lt;p&gt;You do not need:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;large policy model
        +
separate small draft model
        +
synchronization
        +
two model deployments
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;You can instead have:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;large policy model
        +
lightweight MTP module
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;That is the architecture Xiaomi uses in MiMo-V2-Flash.&lt;/p&gt;

&lt;p&gt;Their MTP modules deliberately use a lightweight dense FFN and sliding-window attention rather than duplicating the expensive MoE/global-attention machinery of the main network. Each MTP block is about 0.33B parameters, while the full MiMo-V2-Flash model has 309B total parameters and 15B active parameters per token.&lt;/p&gt;

&lt;p&gt;The engineering principle is important:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;The draft computation must be cheap enough that verification remains worthwhile.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;
  
  
  4. Why this matters more for RL than ordinary serving
&lt;/h2&gt;

&lt;p&gt;For normal inference, speculative decoding saves user-facing latency.&lt;/p&gt;

&lt;p&gt;For RL, it can reduce training time because rollout is part of the optimization loop itself.&lt;/p&gt;

&lt;p&gt;Suppose one training iteration requires:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;100,000 trajectories
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;and the average trajectory is:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;2,000 generated tokens
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Then the rollout stage produces roughly:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;100,000 * 2,000
= 200,000,000 generated tokens
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;That is 200 million autoregressive token decisions.&lt;/p&gt;

&lt;p&gt;Now suppose the effective accepted length from MTP is 3 tokens.&lt;/p&gt;

&lt;p&gt;Very roughly, instead of requiring one main-model decoding step for every token, you might need something closer to:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;200,000,000 / 3
~ 66,700,000
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;main verification steps.&lt;/p&gt;

&lt;p&gt;This is not a 3x end-to-end RL speedup. That would be too simplistic.&lt;/p&gt;

&lt;p&gt;Each verification step is more expensive than a normal one-token decode.&lt;/p&gt;

&lt;p&gt;There is also rejected draft work, MTP overhead, scheduling overhead, synchronization, environment latency, and reward computation.&lt;/p&gt;

&lt;p&gt;But it shows the basic source of leverage:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;RL compute
    |
    +--&amp;gt; policy forward/backward
    |
    +--&amp;gt; rollout generation  &amp;lt;---- MTP attacks this
    |
    +--&amp;gt; environment
    |
    +--&amp;gt; reward computation
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;If rollout is 60% of wall-clock time and MTP somehow halves rollout time, the theoretical end-to-end improvement is approximately:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;old time = 0.60 + 0.40
new time = 0.30 + 0.40
speedup  = 1.00 / 0.70
         ~ 1.43x
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;That is a much more realistic way to think about the economics.&lt;/p&gt;

&lt;p&gt;Accelerating one stage by 2x does not mean the entire training system becomes 2x faster.&lt;/p&gt;
&lt;h2&gt;
  
  
  5. The math: acceptance length is the real lever
&lt;/h2&gt;

&lt;p&gt;The central quantity is the number of draft tokens accepted by the main model.&lt;/p&gt;

&lt;p&gt;Call it:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;A = average accepted tokens per verification cycle
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Without MTP:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;A ~= 1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;With a good MTP system:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;A &amp;gt; 1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Suppose a trajectory requires &lt;code&gt;T&lt;/code&gt; output tokens.&lt;/p&gt;

&lt;p&gt;A crude approximation is:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;verification_steps ~= T / A
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;So the relative reduction in sequential verification work is approximately:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;reduction ~= 1 - 1/A
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;For:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;A = 2
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;you eliminate roughly:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;1 - 1/2 = 50%
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;of sequential steps.&lt;/p&gt;

&lt;p&gt;For:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;A = 3
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;you eliminate roughly:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;1 - 1/3 = 67%
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;For:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;A = 3.6
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;the rough figure is:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;1 - 1/3.6
~ 72%
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Again, this is not wall-clock speedup. It is a way of understanding the mechanical source of the gain.&lt;/p&gt;

&lt;p&gt;The interesting part is that acceptance is related to uncertainty.&lt;/p&gt;

&lt;p&gt;Suppose the model is completing:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;"The capital of France is ..."
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The next few tokens are easy.&lt;/p&gt;

&lt;p&gt;An MTP head has a good chance of producing:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Paris
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;and perhaps the surrounding punctuation or explanation.&lt;/p&gt;

&lt;p&gt;Now compare this with a difficult reasoning step where many continuations are plausible.&lt;/p&gt;

&lt;p&gt;The MTP predictions diverge.&lt;/p&gt;

&lt;p&gt;Acceptance falls.&lt;/p&gt;

&lt;p&gt;The MiMo-V2-Flash experiments found a strong inverse relationship between next-token cross-entropy and MTP acceptance length. Their reported fit had R^2 = 0.995 across the evaluated datasets. Lower-uncertainty contexts produced acceptance lengths around 3.6 tokens, while more uncertain tasks had shorter accepted sequences.&lt;/p&gt;

&lt;p&gt;This creates an important systems rule:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;MTP performance is workload-dependent.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;A benchmark with easy repetitive code may benefit much more than a benchmark dominated by uncertain reasoning branches.&lt;/p&gt;

&lt;p&gt;And RL can change the model's entropy during training.&lt;/p&gt;

&lt;p&gt;That matters.&lt;/p&gt;

&lt;p&gt;A 2026 study called Bebop specifically investigates this issue and reports that MTP acceptance can degrade during RL as model entropy changes. The authors propose rejection-sampling and training approaches designed to preserve acceptance during RL, reporting up to 1.8x end-to-end acceleration in their asynchronous RL experiments.&lt;/p&gt;

&lt;p&gt;So the real optimization target is not:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;"Add MTP."
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;It is:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;maximize useful accepted tokens
while
keeping draft cost low
and
preserving RL training behavior
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h2&gt;
  
  
  6. What an RL engineer actually has to build
&lt;/h2&gt;

&lt;p&gt;A production MTP-enabled RL system is more than adding three linear layers.&lt;/p&gt;

&lt;p&gt;The rollout service now has roughly this structure:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Prompt
  |
  v
Main model forward
  |
  +--&amp;gt; MTP draft heads
  |       |
  |       +--&amp;gt; token 1
  |       +--&amp;gt; token 2
  |       +--&amp;gt; token 3
  |
  v
Main model verification
  |
  +--&amp;gt; accepted prefix
  |
  v
Continue generation
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;There are several engineering details that matter.&lt;/p&gt;
&lt;h3&gt;
  
  
  Keep the MTP module lightweight
&lt;/h3&gt;

&lt;p&gt;If the draft module costs nearly as much as the main model, you have recreated the problem.&lt;/p&gt;

&lt;p&gt;MiMo-V2-Flash therefore uses dense lightweight FFNs and local attention for its MTP blocks.&lt;/p&gt;
&lt;h3&gt;
  
  
  Measure acceptance by workload
&lt;/h3&gt;

&lt;p&gt;Do not report only one global acceptance number.&lt;/p&gt;

&lt;p&gt;Track something like:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;acceptance_length
  by task type
  by trajectory length
  by generation temperature
  by training step
  by model checkpoint
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;A system that starts at:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;A = 3.5
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;and falls to:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;A = 1.4
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;after several million RL updates has a different economics profile.&lt;/p&gt;
&lt;h3&gt;
  
  
  Watch the long tail
&lt;/h3&gt;

&lt;p&gt;This is particularly important in RL.&lt;/p&gt;

&lt;p&gt;Suppose 64 sequences are generating concurrently.&lt;/p&gt;

&lt;p&gt;If 63 finish quickly and one trajectory runs 20x longer, your effective utilization can collapse.&lt;/p&gt;

&lt;p&gt;MTP attacks this by reducing the number of sequential decoding operations in that long trajectory.&lt;/p&gt;

&lt;p&gt;The MiMo-V2-Flash infrastructure combines MTP with sequence-level scheduling, partial rollout, load balancing, and asynchronous reward computation. This is a useful clue about how the authors approached the problem operationally: MTP is one component in a larger rollout system rather than a magic optimization in isolation.&lt;/p&gt;
&lt;h3&gt;
  
  
  Profile memory, not just FLOPs
&lt;/h3&gt;

&lt;p&gt;Autoregressive decoding is frequently memory-bound.&lt;/p&gt;

&lt;p&gt;Each token requires repeatedly using model weights and reading/writing KV-cache state.&lt;/p&gt;

&lt;p&gt;MTP increases token-level parallelism. Several candidate tokens can be considered together, improving arithmetic intensity and making better use of the accelerator.&lt;/p&gt;

&lt;p&gt;That is why a roofline-style analysis is more useful than simply counting theoretical FLOPs.&lt;/p&gt;

&lt;p&gt;The MiMo report explicitly notes that speedup depends on batch size, acceptance length, computation/I/O balance, and kernel efficiency. In their measured setup, three MTP layers produced roughly 1.8x-2.7x speedup across the tested batch sizes and acceptance lengths from 2.8 to 3.8.&lt;/p&gt;
&lt;h2&gt;
  
  
  7. The economics: think in tokens per dollar, not tokens per second
&lt;/h2&gt;

&lt;p&gt;Consider a hypothetical RL cluster costing:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$100,000 per day
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Suppose the training pipeline spends:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;60% rollout
40% everything else
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;So:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;rollout cost = $60,000/day
other cost   = $40,000/day
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Imagine an MTP deployment reduces rollout wall-clock cost by 40%.&lt;/p&gt;

&lt;p&gt;Then:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;new rollout cost = $36,000/day

total cost = $36,000 + $40,000
           = $76,000/day
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;You have reduced total compute expenditure by:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;1 - 76,000 / 100,000
= 24%
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;That is before considering whether you use the freed capacity to run more trajectories.&lt;/p&gt;

&lt;p&gt;And this is where RL becomes interesting economically.&lt;/p&gt;

&lt;p&gt;You have two choices after making rollout cheaper:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;same training budget
       |
       +--&amp;gt; finish training faster
       |
       +--&amp;gt; generate more trajectories
       |
       +--&amp;gt; run more experiments
       |
       +--&amp;gt; increase environment diversity
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;For research teams, the last three may matter more than the raw speedup.&lt;/p&gt;

&lt;p&gt;A 25% reduction in training cost can effectively become more than a 25% increase in experimentation capacity if the system was previously compute-constrained.&lt;/p&gt;

&lt;p&gt;The broader lesson is that MTP is an example of a recurring systems principle in AI:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;When a workload is sequential, look for structure that lets you trade dependency depth for parallel work.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Normal batching increases parallelism across requests.&lt;/p&gt;

&lt;p&gt;MTP increases parallelism inside a request.&lt;/p&gt;

&lt;p&gt;That distinction is especially useful when RL trajectories become long, irregular, and difficult to batch efficiently.&lt;/p&gt;
&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;MTP started as a modification to the language-model training objective.&lt;/p&gt;

&lt;p&gt;Then speculative decoding gave it another interpretation:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Predict the future cheaply.
Verify it with the expensive model.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;For RL, that interpretation is particularly valuable because the system repeatedly generates trajectories before it can learn from them.&lt;/p&gt;

&lt;p&gt;The architecture therefore becomes:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;LLM
 |
 +--&amp;gt; MTP drafts several tokens
 |
 +--&amp;gt; main model verifies them
 |
 +--&amp;gt; environment scores trajectory
 |
 +--&amp;gt; optimizer updates policy
 |
 +--&amp;gt; repeat
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The interesting metric is no longer just model throughput.&lt;/p&gt;

&lt;p&gt;It is:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;useful accepted tokens / unit time
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;And the interesting economic question is:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;How much more RL learning can I buy
with the same accelerator budget?
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The research direction is still evolving. Recent work suggests that MTP acceptance itself can change during RL, which means the draft mechanism may need to co-evolve with the policy rather than remain a static inference optimization.&lt;/p&gt;

&lt;p&gt;That makes MTP more than a decoding trick.&lt;/p&gt;

&lt;p&gt;It is a way of changing the computational shape of RL.&lt;/p&gt;

&lt;p&gt;What other parts of the LLM RL stack do you think are fundamentally sequential today, but could be turned into parallel work?&lt;/p&gt;



&lt;p&gt;&lt;em&gt;&lt;br&gt;
Your team's attention is limited, and the deluge of AI-generated code is making it harder to keep production reliable and secure without slowing you down.&lt;/em&gt;&lt;/p&gt;
&lt;em&gt;

&lt;p&gt;I'm building &lt;strong&gt;LiveReview&lt;/strong&gt;, a blast-radius aware AI code review built for your business-critical systems.&lt;/p&gt;

&lt;p&gt;Instead of presenting every diff with equal emphasis, &lt;strong&gt;LiveReview scores each change by blast radius — how far its impact reaches through your call graph — so you can focus attention where it actually matters.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Spend code review effort where business risk is highest — not spread evenly across every diff.&lt;/p&gt;

&lt;p&gt;⭐ Star it on GitHub: &lt;br&gt;
&lt;/p&gt;
&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://assets.dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/HexmosTech" rel="noopener noreferrer"&gt;
        HexmosTech
      &lt;/a&gt; / &lt;a href="https://github.com/HexmosTech/LiveReview" rel="noopener noreferrer"&gt;
        LiveReview
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      Blast-Radius Aware AI Code Review for Business-Critical Systems
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;&lt;p&gt;&lt;a rel="noopener noreferrer" href="https://github.com/HexmosTech/LiveReview/./assets/gfx/png/logo-with-text.png"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2FHexmosTech%2FLiveReview%2FHEAD%2F.%2Fassets%2Fgfx%2Fpng%2Flogo-with-text.png" alt="LiveReview" height="80"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/HexmosTech/LiveReview/actions/workflows/gitleaks.yml" rel="noopener noreferrer"&gt;&lt;img alt="gitleaks.yml" title="gitleaks.yml: Secret scanning workflow" src="https://github.com/HexmosTech/LiveReview/actions/workflows/gitleaks.yml/badge.svg"&gt;&lt;/a&gt;&amp;nbsp;&lt;a href="https://github.com/HexmosTech/LiveReview/actions/workflows/osv-scanner.yml" rel="noopener noreferrer"&gt;&lt;img alt="osv-scanner.yml" title="osv-scanner.yml: Dependency vulnerability scan" src="https://github.com/HexmosTech/LiveReview/actions/workflows/osv-scanner.yml/badge.svg"&gt;&lt;/a&gt;&amp;nbsp;&lt;a href="https://github.com/HexmosTech/LiveReview/actions/workflows/govulncheck.yml" rel="noopener noreferrer"&gt;&lt;img alt="govulncheck.yml" title="govulncheck.yml: Go vulnerability check" src="https://github.com/HexmosTech/LiveReview/actions/workflows/govulncheck.yml/badge.svg"&gt;&lt;/a&gt;&amp;nbsp;&lt;a href="https://github.com/HexmosTech/LiveReview/actions/workflows/semgrep.yml" rel="noopener noreferrer"&gt;&lt;img alt="semgrep.yml" title="semgrep.yml: Static analysis security scan" src="https://github.com/HexmosTech/LiveReview/actions/workflows/semgrep.yml/badge.svg"&gt;&lt;/a&gt;&amp;nbsp;&lt;a rel="noopener noreferrer" href="https://github.com/HexmosTech/LiveReview/./assets/gfx/dependabot-enabled.svg"&gt;&lt;img alt="dependabot-enabled" title="dependabot-enabled: Automated dependency updates are enabled" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2FHexmosTech%2FLiveReview%2FHEAD%2F.%2Fassets%2Fgfx%2Fdependabot-enabled.svg"&gt;&lt;/a&gt;&amp;nbsp;&lt;a href="https://github.com/HexmosTech/LiveReview/actions/workflows/mcp-testcases.yml" rel="noopener noreferrer"&gt;&lt;img alt="mcp-testcases.yml" title="mcp-testcases.yml: MCP integration test suite" src="https://github.com/HexmosTech/LiveReview/actions/workflows/mcp-testcases.yml/badge.svg"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;LiveReview: Blast-Radius Aware AI Code Review for Business-Critical Systems&lt;/h1&gt;
&lt;/div&gt;

&lt;p&gt;LiveReview is an AI code reviewer that scores every hunk of a diff by &lt;strong&gt;blast radius&lt;/strong&gt;: how far a change reaches through your call graph, how much persistent state it touches, and how well-tested it is. A 3-line change to a shared auth check can outrank a 300-line UI tweak. Your team's attention goes to the highest-risk code first, not spread evenly across every diff.&lt;/p&gt;


  
    
    &lt;span class="m-1"&gt;blast-radius-demo.mp4&lt;/span&gt;
  

  

  


&lt;p&gt;&lt;i&gt;LiveReview's Blast Radius &amp;amp; Review Priority scoring, live in the diff viewer.&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;&lt;div class="table-wrapper-paragraph"&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;table&gt;

&lt;thead&gt;

&lt;tr&gt;

&lt;th&gt;The exact math, not a black box&lt;/th&gt;

&lt;th&gt;Visualize blast radius at a glance&lt;/th&gt;

&lt;th&gt;Every factor that feeds the score&lt;/th&gt;

&lt;/tr&gt;

&lt;/thead&gt;

&lt;tbody&gt;

&lt;tr&gt;

&lt;td&gt;&lt;a rel="noopener noreferrer" href="https://github.com/HexmosTech/LiveReview/./assets/screenshots/blast-radius/new-risk-score-3.webp"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fraw.githubusercontent.com%2FHexmosTech%2FLiveReview%2FHEAD%2F.%2Fassets%2Fscreenshots%2Fblast-radius%2Fnew-risk-score-3.webp" width="280"&gt;&lt;/a&gt;&lt;/td&gt;

&lt;td&gt;&lt;a rel="noopener noreferrer" href="https://github.com/HexmosTech/LiveReview/./assets/screenshots/blast-radius/new-risk-score-4.webp"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fraw.githubusercontent.com%2FHexmosTech%2FLiveReview%2FHEAD%2F.%2Fassets%2Fscreenshots%2Fblast-radius%2Fnew-risk-score-4.webp" width="280"&gt;&lt;/a&gt;&lt;/td&gt;

&lt;td&gt;&lt;a rel="noopener noreferrer" href="https://github.com/HexmosTech/LiveReview/./assets/screenshots/blast-radius/new-risk-score-2.webp"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fraw.githubusercontent.com%2FHexmosTech%2FLiveReview%2FHEAD%2F.%2Fassets%2Fscreenshots%2Fblast-radius%2Fnew-risk-score-2.webp" width="280"&gt;&lt;/a&gt;&lt;/td&gt;

&lt;/tr&gt;

&lt;/tbody&gt;

&lt;/table&gt;&lt;/div&gt;&lt;br&gt;
&lt;p&gt;&lt;/p&gt;

How does Blast Radius scoring work? (a more technical explanation)

&lt;p&gt;&lt;strong&gt;Here's the goal:&lt;/strong&gt;&lt;/p&gt;


&lt;ul&gt;

&lt;li&gt;A 3-line fix in a function used by 40 other files, that also writes to a database, should score high.&lt;/li&gt;

&lt;li&gt;A 300-line UI change in one file, fully covered by…&lt;/li&gt;

&lt;/ul&gt;&lt;/div&gt;
&lt;br&gt;
  &lt;/div&gt;
&lt;br&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/HexmosTech/LiveReview" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;br&gt;
&lt;/div&gt;
&lt;br&gt;


&lt;p&gt;&lt;b&gt;Click below to try LiveReview with your codebase:&lt;/b&gt;&lt;/p&gt;

&lt;/em&gt;&lt;p&gt;&lt;em&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://hexmos.com/livereview" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fvls0pq7nymbrll98je6s.png" alt="LiveReview Banner"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>webdev</category>
      <category>programming</category>
      <category>productivity</category>
    </item>
    <item>
      <title>Multi-Teacher On-Policy Distillation: How One LLM Can Learn From Several Expert Models</title>
      <dc:creator>Shrijith Venkatramana</dc:creator>
      <pubDate>Fri, 25 Sep 2026 19:31:40 +0000</pubDate>
      <link>https://dev.to/shrsv/multi-teacher-on-policy-distillation-how-one-llm-can-learn-from-several-expert-models-49im</link>
      <guid>https://dev.to/shrsv/multi-teacher-on-policy-distillation-how-one-llm-can-learn-from-several-expert-models-49im</guid>
      <description>&lt;p&gt;&lt;em&gt;Hello, I'm Shrijith Venkatramana, and I'm building LiveReview — a blast-radius aware AI code review built for your business-critical systems. &lt;a href="https://github.com/HexmosTech/LiveReview/" rel="noopener noreferrer"&gt;Star us&lt;/a&gt; to help devs discover the project, give it a try, and share your feedback to help improve the product.&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;The usual way to improve an LLM is to make the model itself better.&lt;/p&gt;

&lt;p&gt;Train it on more data. Run more reinforcement learning. Increase the context. Increase the parameter count.&lt;/p&gt;

&lt;p&gt;But there is another possibility:&lt;/p&gt;

&lt;p&gt;Build several models that become very good at different things, then teach a single student to absorb those capabilities.&lt;/p&gt;

&lt;p&gt;That sounds like ordinary knowledge distillation.&lt;/p&gt;

&lt;p&gt;The interesting part is what happens when the teachers are specialists, and the student is allowed to make its own mistakes while learning from them.&lt;/p&gt;

&lt;p&gt;This is the idea behind &lt;strong&gt;Multi-Teacher On-Policy Distillation (MOPD)&lt;/strong&gt;, described in Xiaomi's 2026 MiMo-V2-Flash technical report.&lt;/p&gt;

&lt;p&gt;The basic pattern is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;                    +-------------------+
                    |   Math Teacher    |
                    +---------+---------+
                              |
                    +---------v---------+
                    |                   |
                    |      Student      |----&amp;gt; final model
                    |                   |
                    +---------^---------+
                              |
                    +---------+---------+
                    |                   |
          +---------+---------+   +-----+---------+
          | Coding Teacher   |   | Agent Teacher |
          +------------------+   +---------------+
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The student generates its own trajectory.&lt;/p&gt;

&lt;p&gt;A domain-appropriate teacher looks at those exact tokens and provides dense feedback.&lt;/p&gt;

&lt;p&gt;Over many iterations, the student becomes a single model that contains capabilities that previously lived in separate experts.&lt;/p&gt;

&lt;p&gt;MiMo-V2-Flash uses this as the third stage of its post-training pipeline, after SFT and domain-specific RL. Its report describes specialist teachers for coding, search, tool use, mathematics, reasoning, and safety. (&lt;a href="https://arxiv.org/html/2601.02780v2" rel="noopener noreferrer"&gt;arXiv&lt;/a&gt;)&lt;/p&gt;
&lt;h2&gt;
  
  
  1. The problem: capability specialization creates a new integration problem
&lt;/h2&gt;

&lt;p&gt;Imagine you have five excellent models:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Teacher A -&amp;gt; mathematics
Teacher B -&amp;gt; coding
Teacher C -&amp;gt; web search
Teacher D -&amp;gt; tool use
Teacher E -&amp;gt; general reasoning
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Each model has undergone its own optimization process.&lt;/p&gt;

&lt;p&gt;The math teacher has seen enormous amounts of reward pressure around mathematical reasoning.&lt;/p&gt;

&lt;p&gt;The coding teacher has spent its RL budget on writing and executing code.&lt;/p&gt;

&lt;p&gt;The search teacher has learned how to explore a web environment.&lt;/p&gt;

&lt;p&gt;Eventually, you have several models that are locally excellent but globally fragmented.&lt;/p&gt;

&lt;p&gt;How do you get one production model with all five capabilities?&lt;/p&gt;

&lt;p&gt;There are several obvious approaches.&lt;/p&gt;
&lt;h3&gt;
  
  
  Parameter merging
&lt;/h3&gt;

&lt;p&gt;Average or otherwise combine the weights.&lt;/p&gt;

&lt;p&gt;The problem is that neural networks do not give you a clean "math capability vector" and "coding capability vector" that can simply be added together.&lt;/p&gt;
&lt;h3&gt;
  
  
  Sequential training
&lt;/h3&gt;

&lt;p&gt;Train on mathematics, then coding, then search.&lt;/p&gt;

&lt;p&gt;Now you risk the familiar continual-learning problem: the later optimization changes parameters that were useful for earlier capabilities.&lt;/p&gt;
&lt;h3&gt;
  
  
  Offline distillation
&lt;/h3&gt;

&lt;p&gt;Ask each teacher to generate a large dataset, then fine-tune the student on those examples.&lt;/p&gt;

&lt;p&gt;This works, but the student mostly learns from trajectories that the teachers considered worth generating.&lt;/p&gt;

&lt;p&gt;The important question is:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What happens when the student behaves differently from the teacher?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;That question leads directly to on-policy distillation.&lt;/p&gt;
&lt;h2&gt;
  
  
  2. From Hinton's distillation to learning from your own mistakes
&lt;/h2&gt;

&lt;p&gt;The history is useful here.&lt;/p&gt;

&lt;p&gt;In 2015, Geoffrey Hinton, Oriol Vinyals, and Jeff Dean described &lt;strong&gt;knowledge distillation&lt;/strong&gt; as a way to compress an ensemble of models into a single deployable model.&lt;/p&gt;

&lt;p&gt;The motivation was practical. An ensemble could be more accurate, but serving many large networks for every prediction was expensive. Their idea was to have the large ensemble teach one smaller model. (&lt;a href="https://arxiv.org/abs/1503.02531" rel="noopener noreferrer"&gt;arXiv&lt;/a&gt;)&lt;/p&gt;

&lt;p&gt;The basic idea was:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;large ensemble
      |
      v
soft predictions
      |
      v
small student
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;For autoregressive language models, however, another problem appears.&lt;/p&gt;

&lt;p&gt;Suppose the teacher produces:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;The function is convex because its second derivative is positive...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;and the student produces:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;The function is convex because its derivative is increasing...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Those trajectories have different prefixes.&lt;/p&gt;

&lt;p&gt;The probability distribution the student sees at token 20 depends on what the student generated at tokens 1-19.&lt;/p&gt;

&lt;p&gt;So training on teacher-generated text gives you one distribution of states, while inference gives you another.&lt;/p&gt;

&lt;p&gt;In 2024, Rishabh Agarwal and colleagues at Google DeepMind formalized this issue in &lt;strong&gt;Generalized Knowledge Distillation&lt;/strong&gt;. Their on-policy approach has the student generate its own outputs, then asks the teacher to evaluate those student-generated trajectories. The point is to train on the states the student will actually visit. (&lt;a href="https://mlanthology.org/iclr/2024/agarwal2024iclr-onpolicy/" rel="noopener noreferrer"&gt;ML Anthology&lt;/a&gt;)&lt;/p&gt;

&lt;p&gt;That distinction is easiest to see like this:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;OFF-POLICY

teacher -&amp;gt; generates trajectory -&amp;gt; student learns trajectory


ON-POLICY

student -&amp;gt; generates trajectory
              |
              v
         teacher evaluates it
              |
              v
         student learns from it
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;For an autoregressive model, that difference is substantial.&lt;/p&gt;

&lt;p&gt;The teacher is no longer saying:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"Here is the answer I would have written."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;It is effectively saying:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"Given the exact state you reached, here is how I would evaluate the next decision."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That is much closer to interactive coaching.&lt;/p&gt;
&lt;h2&gt;
  
  
  3. MOPD adds multiple specialist teachers
&lt;/h2&gt;

&lt;p&gt;MOPD takes the on-policy idea and turns it into a multi-expert system.&lt;/p&gt;

&lt;p&gt;The MiMo-V2-Flash pipeline is roughly:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Stage 1
Base model
   |
   v
SFT student
   |
   v
Stage 2
+-------------------------------+
|                               |
| math RL        -&amp;gt; math teacher|
| coding RL      -&amp;gt; code teacher|
| search RL      -&amp;gt; search teacher
| tool-use RL    -&amp;gt; agent teacher
| reasoning RL   -&amp;gt; reasoning teacher
|                               |
+-------------------------------+
   |
   v
Stage 3
MOPD
   |
   v
single general-purpose student
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;A prompt is associated with an appropriate domain teacher.&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;"Prove this number theory result"
            |
            v
      math teacher


"Fix this failing Python test"
            |
            v
      coding teacher


"Find the answer using web search"
            |
            v
      search teacher
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The critical part is that the &lt;strong&gt;student still generates the response&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Suppose the student is trying to solve a coding problem.&lt;/p&gt;

&lt;p&gt;It generates:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Step 1: inspect repository
Step 2: open foo.py
Step 3: modify function
Step 4: run tests
Step 5: ...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The coding teacher evaluates the probabilities it would assign to those student-generated tokens.&lt;/p&gt;

&lt;p&gt;The teacher does not necessarily need to generate a competing four-thousand-token answer.&lt;/p&gt;

&lt;p&gt;Instead, it supplies token-level information about the student's trajectory.&lt;/p&gt;

&lt;p&gt;This makes MOPD very different from simply asking five teachers for five answers and throwing all of them into an SFT dataset.&lt;/p&gt;

&lt;p&gt;The MiMo report explicitly describes MOPD as an on-policy RL process rather than parameter merging or static expert-generated datasets. (&lt;a href="https://arxiv.org/html/2601.02780v2" rel="noopener noreferrer"&gt;arXiv&lt;/a&gt;)&lt;/p&gt;
&lt;h2&gt;
  
  
  4. The math: turn teacher probabilities into a reward
&lt;/h2&gt;

&lt;p&gt;Here is the core idea without getting buried in notation.&lt;/p&gt;

&lt;p&gt;Let:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;pi_student(y_t | x, y_&amp;lt;t)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;be the probability the student assigns to the token it actually generated.&lt;/p&gt;

&lt;p&gt;Let:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;pi_teacher(y_t | x, y_&amp;lt;t)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;be the probability the specialist teacher assigns to that same token, given the same prefix.&lt;/p&gt;

&lt;p&gt;Now define the token-level signal:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;A_t = log( pi_teacher / pi_student )
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Everything is evaluated at the actual student token and its actual prefix.&lt;/p&gt;

&lt;p&gt;This has a very intuitive interpretation.&lt;/p&gt;
&lt;h3&gt;
  
  
  Case 1: teacher likes the token more than the student does
&lt;/h3&gt;

&lt;p&gt;Suppose:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;student probability = 0.10
teacher probability = 0.50
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Then:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;A_t = log(0.50 / 0.10)
    = log(5)
    ≈ +1.61
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;That is a positive learning signal.&lt;/p&gt;

&lt;p&gt;The student should increase the probability of making this decision in similar states.&lt;/p&gt;
&lt;h3&gt;
  
  
  Case 2: teacher dislikes the token
&lt;/h3&gt;

&lt;p&gt;Suppose:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;student probability = 0.40
teacher probability = 0.05
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Then:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;A_t = log(0.05 / 0.40)
    = log(0.125)
    ≈ -2.08
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Now the signal is negative.&lt;/p&gt;

&lt;p&gt;The student should reduce the probability of making that choice.&lt;/p&gt;
&lt;h3&gt;
  
  
  Case 3: they agree
&lt;/h3&gt;

&lt;p&gt;Suppose:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;student probability = 0.20
teacher probability = 0.20
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Then:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;A_t = log(1) = 0
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;There is no corrective pressure.&lt;/p&gt;

&lt;p&gt;So the teacher is providing a &lt;strong&gt;dense, token-level advantage signal&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The underlying objective can be understood as minimizing the reverse KL divergence:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;D_KL(student || teacher)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;with the expectation taken over tokens sampled from the student.&lt;/p&gt;

&lt;p&gt;The MiMo formulation then turns this into a policy-gradient-style surrogate objective. It also uses importance sampling when the training policy and sampling policy differ, and discards tokens whose probability ratios fall outside a specified range. (&lt;a href="https://arxiv.org/html/2601.02780v2" rel="noopener noreferrer"&gt;arXiv&lt;/a&gt;)&lt;/p&gt;

&lt;p&gt;That last engineering detail matters.&lt;/p&gt;

&lt;p&gt;Your rollout worker may use a slightly different inference configuration from the policy being updated.&lt;/p&gt;

&lt;p&gt;If:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;mu = sampling policy
pi = current training policy
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;then a correction factor of roughly&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;pi(y_t) / mu(y_t)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;is needed.&lt;/p&gt;

&lt;p&gt;But enormous ratios make the estimator unstable, so MOPD clips the usable region and drops sufficiently discrepant tokens. (&lt;a href="https://arxiv.org/html/2601.02780v2" rel="noopener noreferrer"&gt;arXiv&lt;/a&gt;)&lt;/p&gt;

&lt;p&gt;This is one reason MOPD should be thought of as an RL system with a specialized reward, rather than simply "cross-entropy against a teacher."&lt;/p&gt;
&lt;h2&gt;
  
  
  5. Why this can combine capabilities without generating an enormous dataset
&lt;/h2&gt;

&lt;p&gt;There is an important computational distinction.&lt;/p&gt;

&lt;p&gt;Imagine a student generates 4,000 tokens.&lt;/p&gt;

&lt;p&gt;With ordinary teacher-generated distillation, the teacher might need to autoregressively generate a 4,000-token answer.&lt;/p&gt;

&lt;p&gt;That is 4,000 sequential decoding steps.&lt;/p&gt;

&lt;p&gt;With on-policy token-level distillation, the student already generated the trajectory.&lt;/p&gt;

&lt;p&gt;The teacher can evaluate the student trajectory with a forward pass over the sequence and produce logits for the relevant positions.&lt;/p&gt;

&lt;p&gt;Conceptually:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Teacher generation:

t1 -&amp;gt; t2 -&amp;gt; t3 -&amp;gt; t4 -&amp;gt; ... -&amp;gt; t4000
 ^     ^     ^     ^
serial decoding


Teacher evaluation:

[t1 t2 t3 t4 ... t4000]
          |
          v
     logits for all
     causal positions
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The exact implementation still has substantial transformer compute, especially with long contexts, but the workload is much more amenable to batching than autoregressive teacher generation.&lt;/p&gt;

&lt;p&gt;That changes the economics.&lt;/p&gt;

&lt;p&gt;Suppose:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;1,000,000 training prompts
4,000 student tokens / prompt
1 selected teacher / prompt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Then the teacher processes approximately:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;1,000,000 * 4,000
= 4 billion teacher-scored tokens
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The important variable is &lt;strong&gt;selected teachers per trajectory&lt;/strong&gt;, not the number of teachers in your library.&lt;/p&gt;

&lt;p&gt;Seven specialist teachers do not automatically mean seven teacher evaluations for every token.&lt;/p&gt;

&lt;p&gt;You can instead have:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;7 teachers
   |
routing
   |
1 teacher per trajectory
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The fixed cost is building seven good teachers.&lt;/p&gt;

&lt;p&gt;The variable cost is scoring student trajectories with the relevant teacher.&lt;/p&gt;

&lt;p&gt;That is an interesting economic trade:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Specialist RL
     |
     v
expensive capability acquisition
     |
     v
reusable teacher
     |
     v
many student models
     |
     v
amortized capability transfer
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;A company building multiple downstream models could reuse the same expert pool.&lt;/p&gt;

&lt;p&gt;That is where multi-teacher distillation starts looking less like a training trick and more like an organizational architecture for model development.&lt;/p&gt;
&lt;h2&gt;
  
  
  6. The hard part is the infrastructure, not the equation
&lt;/h2&gt;

&lt;p&gt;It is tempting to read the MOPD equation and conclude that implementation is just:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;loss&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;student_prob&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="n"&gt;teacher_prob&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;It is not.&lt;/p&gt;

&lt;p&gt;A production implementation has at least these components:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;                +----------------------+
                | Prompt / environment |
                +----------+-----------+
                           |
                           v
                  +----------------+
                  | Student rollout|
                  +--------+-------+
                           |
                           v
               +-----------------------+
               | Select domain teacher |
               +-----------+-----------+
                           |
                           v
               +-----------------------+
               | Teacher forward pass  |
               | on student trajectory |
               +-----------+-----------+
                           |
                           v
               +-----------------------+
               | Token-level advantage |
               +-----------+-----------+
                           |
                 +---------+---------+
                 |                   |
                 v                   v
             MOPD signal        ORM signal
                 |                   |
                 +---------+---------+
                           |
                           v
                    policy update
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;MiMo-V2-Flash is a useful concrete case because its authors describe the surrounding machinery.&lt;/p&gt;

&lt;p&gt;Their RL/MOPD infrastructure uses SGLang for inference and Megatron-LM for training, with FP8 training and inference. They also describe rollout-routing replay, data scheduling, partial rollouts, prefix caching, and load balancing. (&lt;a href="https://arxiv.org/html/2601.02780v2" rel="noopener noreferrer"&gt;arXiv&lt;/a&gt;)&lt;/p&gt;

&lt;p&gt;For coding agents, the scale gets even more concrete.&lt;/p&gt;

&lt;p&gt;The report describes training across roughly 120,000 interactive environments and a Kubernetes-based environment setup involving more than 10,000 concurrent pods. (&lt;a href="https://arxiv.org/html/2601.02780v2" rel="noopener noreferrer"&gt;arXiv&lt;/a&gt;)&lt;/p&gt;

&lt;p&gt;That tells you something important about MOPD:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;the loss function is the easy part.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The difficult parts are:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;rollout throughput
teacher serving
policy/rollout synchronization
importance sampling
long trajectories
GPU utilization
reward latency
environment orchestration
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;This is also why the distinction between an ordinary SFT pipeline and an on-policy pipeline matters operationally.&lt;/p&gt;

&lt;p&gt;In SFT:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;dataset -&amp;gt; GPU -&amp;gt; gradient update
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;In MOPD:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;prompt
  -&amp;gt; rollout
  -&amp;gt; environment interaction
  -&amp;gt; teacher inference
  -&amp;gt; reward computation
  -&amp;gt; advantage construction
  -&amp;gt; policy update
  -&amp;gt; next rollout
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Your training system has become a distributed control loop.&lt;/p&gt;
&lt;h2&gt;
  
  
  7. What MOPD changes about LLM post-training
&lt;/h2&gt;

&lt;p&gt;The deeper idea is not "use several teachers."&lt;/p&gt;

&lt;p&gt;It is:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;separate capability acquisition from capability integration.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A specialist can be optimized very aggressively for one domain.&lt;/p&gt;

&lt;p&gt;Then a general student can learn from many such specialists while remaining the entity that generates its own trajectories.&lt;/p&gt;

&lt;p&gt;That gives you a useful architecture:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;                    specialist RL
                         |
       +-----------------+------------------+
       |                 |                  |
       v                 v                  v
    math expert      coding expert      agent expert
       |                 |                  |
       +-----------------+------------------+
                         |
                         v
                 on-policy student
                         |
                         v
                  unified model
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;There is also an interesting feedback loop.&lt;/p&gt;

&lt;p&gt;MiMo's authors describe a process in which a distilled student can itself become the starting point for another round of specialized RL, producing stronger teachers for a later student. (&lt;a href="https://arxiv.org/html/2601.02780v2" rel="noopener noreferrer"&gt;arXiv&lt;/a&gt;)&lt;/p&gt;

&lt;p&gt;So you can imagine:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Student v1
   |
   v
specialized RL
   |
   v
Teachers v2
   |
   v
MOPD
   |
   v
Student v2
   |
   v
specialized RL
   |
   ...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;That starts to resemble an internal capability-production system.&lt;/p&gt;

&lt;p&gt;But the benchmark results are also a useful warning against treating this as automatic capability addition.&lt;/p&gt;

&lt;p&gt;In the MiMo experiments, MOPD improved or matched the strongest teacher on several listed benchmarks, including AIME 2025, HMMT, LiveCodeBench, and tau²-Bench. But there were also regressions: for example, BrowseComp fell 6.3 points relative to the listed best teacher, and Arena-Hard Creative Writing fell 3.9 points. SWE-Bench Verified was 73.4 after MOPD versus 74.2 for the best teacher in that comparison. (&lt;a href="https://arxiv.org/html/2601.02780v2" rel="noopener noreferrer"&gt;arXiv&lt;/a&gt;)&lt;/p&gt;

&lt;p&gt;So the realistic interpretation is:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;MOPD provides a mechanism for capability transfer.

It does not guarantee perfect capability preservation.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;And that is probably the most useful way for developers to think about it.&lt;/p&gt;

&lt;p&gt;Knowledge distillation began with the problem of making ensembles cheaper.&lt;/p&gt;

&lt;p&gt;On-policy distillation added the idea of teaching students on states they actually visit.&lt;/p&gt;

&lt;p&gt;MOPD pushes that one step further:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;many specialized policies
          |
          v
student-generated trajectories
          |
          v
token-level expert feedback
          |
          v
one deployable policy
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The interesting engineering question is therefore no longer just:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"How do I make a bigger model?"&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;It becomes:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"How cheaply can I create specialized intelligence, and how efficiently can I transfer it into one model?"&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That is a very different post-training economics.&lt;/p&gt;

&lt;p&gt;What do you think is the harder scaling problem for the next generation of LLMs: training stronger specialist teachers, or building the infrastructure to distill them into a single general model?&lt;/p&gt;



&lt;p&gt;&lt;em&gt;&lt;br&gt;
Your team's attention is limited, and the deluge of AI-generated code is making it harder to keep production reliable and secure without slowing you down.&lt;/em&gt;&lt;/p&gt;
&lt;em&gt;

&lt;p&gt;I'm building &lt;strong&gt;LiveReview&lt;/strong&gt;, a blast-radius aware AI code review built for your business-critical systems.&lt;/p&gt;

&lt;p&gt;Instead of presenting every diff with equal emphasis, &lt;strong&gt;LiveReview scores each change by blast radius — how far its impact reaches through your call graph — so you can focus attention where it actually matters.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Spend code review effort where business risk is highest — not spread evenly across every diff.&lt;/p&gt;

&lt;p&gt;⭐ Star it on GitHub: &lt;br&gt;
&lt;/p&gt;
&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://assets.dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/HexmosTech" rel="noopener noreferrer"&gt;
        HexmosTech
      &lt;/a&gt; / &lt;a href="https://github.com/HexmosTech/LiveReview" rel="noopener noreferrer"&gt;
        LiveReview
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      Blast-Radius Aware AI Code Review for Business-Critical Systems
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;&lt;p&gt;&lt;a rel="noopener noreferrer" href="https://github.com/HexmosTech/LiveReview/./assets/gfx/png/logo-with-text.png"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2FHexmosTech%2FLiveReview%2FHEAD%2F.%2Fassets%2Fgfx%2Fpng%2Flogo-with-text.png" alt="LiveReview" height="80"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/HexmosTech/LiveReview/actions/workflows/gitleaks.yml" rel="noopener noreferrer"&gt;&lt;img alt="gitleaks.yml" title="gitleaks.yml: Secret scanning workflow" src="https://github.com/HexmosTech/LiveReview/actions/workflows/gitleaks.yml/badge.svg"&gt;&lt;/a&gt;&amp;nbsp;&lt;a href="https://github.com/HexmosTech/LiveReview/actions/workflows/osv-scanner.yml" rel="noopener noreferrer"&gt;&lt;img alt="osv-scanner.yml" title="osv-scanner.yml: Dependency vulnerability scan" src="https://github.com/HexmosTech/LiveReview/actions/workflows/osv-scanner.yml/badge.svg"&gt;&lt;/a&gt;&amp;nbsp;&lt;a href="https://github.com/HexmosTech/LiveReview/actions/workflows/govulncheck.yml" rel="noopener noreferrer"&gt;&lt;img alt="govulncheck.yml" title="govulncheck.yml: Go vulnerability check" src="https://github.com/HexmosTech/LiveReview/actions/workflows/govulncheck.yml/badge.svg"&gt;&lt;/a&gt;&amp;nbsp;&lt;a href="https://github.com/HexmosTech/LiveReview/actions/workflows/semgrep.yml" rel="noopener noreferrer"&gt;&lt;img alt="semgrep.yml" title="semgrep.yml: Static analysis security scan" src="https://github.com/HexmosTech/LiveReview/actions/workflows/semgrep.yml/badge.svg"&gt;&lt;/a&gt;&amp;nbsp;&lt;a rel="noopener noreferrer" href="https://github.com/HexmosTech/LiveReview/./assets/gfx/dependabot-enabled.svg"&gt;&lt;img alt="dependabot-enabled" title="dependabot-enabled: Automated dependency updates are enabled" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2FHexmosTech%2FLiveReview%2FHEAD%2F.%2Fassets%2Fgfx%2Fdependabot-enabled.svg"&gt;&lt;/a&gt;&amp;nbsp;&lt;a href="https://github.com/HexmosTech/LiveReview/actions/workflows/mcp-testcases.yml" rel="noopener noreferrer"&gt;&lt;img alt="mcp-testcases.yml" title="mcp-testcases.yml: MCP integration test suite" src="https://github.com/HexmosTech/LiveReview/actions/workflows/mcp-testcases.yml/badge.svg"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;LiveReview: Blast-Radius Aware AI Code Review for Business-Critical Systems&lt;/h1&gt;
&lt;/div&gt;

&lt;p&gt;LiveReview is an AI code reviewer that scores every hunk of a diff by &lt;strong&gt;blast radius&lt;/strong&gt;: how far a change reaches through your call graph, how much persistent state it touches, and how well-tested it is. A 3-line change to a shared auth check can outrank a 300-line UI tweak. Your team's attention goes to the highest-risk code first, not spread evenly across every diff.&lt;/p&gt;


  
    
    &lt;span class="m-1"&gt;blast-radius-demo.mp4&lt;/span&gt;
  

  

  


&lt;p&gt;&lt;i&gt;LiveReview's Blast Radius &amp;amp; Review Priority scoring, live in the diff viewer.&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;&lt;div class="table-wrapper-paragraph"&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;table&gt;

&lt;thead&gt;

&lt;tr&gt;

&lt;th&gt;The exact math, not a black box&lt;/th&gt;

&lt;th&gt;Visualize blast radius at a glance&lt;/th&gt;

&lt;th&gt;Every factor that feeds the score&lt;/th&gt;

&lt;/tr&gt;

&lt;/thead&gt;

&lt;tbody&gt;

&lt;tr&gt;

&lt;td&gt;&lt;a rel="noopener noreferrer" href="https://github.com/HexmosTech/LiveReview/./assets/screenshots/blast-radius/new-risk-score-3.webp"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fraw.githubusercontent.com%2FHexmosTech%2FLiveReview%2FHEAD%2F.%2Fassets%2Fscreenshots%2Fblast-radius%2Fnew-risk-score-3.webp" width="280"&gt;&lt;/a&gt;&lt;/td&gt;

&lt;td&gt;&lt;a rel="noopener noreferrer" href="https://github.com/HexmosTech/LiveReview/./assets/screenshots/blast-radius/new-risk-score-4.webp"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fraw.githubusercontent.com%2FHexmosTech%2FLiveReview%2FHEAD%2F.%2Fassets%2Fscreenshots%2Fblast-radius%2Fnew-risk-score-4.webp" width="280"&gt;&lt;/a&gt;&lt;/td&gt;

&lt;td&gt;&lt;a rel="noopener noreferrer" href="https://github.com/HexmosTech/LiveReview/./assets/screenshots/blast-radius/new-risk-score-2.webp"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fraw.githubusercontent.com%2FHexmosTech%2FLiveReview%2FHEAD%2F.%2Fassets%2Fscreenshots%2Fblast-radius%2Fnew-risk-score-2.webp" width="280"&gt;&lt;/a&gt;&lt;/td&gt;

&lt;/tr&gt;

&lt;/tbody&gt;

&lt;/table&gt;&lt;/div&gt;&lt;br&gt;
&lt;p&gt;&lt;/p&gt;

How does Blast Radius scoring work? (a more technical explanation)

&lt;p&gt;&lt;strong&gt;Here's the goal:&lt;/strong&gt;&lt;/p&gt;


&lt;ul&gt;

&lt;li&gt;A 3-line fix in a function used by 40 other files, that also writes to a database, should score high.&lt;/li&gt;

&lt;li&gt;A 300-line UI change in one file, fully covered by…&lt;/li&gt;

&lt;/ul&gt;&lt;/div&gt;
&lt;br&gt;
  &lt;/div&gt;
&lt;br&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/HexmosTech/LiveReview" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;br&gt;
&lt;/div&gt;
&lt;br&gt;


&lt;p&gt;&lt;b&gt;Click below to try LiveReview with your codebase:&lt;/b&gt;&lt;/p&gt;

&lt;/em&gt;&lt;p&gt;&lt;em&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://hexmos.com/livereview" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fvls0pq7nymbrll98je6s.png" alt="LiveReview Banner" width="800" height="240"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>webdev</category>
      <category>programming</category>
      <category>productivity</category>
    </item>
  </channel>
</rss>
