<?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: GamzoDev</title>
    <description>The latest articles on DEV Community by GamzoDev (@gamzodev).</description>
    <link>https://dev.to/gamzodev</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%2F4269069%2F74f3e61e-3d15-4f02-ac3c-b8d7d3e812ce.jpg</url>
      <title>DEV Community: GamzoDev</title>
      <link>https://dev.to/gamzodev</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/gamzodev"/>
    <language>en</language>
    <item>
      <title>AI Writes Code. But Who Verifies It? Building a Deterministic Verifier for AI Coding Agents</title>
      <dc:creator>GamzoDev</dc:creator>
      <pubDate>Fri, 27 Nov 2026 13:33:21 +0000</pubDate>
      <link>https://dev.to/gamzodev/ai-writes-code-but-who-verifies-it-building-a-deterministic-verifier-for-ai-coding-agents-316p</link>
      <guid>https://dev.to/gamzodev/ai-writes-code-but-who-verifies-it-building-a-deterministic-verifier-for-ai-coding-agents-316p</guid>
      <description>&lt;p&gt;AI coding agents are becoming increasingly capable of writing, modifying, and testing software.&lt;/p&gt;

&lt;p&gt;But there is a fundamental difference between &lt;strong&gt;completing a task and proving that its constraints were respected.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;When an AI agent reports that it followed every instruction, what independently verifiable evidence supports that claim?&lt;/p&gt;

&lt;p&gt;As a mathematician and software developer, I find this distinction particularly interesting. Instead of introducing another language model into the verification process, what if we could express development constraints as deterministic, machine-verifiable contracts?&lt;/p&gt;

&lt;p&gt;This question led me to build &lt;strong&gt;RangeContract&lt;/strong&gt;, an open-source verification tool for AI-assisted software development.&lt;/p&gt;




&lt;h2&gt;
  
  
  The problem: generation is not verification
&lt;/h2&gt;

&lt;p&gt;Imagine assigning an AI coding agent a development task with four constraints:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Modify only authorized source files and tests.&lt;/li&gt;
&lt;li&gt;Never modify authentication or security-sensitive files.&lt;/li&gt;
&lt;li&gt;Limit the number of changes.&lt;/li&gt;
&lt;li&gt;Successfully execute the required regression tests.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The agent completes the task and reports success.&lt;/p&gt;

&lt;p&gt;But did it actually respect every constraint?&lt;/p&gt;

&lt;p&gt;Traditional code reviews remain essential. However, many structural development constraints can be verified without subjective judgment or probabilistic inference.&lt;/p&gt;

&lt;p&gt;The challenge is turning those constraints into independently testable conditions.&lt;/p&gt;

&lt;h2&gt;
  
  
  A deterministic approach
&lt;/h2&gt;

&lt;p&gt;RangeContract separates code generation from constraint verification.&lt;/p&gt;

&lt;p&gt;The workflow consists of four components:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Baseline:&lt;/strong&gt; A pinned Git commit representing the initial state.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Implementation:&lt;/strong&gt; Changes produced by a developer or an AI coding agent.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Contract:&lt;/strong&gt; Explicit, machine-readable development constraints.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Verification:&lt;/strong&gt; An independent evaluation of the observable changes.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Instead of trusting an agent's completion report, RangeContract evaluates the actual Git changes.&lt;/p&gt;

&lt;p&gt;The result is one of three explicit outcomes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;PASS&lt;/strong&gt; — the evaluated contract requirements were satisfied.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;FAIL&lt;/strong&gt; — one or more requirements were violated.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;ERROR&lt;/strong&gt; — verification could not be completed reliably.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;No language model is required for the verification process.&lt;/p&gt;

&lt;h2&gt;
  
  
  What does RangeContract verify?
&lt;/h2&gt;

&lt;p&gt;RangeContract supports:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Allowed and forbidden file paths.&lt;/li&gt;
&lt;li&gt;Limits on Git change records.&lt;/li&gt;
&lt;li&gt;Baseline and target commit ancestry.&lt;/li&gt;
&lt;li&gt;Optional execution of trusted validation commands.&lt;/li&gt;
&lt;li&gt;Checkout integrity checks around validation.&lt;/li&gt;
&lt;li&gt;Machine-readable JSON reports.&lt;/li&gt;
&lt;li&gt;Human-readable verification results.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The underlying implementation uses Git objects, deterministic rules, cryptographic content hashes, and actual command execution.&lt;/p&gt;

&lt;p&gt;Forbidden path constraints take precedence over allowed path constraints, making it possible to define explicit exceptions within an otherwise authorized development scope.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why not simply use another AI reviewer?
&lt;/h2&gt;

&lt;p&gt;AI-based code review is valuable, particularly for evaluating architecture, readability, potential bugs, and implementation quality.&lt;/p&gt;

&lt;p&gt;However, not every verification problem requires artificial intelligence.&lt;/p&gt;

&lt;p&gt;Whether a prohibited file was modified is not a matter of interpretation.&lt;/p&gt;

&lt;p&gt;Whether a commit descends from a specific baseline is not a matter of opinion.&lt;/p&gt;

&lt;p&gt;Whether a validation command returned a successful exit code is an observable result.&lt;/p&gt;

&lt;p&gt;For precisely defined constraints, deterministic verification provides a complementary layer of evidence.&lt;/p&gt;

&lt;p&gt;I see this as a separation of responsibilities:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;AI agents generate candidate solutions.&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Deterministic verifiers evaluate explicit constraints.&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Human reviewers assess semantic correctness and engineering quality.&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The objective is not to replace AI or human reviewers, but to give each component a more clearly defined responsibility.&lt;/p&gt;

&lt;h2&gt;
  
  
  Project engineering
&lt;/h2&gt;

&lt;p&gt;The initial public release of RangeContract includes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;106 regression tests.&lt;/li&gt;
&lt;li&gt;12 live acceptance scenarios.&lt;/li&gt;
&lt;li&gt;Cross-platform CI covering Windows, Linux, and macOS.&lt;/li&gt;
&lt;li&gt;Python 3.11+ support.&lt;/li&gt;
&lt;li&gt;Zero Python runtime dependencies.&lt;/li&gt;
&lt;li&gt;No API keys.&lt;/li&gt;
&lt;li&gt;No AI models required for verification.&lt;/li&gt;
&lt;li&gt;MIT open-source licensing.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The project was developed with the assistance of OpenAI Codex, making it an example of using AI-assisted development to build deterministic verification infrastructure for AI-assisted development itself.&lt;/p&gt;

&lt;h2&gt;
  
  
  Getting started
&lt;/h2&gt;

&lt;p&gt;RangeContract is available through PyPI.&lt;/p&gt;

&lt;p&gt;Install it in a trusted Python environment:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;python -I -m pip install rangecontract
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Explore the available commands:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;python -I -m rangecontract --help
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;The repository contains documentation, contract examples, implementation details, and the regression test suite.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;GitHub:&lt;/strong&gt; &lt;a href="https://github.com/Gamzo-dev/rangecontract" rel="noopener noreferrer"&gt;https://github.com/Gamzo-dev/rangecontract&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;PyPI:&lt;/strong&gt; &lt;a href="https://pypi.org/project/rangecontract/" rel="noopener noreferrer"&gt;https://pypi.org/project/rangecontract/&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Understanding the limitations
&lt;/h2&gt;

&lt;p&gt;Deterministic verification does not imply universal correctness.&lt;/p&gt;

&lt;p&gt;A passing contract cannot prove that software is bug-free, secure, or semantically correct.&lt;/p&gt;

&lt;p&gt;Comparing Git commits cannot reconstruct every intermediate action taken during development.&lt;/p&gt;

&lt;p&gt;Validation commands must be trusted, and checkout integrity verification is not a security sandbox.&lt;/p&gt;

&lt;p&gt;RangeContract has a deliberately narrower objective: establishing whether observable changes satisfy explicitly defined development constraints.&lt;/p&gt;

&lt;h2&gt;
  
  
  What's next?
&lt;/h2&gt;

&lt;p&gt;I believe independent verification will become increasingly important as AI coding agents gain greater autonomy.&lt;/p&gt;

&lt;p&gt;Generating more code is not the only engineering challenge. Building reliable mechanisms to verify that generated code respects its intended boundaries is equally important.&lt;/p&gt;

&lt;p&gt;RangeContract is my contribution to exploring that problem.&lt;/p&gt;

&lt;p&gt;I would genuinely appreciate technical feedback from developers working with Codex, Claude Code, Cursor, and other AI-assisted development environments.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How do you independently verify that your AI coding agents respect the constraints you give them?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Feedback, GitHub issues, and open-source contributions are welcome.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;RangeContract is free and open source under the MIT license.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;AI disclosure: This article was drafted and edited using ChatGPT. The project itself was developed with AI assistance.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>showdev</category>
      <category>opensource</category>
      <category>python</category>
      <category>ai</category>
    </item>
  </channel>
</rss>
