<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:googleplay="http://www.google.com/schemas/play-podcasts/1.0"><channel><title><![CDATA[Optivem Journal: Spec-Driven Development]]></title><description><![CDATA[SDD]]></description><link>https://journal.optivem.com/s/spec-driven-development</link><image><url>https://substackcdn.com/image/fetch/$s_!GEk9!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc45df0d6-2660-4466-9b3a-ea5f01e9b5dc_512x512.png</url><title>Optivem Journal: Spec-Driven Development</title><link>https://journal.optivem.com/s/spec-driven-development</link></image><generator>Substack</generator><lastBuildDate>Thu, 03 Dec 2026 19:03:19 GMT</lastBuildDate><atom:link href="https://journal.optivem.com/feed" rel="self" type="application/rss+xml"/><copyright><![CDATA[Valentina Jemuović, Optivem]]></copyright><language><![CDATA[en]]></language><webMaster><![CDATA[optivem@substack.com]]></webMaster><itunes:owner><itunes:email><![CDATA[optivem@substack.com]]></itunes:email><itunes:name><![CDATA[Valentina Jemuović]]></itunes:name></itunes:owner><itunes:author><![CDATA[Valentina Jemuović]]></itunes:author><googleplay:owner><![CDATA[optivem@substack.com]]></googleplay:owner><googleplay:email><![CDATA[optivem@substack.com]]></googleplay:email><googleplay:author><![CDATA[Valentina Jemuović]]></googleplay:author><itunes:block><![CDATA[Yes]]></itunes:block><item><title><![CDATA[Prompt Engineering: Stop Asking the Wrong Questions]]></title><description><![CDATA[Specify the problem, not just the solution]]></description><link>https://journal.optivem.com/p/prompt-engineering-stop-asking-the-wrong-questions</link><guid isPermaLink="false">https://journal.optivem.com/p/prompt-engineering-stop-asking-the-wrong-questions</guid><dc:creator><![CDATA[Valentina Jemuović]]></dc:creator><pubDate>Thu, 29 Oct 2026 07:01:50 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/7d883e55-d94f-4a3b-b537-5a24da26449d_1000x666.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p><strong>&#9889;Spec-Driven Development in Legacy Code</strong><br>Hands-on work with your teams. Limited spaces for 2027.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://calendly.com/valentinajemuovic/call&quot;,&quot;text&quot;:&quot;Book a call&quot;,&quot;action&quot;:null,&quot;class&quot;:&quot;button-wrapper&quot;}" data-component-name="ButtonCreateButton"><a class="button primary button-wrapper" href="https://calendly.com/valentinajemuovic/call"><span>Book a call</span></a></p><div><hr></div><p>A prompt might contain precise instructions but make a false assumption.</p><p>It might ask for a solution before the problem is understood.</p><p>Or it might push the AI to agree with what you already believe.</p><p>Models tend to do this anyway. Researchers call it sycophancy: the model leans towards the answer it thinks you want.</p><p>The result can be an answer that sounds convincing, looks professional, and solves the wrong problem.</p><h2>1. Don&#8217;t use vague quality words when you can name the criteria</h2><p><strong>&#10060; Asking for &#8220;rigor&#8221; without saying what rigor means</strong></p><p>&#8220;Act as a senior software architect and give me a rigorous review of this design.&#8221;</p><p><strong>What&#8217;s wrong?</strong></p><p>Words like <em>senior</em>, <em>rigorous</em>, and <em>high-quality</em> sound useful, but they don&#8217;t say what the AI should examine or how it should back up its conclusions.</p><p>A response can sound authoritative without naming a single problem you can act on.</p><p>A role can set a perspective, but it doesn&#8217;t replace a clear task. (Asking the model to reason step by step before answering is different &#8212; that does change how it works on the problem. &#8220;Be rigorous&#8221; doesn&#8217;t.)</p>
      <p>
          <a href="https://journal.optivem.com/p/prompt-engineering-stop-asking-the-wrong-questions">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[Spec-Driven: Bad AI Prompts vs. Good AI Prompts]]></title><description><![CDATA[A detailed prompt can still send AI in the wrong direction.]]></description><link>https://journal.optivem.com/p/spec-driven-bad-ai-prompts-vs-good-ai-prompts</link><guid isPermaLink="false">https://journal.optivem.com/p/spec-driven-bad-ai-prompts-vs-good-ai-prompts</guid><dc:creator><![CDATA[Valentina Jemuović]]></dc:creator><pubDate>Fri, 23 Oct 2026 06:01:35 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/8eec6bff-01e6-483a-ae7d-3557a9fd9168_1000x666.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p><strong>&#9889;Spec-Driven Development in Legacy Code</strong><br>Hands-on work with your teams. Limited spaces for 2027.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://calendly.com/valentinajemuovic/call&quot;,&quot;text&quot;:&quot;Book a call&quot;,&quot;action&quot;:null,&quot;class&quot;:&quot;button-wrapper&quot;}" data-component-name="ButtonCreateButton"><a class="button primary button-wrapper" href="https://calendly.com/valentinajemuovic/call"><span>Book a call</span></a></p><div><hr></div><p><em>&#128274; Hello, this is Valentina with a premium issue of the Optivem Journal.</em></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://journal.optivem.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://journal.optivem.com/subscribe?"><span>Subscribe now</span></a></p><div><hr></div><p>We often hear that getting better results from AI is a matter of writing better prompts.</p><p>Be more specific. Give the AI a role. Add context. Explain what you want.</p><p>All of that can help. But: <strong>a prompt can be detailed, well-written, and still lead you in the wrong direction.</strong></p><h2>1. Don&#8217;t ask AI to confirm your decision. Ask it to evaluate it.</h2><p><strong>&#10060; Treating the decision as already made</strong></p><p>&#8220;We&#8217;ve decided to move to microservices. Outline how to split our application into services.&#8221;</p><p><strong>What&#8217;s wrong?</strong></p><p>The decision is presented as settled, so the AI works on the next step. It will produce a sensible-looking list of services. It won&#8217;t usually stop to ask whether you need microservices at all.</p><p>Ask a model directly &#8220;Are microservices better than a monolith?&#8221; and it will usually say &#8220;it depends&#8221;. The risk is the prompt where the decision is built in and never questioned.</p>
      <p>
          <a href="https://journal.optivem.com/p/spec-driven-bad-ai-prompts-vs-good-ai-prompts">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[Spec-Driven: When AI writes the code and the tests, green means nothing]]></title><description><![CDATA[Don't let AI invent the expected behavior. Use it to refine the requirement, then let the tests verify the code against it.]]></description><link>https://journal.optivem.com/p/spec-driven-write-test-before-code</link><guid isPermaLink="false">https://journal.optivem.com/p/spec-driven-write-test-before-code</guid><dc:creator><![CDATA[Valentina Jemuović]]></dc:creator><pubDate>Fri, 16 Oct 2026 06:01:21 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/82d94237-8bbf-44ec-938e-b4b3fe25ab57_1000x666.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p><strong>&#9889;Spec-Driven Development in Legacy Code</strong><br>Hands-on work with your teams. Limited spaces for 2027.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://calendly.com/valentinajemuovic/call&quot;,&quot;text&quot;:&quot;Book a call&quot;,&quot;action&quot;:null,&quot;class&quot;:&quot;button-wrapper&quot;}" data-component-name="ButtonCreateButton"><a class="button primary button-wrapper" href="https://calendly.com/valentinajemuovic/call"><span>Book a call</span></a></p><div><hr></div><p>&#128274; Hello, this is Valentina with a premium issue of the Optivem Journal.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://journal.optivem.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://journal.optivem.com/subscribe?"><span>Subscribe now</span></a></p><div><hr></div><p>AI writes code fast. Many teams then ask AI to write the tests for that code too.</p><p>That&#8217;s the problem. The tests check the code against itself. They don&#8217;t check it against what the business asked for.</p><p>It&#8217;s like a student marking their own exam. The answers always match, so they always pass. A test that can&#8217;t fail tells you nothing.</p><h2>&#10060; Write test after code</h2><p>The test comes from the code, not from the spec.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!A3ii!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1a518c7f-efea-40a0-bdd7-a47b74d61afa_510x935.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!A3ii!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1a518c7f-efea-40a0-bdd7-a47b74d61afa_510x935.png 424w, https://substackcdn.com/image/fetch/$s_!A3ii!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1a518c7f-efea-40a0-bdd7-a47b74d61afa_510x935.png 848w, https://substackcdn.com/image/fetch/$s_!A3ii!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1a518c7f-efea-40a0-bdd7-a47b74d61afa_510x935.png 1272w, https://substackcdn.com/image/fetch/$s_!A3ii!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1a518c7f-efea-40a0-bdd7-a47b74d61afa_510x935.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!A3ii!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1a518c7f-efea-40a0-bdd7-a47b74d61afa_510x935.png" width="510" height="935" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/1a518c7f-efea-40a0-bdd7-a47b74d61afa_510x935.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:935,&quot;width&quot;:510,&quot;resizeWidth&quot;:510,&quot;bytes&quot;:51323,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://journal.optivem.com/i/220574853?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1a518c7f-efea-40a0-bdd7-a47b74d61afa_510x935.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!A3ii!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1a518c7f-efea-40a0-bdd7-a47b74d61afa_510x935.png 424w, https://substackcdn.com/image/fetch/$s_!A3ii!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1a518c7f-efea-40a0-bdd7-a47b74d61afa_510x935.png 848w, https://substackcdn.com/image/fetch/$s_!A3ii!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1a518c7f-efea-40a0-bdd7-a47b74d61afa_510x935.png 1272w, https://substackcdn.com/image/fetch/$s_!A3ii!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1a518c7f-efea-40a0-bdd7-a47b74d61afa_510x935.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-nxj3kw" tabindex="0" type="button"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button class="pencraft pc-reset pencraft icon-container view-image buttonBase-nxj3kw" tabindex="0" type="button"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p></p><h3>1. AI Reads Spec</h3><p>AI reads the spec:</p><blockquote><p>A customer gets the 10% promotion and their 20% coupon.</p></blockquote><p>There are (at least) two ways to interpret the spec:</p><ul><li><p><strong>Interpretation A:</strong> 10% off first, then 20% off what is left.</p></li><li><p><strong>Interpretation B:</strong> 10% + 20% = 30% off.</p></li></ul><h3>2. AI Writes Code</h3><p>AI picks interpretation A: 10% off first, then 20% off the reduced price.</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;java&quot;,&quot;nodeId&quot;:&quot;495e222c-030c-4a60-9578-7db4f7da4b6c&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-java">var promotedPrice = basePrice.multiply(promotionFactor);
var discountAmount = promotedPrice.multiply(discountRate);
var totalPrice = promotedPrice.subtract(discountAmount);</code></pre></div><p><em>Note: AI is non-deterministic, so we can&#8217;t know which interpretation it will choose. In one run it may only think of interpretation A. In another run it may only think of B. In another it may see both and ask us to choose. And in another it may come up with an interpretation C that we hadn&#8217;t even thought of.</em></p><h3>3. AI Writes Acceptance Test</h3><p>AI reads its own code, then writes a test that mirrors the behavior of that code. It makes up inputs and answers that fit the code:</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;java&quot;,&quot;nodeId&quot;:&quot;f9969ad4-f0ee-43f9-bde6-87235c032894&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-java">@TestTemplate
@Channel({ChannelType.UI, ChannelType.API})
void shouldApplyCouponOnPromotedPrice() {
    scenario
            .given().product().withUnitPrice(&#8221;100.00&#8221;)
                .and().promotion().isActive().withDiscount(&#8221;10%&#8221;)
                .and().coupon().withDiscountRate(&#8221;20%&#8221;)
            .when().placeOrder()
            .then().shouldSucceed()
                .and().order().hasTotalPrice(72.00);
}</code></pre></div><h3>4. Verify Acceptance Test Passes</h3><p>The acceptance test is executed. It passes, because it was made to match the code, so the build is green.</p><h3>5. Human discovers misinterpretation</h3><p>The build is green, so the work goes to QA. QA reads the spec their own way. They expect $70.00 and see $72.00, so they report a bug. The bug goes to the product owner.</p><p>Only now does anyone ask the question that should have been asked first. The product owner says 30% off.</p><h3>6. AI reworks code &amp; test</h3><p>The code is wrong, and the test is wrong too, because it was made to match the code. Both the code and the test must be reworked.</p><p>It was circular: the code decided the test, and then the test &#8220;proved&#8221; the code. That makes it tautological: true by construction, so it can never fail.</p><h2>&#9989; Write test before code</h2>
      <p>
          <a href="https://journal.optivem.com/p/spec-driven-write-test-before-code">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[Spec-driven development has a Markdown problem]]></title><description><![CDATA[Stop manually checking whether AI implemented your spec correctly]]></description><link>https://journal.optivem.com/p/spec-driven-development-has-a-markdown-problem</link><guid isPermaLink="false">https://journal.optivem.com/p/spec-driven-development-has-a-markdown-problem</guid><dc:creator><![CDATA[Valentina Jemuović]]></dc:creator><pubDate>Mon, 12 Oct 2026 06:02:03 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/92353ed2-fb8d-46b8-8150-e6a34eb417d0_1000x666.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>&#128197; Register (free): <strong><a href="https://www.meetup.com/techexcellence/events/316851439">Spec-Driven Development with ATDD &amp; AI</a></strong> (Oct 14)</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.meetup.com/techexcellence/events/316851439&quot;,&quot;text&quot;:&quot;Register now&quot;,&quot;action&quot;:null,&quot;class&quot;:&quot;button-wrapper&quot;}" data-component-name="ButtonCreateButton"><a class="button primary button-wrapper" href="https://www.meetup.com/techexcellence/events/316851439"><span>Register now</span></a></p><div><hr></div><p>&#128075; <em>Hello, this is Valentina with the free edition of the Optivem Journal.</em></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://journal.optivem.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://journal.optivem.com/subscribe?"><span>Subscribe now</span></a></p><div><hr></div><p>Markdown spec = enforced spec? WRONG.<br><br>Markdown = Spec. Acceptance Test = Executable Spec.<br><br>&#10060; Spec -&gt; AI writes code -&gt; Human manually tests<br><br>&#9989; Executable Spec -&gt; AI writes code -&gt; Automatic spec verification</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!VIHJ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5f13b398-aa79-469a-896d-0cc68d35074b_1025x995.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!VIHJ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5f13b398-aa79-469a-896d-0cc68d35074b_1025x995.png 424w, https://substackcdn.com/image/fetch/$s_!VIHJ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5f13b398-aa79-469a-896d-0cc68d35074b_1025x995.png 848w, https://substackcdn.com/image/fetch/$s_!VIHJ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5f13b398-aa79-469a-896d-0cc68d35074b_1025x995.png 1272w, https://substackcdn.com/image/fetch/$s_!VIHJ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5f13b398-aa79-469a-896d-0cc68d35074b_1025x995.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!VIHJ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5f13b398-aa79-469a-896d-0cc68d35074b_1025x995.png" width="1025" height="995" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/5f13b398-aa79-469a-896d-0cc68d35074b_1025x995.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:995,&quot;width&quot;:1025,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:85988,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://journal.optivem.com/i/219877641?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5f13b398-aa79-469a-896d-0cc68d35074b_1025x995.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!VIHJ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5f13b398-aa79-469a-896d-0cc68d35074b_1025x995.png 424w, https://substackcdn.com/image/fetch/$s_!VIHJ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5f13b398-aa79-469a-896d-0cc68d35074b_1025x995.png 848w, https://substackcdn.com/image/fetch/$s_!VIHJ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5f13b398-aa79-469a-896d-0cc68d35074b_1025x995.png 1272w, https://substackcdn.com/image/fetch/$s_!VIHJ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5f13b398-aa79-469a-896d-0cc68d35074b_1025x995.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-nxj3kw" tabindex="0" type="button"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button class="pencraft pc-reset pencraft icon-container view-image buttonBase-nxj3kw" tabindex="0" type="button"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>99% of developers follow Spec-Driven Development (SDD) the WRONG way.<br><br>1. They write the spec in Markdown.<br>2. They tell AI to implement code based on spec.<br><br>But what's the problem here? Sure, AI reads the markdown file, but doesn't follow it fully! It may decide to skip instructions, or misinterpret instructions, etc.<br><br>So we can NOT trust AI!<br><br>We have to manually read the spec, manually run the system, and manually decide whether the functionality that the system implemented matches what was in the spec.<br><br>Interestingly, this is not a new problem. We've had this problem for ages, with human developers. Remember, we'd write a User Story, the developer thinks they followed it, but then QA says it doesn't work correctly - that there was something that the developer missed, or they had misinterpretations.<br><br>Well, that's exactly the same problem in Spec-Driven Development, how most people practice it.<br><br>The solution is: EXECUTABLE specs. With executable specs, we can be sure to enforce that AI actually implements the behavior that we specified. We have an automated way to check - a pass or fail. This means if AI skips instructions, or misinterprets something, we'll have a test telling us it failed. AI tries again, until the test passes. There's no way for AI to "cheat" the test.<br><br>That's the right way to do Spec-Driven Development. Convert textual specs to executable specs.<br><br>&#9889;Full walkthrough, with the code examples </p><div class="digest-post-embed" data-attrs="{&quot;nodeId&quot;:&quot;6e1b5809-0eab-4a5b-bdd2-f79cc12eaf69&quot;,&quot;caption&quot;:&quot;I help teams adopt Spec-Driven Development, so that they can write code faster with AI agents. I have a few spots left for 2027.&quot;,&quot;cta&quot;:null,&quot;showBylines&quot;:true,&quot;showDescription&quot;:true,&quot;showImage&quot;:true,&quot;size&quot;:&quot;sm&quot;,&quot;isEditorNode&quot;:true,&quot;title&quot;:&quot;Spec-Driven Development: Make Specs Enforceable with ATDD&quot;,&quot;publishedBylines&quot;:[{&quot;id&quot;:27708677,&quot;name&quot;:&quot;Valentina Jemuovi&#263;&quot;,&quot;bio&quot;:&quot;Technical Coach @ Optivem | TDD | Hexagonal Architecture | Clean Architecture | I help Technical Founders to deliver software products faster by minimizing regression bugs and reducing maintenance cost&quot;,&quot;photo_url&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/04f571bf-04c6-43af-b888-9bc1eb7d490a_200x200.jpeg&quot;,&quot;is_guest&quot;:false,&quot;bestseller_tier&quot;:null}],&quot;post_date&quot;:&quot;2026-09-25T15:21:52.676Z&quot;,&quot;cover_image&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/55e22a9e-b029-48c9-9d23-99ba2c8693b7_1000x666.png&quot;,&quot;cover_image_alt&quot;:null,&quot;cover_image_crop&quot;:null,&quot;canonical_url&quot;:&quot;https://journal.optivem.com/p/spec-driven-development-make-specs&quot;,&quot;section_name&quot;:&quot;ATDD&quot;,&quot;video_upload_id&quot;:null,&quot;id&quot;:217383701,&quot;type&quot;:&quot;newsletter&quot;,&quot;reaction_count&quot;:9,&quot;comment_count&quot;:2,&quot;publication_id&quot;:824051,&quot;publication_name&quot;:&quot;Optivem Journal&quot;,&quot;publication_logo_url&quot;:&quot;https://substackcdn.com/image/fetch/$s_!0CjJ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F9abead4c-3f54-46b1-96aa-7033849416df_200x200.png&quot;,&quot;belowTheFold&quot;:true,&quot;youtube_url&quot;:null,&quot;show_links&quot;:null,&quot;feed_url&quot;:null}"></div><div><hr></div><p><br>&#128197; Register (free): <strong><a href="https://www.meetup.com/techexcellence/events/316851439">Spec-Driven Development with ATDD &amp; AI</a></strong> (Oct 14)</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.meetup.com/techexcellence/events/316851439&quot;,&quot;text&quot;:&quot;Register now&quot;,&quot;action&quot;:null,&quot;class&quot;:&quot;button-wrapper&quot;}" data-component-name="ButtonCreateButton"><a class="button primary button-wrapper" href="https://www.meetup.com/techexcellence/events/316851439"><span>Register now</span></a></p>]]></content:encoded></item><item><title><![CDATA[Spec-Driven Development: Make Specs Enforceable with ATDD]]></title><description><![CDATA[AI can ignore your spec &#8212; it can&#8217;t ignore a failing test.]]></description><link>https://journal.optivem.com/p/spec-driven-development-make-specs</link><guid isPermaLink="false">https://journal.optivem.com/p/spec-driven-development-make-specs</guid><dc:creator><![CDATA[Valentina Jemuović]]></dc:creator><pubDate>Fri, 25 Sep 2026 15:21:52 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/55e22a9e-b029-48c9-9d23-99ba2c8693b7_1000x666.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p><em>I help teams adopt Spec-Driven Development, so that they can write code faster with AI agents. I have a few spots left for 2027.</em></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://calendly.com/valentinajemuovic/call&quot;,&quot;text&quot;:&quot;Book a call&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://calendly.com/valentinajemuovic/call"><span>Book a call</span></a></p><p>&#8220;Spec-driven development&#8221; is everywhere in AI tooling right now: Kiro, GitHub&#8217;s spec-kit, Tessl. Write the spec first, then let the agent build against it. Birgitta B&#246;ckeler reviewed all three in <a href="https://martinfowler.com/articles/exploring-gen-ai/sdd-3-tools.html">Understanding Spec-Driven-Development: Kiro, spec-kit, and Tessl</a> on martinfowler.com and found the catch.</p><p>In every one of them, &#8220;spec&#8221; means a Markdown document the agent is supposed to read. <strong>Nothing checks that the code matches it, and the agents don&#8217;t always follow it.</strong> As she put it: &#8220;I frequently saw the agent ultimately not follow all the instructions.&#8221;</p><p>The problem isn&#8217;t the tools. It&#8217;s that the spec is a Markdown file, and <strong>you can&#8217;t run a Markdown file against the code.</strong> To find out whether the agent followed it, a person has to read the code line by line. That&#8217;s the work you hoped the spec would save.</p><p>We&#8217;ve had a spec without this problem since 1999. Kent Beck&#8217;s first Extreme Programming book, <a href="https://dl.acm.org/doi/abs/10.5555/318762">Extreme Programming Explained</a> (1999), already had acceptance tests, and the <a href="http://www.extremeprogramming.org/rules/functionaltests.html">XP rules</a> on extremeprogramming.org spell out how they work: acceptance tests &#8220;are created from user stories&#8221; and &#8220;should be automated so they can be run often.&#8221;</p><p>In 2010, Jez Humble and Dave Farley&#8217;s <a href="https://www.amazon.com/dp/B003YMNVC0">Continuous Delivery</a> gave automated acceptance tests their own chapter: &#8220;Acceptance tests are a crucial stage in the deployment pipeline: They take delivery teams beyond basic continuous integration. Once you have automated acceptance tests in place, you are testing the business acceptance criteria of your application, that is, validating that it provides users with valuable functionality.&#8221;</p><p>An acceptance test is the spec and the check in one: it describes what the system should do, and it fails until the system does it.</p><p><strong>An agent can ignore a Markdown file.</strong></p><p><strong>It can&#8217;t ignore a test that won&#8217;t pass.</strong></p><p>An acceptance test doesn&#8217;t call the system directly. It calls a DSL, and the DSL calls two kinds of drivers. System drivers talk to the system through its UI or API. External-system drivers talk to the external systems it depends on, such as an ERP.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!ol6t!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc3640883-04bc-47c3-9204-41e9f9eeccd4_1760x1778.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!ol6t!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc3640883-04bc-47c3-9204-41e9f9eeccd4_1760x1778.png 424w, https://substackcdn.com/image/fetch/$s_!ol6t!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc3640883-04bc-47c3-9204-41e9f9eeccd4_1760x1778.png 848w, https://substackcdn.com/image/fetch/$s_!ol6t!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc3640883-04bc-47c3-9204-41e9f9eeccd4_1760x1778.png 1272w, https://substackcdn.com/image/fetch/$s_!ol6t!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc3640883-04bc-47c3-9204-41e9f9eeccd4_1760x1778.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!ol6t!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc3640883-04bc-47c3-9204-41e9f9eeccd4_1760x1778.png" width="602" height="608.2019230769231" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c3640883-04bc-47c3-9204-41e9f9eeccd4_1760x1778.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1471,&quot;width&quot;:1456,&quot;resizeWidth&quot;:602,&quot;bytes&quot;:145963,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://journal.optivem.com/i/217383701?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc3640883-04bc-47c3-9204-41e9f9eeccd4_1760x1778.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!ol6t!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc3640883-04bc-47c3-9204-41e9f9eeccd4_1760x1778.png 424w, https://substackcdn.com/image/fetch/$s_!ol6t!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc3640883-04bc-47c3-9204-41e9f9eeccd4_1760x1778.png 848w, https://substackcdn.com/image/fetch/$s_!ol6t!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc3640883-04bc-47c3-9204-41e9f9eeccd4_1760x1778.png 1272w, https://substackcdn.com/image/fetch/$s_!ol6t!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc3640883-04bc-47c3-9204-41e9f9eeccd4_1760x1778.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-nxj3kw" tabindex="0" type="button"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button class="pencraft pc-reset pencraft icon-container view-image buttonBase-nxj3kw" tabindex="0" type="button"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p></p><p>In acceptance test-driven development (ATDD), the Red step is where you write that test, before any system code exists. When an AI agent does the work, the Red step is split into four small steps, and a human reviews each one.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!-OUs!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc95d581b-fab0-4902-a97a-edddd337345f_1760x3354.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!-OUs!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc95d581b-fab0-4902-a97a-edddd337345f_1760x3354.png 424w, https://substackcdn.com/image/fetch/$s_!-OUs!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc95d581b-fab0-4902-a97a-edddd337345f_1760x3354.png 848w, https://substackcdn.com/image/fetch/$s_!-OUs!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc95d581b-fab0-4902-a97a-edddd337345f_1760x3354.png 1272w, https://substackcdn.com/image/fetch/$s_!-OUs!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc95d581b-fab0-4902-a97a-edddd337345f_1760x3354.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!-OUs!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc95d581b-fab0-4902-a97a-edddd337345f_1760x3354.png" width="602" height="1147.3557692307693" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c95d581b-fab0-4902-a97a-edddd337345f_1760x3354.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:2775,&quot;width&quot;:1456,&quot;resizeWidth&quot;:602,&quot;bytes&quot;:275044,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://journal.optivem.com/i/217383701?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc95d581b-fab0-4902-a97a-edddd337345f_1760x3354.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!-OUs!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc95d581b-fab0-4902-a97a-edddd337345f_1760x3354.png 424w, https://substackcdn.com/image/fetch/$s_!-OUs!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc95d581b-fab0-4902-a97a-edddd337345f_1760x3354.png 848w, https://substackcdn.com/image/fetch/$s_!-OUs!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc95d581b-fab0-4902-a97a-edddd337345f_1760x3354.png 1272w, https://substackcdn.com/image/fetch/$s_!-OUs!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc95d581b-fab0-4902-a97a-edddd337345f_1760x3354.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-nxj3kw" tabindex="0" type="button"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button class="pencraft pc-reset pencraft icon-container view-image buttonBase-nxj3kw" tabindex="0" type="button"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>In every box, the AI writes the code, a human reviews it, and then it&#8217;s committed.</p><h2>Before Red: the acceptance criteria</h2><p>Example: placing an order in an online shop.</p><p>It starts with a ticket. Its acceptance criteria are agreed before any code is written:</p><pre><code>Scenario: Calculate the base price from unit price and quantity
  Given a product with unit price 20.00
  When I place an order for 5 of that product
  Then the order is placed successfully
  And the order&#8217;s base price is 100.00</code></pre><h2>Inside the Red step</h2><p><strong>1. Write Acceptance Tests</strong></p><p>The agent turns the acceptance criteria into a test. The test is written in a DSL, the test code&#8217;s own vocabulary (<code>placeOrder().withQuantity(...)</code>). Here&#8217;s the acceptance test, from <code>PlaceOrderPositiveTest.java</code>:</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;java&quot;,&quot;nodeId&quot;:&quot;e8dd1e8a-3469-4dc3-9b7d-ce0e682d802c&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-java">@TestTemplate
@Channel({ChannelType.UI, ChannelType.API})
void shouldCalculateBasePriceAsProductOfUnitPriceAndQuantity() {
    scenario
            .given().product()
                .withUnitPrice(20.00)
            .when().placeOrder()
                .withQuantity(5)
            .then().shouldSucceed()
            .and().order()
                .hasBasePrice(100.00);
}</code></pre></div>
      <p>
          <a href="https://journal.optivem.com/p/spec-driven-development-make-specs">
              Read more
          </a>
      </p>
   ]]></content:encoded></item></channel></rss>