{"id":117790,"date":"2026-08-05T10:42:54","date_gmt":"2026-08-05T08:42:54","guid":{"rendered":"https:\/\/diselva.com\/?p=117790"},"modified":"2026-08-05T10:57:47","modified_gmt":"2026-08-05T08:57:47","slug":"the-ai-agent-forgets-everything-the-specification-doesnt","status":"publish","type":"post","link":"https:\/\/diselva.com\/en\/blog\/the-ai-agent-forgets-everything-the-specification-doesnt\/","title":{"rendered":"The AI Agent Forgets Everything. The Specification Doesn&#8217;t."},"content":{"rendered":"\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">An AI agent has no memory of its own between two sessions. We preserve the project&#8217;s memory permanently through specifications, guardrails, and skills.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Three months after project kickoff, the acceptance test of an AI-developed application revealed something troubling: anyone who changed the invoice number in the URL could see another customer&#8217;s invoice as a PDF, complete with address and payment status. We looked for the rule that should have prevented this. Somewhere it should have said: a customer may only view their own invoices. We asked the AI agent that was working on this module at the time. It had no idea \u2014 and couldn&#8217;t have had one: that session knew nothing of the last one, let alone the one months earlier that should have specified this check. So we searched the specification itself. The rule wasn&#8217;t there. Not deleted. Never written down, because it seemed too obvious to everyone to bother recording it.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>To make sure this doesn&#8217;t happen again, every decision needs a place where even the next, clueless AI agent can still read it.<\/strong><\/p>\n\n\n\n<h4 class=\"wp-block-heading\">The Specification \u2013 What&#8217;s fixed and what&#8217;s still open<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">This is where the business domain of a module is defined: its terms, data, and rules. This also includes the use cases with their acceptance criteria, which precisely describe how the system should behave. This is owned by the business analyst.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Every statement in it falls into one of two categories:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Invariant:<\/strong> A fixed rule that an implementation may never violate.<\/li>\n\n\n\n<li><strong>Open Decision:<\/strong> A decision not yet made, recorded with a safe default value so nobody has to guess.<\/li>\n<\/ul>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\"><strong>The Golden Rule:<\/strong> write down every business rule and invariant explicitly, no matter how obvious it seems. Whatever isn&#8217;t in the specification doesn&#8217;t exist for the AI agent.<\/p>\n<\/blockquote>\n\n\n\n<p class=\"wp-block-paragraph\">EXCERPT: FROM THE ORDER DOMAIN MODEL<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">Order<br>  id: string<br>  accountId: string (owning customer account)<br>  status: placed | shipped | cancelled | refunded<br><br>INV-07: A customer may view only orders belonging to their own account.<br><br>OD-03: How long does a cancelled order stay visible in the account?<br>       Default: 24 months, pending confirmation from Legal.<br><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">EXCERPT: USE CASE ORDER DETAIL<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">Scenario: Customer views their own order<br>  Given an authenticated customer<br>  When they request an order by id<br>  Then the order is returned only if accountId matches the requester<br>  # enforces INV-07<br><br>Scenario: Customer requests an order they do not own<br>  Given an authenticated customer<br>  When the requested order belongs to a different account<br>  Then the response is 403 Forbidden<br>  # enforces INV-07<br><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">The Guardrails \u2013 The memory that applies to everyone<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Above the specification of an individual module sit the <strong>guardrails<\/strong>. They form the shared technical standard that every application in the system follows: tech stack, programming language, API design, security, error handling, and logging.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This is defined by the <em>solution architect<\/em>. It also includes <strong>architecture decision records (ADRs) <\/strong>\u2014 short entries that capture why a particular option was chosen and an alternative rejected.<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\"><strong>The golden rule:<\/strong> define technical standards and security rules once, centrally, for the whole system. Whatever is anchored in the guardrails applies without exception, regardless of what the business analyst happened to think of in an individual use case.<\/p>\n<\/blockquote>\n\n\n\n<p class=\"wp-block-paragraph\">EXCERPT: ARCHITECTURE DECISION RECORD<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">Title: Integration with SAP S\/4HANA<br>Status: Accepted<br><br>Context: Multiple services need data from SAP. Direct point-to-point connections would mean many sets of credentials to rotate and no single place to audit access.<br><br>Decision: All integration with SAP S\/4HANA goes through SAP Cloud Integration. No service connects to SAP directly.<br><br>Consequences: One integration surface to secure and monitor. Slightly higher latency accepted as tradeoff for a single audited path.<br><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">EXCERPT: DEFINITION OF FOLDER STRUCTURE<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><br>pxp-portal-web (BFF)<br>  \u251c\u2500\u2500 app\/          (Routes &amp; Server Components call microservice directly)<br>  \u251c\u2500\u2500 app\/api\/      (Route Handlers, one per client-triggered write)<br>  \u2514\u2500\u2500 lib\/api-client (Typed calls to the microservice)<br><br>order-service (Microservice)<br>  \u251c\u2500\u2500 src\/handlers  (HTTP routes)<br>  \u251c\u2500\u2500 src\/services  (Business logic)<br>  \u2514\u2500\u2500 src\/models    (Domain types)<br><br>Rule: The browser never calls a microservice directly. <br>Every client-triggered write goes through a same-origin Route Handler in the BFF.<br><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">The UX \u2013 What&#8217;s allowed vs. how it should look<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">A visual design carries <strong>no memory <\/strong>of its own at all. A Figma design only shows a target state, but never the reasoning or the business logic behind it.<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\"><strong>The golden rule:<\/strong> the design shows the how, the specification decides the what. If the two contradict each other, the specification always wins, because it&#8217;s the only one that can be explained and traced back.<\/p>\n<\/blockquote>\n\n\n\n<p class=\"wp-block-paragraph\">EXAMPLE: UX ORDER OVERVIEW<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"1360\" height=\"823\" src=\"https:\/\/i0.wp.com\/diselva.com\/wp-content\/uploads\/2026\/07\/image-1.png?resize=1360%2C823&#038;quality=78&#038;ssl=1\" alt=\"\" class=\"wp-image-117759\" srcset=\"https:\/\/i0.wp.com\/diselva.com\/wp-content\/uploads\/2026\/07\/image-1.png?resize=2048%2C1239&amp;quality=78&amp;ssl=1 2048w, https:\/\/i0.wp.com\/diselva.com\/wp-content\/uploads\/2026\/07\/image-1.png?resize=1024%2C619&amp;quality=78&amp;ssl=1 1024w, https:\/\/i0.wp.com\/diselva.com\/wp-content\/uploads\/2026\/07\/image-1.png?resize=400%2C242&amp;quality=78&amp;ssl=1 400w, https:\/\/i0.wp.com\/diselva.com\/wp-content\/uploads\/2026\/07\/image-1.png?resize=768%2C464&amp;quality=78&amp;ssl=1 768w, https:\/\/i0.wp.com\/diselva.com\/wp-content\/uploads\/2026\/07\/image-1.png?resize=1536%2C929&amp;quality=78&amp;ssl=1 1536w, https:\/\/i0.wp.com\/diselva.com\/wp-content\/uploads\/2026\/07\/image-1.png?resize=1200%2C726&amp;quality=78&amp;ssl=1 1200w\" sizes=\"auto, (max-width: 1360px) 100vw, 1360px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">The Hands \u2013 Two kinds of memory<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">None of the three human roles (architect, business analyst, UX designer) writes the code itself. That&#8217;s handled by a set of repeatable procedures: <strong>the skills<\/strong>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Here the difference between two types of knowledge becomes visible:<\/p>\n\n\n\n<ol start=\"1\" class=\"wp-block-list\">\n<li><strong>Declarative knowledge (factual knowledge): <\/strong>The specification and the guardrails record what has been decided.<\/li>\n\n\n\n<li><strong>Procedural knowledge (know-how): <\/strong>The skills record how to actually build something from these requirements.<\/li>\n<\/ol>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\"><strong>The Golden rule:<\/strong> define the procedural knowledge (how to build) in repeatable skills, but never let them guess the factual knowledge (what to build). A skill executes rules strictly and stops immediately if a specification is incomplete.<\/p>\n<\/blockquote>\n\n\n\n<p class=\"wp-block-paragraph\">EXCERPT: SKILL DEFINITION IMPLEMENT-USE-CASE<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">name: implement-use-case<br>description: Turn an already written Use Case doc into working code against the harness.<br><br>instructions:<br>  Before writing any code, trace every Open Decision and Invariant <br>  the Use Case cites. If a citation points to an ID that does not <br>  exist in the Domain Model doc, STOP and flag it rather than <br>  guessing what it might have meant.<br><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Was \u201eSTOP and flag&#8221; in der Praxis bedeutet: Der Agent bricht die Session nicht ab, er pausiert sie. Die offene Frage geht als R\u00fcckfrage an die verantwortliche Rolle zur\u00fcck, meist an den Business Analyst bei einer fehlenden Anforderung, an den Architekten bei einer L\u00fccke in den Leitplanken. Bis die Antwort da ist, wird nichts geraten und nichts implementiert. Sobald die Entscheidung in Spezifikation oder Leitplanken eingetragen ist, nimmt der Agent die Session mit dem neuen Stand wieder auf.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">The Audit \u2013 How we closed the gap<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">When the team investigated the invoice URL security hole, it became clear: it was never the decision of a single module, but a rule that everyone had considered &#8220;obvious.&#8221;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The problem was fixed in two places:<\/p>\n\n\n\n<ol start=\"1\" class=\"wp-block-list\">\n<li>Invoice retrieval now checks ownership.<\/li>\n\n\n\n<li>The rule was added globally to <strong>the guardrails<\/strong>.<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">EXCERPT: GUARDRAILS (ADDITION AFTER THE INCIDENT)<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">Rule: Any endpoint returning an entity by ID MUST verify that the requester <br>owns it before the response is built. No exception\u2014not even for internal tools.<br><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">The Overview: Three roles, one borrowed memory<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">An AI agent forgets everything. Every time. So that AI can still develop software reliably within an enterprise, we move the project&#8217;s memory out of the volatile chat window and into structured artifacts.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Three human roles define the <strong>factual knowledge<\/strong> (what gets built). Repeatable skills provide the <strong>procedural knowledge<\/strong> (how it gets built). The agent only borrows this knowledge for the duration of a working session.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"913\" src=\"https:\/\/i0.wp.com\/diselva.com\/wp-content\/uploads\/2026\/07\/image.png?resize=1024%2C913&#038;quality=78&#038;ssl=1\" alt=\"\" class=\"wp-image-117733\" srcset=\"https:\/\/i0.wp.com\/diselva.com\/wp-content\/uploads\/2026\/07\/image.png?w=1024&amp;quality=78&amp;ssl=1 1024w, https:\/\/i0.wp.com\/diselva.com\/wp-content\/uploads\/2026\/07\/image.png?resize=400%2C357&amp;quality=78&amp;ssl=1 400w, https:\/\/i0.wp.com\/diselva.com\/wp-content\/uploads\/2026\/07\/image.png?resize=768%2C685&amp;quality=78&amp;ssl=1 768w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">In a nutshell<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Borrowed memory<\/strong>: The AI agent has no memory of its own. It reads specifications and guardrails at the start of a session and forgets them again when it closes. <\/li>\n\n\n\n<li><strong>The golden rule<\/strong>: What isn&#8217;t written down doesn&#8217;t exist for the AI. In AI engineering, there&#8217;s no such thing as &#8220;obvious.&#8221; <\/li>\n\n\n\n<li><strong>Engineering instead of &#8220;vibe coding&#8221;<\/strong>: The difference between trial and error and professional AI development doesn&#8217;t lie in clever prompting \u2013 it lies in the quality of the specifications and guardrails.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">How Diselva can help<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Getting started with AI-driven software development is a cultural and process shift. <strong>At Diselva, we help you build this foundation:<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Anchoring guardrails:<\/strong> We work with your architects to define technical standards and security rules (harness).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Sharpening specifications:<\/strong> We establish structures for use cases and invariants that AI agents understand unambiguously.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Developing custom AI skills: <\/strong>We build the procedures your agents need to code precisely to your specifications.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Lowering context costs:<\/strong> A memory that gets reloaded from scratch at every session has a cost. We structure guardrails and specifications so agents only load what they actually need.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Make your project&#8217;s knowledge independent of any single chat&#8217;s context window \u2013 get in touch.<br><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>An AI agent has no memory of its own between two sessions. We preserve the project&#8217;s memory permanently through specifications, guardrails, and skills. Three months after project kickoff, the acceptance test of an AI-developed application revealed something troubling: anyone who changed the invoice number in the URL could see another customer&#8217;s invoice as a PDF, [&hellip;]<\/p>\n","protected":false},"author":268896787,"featured_media":117733,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_eb_attr":"","content-type":"","advanced_seo_description":"","jetpack_seo_html_title":"","jetpack_seo_noindex":false,"jetpack_seo_schema_type":"","_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_wpcom_ai_launchpad_first_post":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[1916,1963],"tags":[],"thema":[],"class_list":["post-117790","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-expert-article","category-leading-with-ai"],"blocksy_meta":{"styles_descriptor":{"styles":{"desktop":"","tablet":"","mobile":""},"google_fonts":[],"version":8}},"acf":[],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"https:\/\/i0.wp.com\/diselva.com\/wp-content\/uploads\/2026\/07\/image.png?fit=1024%2C913&quality=78&ssl=1","_links":{"self":[{"href":"https:\/\/diselva.com\/en\/wp-json\/wp\/v2\/posts\/117790","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/diselva.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/diselva.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/diselva.com\/en\/wp-json\/wp\/v2\/users\/268896787"}],"replies":[{"embeddable":true,"href":"https:\/\/diselva.com\/en\/wp-json\/wp\/v2\/comments?post=117790"}],"version-history":[{"count":2,"href":"https:\/\/diselva.com\/en\/wp-json\/wp\/v2\/posts\/117790\/revisions"}],"predecessor-version":[{"id":117798,"href":"https:\/\/diselva.com\/en\/wp-json\/wp\/v2\/posts\/117790\/revisions\/117798"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/diselva.com\/en\/wp-json\/wp\/v2\/media\/117733"}],"wp:attachment":[{"href":"https:\/\/diselva.com\/en\/wp-json\/wp\/v2\/media?parent=117790"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/diselva.com\/en\/wp-json\/wp\/v2\/categories?post=117790"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/diselva.com\/en\/wp-json\/wp\/v2\/tags?post=117790"},{"taxonomy":"thema","embeddable":true,"href":"https:\/\/diselva.com\/en\/wp-json\/wp\/v2\/thema?post=117790"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}