<?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: Aleksandr Razinkin</title>
    <description>The latest articles on DEV Community by Aleksandr Razinkin (@raaleksandr).</description>
    <link>https://dev.to/raaleksandr</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.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3908112%2Fcd13add4-b41b-445d-a5e9-4c6ca865d442.png</url>
      <title>DEV Community: Aleksandr Razinkin</title>
      <link>https://dev.to/raaleksandr</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/raaleksandr"/>
    <language>en</language>
    <item>
      <title>Exploring a more deterministic approach to AI-assisted code generation</title>
      <dc:creator>Aleksandr Razinkin</dc:creator>
      <pubDate>Fri, 01 May 2026 22:15:32 +0000</pubDate>
      <link>https://dev.to/raaleksandr/exploring-a-more-deterministic-approach-to-ai-assisted-code-generation-31dc</link>
      <guid>https://dev.to/raaleksandr/exploring-a-more-deterministic-approach-to-ai-assisted-code-generation-31dc</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;AI coding agents are getting surprisingly good.&lt;/p&gt;

&lt;p&gt;In small projects, you can ask them to add features, fix bugs, and even write tests—and they often succeed.&lt;/p&gt;

&lt;p&gt;But once your project grows, things start to break down.&lt;/p&gt;

&lt;p&gt;In my experience, the issue is not model capability. It’s something more subtle: &lt;strong&gt;prompt instability&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Problem: Prompt Instability
&lt;/h2&gt;

&lt;p&gt;Most coding agents construct prompts dynamically using:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;chat history&lt;/li&gt;
&lt;li&gt;parts of the codebase&lt;/li&gt;
&lt;li&gt;internal heuristics&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This means the final prompt is not fully under your control.&lt;/p&gt;

&lt;p&gt;As a result:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;the same request can produce different outputs&lt;/li&gt;
&lt;li&gt;changes can appear in unexpected parts of the codebase&lt;/li&gt;
&lt;li&gt;behavior becomes harder to reason about&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In small projects, this is manageable.&lt;br&gt;
In larger systems, it becomes risky.&lt;/p&gt;
&lt;h2&gt;
  
  
  A Different Approach: Treat Prompts Like Source Code
&lt;/h2&gt;

&lt;p&gt;Instead of relying on dynamically constructed prompts, I started experimenting with a different idea:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Treat prompts like source code.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That means:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;prompts are explicit&lt;/li&gt;
&lt;li&gt;prompts are reusable&lt;/li&gt;
&lt;li&gt;prompts can be composed from other prompts&lt;/li&gt;
&lt;li&gt;prompt construction is deterministic&lt;/li&gt;
&lt;li&gt;prompts are the source of truth, not code&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This shifts the workflow from “chatting with an agent” to something closer to &lt;strong&gt;designing system architecture&lt;/strong&gt;.&lt;/p&gt;
&lt;h2&gt;
  
  
  The Tool: SVI (Structured Vibe Coding)
&lt;/h2&gt;

&lt;p&gt;To explore this idea, I built a small tool called &lt;strong&gt;SVI&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;SVI generates source code from structured specification files (&lt;code&gt;.svi&lt;/code&gt;) written in a Markdown-like format.&lt;/p&gt;

&lt;p&gt;Key ideas:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Each &lt;code&gt;.svi&lt;/code&gt; file defines how a specific source file should be generated&lt;/li&gt;
&lt;li&gt;Prompts can import and reuse other prompts&lt;/li&gt;
&lt;li&gt;The final prompt is constructed in a fully controlled and predictable way&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Unlike typical coding agents, SVI does not depend on chat history or implicit context.&lt;/p&gt;
&lt;h2&gt;
  
  
  Example
&lt;/h2&gt;

&lt;p&gt;Here is a simple &lt;code&gt;.svi&lt;/code&gt; file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="gh"&gt;# Destination File&lt;/span&gt;
hello.js

&lt;span class="gh"&gt;# Output&lt;/span&gt;
function hello()

&lt;span class="gh"&gt;# Options&lt;/span&gt;
ProgrammingLanguage=Node.js
Active=True

&lt;span class="gh"&gt;# Prompt&lt;/span&gt;
Create a function that prints "Hello World", and call this function

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Generate the code with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;svi run
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The output is generated by an LLM and based on the specification.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why This Matters
&lt;/h2&gt;

&lt;p&gt;This approach has a few practical benefits:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;More predictable results&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You know exactly which prompt generated which file, and get more predictable results&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Reusability&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Prompts can be shared and composed&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Lower model requirements&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Smaller prompts allow you to use cheaper or even free models; you can adjust the prompt size and complexity to match the LLM you’re using.&lt;/p&gt;

&lt;h2&gt;
  
  
  Trade-offs
&lt;/h2&gt;

&lt;p&gt;This approach is not a silver bullet.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It requires more upfront structure &lt;/li&gt;
&lt;li&gt;It is less flexible than free-form prompting &lt;/li&gt;
&lt;li&gt;It changes the workflow from interactive to more declarative&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;However, for larger projects, this trade-off might be worthwhile.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;AI coding agents are powerful, but their current design makes them hard to control at scale.&lt;br&gt;
Treating prompts like source code is one way to bring back structure and predictability.&lt;br&gt;
I’m still experimenting with this approach, and I’d be interested to hear if others have explored similar ideas.&lt;/p&gt;

&lt;h2&gt;
  
  
  Links
&lt;/h2&gt;

&lt;p&gt;GitHub repository: &lt;a href="https://github.com/avrmsoft/svi" rel="noopener noreferrer"&gt;https://github.com/avrmsoft/svi&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>programming</category>
      <category>webdev</category>
      <category>vibecoding</category>
    </item>
  </channel>
</rss>
