<?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: Chris Wensel</title>
    <description>The latest articles on DEV Community by Chris Wensel (@cwensel).</description>
    <link>https://dev.to/cwensel</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%2F4130215%2Fbaa96a25-9705-469d-8582-72cc06382466.jpg</url>
      <title>DEV Community: Chris Wensel</title>
      <link>https://dev.to/cwensel</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/cwensel"/>
    <language>en</language>
    <item>
      <title>Determinism Injection</title>
      <dc:creator>Chris Wensel</dc:creator>
      <pubDate>Sat, 29 Aug 2026 00:00:00 +0000</pubDate>
      <link>https://dev.to/cwensel/determinism-injection-48m9</link>
      <guid>https://dev.to/cwensel/determinism-injection-48m9</guid>
      <description>&lt;p&gt;I’ve been refining a specification-driven development model for LLM software engineering for over a year now. The &lt;a href="https://chris.wensel.net/post/recommendation-decisioning-records/" rel="noopener noreferrer"&gt;RDR model&lt;/a&gt; started with a simple template, but has &lt;a href="https://chris.wensel.net/post/rdr-process/" rel="noopener noreferrer"&gt;evolved&lt;/a&gt; into a full human-driven engineering workflow. There are a number of stages in the flow, all derived from process, management, and engineering literature, as well as 30 years of experience writing software and managing software engineering teams.&lt;/p&gt;

&lt;p&gt;Every step has an artifact a human is either expected or can review and refine to ensure they are building the correct thing, while also ensuring the whole project maintains its conceptual integrity as it evolves.&lt;/p&gt;

&lt;p&gt;The challenge is that even though the flow is well defined and orchestrated by a human, the flow elements are just large LLM prompts that internally make localized decisions and look up facts across related documents.&lt;/p&gt;

&lt;p&gt;This is decidedly non-deterministic. Guo et al., in &lt;a href="https://arxiv.org/abs/2606.00376" rel="noopener noreferrer"&gt;&lt;em&gt;The Deterministic Horizon&lt;/em&gt;&lt;/a&gt;, identify a &lt;em&gt;deterministic horizon&lt;/em&gt; as the step depth past which unaided model accuracy collapses. And name the mechanism &lt;em&gt;state-space decoherence&lt;/em&gt;, divergence that accumulates from extended reasoning rather than being resolved by it. This decoherence is aggravated by a prompt performing tasks that can be externalized.&lt;/p&gt;

&lt;p&gt;So, instead of writing an application that executes prompts in a deterministic way, I need to inject determinism into the prompts I execute in order to improve their ability to actually solve the problem they are tasked with and not lose accuracy or focus because they had to grep 100 files for a single fact.&lt;/p&gt;

&lt;p&gt;I think we should call this what it is: Determinism Injection.&lt;/p&gt;

&lt;p&gt;Determinism Injection is the inverse of code orchestrating small prompts, the approach behind frameworks like Alibaba’s &lt;a href="https://arxiv.org/abs/2508.02721" rel="noopener noreferrer"&gt;Blueprint First, Model Second&lt;/a&gt;. The prompt is the orchestrator, and generic or purpose-built tools perform the lookups, state transitions, and writes.&lt;/p&gt;

&lt;p&gt;This is a clear play on &lt;a href="https://en.wikipedia.org/wiki/Dependency_injection" rel="noopener noreferrer"&gt;Dependency Injection&lt;/a&gt;, where capabilities are polymorphically supplied to adapt an application’s behavior to a given context. Determinism Injection is a precursor step that isolates a deterministic behavior and externalizes it, which allows contextual binding of tools that will satisfy the expectations.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/cwensel/intrastate" rel="noopener noreferrer"&gt;Intrastate&lt;/a&gt; is a tool for resolving state transitions. I call it a stateless state-machine. It has no backing datastore, it is handed context for a given flow it’s intended to execute, it may look up additional facts, then determines the next state. Since an LLM is driving it, if there is any ambiguity or failure, it generally has enough context to recover. But the net effect is that we lower prompt size, token spend, and wall-clock duration. And gain both (more) deterministic results and higher reasoning quality.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://chris.wensel.net/post/introducing-retrofit/" rel="noopener noreferrer"&gt;Retrofit&lt;/a&gt; is another tool for Determinism Injection. Instead of relying on a prompt to generate SQL schemas and migration scripts, the LLM stops at intent. It hands its intent (RenameColumn, DecomposeTable, etc) to retrofit, and when asked, &lt;a href="https://retrofit.sh" rel="noopener noreferrer"&gt;retrofit&lt;/a&gt; can render a SQL dump (with or without data), or migration scripts (or their reverse for rollback).&lt;/p&gt;

&lt;p&gt;&lt;a href="https://chris.wensel.net/project/arcaneum/" rel="noopener noreferrer"&gt;Arcaneum&lt;/a&gt; was my first such tool, started over a year and a half ago, to compensate for hallucinated assertions. It is a RAG search tool for both full-text and semantic indexes. Instead of filling my context by grepping all my documents, I use it daily for searching and retrieving literature, documentation, source-code, and LLM harness transcript histories. Every design decision I make is grounded in research. And every assertion has a valid citation.&lt;/p&gt;

&lt;p&gt;The &lt;a href="https://www.katatracker.com" rel="noopener noreferrer"&gt;kata&lt;/a&gt; and &lt;a href="https://www.roborev.io" rel="noopener noreferrer"&gt;roborev&lt;/a&gt; projects are also examples of this model. The first is an inline issue tracker for LLM agents, and the second is an asynchronous code reviewer. Work that is actually quite hard for an LLM to manage (remember &lt;a href="https://github.com/steveyegge/beads" rel="noopener noreferrer"&gt;beads&lt;/a&gt;?).&lt;/p&gt;

</description>
      <category>ai</category>
      <category>llm</category>
      <category>architecture</category>
      <category>promptengineering</category>
    </item>
  </channel>
</rss>
