<?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: Davide Agosti</title>
    <description>The latest articles on DEV Community by Davide Agosti (@davideagosti).</description>
    <link>https://dev.to/davideagosti</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%2F2659977%2F73e7974a-2693-4c91-aaad-944ef07e31b9.jpg</url>
      <title>DEV Community: Davide Agosti</title>
      <link>https://dev.to/davideagosti</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/davideagosti"/>
    <language>en</language>
    <item>
      <title>Designing a BYOK AI Architecture for a Commercial Framer Template</title>
      <dc:creator>Davide Agosti</dc:creator>
      <pubDate>Tue, 01 Sep 2026 16:56:59 +0000</pubDate>
      <link>https://dev.to/davideagosti/designing-a-byok-ai-architecture-for-a-commercial-framer-template-2ano</link>
      <guid>https://dev.to/davideagosti/designing-a-byok-ai-architecture-for-a-commercial-framer-template-2ano</guid>
      <description>&lt;p&gt;I Built an AI-Enabled Framer Template Without Owning the Buyer’s AI&lt;/p&gt;

&lt;p&gt;Most AI-enabled websites hide an architectural decision behind the interface:&lt;/p&gt;

&lt;p&gt;Who actually owns the AI?&lt;/p&gt;

&lt;p&gt;When I started building CounselForm AI 2.0, a Framer template for modern law firms, I didn't want buyers to depend on an API key that I controlled.&lt;/p&gt;

&lt;p&gt;I didn't want to bundle inference into a subscription.&lt;/p&gt;

&lt;p&gt;And I definitely didn't want an OpenAI API key sitting somewhere in browser-side configuration.&lt;/p&gt;

&lt;p&gt;So I designed the AI layer around a different principle:&lt;/p&gt;

&lt;p&gt;The buyer owns the AI infrastructure.&lt;/p&gt;

&lt;p&gt;That decision shaped almost everything behind CounselForm AI 2.0.&lt;/p&gt;

&lt;p&gt;The product&lt;/p&gt;

&lt;p&gt;CounselForm started as a premium Framer template for law firms.&lt;/p&gt;

&lt;p&gt;For 2.0, I wanted the website to do more than present pages.&lt;/p&gt;

&lt;p&gt;A potential client might arrive knowing they have a commercial problem without knowing:&lt;/p&gt;

&lt;p&gt;which practice area is relevant;&lt;br&gt;
which lawyer they should speak to;&lt;br&gt;
whether the firm works in their industry;&lt;br&gt;
which existing insight is relevant;&lt;br&gt;
or even how to describe their problem.&lt;/p&gt;

&lt;p&gt;That became the problem behind Ask Lexora.&lt;/p&gt;

&lt;p&gt;Instead of replacing the website, Ask Lexora sits on top of its information architecture and provides another way to explore it.&lt;/p&gt;

&lt;p&gt;There are two modes.&lt;/p&gt;

&lt;p&gt;Guided Discovery&lt;/p&gt;

&lt;p&gt;Guided Discovery is deterministic.&lt;/p&gt;

&lt;p&gt;It uses structured questions and the firm's trusted knowledge to help visitors navigate relevant expertise, people, industries and insights.&lt;/p&gt;

&lt;p&gt;No LLM inference is required.&lt;/p&gt;

&lt;p&gt;This was intentional.&lt;/p&gt;

&lt;p&gt;Not every interaction needs a model.&lt;/p&gt;

&lt;p&gt;AI Mode&lt;/p&gt;

&lt;p&gt;AI Mode is optional.&lt;/p&gt;

&lt;p&gt;Here the visitor can ask a natural-language question and receive a contextual answer based on the firm's trusted knowledge.&lt;/p&gt;

&lt;p&gt;But the architecture introduces an important boundary.&lt;/p&gt;

&lt;p&gt;The browser does not talk directly to OpenAI.&lt;/p&gt;

&lt;p&gt;And the template seller doesn't provide the OpenAI account.&lt;/p&gt;

&lt;p&gt;The simplified flow looks like this:&lt;/p&gt;

&lt;p&gt;Visitor&lt;br&gt;
   ↓&lt;br&gt;
Framer / Ask Lexora&lt;br&gt;
   ↓&lt;br&gt;
Buyer-owned Cloudflare Companion&lt;br&gt;
   ↓&lt;br&gt;
Trusted firm context&lt;br&gt;
   ↓&lt;br&gt;
Buyer-owned OpenAI account&lt;br&gt;
   ↓&lt;br&gt;
Structured response&lt;br&gt;
   ↓&lt;br&gt;
Ask Lexora&lt;/p&gt;

&lt;p&gt;The buyer supplies and controls the provider credentials.&lt;/p&gt;

&lt;p&gt;Why BYOK?&lt;/p&gt;

&lt;p&gt;I settled on a Bring Your Own Key / Bring Your Own AI model.&lt;/p&gt;

&lt;p&gt;The buyer owns:&lt;/p&gt;

&lt;p&gt;the OpenAI account;&lt;br&gt;
the API credentials;&lt;br&gt;
the Cloudflare deployment;&lt;br&gt;
provider usage;&lt;br&gt;
and the resulting inference costs.&lt;/p&gt;

&lt;p&gt;The seller doesn't provide a shared API key and doesn't subsidize token usage.&lt;/p&gt;

&lt;p&gt;There are a few reasons I prefer this architecture for commercially distributed AI templates.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Credentials don't belong in Framer&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;A secret placed in client-side JavaScript isn't a secret.&lt;/p&gt;

&lt;p&gt;The Cloudflare Companion creates a server-side boundary between the Framer experience and the AI provider.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;AI costs stay attributable&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;If 100 people buy a template, I don't want to become the inference provider for 100 unrelated businesses.&lt;/p&gt;

&lt;p&gt;Each buyer pays their own provider costs.&lt;/p&gt;

&lt;p&gt;That also means the template doesn't need an artificial seller-managed AI subscription just to recover inference costs.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The buyer isn't locked into my infrastructure&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The customer isn't buying access to my OpenAI account.&lt;/p&gt;

&lt;p&gt;They're buying the product and architecture.&lt;/p&gt;

&lt;p&gt;Their AI remains theirs.&lt;/p&gt;

&lt;p&gt;The other problem: what does the AI actually know?&lt;/p&gt;

&lt;p&gt;Connecting an LLM wasn't the difficult conceptual part.&lt;/p&gt;

&lt;p&gt;Trusting what it says was.&lt;/p&gt;

&lt;p&gt;A law firm's website contains specific claims about expertise, people, industries and published insights.&lt;/p&gt;

&lt;p&gt;I didn't want Ask Lexora improvising firm-specific facts simply because a language model could generate a plausible answer.&lt;/p&gt;

&lt;p&gt;So CounselForm AI 2.0 uses a Knowledge Sync workflow.&lt;/p&gt;

&lt;p&gt;Conceptually:&lt;/p&gt;

&lt;p&gt;Approved firm content&lt;br&gt;
        ↓&lt;br&gt;
   Knowledge Sync&lt;br&gt;
        ↓&lt;br&gt;
  Trusted knowledge&lt;br&gt;
        ↓&lt;br&gt;
Deterministic retrieval&lt;br&gt;
        ↓&lt;br&gt;
 Bounded context&lt;br&gt;
        ↓&lt;br&gt;
      LLM&lt;br&gt;
        ↓&lt;br&gt;
  Ask Lexora response&lt;/p&gt;

&lt;p&gt;This isn't an autonomous crawler that magically "learns" the buyer's website.&lt;/p&gt;

&lt;p&gt;The knowledge is deliberately maintained.&lt;/p&gt;

&lt;p&gt;And when the available information isn't sufficient, the safer behavior is to acknowledge that limitation or direct the visitor toward the appropriate contact path rather than inventing an answer.&lt;/p&gt;

&lt;p&gt;Not everything needs AI&lt;/p&gt;

&lt;p&gt;One of my favorite outcomes from the project is actually Guided Discovery.&lt;/p&gt;

&lt;p&gt;It costs nothing in inference.&lt;/p&gt;

&lt;p&gt;That matters because AI shouldn't be added simply because a product has an AI feature.&lt;/p&gt;

&lt;p&gt;Sometimes structured interaction provides enough value.&lt;/p&gt;

&lt;p&gt;So CounselForm can operate perfectly well without an OpenAI account.&lt;/p&gt;

&lt;p&gt;AI Mode is an enhancement, not a prerequisite for the website.&lt;/p&gt;

&lt;p&gt;The public demo doesn't use OpenAI either&lt;/p&gt;

&lt;p&gt;There was one more interesting problem.&lt;/p&gt;

&lt;p&gt;How do you publicly demonstrate an AI-enabled commercial template without running every anonymous visitor through a seller-funded API?&lt;/p&gt;

&lt;p&gt;The public Ask Lexora preview is therefore deterministic.&lt;/p&gt;

&lt;p&gt;It demonstrates the interaction model using curated questions and responses without performing OpenAI inference.&lt;/p&gt;

&lt;p&gt;The purchased product can then be configured by the buyer to enable real AI Mode using their own infrastructure.&lt;/p&gt;

&lt;p&gt;That gives me a public interactive demo without turning the demo itself into an uncontrolled inference endpoint.&lt;/p&gt;

&lt;p&gt;What I ended up building&lt;/p&gt;

&lt;p&gt;CounselForm AI 2.0 combines:&lt;/p&gt;

&lt;p&gt;Framer;&lt;br&gt;
responsive legal/editorial design;&lt;br&gt;
CMS-powered content;&lt;br&gt;
Ask Lexora;&lt;br&gt;
deterministic Guided Discovery;&lt;br&gt;
optional AI Mode;&lt;br&gt;
Knowledge Sync;&lt;br&gt;
a buyer-owned Cloudflare Companion;&lt;br&gt;
OpenAI BYOK;&lt;br&gt;
buyer setup and troubleshooting documentation;&lt;br&gt;
and a commercially distributable template architecture.&lt;/p&gt;

&lt;p&gt;The interesting part for me wasn't simply adding an LLM to a website.&lt;/p&gt;

&lt;p&gt;It was figuring out where the AI should stop being my infrastructure and start being the buyer's infrastructure.&lt;/p&gt;

&lt;p&gt;That distinction becomes increasingly important when AI functionality moves from prototypes into products that other people actually own.&lt;/p&gt;

&lt;p&gt;Try Ask Lexora&lt;/p&gt;

&lt;p&gt;CounselForm AI 2.0 is now live, and I've published an interactive preview of the Ask Lexora experience:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://contextual-days-463272.framer.app/" rel="noopener noreferrer"&gt;Live preview: CounselForm AI 2.0&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.framer.com/marketplace/templates/counselform-2-0/" rel="noopener noreferrer"&gt;Framer Marketplace: CounselForm AI 2.0&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I'd be particularly interested in hearing how other developers are approaching BYOK, buyer-owned inference and trusted knowledge boundaries in commercially distributed AI products.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>webdev</category>
      <category>architecture</category>
      <category>framer</category>
    </item>
    <item>
      <title>Business Context Should Be Infrastructure, Not Prompt Text</title>
      <dc:creator>Davide Agosti</dc:creator>
      <pubDate>Tue, 01 Sep 2026 15:39:37 +0000</pubDate>
      <link>https://dev.to/davideagosti/business-context-should-be-infrastructure-not-prompt-text-3i5h</link>
      <guid>https://dev.to/davideagosti/business-context-should-be-infrastructure-not-prompt-text-3i5h</guid>
      <description>&lt;h1&gt;
  
  
  Business Context Should Be Infrastructure, Not Prompt Text
&lt;/h1&gt;

&lt;p&gt;A lot of AI applications eventually run into the same problem.&lt;/p&gt;

&lt;p&gt;The model understands the prompt.&lt;/p&gt;

&lt;p&gt;It may have access to tools.&lt;/p&gt;

&lt;p&gt;It may retrieve documents.&lt;/p&gt;

&lt;p&gt;It may even maintain memory.&lt;/p&gt;

&lt;p&gt;But none of those things necessarily mean it has a coherent understanding of the &lt;strong&gt;business&lt;/strong&gt; it is operating within.&lt;/p&gt;

&lt;p&gt;That distinction is what led me to start working on &lt;strong&gt;Evidensiq&lt;/strong&gt;, an early-stage open-source specification for portable, evidence-backed business context.&lt;/p&gt;

&lt;p&gt;The project is deliberately still at the specification stage. There is no runtime or package to install yet.&lt;/p&gt;

&lt;p&gt;Before building one, I want to find out where the model is wrong.&lt;/p&gt;

&lt;h2&gt;
  
  
  The problem
&lt;/h2&gt;

&lt;p&gt;Business knowledge rarely exists in one place.&lt;/p&gt;

&lt;p&gt;A company may have:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;product information in a database;&lt;/li&gt;
&lt;li&gt;pricing in a CRM;&lt;/li&gt;
&lt;li&gt;strategy in documents;&lt;/li&gt;
&lt;li&gt;operational constraints in internal notes;&lt;/li&gt;
&lt;li&gt;customer information in spreadsheets;&lt;/li&gt;
&lt;li&gt;metrics in analytics systems;&lt;/li&gt;
&lt;li&gt;policies in PDFs;&lt;/li&gt;
&lt;li&gt;and historical information that is no longer valid.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A typical AI application eventually has to turn some combination of those sources into context for a model.&lt;/p&gt;

&lt;p&gt;But retrieving text is only part of the problem.&lt;/p&gt;

&lt;p&gt;Suppose three sources say:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;2025 pricing document → Product A = £100
CRM                   → Product A = £120
Website               → Product A = £110
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Which one is true?&lt;/p&gt;

&lt;p&gt;More importantly: should the infrastructure silently decide that one of them is true?&lt;/p&gt;

&lt;p&gt;I don't think it should.&lt;/p&gt;

&lt;h2&gt;
  
  
  Evidence is not a fact
&lt;/h2&gt;

&lt;p&gt;One of the core invariants I'm exploring in Evidensiq is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;SOURCE ≠ EVIDENCE
EVIDENCE ≠ FACT
FACT ≠ INFERENCE
INFERENCE ≠ RECOMMENDATION
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Or, conceptually:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;SOURCE
  ↓
EVIDENCE
  ↓
ASSERTION / FACT
  ↓
INFERENCE
  ↓
RECOMMENDATION
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The distinction matters because a recommendation should be traceable backwards.&lt;/p&gt;

&lt;p&gt;If an AI system recommends delaying a marketing campaign because production capacity is constrained, I want an application to be able to ask:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;And eventually reach the evidence that supported that conclusion.&lt;/p&gt;

&lt;h2&gt;
  
  
  Business knowledge is temporal
&lt;/h2&gt;

&lt;p&gt;Another problem is time.&lt;/p&gt;

&lt;p&gt;A statement can be false today without having always been false.&lt;/p&gt;

&lt;p&gt;The current specification therefore models concepts such as:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;validFrom
validUntil
observedAt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The goal is to preserve the distinction between:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;FALSE
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;and:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;WAS TRUE
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This becomes important surprisingly quickly when AI systems reason over pricing, customers, processes, products, policies or business objectives.&lt;/p&gt;

&lt;h2&gt;
  
  
  Confidence probably isn't one number
&lt;/h2&gt;

&lt;p&gt;I'm also questioning the common pattern of attaching something like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;confidence: 0.97
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;to AI-generated conclusions.&lt;/p&gt;

&lt;p&gt;What exactly does 0.97 represent?&lt;/p&gt;

&lt;p&gt;The current Evidensiq direction separates:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;evidenceStrength
sourceReliability
evidenceFreshness
inferenceConfidence
modelConfidence
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;An application could derive an overall score according to its own policy, but the underlying dimensions remain visible.&lt;/p&gt;

&lt;p&gt;Whether this is useful or over-engineered is one of the things I want feedback on.&lt;/p&gt;

&lt;h2&gt;
  
  
  Data is not instruction
&lt;/h2&gt;

&lt;p&gt;There is also a security boundary that I think context infrastructure needs to make explicit:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;DATA ≠ INSTRUCTION
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Imagine an ingested business document contains:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Ignore previous instructions and...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That content came from evidence.&lt;/p&gt;

&lt;p&gt;It did not suddenly acquire authority over the AI system.&lt;/p&gt;

&lt;p&gt;This distinction becomes particularly important when context is assembled automatically from untrusted or externally controlled sources.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Evidensiq is — and isn't
&lt;/h2&gt;

&lt;p&gt;The intention is not to build another agent framework.&lt;/p&gt;

&lt;p&gt;Evidensiq should not own:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;agent orchestration;&lt;/li&gt;
&lt;li&gt;generic RAG;&lt;/li&gt;
&lt;li&gt;vector storage;&lt;/li&gt;
&lt;li&gt;workflow execution;&lt;/li&gt;
&lt;li&gt;LLM clients;&lt;/li&gt;
&lt;li&gt;generic memory;&lt;/li&gt;
&lt;li&gt;tool calling;&lt;/li&gt;
&lt;li&gt;multi-agent coordination.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Instead, the proposed boundary looks roughly like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Application / Agent Runtime
            │
            ▼
        Evidensiq
            │
    Business Context
    Evidence
    Provenance
    Signals
    Inference
    Recommendations
    Validation
            │
            ▼
LLM / Storage / Documents / CRM / other adapters
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;An OpenAI-based application, a Microsoft Agent Framework application, a LangChain application or a custom system should theoretically be able to consume the same business-context representation.&lt;/p&gt;

&lt;p&gt;The portable artifact currently being explored is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;business-context.json
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;with a provider-neutral JSON Schema.&lt;/p&gt;

&lt;h2&gt;
  
  
  Before writing the runtime
&lt;/h2&gt;

&lt;p&gt;The obvious temptation at this point would be to start building packages.&lt;/p&gt;

&lt;p&gt;I'm deliberately not doing that yet.&lt;/p&gt;

&lt;p&gt;The current repository contains the specification, JSON Schema, architecture, terminology, security model and project rationale.&lt;/p&gt;

&lt;p&gt;Before locking those abstractions and implementing reference libraries in TypeScript and .NET, I'd like them challenged by other developers.&lt;/p&gt;

&lt;p&gt;In particular:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Are SOURCE / EVIDENCE / FACT / INFERENCE / RECOMMENDATION actually useful boundaries?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Is the business model too broad or too restrictive?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Does the temporal model hold up against real systems?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Is multidimensional confidence useful or unnecessary complexity?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Can a context specification like this genuinely remain runtime- and provider-neutral?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Where does this overlap too much with existing context, knowledge-graph or agent infrastructure?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;What would prevent you from integrating something like this into a production AI application?&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;I've opened a technical review discussion here:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/davideagosti-dev/evidensiq/discussions/3" rel="noopener noreferrer"&gt;https://github.com/davideagosti-dev/evidensiq/discussions/3&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The repository is here:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/davideagosti-dev/evidensiq" rel="noopener noreferrer"&gt;https://github.com/davideagosti-dev/evidensiq&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;At this stage, disagreement is useful.&lt;/p&gt;

&lt;p&gt;I'd rather discover a bad abstraction in a Markdown specification than after publishing APIs around it.&lt;/p&gt;

</description>
      <category>opensource</category>
      <category>ai</category>
      <category>architecture</category>
      <category>programming</category>
    </item>
    <item>
      <title>Your Component Fits. But Is It Still Useful?</title>
      <dc:creator>Davide Agosti</dc:creator>
      <pubDate>Tue, 01 Sep 2026 14:10:45 +0000</pubDate>
      <link>https://dev.to/davideagosti/your-component-fits-but-is-it-still-useful-3ln1</link>
      <guid>https://dev.to/davideagosti/your-component-fits-but-is-it-still-useful-3ln1</guid>
      <description>&lt;p&gt;&lt;a href="https://dndgem.dev/articles/geometrically-fits-content-remains-useful/" rel="noopener noreferrer"&gt;&lt;strong&gt;DnDGem&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Your Component Fits. But Is It Still Useful?
&lt;/h1&gt;

&lt;p&gt;Responsive interfaces usually answer a geometric question:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Does this component fit in the available space?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;But there is another question that is much harder to express:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Is the content still useful at that size?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Those two questions are not always equivalent.&lt;/p&gt;

&lt;h2&gt;
  
  
  A simple example
&lt;/h2&gt;

&lt;p&gt;Imagine a dashboard panel with these constraints:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;minWidth&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;120&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;minUsefulWidth&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;180&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;At &lt;strong&gt;200px&lt;/strong&gt;, everything is fine.&lt;/p&gt;

&lt;p&gt;The panel fits, and its content has enough room to remain useful.&lt;/p&gt;

&lt;p&gt;At &lt;strong&gt;150px&lt;/strong&gt;, something more interesting happens.&lt;/p&gt;

&lt;p&gt;The panel still satisfies its geometric minimum. Nothing necessarily overflows. The browser can render it perfectly well.&lt;/p&gt;

&lt;p&gt;But perhaps:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;labels become cramped,&lt;/li&gt;
&lt;li&gt;a chart loses enough context to become difficult to interpret,&lt;/li&gt;
&lt;li&gt;controls remain technically accessible but awkward to use,&lt;/li&gt;
&lt;li&gt;or important information becomes harder to understand.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The component still &lt;strong&gt;fits&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;But its content has started to &lt;strong&gt;degrade&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;At &lt;strong&gt;100px&lt;/strong&gt;, the situation changes again: now the component violates its hard minimum width.&lt;/p&gt;

&lt;p&gt;These are three different states.&lt;/p&gt;

&lt;h3&gt;
  
  
  VALID
&lt;/h3&gt;

&lt;p&gt;The component satisfies its geometric constraints and its usefulness thresholds.&lt;/p&gt;

&lt;h3&gt;
  
  
  DEGRADED
&lt;/h3&gt;

&lt;p&gt;The component still satisfies its hard geometric constraints, but one or more usefulness thresholds are no longer satisfied.&lt;/p&gt;

&lt;h3&gt;
  
  
  INVALID
&lt;/h3&gt;

&lt;p&gt;A hard geometric constraint has been violated.&lt;/p&gt;

&lt;p&gt;That middle state is the interesting one.&lt;/p&gt;

&lt;h2&gt;
  
  
  Geometry is not usefulness
&lt;/h2&gt;

&lt;p&gt;CSS already gives us extremely powerful mechanisms for responsive design.&lt;/p&gt;

&lt;p&gt;Media queries let us respond to viewport conditions.&lt;/p&gt;

&lt;p&gt;Container queries let components respond to the dimensions of their containers.&lt;/p&gt;

&lt;p&gt;Intrinsic sizing gives the browser sophisticated rules for determining how elements should occupy available space.&lt;/p&gt;

&lt;p&gt;None of those technologies are the problem.&lt;/p&gt;

&lt;p&gt;The question I'm interested in sits at a different layer:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;What should a layout system do when geometry remains valid, but the content inside that geometry is no longer useful?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Consider a data visualization.&lt;/p&gt;

&lt;p&gt;A chart might technically render at 160px wide. No overflow. No violated minimum width.&lt;/p&gt;

&lt;p&gt;But perhaps its axis labels collide, the legend dominates the plot, or the amount of visible information becomes too small to communicate anything meaningful.&lt;/p&gt;

&lt;p&gt;From the browser's perspective, the layout may still be valid.&lt;/p&gt;

&lt;p&gt;From the application's perspective, it may have degraded.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why model DEGRADED explicitly?
&lt;/h2&gt;

&lt;p&gt;A binary model gives us:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;VALID
INVALID
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;But adaptive interfaces often have a meaningful region between those states:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;VALID
   ↓
DEGRADED
   ↓
INVALID
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Making that middle state explicit gives the application another piece of information to reason about.&lt;/p&gt;

&lt;p&gt;For example, a layout engine could decide to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;reduce lower-priority content,&lt;/li&gt;
&lt;li&gt;switch to a more compact representation,&lt;/li&gt;
&lt;li&gt;move something elsewhere,&lt;/li&gt;
&lt;li&gt;reflow the surrounding layout,&lt;/li&gt;
&lt;li&gt;or simply expose the degraded state and let the application decide.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The important part isn't prescribing one universal response.&lt;/p&gt;

&lt;p&gt;It's recognizing that &lt;strong&gt;"fits" and "remains useful" describe different constraints.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Exploring the idea with DnDGem
&lt;/h2&gt;

&lt;p&gt;This distinction is what I've been exploring in &lt;strong&gt;DnDGem&lt;/strong&gt;, an open-source adaptive layout engine.&lt;/p&gt;

&lt;p&gt;DnDGem separates hard geometric constraints from content-usefulness constraints.&lt;/p&gt;

&lt;p&gt;A simplified example looks like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;minWidth&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;120&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;minUsefulWidth&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;180&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;minWidth&lt;/code&gt; represents a hard geometric boundary.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;minUsefulWidth&lt;/code&gt; represents the point below which the content is considered degraded, even though the component may still geometrically fit.&lt;/p&gt;

&lt;p&gt;The resulting state becomes information that an adaptive layout system can use when evaluating layout decisions.&lt;/p&gt;

&lt;p&gt;The goal isn't to replace CSS, media queries, container queries, or intrinsic sizing.&lt;/p&gt;

&lt;p&gt;It's to explore an application-level question those mechanisms don't necessarily answer on their own:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;When should an interface react to loss of usefulness rather than only loss of geometric fit?&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Try the idea
&lt;/h2&gt;

&lt;p&gt;I've written a more detailed explanation of the model, including the reasoning behind VALID, DEGRADED, and INVALID:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://dndgem.dev/articles/geometrically-fits-content-remains-useful/" rel="noopener noreferrer"&gt;https://dndgem.dev/articles/geometrically-fits-content-remains-useful/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;There's also an interactive playground:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://playground.dndgem.dev/" rel="noopener noreferrer"&gt;https://playground.dndgem.dev/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;But I'm particularly interested in how other frontend engineers approach this problem.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;When a component technically fits but its content no longer works well, how do you represent that boundary in your applications today?&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>opensource</category>
      <category>github</category>
    </item>
  </channel>
</rss>
