<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0">
    <channel>
        <title>Data Engineering Blog &amp; Second Brain</title>
        <link>https://www.ssp.sh/</link>
        <description>Data Engineering Blog with genuine insights by Simon Späti: 100&#43; open-source data essays, a 1,000&#43; note Second Brain, and the book Patterns of Data Engineering.</description>
        <generator>Hugo -- gohugo.io</generator><language>en-US</language><managingEditor>hello@ssp.sh (Simon Späti)</managingEditor>
            <webMaster>hello@ssp.sh (Simon Späti)</webMaster><copyright>All rights reserved. Sharing of excerpts with proper attribution is encouraged for non-commercial purposes. For commercial use or republication, please contact inquiries@ssp.sh.</copyright><lastBuildDate>Tue, 10 Nov 2026 08:00:08 &#43;0200</lastBuildDate>
            <atom:link href="https://www.ssp.sh/index.xml" rel="self" type="application/rss+xml" />
        <item>
    <title>Typed Graphs, Checked Types: Graph as Code for Agentic Engineering and Data Quality</title>
    <link>https://www.ssp.sh/blog/context-as-code-typed-graphs-checked/</link>
    <pubDate>Tue, 10 Nov 2026 08:00:08 &#43;0200</pubDate>
    <author>Simon Späti</author>
    <guid>https://www.ssp.sh/blog/context-as-code-typed-graphs-checked/</guid><enclosure url="https://www.ssp.sh/blog/context-as-code-typed-graphs-checked/featured-image.webp" type="image/webp" length="0" /><description><![CDATA[<p>Graphs usually get a bad rap: &ldquo;what are they good for?&rdquo;, &ldquo;there&rsquo;s no schema&rdquo;. But there are also moments when they are superior to tables and other formats, and agents like them a lot. Typed graphs, meaning graphs with clear data types attached, help even more, especially with types that can be checked and verified. If you can define it declaratively, that helps collaboration by giving humans and agents a place to work together, but also data quality, as you can version it and extensively run tests (unit, end-to-end, etc.).</p>
<p>Data quality was probably the biggest and most challenging domain in data two decades ago, and it is getting even harder these days with more autonomous systems and agents. The question becomes: how do we <strong>build and verify reliably</strong>? That&rsquo;s where graphs as code with added types and checks can ensure that agents won&rsquo;t store wrong data in the wrong place.</p>
<p>But how do we test? In the old days, we got a confirmed business number from the business users or domain experts. They consolidated it either from their CRM, SAP, or other operational applications they use (sometimes from their Excel sheets 😉). Or, the second most common case, people created queries based on an OLTP relational database, which give numbers verified by the business that then need to be replicated by the DWH or analytics team. So, as a start, we could use that and feed it to the agents<sup id="fnref:1"><a href="#fn:1" class="footnote-ref" role="doc-noteref">1</a></sup>.</p>
<p>No matter how we test, types and checks are always part of it, and that&rsquo;s why they&rsquo;re making their way into graphs, <strong>enabling more agentic work with graph as code, and overall consistency</strong>.</p>
<h2 id="why-is-agentic-engineering-built-on-graphs">Why Is Agentic Engineering Built on Graphs?</h2>
<p>So let&rsquo;s first start with why agentic engineering uses graphs, why they are therefore popular nowadays, and why context and knowledge layers build on top of them, too.</p>
<h3 id="three-shapes-of-data-tabular-data---json---graphs">Three Shapes of Data: <code>tabular data -&gt; JSON -&gt; Graphs</code></h3>
<p>If we zoom out, we have essentially three shapes of data<sup id="fnref:2"><a href="#fn:2" class="footnote-ref" role="doc-noteref">2</a></sup>:</p>
<ul>
<li>Good old <strong>tabular data</strong>: everything that looks like a table with rows and columns (Excel style, databases)—these are rigid and typed, with relationships modeled in foreign keys and an <a href="https://www.ssp.sh/brain/entity-relationship-diagram-erd/" target="_blank" rel="noopener noreffer">Entity Relationship Diagram (ERD)</a></li>
<li>Then there&rsquo;s the <strong>nested tree structure</strong> like JSON/XML, etc.: useful for semi-structured data, popularized by the NoSQL movement. Great for storing, not so much for analytics—flexible, untyped, and hard at query time.</li>
<li>And <strong>graphs</strong> with <em>nodes</em> (also called vertices) and <em>edges</em> (also called links or lines) modeled with <em>relationships</em> between them—relationships are first-class, but untyped.</li>
</ul>













  
<figure><span class="img-expandable" data-full="/blog/context-as-code-typed-graphs-checked/graph-brain.webp">
<a target="_blank" href="/blog/context-as-code-typed-graphs-checked/graph-brain.webp" title="Open image in full size">

</a><button type="button" class="expand-btn" aria-label="Expand image" title="Expand image" hidden><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true"><path d="M15 3h6v6M9 21H3v-6M21 3l-7 7M3 21l7-7"/></svg></button>
</span><figcaption class="image-caption">Here&rsquo;s an example of my <a href="https://www.ssp.sh/brain/" target="_blank" rel="noopener noreffer">public Second Brain</a> as a graph: 651 notes, 3,459 wikilinks, exported from Markdown with a <a href="https://gist.github.com/sspaeti/9f4fced0adc66f519ef28db2fc96261d" target="_blank" rel="noopener noreffer">small script</a> into the snapshot format <a href="https://github.com/ModernRelay/orbit" target="_blank" rel="noopener noreffer">Orbit</a> renders. All the connected links would be very hard to model in a relational or any format other than a graph. You see two clusters, data engineering and writing/Obsidian. Every edge is <code>links_to</code>. In this example, nothing says why two notes connect. Relationships first-class, but untyped.</figcaption>
</figure>
<p>So why did LLMs and AI architecture not choose a relational, and therefore tabular, format, or a simple JSON?</p>
<h3 id="why-a-graph-over-a-relational-model-sql">Why a Graph over a Relational Model (SQL)?</h3>
<p>The simple reason isn&rsquo;t storage or joins, but <strong>retrieval</strong>. Graphs treat <strong>relationships as first-class data</strong>, so retrieval matches the shape of the questions.</p>
<p>When an agent works with messy, heterogeneous knowledge (people, docs, concepts, decisions, code), its questions are usually relational and open-ended. “What’s connected to X?” “How did A lead to B?” “What else touches this concept?” A graph answers these by walking edges from a starting point. SQL answers them by reconstructing relationships through joins at query time.</p>
<p>The advantages of a graph are many. <a href="https://www.omnigraph.dev/docs/queries-search/traversal" target="_blank" rel="noopener noreffer">Multi-hop traversals</a> are much cheaper than including 100s of tables in a SQL join with <a href="https://www.ssp.sh/brain/cte/" target="_blank" rel="noopener noreffer">CTEs</a>. The schema of a &ldquo;table&rdquo; can stay loose and doesn&rsquo;t have a fixed table design by default. Edges can carry the meaning of why two nodes are connected, which is helpful for retrieval again. A classical foreign key does not have that built in. There, we usually add it to the Entity Relationship Diagram visually, but not in the database or the relationship itself.</p>
<p>Retrieval with a graph becomes finding an entry point with hybrid search (vector + <a href="https://en.wikipedia.org/wiki/Okapi_BM25" target="_blank" rel="noopener noreffer">BM25</a>), then expanding its neighborhood into a subgraph the model can read as context.</p>
<p>SQL still wins for aggregation and well-structured records, and also for type safety and overall reliability and consistency, which get ever more important with agents to keep data quality up.</p>
<p>With <strong>agents being the user, workflow, and operator</strong> at once, having schema, queries, and policy as one checkable definition in code becomes more important than ever. That&rsquo;s where typed graphs and graph as code with checked types bridge the gap.</p>
<h3 id="signs-of-sql-not-being-enough">Signs of SQL Not Being Enough</h3>
<p>SQL is great for its declarative approach: you can write SQL independently of the engine, and the engine will figure out the best execution (query plan) and how to retrieve and return tabular data.</p>
<p>But there are also limits. Julian Hyde gave a talk at Data Council about <a href="https://www.datacouncil.ai/talks/cubing-and-metrics-in-sql" target="_blank" rel="noopener noreffer">Extending SQL for analytics</a>. He continued his work with <a href="https://github.com/hydromatic/morel" target="_blank" rel="noopener noreffer">Morel Language</a> with static types, unit tests, and more:</p>
<blockquote>
<p>Morel can solve data-engineering and data-intensive problems that are <a href="http://blog.hydromatic.net/2020/03/31/word-count-revisited.html" target="_blank" rel="noopener noreffer">beyond SQL’s capabilities</a> (think dbt and Spark) but with the benefit of a single compiler/optimizer. Even problems that can be fully solved in SQL will, I think, benefit from the programming language approach (<strong>static typing, unit tests, refactoring, modules, version control</strong>).</p>
</blockquote>
<p>Also, <a href="https://www.cs.cmu.edu/~pavlo/" target="_blank" rel="noopener noreffer">Andy Pavlo</a> said on the <a href="https://www.youtube.com/watch?v=74X0DJOVEc8" target="_blank" rel="noopener noreffer">MAD Podcast</a> that he has strong opinions about graph databases (not graphs per se):</p>
<blockquote>
<p>[…] the traversals of graphs, which essentially are just self-joins on a table. You can implement those very efficiently, and you can easily outperform Neo4j. […] If you&rsquo;re doing that back and forth [client-side traversal], yeah, they&rsquo;ll beat you. But the SQL standard now supports property graph queries. […] So graph databases, I think a horrible idea. There&rsquo;s no reason why anyone would actually want to use them.</p>
</blockquote>
<p>This was said in the context of graph <em>engines</em> for OLTP. He also says that <strong>plain SQL is the wrong language for traversal</strong>, which he wrote in <a href="https://db.cs.cmu.edu/papers/2024/whatgoesaround-sigmodrec2024.pdf" target="_blank" rel="noopener noreffer">What Goes Around Comes Around… And Around… (SIGMOD Record, 2024)</a> as well:</p>
<blockquote>
<p>&ldquo;RDBMSs are always an option to support graphs. But &lsquo;vanilla&rsquo; SQL is <strong>not expressive enough for graph queries</strong> and thus require multiple client-server roundtrips for traversal operations.&rdquo;</p>
</blockquote>
<h4 id="relations-with-unstructured-knowledge">Relations with Unstructured Knowledge</h4>
<p>In <a href="https://github.com/ModernRelay/omnigraph" target="_blank" rel="noopener noreffer">Omnigraph</a>, we don&rsquo;t build relational data. We are building connections with unstructured knowledge. That&rsquo;s why a graph with its language on top, and columnar tables stored underneath in a file structure<sup id="fnref:3"><a href="#fn:3" class="footnote-ref" role="doc-noteref">3</a></sup>, is very useful for the knowledge use case.</p>
<p>So a &lsquo;graph-based storage format&rsquo;, not a database, helps with context. The graph wins as the <strong>model, schema, and interface for agents</strong>, and not as the storage engine.</p>
<p>Another case is plain old Postgres, which almost shipped <a href="https://thebuild.com/blog/sqlpgq-in-postgresql-19-graph-queries-without-the-graph-database/" target="_blank" rel="noopener noreffer"><code>GRAPH_TABLE</code> (SQL/PGQ) in version 19</a>: committed for the beta, then reverted in September 2026 over readiness concerns, so 19 ships without it and it is now PG20 material. But even once it lands, Postgres is a general-purpose database. It&rsquo;s great if you need to store some graph-like data, but not if the full knowledge graph and agents depend on graphs.</p>
<blockquote>
<p>[!tip] Gartner&rsquo;s forecasted 80% use in data analytics by 2025</p>
<p>The <a href="https://data.world/blog/ai-ready-data-through-governance/" target="_blank" rel="noopener noreffer">prediction by Gartner</a> in 2025 that:<br>
&ldquo;<em>By 2026, graph technologies will be used in 80% of data and analytics innovations, up from 10% in 2021, facilitating rapid decision making across the enterprise.” Even from other attendees, we heard “being built on a knowledge graph early will result in the best catalog approach today. This growth in the awareness and adoption of graph technology is now being seen as a key step to realizing future AI success. We’re excited to see what that brings.</em>&rdquo;</p>
<p>It&rsquo;s hard to say if that came true, but with the focus on graphs, context layers, ontologies, and semantics, it&rsquo;s clear that more people are implementing or looking at graphs, but only time will tell.</p>
</blockquote>
<p>But all of this goes to show that SQL, which I love, use all the time, and will continue to use, also has its limitations, or use cases where other approaches are better. With LLMs&rsquo; more complex and unpredictable needs and non-linear traversal across millions of interconnected data points, processing them in main memory using specialized data structures is essential. That&rsquo;s where <strong>(analytic) graph applications make more sense than traditional storage systems</strong>.</p>
<h4 id="graph--graph-database--bi-chart--nosql">Graph ≠ Graph database ≠ BI chart ≠ NoSQL</h4>
<p>In this article, we talk a lot about graphs and graph databases, but they&rsquo;re not the same thing. A <strong>graph</strong> is a data model: things (nodes) and the relationships between them (edges), where each relationship has a name, a direction, and optionally its own properties. It&rsquo;s a way to describe data, and you can store it anywhere: Markdown files with wikilinks, JSON, Parquet or Lance files, or a plain node table plus an edge table in Postgres.</p>
<p>A <strong>graph database</strong> is an engine built to store and traverse that model natively, like Neo4j with its own storage layout, its own query language (<a href="https://en.wikipedia.org/wiki/Cypher_%28query_language%29" target="_blank" rel="noopener noreffer">Cypher</a>), and pointer-chasing execution.</p>
<blockquote>
<p>[!note] Not every graph is about knowledge<br>
An <a href="https://cube.dev/blog/how-semantic-sql-works" target="_blank" rel="noopener noreffer">E-Graph</a> (equality graph) is a data structure that holds many equivalent versions of an expression at once, so an optimizer can pick the best one. Cube, for example, uses one in its Rust-based <a href="https://cube.dev/blog/how-semantic-sql-works" target="_blank" rel="noopener noreffer">semantic SQL engine</a> to rewrite incoming queries into something its semantic layer can answer. Same nodes and edges, completely different job. So when someone says &ldquo;graph&rdquo;, it&rsquo;s worth asking: a data model, a data structure, or a database?</p>
</blockquote>
<h2 id="how-to-make-graphs-even-more-useful-for-agents-typed-graph--checked-type">How to Make Graphs Even More Useful for Agents: Typed Graph &amp; Checked Type</h2>
<p>Now that we know graphs are good for retrieval and for defining relationships as first-class citizens of the data, there are also some downsides that usually bite data quality. There&rsquo;s not much consistency or structure. Or, as Fritz Laux, who researched the Typed Graph Model (TGM, more about it later), puts it: &ldquo;the flexibility of the graph model contributes to its popularity, but its schema-less implementations are prone to data quality problems.&rdquo; But that&rsquo;s where <strong>typed graphs</strong> and <strong>checked types</strong> come into play.</p>
<h3 id="what-are-typed-graphs">What Are Typed Graphs?</h3>
<p>So what&rsquo;s a typed graph then? It&rsquo;s a term I first heard with Omnigraph when I was building my <a href="https://www.ssp.sh/blog/from-obsidian-to-enterprise-company-brain/" target="_blank" rel="noopener noreffer">company brain for large enterprises</a>, though the term itself goes back to Laux&rsquo;s 2020 paper (more below). In simple terms, it means <strong>adding data types to a graph, similar to data types in relational databases</strong>, increasing consistency and improving the quality of data written by agents. &lsquo;Typed&rsquo; means rules: every node and edge has a declaratively defined shape, written down.</p>
<p>In a normal graph, <strong>relationships are first-class, but schemaless</strong>. Think of the Markdown wiki problem at scale. Laux makes the same point with Neo4j&rsquo;s own &ldquo;specification by example&rdquo;: a user Billy with a 5-star review of a performance. From that one example, you can&rsquo;t tell if Billy may review the same performance twice, or if a review can exist without a user or a performance. This is the connection to today and how we can&rsquo;t force agents to write in a certain way.</p>
<p><strong>Tabular</strong>:</p>
<table>
	<thead>
			<tr>
					<th>user_id</th>
					<th>perf_id</th>
					<th>stars</th>
			</tr>
	</thead>
	<tbody>
			<tr>
					<td>1</td>
					<td>7</td>
					<td>5</td>
			</tr>
	</tbody>
</table>
<p><strong>JSON</strong>:</p>
<div class="highlight"><div class="chroma open"><div class="code-header language-json"><span class="code-title"><i class="arrow svg-icon icon-code-right"></i></span><span class="ellipses"><i class="svg-icon icon-ellipsis"></i></span><span class="copy" title="Copy to clipboard"><i class="svg-icon icon-copy"></i></span></div><div class="table-wrapper">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-json" data-lang="json"><span class="line"><span class="cl"><span class="p">{</span><span class="nt">&#34;user&#34;</span><span class="p">:</span> <span class="s2">&#34;Billy&#34;</span><span class="p">,</span> <span class="nt">&#34;reviews&#34;</span><span class="p">:</span> <span class="p">[{</span><span class="nt">&#34;performance&#34;</span><span class="p">:</span> <span class="s2">&#34;Hamlet&#34;</span><span class="p">,</span> <span class="nt">&#34;stars&#34;</span><span class="p">:</span> <span class="mi">5</span><span class="p">}]}</span></span></span></code></pre></td></tr></table>
</div></div></div>
<p><strong>Graph</strong>:</p>
<div class="mermaid-container">
    <div class="mermaid" id="id-5"></div><button type="button" class="expand-btn" aria-label="Expand diagram" title="Expand diagram" hidden><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true"><path d="M15 3h6v6M9 21H3v-6M21 3l-7 7M3 21l7-7"/></svg></button>
</div><p>Computer scientist Fritz Laux proves in his research on <a href="https://arxiv.org/html/2110.02021" target="_blank" rel="noopener noreffer">The Typed Graph Model (TGM)</a> (2021) that the TGM is strictly stronger than the relational model (and at least as expressive as object-oriented, XML, and RDF schemas, which is why he calls it a <em>supermodel</em>), and he proposes:</p>
<blockquote>
<p>a <strong>schema bound Typed Graph Model</strong> with properties and labels. These enhancements improve not only data quality but also the quality of graph analysis.</p>
</blockquote>
<p>In his example, he makes the graph <em>typed</em> in his own definition with the schema: every node and edge type declares its properties with data types, which node types an edge may connect, a min-max cardinality on each end, and integrity constraints. <strong>Every node and edge in the graph maps to exactly one type</strong>, and &ldquo;data type and <strong>constraint checking is applied for all nodes and edges before any insert, update, or delete action</strong> can be committed.&rdquo;</p>
<p>The same Billy example as Omnigraph <code>schema.pg</code>, the typed version of the untyped brain graph above:</p>
<div class="highlight"><div class="chroma open"><div class="code-header language-graphql"><span class="code-title"><i class="arrow svg-icon icon-code-right"></i></span><span class="ellipses"><i class="svg-icon icon-ellipsis"></i></span><span class="copy" title="Copy to clipboard"><i class="svg-icon icon-copy"></i></span></div><div class="table-wrapper">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt"> 1
</span><span class="lnt"> 2
</span><span class="lnt"> 3
</span><span class="lnt"> 4
</span><span class="lnt"> 5
</span><span class="lnt"> 6
</span><span class="lnt"> 7
</span><span class="lnt"> 8
</span><span class="lnt"> 9
</span><span class="lnt">10
</span><span class="lnt">11
</span><span class="lnt">12
</span><span class="lnt">13
</span><span class="lnt">14
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-graphql" data-lang="graphql"><span class="line"><span class="cl"><span class="py">node</span><span class="w"> </span><span class="py">User</span><span class="w"> </span><span class="p">{</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span><span class="py">name</span><span class="p">:</span><span class="w"> </span><span class="nc">String</span><span class="w"> </span><span class="nd">@key</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="p">}</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="py">node</span><span class="w"> </span><span class="py">Performance</span><span class="w"> </span><span class="p">{</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span><span class="py">title</span><span class="p">:</span><span class="w"> </span><span class="nc">String</span><span class="w"> </span><span class="nd">@key</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span><span class="py">date</span><span class="p">:</span><span class="w"> </span><span class="nc">Date</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="p">}</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="py">edge</span><span class="w"> </span><span class="py">Reviewed</span><span class="p">:</span><span class="w"> </span><span class="nc">User</span><span class="w"> </span><span class="err">-&gt;</span><span class="w"> </span><span class="py">Performance</span><span class="w"> </span><span class="nd">@card</span><span class="p">(</span><span class="py">0</span><span class="err">..</span><span class="p">)</span><span class="w"> </span><span class="p">{</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span><span class="py">stars</span><span class="p">:</span><span class="w"> </span><span class="nc">I32</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span><span class="py">date</span><span class="p">:</span><span class="w"> </span><span class="nc">Date</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span><span class="nd">@unique</span><span class="p">(</span><span class="nd">@src</span><span class="p">,</span><span class="w"> </span><span class="nd">@dst</span><span class="p">)</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="p">}</span></span></span></code></pre></td></tr></table>
</div></div></div>
<p>Four questions the Neo4j example left open are now answered in twelve lines: a review needs a <code>User</code> and a <code>Performance</code> (endpoints), <code>stars</code> is an integer (type)<sup id="fnref:4"><a href="#fn:4" class="footnote-ref" role="doc-noteref">4</a></sup>, Billy can review Hamlet once (<code>@unique</code>), and a user may have zero or many reviews (<code>@card</code>). An agent writing <code>stars: &quot;five&quot;</code> or a second review is refused before the write lands.</p>
<p>That&rsquo;s the write side, which Omnigraph often handles autonomously with agents, as we saw in <a href="https://www.ssp.sh/blog/from-obsidian-to-enterprise-company-brain/" target="_blank" rel="noopener noreffer">Part 1</a>. Laux even left the query side explicitly open: &ldquo;the development of a manipulation and query language for the TGM is future work&rdquo;. That gap is what <strong>checked types</strong> fill.</p>
<blockquote>
<p>[!tip] Types keep coming back<br>
After NoSQL, MongoDB, and other &ldquo;schema-free&rdquo; approaches, DuckDB also introduced <a href="https://duckdb.org/2026/10/16/json-to-typed-columns" target="_blank" rel="noopener noreffer">Typed Columns for JSON</a>, adding types to JSON. The detail: <code>json_transform</code> turns a value it can&rsquo;t convert into <code>NULL</code> by default, and only <code>json_transform_strict</code> raises an error. The default swallows the bad value, while the strict version surfaces it. Working with agents without schemas and enforced types gets messy very quickly, and a typed graph is the strict version on every write.</p>
</blockquote>
<p>Omnigraph defines types as:</p>
<blockquote>
<p>&ldquo;typed property graph&rdquo; and &ldquo;typed ontology&rdquo;, &ldquo;a typed, <strong>versioned graph where your business entities, relationships, and constraints are defined as precisely as code</strong>. The schema compiler validates definitions before data enters the graph&rdquo;.</p>
</blockquote>
<h3 id="what-about-checked-types">What About Checked Types?</h3>
<p>Typed graphs are important for the <strong>write side</strong>: the schema decides what an agent may store. Checked types are for the <strong>query side</strong>: what an agent may <em>ask</em>. For example, SQL itself checks a query only at prepare time against a live catalog<sup id="fnref:5"><a href="#fn:5" class="footnote-ref" role="doc-noteref">5</a></sup>: you need a running database, and a bad query fails at runtime, often deep in an agent loop. A graph like Omnigraph can compile first: <code>.gq → parse → typecheck → IR</code>, <code>omnigraph lint --query q.gq --schema schema.pg</code>, stable <a href="https://www.omnigraph.dev/docs/queries-search/diagnostics" target="_blank" rel="noopener noreffer">error codes</a> (<code>Q</code> parser, <code>T</code> type checker, <code>P</code> planner) with position and one concrete fix, offline, no running DB. A traversal over an edge that doesn&rsquo;t exist or a filter on the wrong type is refused before anything executes.</p>
<div class="highlight"><div class="chroma open"><div class="code-header language-sh"><span class="code-title"><i class="arrow svg-icon icon-code-right"></i></span><span class="ellipses"><i class="svg-icon icon-ellipsis"></i></span><span class="copy" title="Copy to clipboard"><i class="svg-icon icon-copy"></i></span></div><div class="table-wrapper">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span><span class="lnt">2
</span><span class="lnt">3
</span><span class="lnt">4
</span><span class="lnt">5
</span><span class="lnt">6
</span><span class="lnt">7
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl">$ cat q.gq
</span></span><span class="line"><span class="cl">query name <span class="o">{</span> match <span class="o">{</span> <span class="nv">$p</span>: Person <span class="o">}</span> <span class="k">return</span> <span class="o">{</span> <span class="nv">$p</span>.name <span class="o">}</span> <span class="o">}</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">$ omnigraph lint --query q.gq --schema schema.pg
</span></span><span class="line"><span class="cl">error<span class="o">[</span>Q002<span class="o">]</span>: parse error: expected <span class="sb">`</span><span class="o">(</span><span class="sb">`</span>: a query declares its parameters even when it has none
</span></span><span class="line"><span class="cl">  --&gt; line 1, column <span class="m">11</span>
</span></span><span class="line"><span class="cl">  fix: query name<span class="o">()</span></span></span></code></pre></td></tr></table>
</div></div></div>
<p>Same diagnostic over the HTTP API, so an agent can parse it instead of reading prose:</p>
<div class="highlight"><div class="chroma open"><div class="code-header language-json"><span class="code-title"><i class="arrow svg-icon icon-code-right"></i></span><span class="ellipses"><i class="svg-icon icon-ellipsis"></i></span><span class="copy" title="Copy to clipboard"><i class="svg-icon icon-copy"></i></span></div><div class="table-wrapper">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt"> 1
</span><span class="lnt"> 2
</span><span class="lnt"> 3
</span><span class="lnt"> 4
</span><span class="lnt"> 5
</span><span class="lnt"> 6
</span><span class="lnt"> 7
</span><span class="lnt"> 8
</span><span class="lnt"> 9
</span><span class="lnt">10
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-json" data-lang="json"><span class="line"><span class="cl"><span class="p">{</span>
</span></span><span class="line"><span class="cl">  <span class="nt">&#34;error&#34;</span><span class="p">:</span> <span class="s2">&#34;parse error: expected `(`: a query declares its parameters even when it has none&#34;</span><span class="p">,</span>
</span></span><span class="line"><span class="cl">  <span class="nt">&#34;code&#34;</span><span class="p">:</span> <span class="s2">&#34;bad_request&#34;</span><span class="p">,</span>
</span></span><span class="line"><span class="cl">  <span class="nt">&#34;diagnostic&#34;</span><span class="p">:</span> <span class="p">{</span>
</span></span><span class="line"><span class="cl">    <span class="nt">&#34;code&#34;</span><span class="p">:</span> <span class="s2">&#34;Q002&#34;</span><span class="p">,</span>
</span></span><span class="line"><span class="cl">    <span class="nt">&#34;position&#34;</span><span class="p">:</span> <span class="p">{</span> <span class="nt">&#34;line&#34;</span><span class="p">:</span> <span class="mi">1</span><span class="p">,</span> <span class="nt">&#34;column&#34;</span><span class="p">:</span> <span class="mi">11</span><span class="p">,</span> <span class="nt">&#34;byte&#34;</span><span class="p">:</span> <span class="mi">10</span> <span class="p">},</span>
</span></span><span class="line"><span class="cl">    <span class="nt">&#34;expected&#34;</span><span class="p">:</span> <span class="s2">&#34;expected `(`: a query declares its parameters even when it has none&#34;</span><span class="p">,</span>
</span></span><span class="line"><span class="cl">    <span class="nt">&#34;fix&#34;</span><span class="p">:</span> <span class="s2">&#34;query name()&#34;</span>
</span></span><span class="line"><span class="cl">  <span class="p">}</span>
</span></span><span class="line"><span class="cl"><span class="p">}</span></span></span></code></pre></td></tr></table>
</div></div></div>
<p>It&rsquo;s like a linter for agents. It speeds up query checks and quality, and the error is the documentation the agent acts on. A stored graph query becomes a typed and reusable tool: <strong>context as code</strong>. Define the traversal once, type-check it against the schema, version it with it, and the next agent reuses it instead of working it out again.</p>
<p>It has one plan and can traverse first, then run <code>nearest</code> only over reached nodes, including <code>rrf(nearest, bm25)</code>. In the Shakespeare vs. Lion King example, the walk keeps only Shakespeare&rsquo;s 37 plays, then ranks them by &ldquo;a prince avenges his father&rsquo;s murder&rdquo;: Hamlet. Vector search alone over the whole graph puts The Lion King right next to it, same plot, wrong author. No app-side join between graph and vector store needed.</p>
<p>This converges with others, such as the previously mentioned Morel (static types, unit tests), Jev with typed outputs, or <a href="https://lobu.ai/blog/self-improving-agents-are-event-sourced/" target="_blank" rel="noopener noreffer">Lobu</a>, where every agent output goes back into the same graph as an event or entity change. Different layers, same move: check output against a type instead of trusting it.</p>
<blockquote>
<p>[!note] What about GraphQL?<br>
You might remember <a href="https://graphql.org/" target="_blank" rel="noopener noreffer">GraphQL</a>, a query language to query such graphs that was quite popular in the Web 2.0 era when Facebook went fully mobile, so desktop and mobile had the same API to pull from. See also <a href="https://www.ssp.sh/blog/analytics-api-with-graphql-the-next-level-of-data-engineering/" target="_blank" rel="noopener noreffer">Building an Analytics API with GraphQL</a> to get a feel for 2022, when GraphQL brushed data engineering. It looks like a typed graph, and it does validate every query against its schema before execution, with the <a href="https://graphql.org/learn/schema/" target="_blank" rel="noopener noreffer">SDL (Schema Definition Language)</a> file usually in git. But that schema types the API response shape over whatever store sits behind it. A mutation is a typed function signature. What the resolver writes, and whether the stored relationships still match the SDL, nobody checks.</p>
</blockquote>
<h2 id="what-a-typed-graph-allows-first-class-agentic-engineering">What a Typed Graph Allows: First-Class Agentic Engineering</h2>
<p>It is essentially a declarative way of expressing knowledge with <strong>Graph as Code</strong>.</p>
<p>Compared to vector-only Retrieval-Augmented Generation (RAG), the difference isn&rsquo;t the search: Omnigraph has the same <code>nearest</code>, <code>bm25</code>, and <code>rrf</code> as any vector store. The difference is that similar is not related. The top-k neighbors are close in embedding space, but nothing says how they relate to the question or to each other, so the agent has to work that out again on every call. In a typed graph, the edge type names the relationship, and the query that walks it is checked, versioned code: declarative retrieval instead of ad-hoc. <strong>Graph as code puts schema and queries in one definition that fits in context; assembling context is a traversal problem</strong>.</p>
<p>With ever-growing data, we need a more rigid way to work with &lsquo;context&rsquo; to <strong>read, reuse, and change</strong>. Declaring schema, checked queries, and policies, all checked in and versioned in git and branches: this is what Omnigraph with a typed graph can deliver.</p>
<p>The <a href="https://modernrelay.com/manifesto" target="_blank" rel="noopener noreffer">Knowledge-Coordination Manifesto</a> by Omnigraph says: &ldquo;the schema is the price system for agents. <strong>It compresses domain knowledge into a structure every agent can read, trust, and act on</strong>. When the ontology is clear, agents make locally correct decisions. When it&rsquo;s unclear, they produce chaos&rdquo;.</p>
<p>Coordination through shared typed state avoids the need for an orchestrator, with just declarative definitions of business knowledge (context).</p>
<blockquote>
<p>[!note] Typed Graphs are not new per se</p>
<p>Coming from the Semantic Web angle:</p>
<ul>
<li>Resource Description Framework (RDF) Schema / OWL / SHACL: typed and constrained graphs since the 2000s.</li>
<li>ISO GQL (ISO/IEC 39075:2024): includes graph types.</li>
<li>PG-Schema (Angles et al., SIGMOD 2023), a schema language for property graphs.</li>
<li>Laux&rsquo;s Typed Graph Model (see above).</li>
</ul>
<p>But what is new: the schema as a code file in git, queries checked offline against it, more stable machine-readable errors for agents, and branch-per-agent writes into one system. <strong>You could say, typed graphs finally get the developer workflow typed code already has</strong>.</p>
</blockquote>
<h2 id="so-how-can-the-typed-graph-help-with-data-quality">So How Can the Typed Graph Help with Data Quality?</h2>
<p>Coming back to the initial question of how typed graphs and checked types help data quality. Types are the cheapest and safest data quality check there is: they can&rsquo;t be forgotten, they can&rsquo;t be skipped, and they keep up with the writing speed of agents because every write is checked the moment it happens. Nobody has to review each write anymore. The type checker is the reviewer.</p>
<p>But there are two kinds of quality, and it helps to keep them apart. Data can be <strong>valid</strong>: right shape, right type, right place, right relationship. Types and checked queries solve this completely. And data can be <strong>true</strong>: the confirmed business number, the golden dataset, the end-to-end test from the intro. Types can&rsquo;t help here. No schema knows whether revenue was really 4.2 million.</p>
<p>That&rsquo;s what branches are for. An agent writes on its own branch, the result is diffed, reviewed, and merged into <code>main</code> or thrown away. The merge itself is type-checked again (schema validation runs on mutations, loads <em>and</em> merges), so a branch can&rsquo;t smuggle invalid data into main either. Policies as code close the loop: <code>protected_branches: [main]</code> and Cedar on every write decide who may change what, in the same files as the schema.</p>
<div class="mermaid-container">
    <div class="mermaid" id="id-6"></div><button type="button" class="expand-btn" aria-label="Expand diagram" title="Expand diagram" hidden><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true"><path d="M15 3h6v6M9 21H3v-6M21 3l-7 7M3 21l7-7"/></svg></button>
</div><p>Types answer <em>valid</em> at every arrow on the left. Only the human in the middle answers <em>true</em>.</p>
<p>The ModernRelay <a href="https://modernrelay.com/manifesto" target="_blank" rel="noopener noreffer">manifesto</a> puts the same split in two words: humans <strong>define</strong> (what matters, what the schema is, what the rules are), agents <strong>execute</strong> (gather, structure, update, enrich). Types guard the executing side. Humans keep the defining side, and that&rsquo;s where &ldquo;true&rdquo; lives.</p>
<p>It&rsquo;s <strong>schema-on-write for knowledge</strong>, after a decade of schema-on-read data lakes. And yes, branching alone isn&rsquo;t new (Neon and Dolt do it for SQL), but the combination of schema, queries, and policy living next to each other, as code, is a welcome improvement.</p>
<h3 id="graph-as-code-context-as-code">Graph as Code: Context as Code</h3>
<p>All of it concludes with: schema (<code>.pg</code>), queries (<code>.gq</code>), policies (<code>.yaml</code>): three files in git, one diff, reviewed like any other pull request. The same reason code-first BI still beats <a href="https://www.ssp.sh/brain/claude-dashboards/" target="_blank" rel="noopener noreffer">Claude Dashboards</a> applies here: you own the artifacts, you can version them, test them, and collaborate on them, human and agent alike. The team at <a href="https://modernrelay.com/blog/graph-as-code" target="_blank" rel="noopener noreffer">ModernRelay counts six things</a> that go declarative (schema, context, writes, policy, UI, deployment). This article covered the first four. The other two come out of the box: the UI is derived from schema and queries, and the whole graph is recreated anywhere with one <code>apply</code>.</p>
<p>So, how do we build and verify reliably, now that agents write faster than we can read? Build on a typed graph, and everything written is valid. Query with checked types, and every question is valid too. This allows agents to work on branches, so mistakes are cheap, and lets humans or domain experts chime in when changes are needed, because in the end, someone still has to decide what&rsquo;s true. That part hasn&rsquo;t changed since the days we called the business for the confirmed number, but it&rsquo;s now a lot easier to get there.</p>
<hr>
<p>If you want to catch up with the latest features, Omnigraph shipped a few in <a href="https://github.com/ModernRelay/omnigraph/releases/tag/v0.14.0" target="_blank" rel="noopener noreffer">v0.14.0</a> and the <a href="https://github.com/ModernRelay/omnigraph/releases" target="_blank" rel="noopener noreffer">edge builds</a> since that fit this article directly: <a href="https://www.omnigraph.dev/docs/branching/changes" target="_blank" rel="noopener noreffer">branch review</a> and <a href="https://www.omnigraph.dev/docs/branching/merge" target="_blank" rel="noopener noreffer">merge dry-runs</a> to inspect what an agent changed before it lands, <a href="https://www.omnigraph.dev/docs/branching" target="_blank" rel="noopener noreffer">unpublished commits</a> that stage a mutation until a human publishes or drops it, <a href="https://www.omnigraph.dev/docs/schema" target="_blank" rel="noopener noreffer"><code>@card</code> cardinality</a> enforced on every write, an <a href="https://www.omnigraph.dev/docs/queries-search/catalogue" target="_blank" rel="noopener noreffer">engine catalogue</a> you query with the same typed GQ, an exportable <a href="https://www.omnigraph.dev/docs/cli" target="_blank" rel="noopener noreffer">agent skill</a> built into the binary, and <a href="https://www.omnigraph.dev/docs/operations/mcp" target="_blank" rel="noopener noreffer">MCP tools</a> listed only under the policy an agent holds.</p>
<pre class=""><em>Made possible by <a href="https://modernrelay.com" target="_blank" rel="noopener noreferrer">ModernRelay</a>, the team behind Omnigraph</em></pre>
<div class="footnotes" role="doc-endnotes">
<hr>
<ol>
<li id="fn:1">
<p>But what if none exists, or if there&rsquo;s not enough time to ask anyone and we just need to deliver? We could run it once in test with production data, or even run it in production without surfacing it yet, and use that going forward. You can also sample a larger test dataset whose outcome you know. But yeah, these are hard to create and usually don&rsquo;t contain all edge cases. Still, it&rsquo;s a great way for CI/CD, fast iteration, and autonomous agent TDD.&#160;<a href="#fnref:1" class="footnote-backref" role="doc-backlink">&#x21a9;&#xfe0e;</a></p>
</li>
<li id="fn:2">
<p>For illustration, we use only these three. It&rsquo;s a simplified view: nested trees are more than JSON and XML, and there are other shapes too, such as arrays/tensors, time series and event streams, unstructured data, key-value, and geospatial.&#160;<a href="#fnref:2" class="footnote-backref" role="doc-backlink">&#x21a9;&#xfe0e;</a></p>
</li>
<li id="fn:3">
<p>e.g., columnar Lance tables with git branches, Arrow, and DataFusion, plus a dedicated in-memory CSR/CSC index per edge type&#160;<a href="#fnref:3" class="footnote-backref" role="doc-backlink">&#x21a9;&#xfe0e;</a></p>
</li>
<li id="fn:4">
<p>Laux&rsquo;s model also bounds it to 1..5. Omnigraph has that check as well: <code>@range(age, 0..150)</code> on a node property is one line, enforced on every write. <code>@range</code> and <code>@check</code> are <a href="https://www.omnigraph.dev/docs/schema#constraints" target="_blank" rel="noopener noreffer">node constraints</a>, <code>@card</code> is an edge constraint, and <code>@key</code>, <code>@unique</code>, and <code>@index</code> work on both. For an edge property like <code>stars</code>, the type check does the work in this example.&#160;<a href="#fnref:4" class="footnote-backref" role="doc-backlink">&#x21a9;&#xfe0e;</a></p>
</li>
<li id="fn:5">
<p>Static checks for SQL exist, but as tools around the language rather than part of it, and most stop at syntax. Parsers like <a href="https://github.com/apache/datafusion-sqlparser-rs" target="_blank" rel="noopener noreffer">sqlparser-rs</a>, <a href="https://github.com/pganalyze/pg_query" target="_blank" rel="noopener noreffer">pg_query</a>, or <a href="https://github.com/JSQLParser/JSqlParser" target="_blank" rel="noopener noreffer">JSQLParser</a> catch a missing comma offline, but not a column that doesn&rsquo;t exist or a string compared to a number. That needs a catalog: <a href="https://calcite.apache.org/" target="_blank" rel="noopener noreffer">Apache Calcite</a> and <a href="https://github.com/google/zetasql" target="_blank" rel="noopener noreffer">ZetaSQL</a> validate against one you supply, <a href="https://github.com/tobymao/sqlglot" target="_blank" rel="noopener noreffer">sqlglot</a> against a schema you hand it, <a href="https://sqlc.dev/" target="_blank" rel="noopener noreffer">sqlc</a> against your DDL, and <a href="https://github.com/launchbadge/sqlx" target="_blank" rel="noopener noreffer">SQLx</a> in offline mode against cached query metadata.&#160;<a href="#fnref:5" class="footnote-backref" role="doc-backlink">&#x21a9;&#xfe0e;</a></p>
</li>
</ol>
</div>
]]></description>
</item>
<item>
    <title>As Humans Write Less Code: Workloads Shift from Human to Agent Verification with Iterative Test Suites</title>
    <link>https://www.ssp.sh/blog/humans-write-less-code/</link>
    <pubDate>Tue, 03 Nov 2026 09:40:08 &#43;0200</pubDate>
    <author>Simon Späti</author>
    <guid>https://www.ssp.sh/blog/humans-write-less-code/</guid><enclosure url="https://www.ssp.sh/blog/humans-write-less-code/featured-image.jpg" type="image/jpeg" length="0" /><description><![CDATA[<p>Analysts, analytics engineers, and even business users are writing less SQL and Python by hand. They prompt an agent instead, and with the right context (data models, docs, a data catalog), the agent writes a decent query. Think of a BI tool shifting left and democratizing new context from data models and sources. This helps the agents better understand the business problem and write a more accurate SQL query.</p>
<p>With more advanced tooling that automatically reviews or generates queries iteratively, the agents&rsquo; output gets higher in quality every time. The models get better, and we can add additional documentation from internal Confluence pages or data catalogs, and it will get even better.</p>
<p>When using Generative AI for BI tools, we need better ways to verify the underlying foundation for a dashboard. But how? What we need next are linters and a compiler-like style that AI-lints everything before running, and then integrated test suites that get better and better. Basically, back to Test-Driven Development: prompting the tests first, so we assert<sup id="fnref:1"><a href="#fn:1" class="footnote-ref" role="doc-noteref">1</a></sup> what we want to build.</p>
<p>As models get better, iterative test suites get better too, and with it, we get better verification. But still, <strong>in verification lies the liability today with agentic engineering work</strong>, and that&rsquo;s what we talk about in this article: helping data analysts and domain experts develop more meaningful data work for the organization.</p>
<p>We need to move all logic into one place, to go from a stack of components to one optimized for human ergonomics. We need new ways to make this human-friendly, a new architecture even, a unified lineage tree. This article explores current challenges in BI from first principles, analyses what has worked so far, what no longer does, and how we could improve the architecture to better prevent errors.</p>
<blockquote>
<p>[!note] People already feel this in a recent Survey<br>
In a Metabase survey run during its AI analytics week (<a href="https://www.metabase.com/ai-readiness-hub" target="_blank" rel="noopener noreffer">AI readiness quiz</a>), 74% of teams were building with AI, and only 2% were scaling it. The bottleneck has moved from creating analysis to checking it. Take the quiz today to find out where your team stands.</p>
</blockquote>
<h2 id="verification-with-agents-through-test-suites-and-human-intuition">Verification with Agents through Test Suites, and Human Intuition?</h2>
<p>So the first question is, what do we need to verify? What&rsquo;s an iterative test suite?</p>
<p>If it comes down to verifying metrics and KPIs, it&rsquo;s <strong>all math</strong>. The retention KPI is built in code, defined in SQL. It&rsquo;s math. Agents will eventually generate the right test suite to verify the retention KPI, based on 1000s of test cases, <a href="https://www.linkedin.com/in/salsakran" target="_blank" rel="noopener noreffer">Sameer Al-Sakran</a>, CEO of Metabase, said. It&rsquo;s a standard equation: with <a href="https://www.anthropic.com/engineering/demystifying-evals-for-ai-agents" target="_blank" rel="noopener noreffer">evals</a> run by a harness (the new Zeitgeist), agents can figure out edge cases.</p>
<p>But then again, you also need <strong>human verification</strong>. Sameer said:</p>
<blockquote>
<p>Business people are the best data contracts, they know when something doesn&rsquo;t make sense, they know the numbers. Plus they feel it in their subconscious.</p>
</blockquote>
<p>It&rsquo;s an intuition they gained with years of experience, knowing what the numbers should be in what case. So the test suite can be initiated at the beginning, iterated and improved, but the human adds their intuition to the mix.</p>
<p>Frameworks like <a href="https://github.com/obra/superpowers" target="_blank" rel="noopener noreffer">Superpowers</a> ask and question the human along the way, and <a href="https://github.com/dietrichgebert/ponytail" target="_blank" rel="noopener noreffer">Ponytail</a> pushes the agent to write less code in the first place.</p>
<h3 id="five-hierarchy-levels-for-testing-system-wide-quality">Five Hierarchy Levels for Testing System-wide Quality</h3>
<p>For testing across the data stack, we need system-wide tests, and tests that run on different levels. Below are five different hierarchies for better quality testing:</p>
<ul>
<li><strong>Linting</strong>: Statically analyses our development code and our aggregations without running them, and gives real-time diagnostics of our metrics and configs with type checks and contract conformance.</li>
<li><strong>Compiler</strong>: A whole-tree check that resolves and type-checks the full lineage tree before deploying and running on an environment, refusing to build what doesn&rsquo;t fit together.</li>
<li><strong>Unit Test</strong>: Tests small functions and components of the full system, each time we change something. Value assertions and calibration thresholds against known inputs live here.</li>
<li><strong>Integration Tests</strong>: Similar to unit tests, but we test multiple parts of the system, modules or components as a group to verify interactions.</li>
<li><strong>End-to-End Tests</strong>: Run the compiled system with dedicated seeds of data sets and check the outputs end-to-end.</li>
</ul>













  

























<figure><span class="img-expandable" data-full="/blog/humans-write-less-code/five-hierarchy-of-testing.png">
<a target="_blank" href="/blog/humans-write-less-code/five-hierarchy-of-testing.png" title="All five hierarchies in one repo and where changes apply with one commit">

</a><button type="button" class="expand-btn" aria-label="Expand image" title="Expand image" hidden><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true"><path d="M15 3h6v6M9 21H3v-6M21 3l-7 7M3 21l7-7"/></svg></button>
</span><figcaption class="image-caption">All five hierarchies in one repo and where changes apply with one commit</figcaption>
</figure>
<p>If we add them all together, we could have thorough and well-tested KPIs for business analytics and the data stack, from start to end, with the power of the latest agentic engineering, but also a <strong>touch of human intervention and intuition</strong>.</p>
<blockquote>
<p>[!info] Single Test Score to represent data quality?</p>
<p>The ultimate goal would be to have a single test score that gives you an indication of how good data quality, ETL, the aggregations and dashboards are, but that&rsquo;s really hard to do. Again, this is where the test suite makes more sense. Also, agents are better at testing narrow fields in a broad test suite.</p>
</blockquote>
<h2 id="the-solution-moving-all-logic-into-one-place">The Solution: Moving All Logic into One Place?</h2>
<p>One git repository, one mono repository, one commit hash, one change across all metrics, dashboards and ETL load. Quite similar to what I was writing about a while back, the &ldquo;<a href="https://www.ssp.sh/blog/rise-of-declarative-data-stack/" target="_blank" rel="noopener noreffer">Declarative Data Stack</a>&rdquo;, expressing the full data stack as a single function.</p>
<p>It&rsquo;s precise, and a declarative config such as a function, e.g. <code>run_stack(serve(transform(ingest)))</code>, can recreate the entire data stack.</p>
<p>For our purpose, we want to have better verification, which helps with that too. The logic (metrics, dashboard, ETL) is stored in a standardized way, agents can create test suites on top of it, and we can iterate fast. We <strong>can&rsquo;t verify logic in four different databases and git repos</strong>. Bringing it together into one declarative place will avoid this.</p>
<p>In the end, metric definitions, segments, transformation, aggregation, all of it results in a dashboard. We go from source to visualization. It&rsquo;s a full-stack data engineering platform, from transformation, semantic layer, actual computation to dashboard and data app.</p>
<h3 id="different-serialization-formats">Different Serialization Formats</h3>
<p>Besides having the code and configuration in one place, having different formats or syntax is okay these days. dbt models are Jinja-templated SQL in each warehouse&rsquo;s dialect, Metabase has native SQL and its own query language (<a href="https://www.metabase.com/learn/metabase-basics/administration/administration-and-operation/metabase-api#running-custom-queries" target="_blank" rel="noopener noreffer">MBQL</a>), and Looker has LookML. Translating between them can increasingly be done by an agent, and verified with a compiler or inspection tools.</p>
<p>That means we have less lock-in to proprietary syntax than before, though formats like LookML and MBQL are still proprietary.</p>
<h3 id="stacking-of-components-to-optimize-for-human-ergonomics">Stacking of Components to Optimize for Human Ergonomics</h3>
<p>We need a system that focuses on human productivity by fitting into our workflow like macros in dbt or LookML functions. In programming, we also started with Assembly, then moved up to higher-level languages like FORTRAN and C, then to object-oriented languages like Smalltalk, and now we have all the programming languages. Now we have evolved even further, so we can just instruct in natural language.</p>
<p>We went <strong>up the stack, it&rsquo;s a different optimization level</strong> when we don&rsquo;t need to write Assembly anymore. Sure, sometimes it&rsquo;s still beneficial to write in Assembly, if you need to have full control over everything, making it super performant, but sometimes we also just need a setup that helps us get the job done. For BI developers, that&rsquo;s a reliable system that supports us with agentic work whenever possible, but still with the human ergonomics and productivity in mind—e.g. producing more is not better, but higher quality and correct metrics are.</p>
<p>We want the <strong>ability to verify</strong>. Some companies have rewritten their core as notebooks were unusable: state was not clearly managed, variables ran out of order or were reassigned, and it was hard to understand which code block created which datasets. That is where, in a BI tool, the connection between a metric and the compute engine becomes essential: the better integrated, the less drift we have from definition to data sets.</p>
<p>This idea is older than BI. Donald Knuth&rsquo;s <a href="https://en.wikipedia.org/wiki/Literate_programming" target="_blank" rel="noopener noreffer">Literate Programming</a> (1984) treats the computer program more like an essay explaining the <em>reasoning</em>, with the code as illustration. One tool produces the <em>tangled</em> version the machine runs, and another produces the <em>woven</em> version the human reads. <strong>Meaning and implementation can&rsquo;t drift apart, because they&rsquo;re the same document</strong>.</p>
<p>Apply that to a metric (and its contracts), and you get what this article is about, with humans writing less code: a definition that says what a metric means, and the code that computes it, kept in one place and checked against each other.</p>
<blockquote>
<p>[!note] The P versus NP problem, in reverse<br>
The <strong><a href="https://en.wikipedia.org/wiki/P_versus_NP_problem" target="_blank" rel="noopener noreffer">P versus NP problem</a></strong> is a major <a href="https://en.wikipedia.org/wiki/List_of_unsolved_problems_in_computer_science" title="List of unsolved problems in computer science" target="_blank" rel="noopener noreffer">unsolved problem</a> in <a href="https://en.wikipedia.org/wiki/Theoretical_computer_science" title="Theoretical computer science" target="_blank" rel="noopener noreffer">theoretical computer science</a>. Informally, it asks whether every problem whose solution can be quickly verified can also be quickly solved. For NP problems, checking is the easy part and finding the answer may be hard. Agentic BI has the reverse asymmetry: an agent can produce a metric or dashboard cheaply, but checking that it&rsquo;s correct is the hard, expensive part, which is why we invest so much in the verification layer.</p>
</blockquote>
<h2 id="a-unified-hierarchical-lineage-dag">A Unified, Hierarchical Lineage DAG</h2>
<p>For bringing the test suite into an integrated place, I was tinkering with the idea of creating a unified computational graph that represents the full state from ingestion to dashboard.</p>
<p>When I discussed this with Sameer, he pointed out that it has no cycles and is <strong>hierarchical</strong>: a DAG that goes down level by level into its sub-DAGs. It isn&rsquo;t a strict tree, since any join gives a model more than one parent, but it reads top-down like one. That&rsquo;s what I mean by &ldquo;lineage tree&rdquo;, or &ldquo;hierarchical lineage DAG&rdquo;, in this article:</p>













  

























<figure><span class="img-expandable" data-full="/blog/humans-write-less-code/unified-lineage-tree.png">
<a target="_blank" href="/blog/humans-write-less-code/unified-lineage-tree.png" title="A hierarchical DAG of sub-DAGs with no cycles. Every node is parsed to its AST and linted at every layer.">

</a><button type="button" class="expand-btn" aria-label="Expand image" title="Expand image" hidden><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true"><path d="M15 3h6v6M9 21H3v-6M21 3l-7 7M3 21l7-7"/></svg></button>
</span><figcaption class="image-caption">A hierarchical DAG of sub-DAGs with no cycles. Every node is parsed to its AST and linted at every layer.</figcaption>
</figure>
<p>For the linting part, we can use something called an <a href="https://www.tobikodata.com/blog/ast-journey" target="_blank" rel="noopener noreffer">Abstract Syntax Tree (AST)</a>. It&rsquo;s a data structure that <strong>represents the structure of a program or code snippet</strong>. It is a <strong>tree representation</strong> of the abstract syntactic structure of text written in a formal language. There&rsquo;s also a SQL AST specifically, and tools like SQLMesh and most parsers in BI tools make heavy use of them. E.g. the <a href="https://www.tobikodata.com/blog/virtual-data-environments" target="_blank" rel="noopener noreffer">Virtual Data Environments</a> feature, which detects modifications and automatically categorizes the impact of breaking or non-breaking changes, is <a href="https://www.tobikodata.com/blog/virtual-data-environments" target="_blank" rel="noopener noreffer">heavily reliant on ASTs</a>:</p>
<blockquote>
<p>This is possible due to the platform’s ability to understand SQL semantically, at the AST level. By comparing the current model version with the previous one we’re able to compute a <a href="https://github.com/tobymao/sqlglot/blob/main/posts/sql_diff.md" target="_blank" rel="noopener noreffer">semantic diff</a>, which SQLMesh further analyzes to understand the impacts it would have on downstream models.</p>
</blockquote>
<p>So with such techniques, and advanced knowledge about the configuration of the full system, adding SQL transpilation and LSP (Language Server Protocol) linters to the mix, we have a pretty strong lineage tree that can help us make verification up-to-date for the new AI age, and allow faster iterations.</p>
<blockquote>
<p>[!note] The Modern Data Graph?<br>
Stephen Bailey, in <a href="https://stkbailey.substack.com/p/the-modern-data-graph?r=a3d32" target="_blank" rel="noopener noreffer">The Modern Data Graph</a>, reframes a16z&rsquo;s &ldquo;<a href="https://a16z.com/emerging-architectures-for-modern-data-infrastructure/" target="_blank" rel="noopener noreffer">unified data infrastructure</a>&rdquo; from a stack into a graph:<br>
While there is an overall left-to-right flow from data sources to output systems, there is a hub of interchange around the warehouse and storage. You could get rid of almost all other nodes and still have a platform that sustains the workloads (<a href="/blog/humans-write-less-code/from-stack-to-graph.png" rel="">see his illustration</a>).</p>
<p>Its role is <strong>&ldquo;transferring knowledge so humans can use it&rdquo;</strong>: the data graph supports the system graph, which supports the human graph. His distinction between <strong>systems that operate within the graph</strong> (defined edges, inside boxes) and <strong>those that work on it</strong> (unboxed) maps neatly onto the two things we need to verify: the <strong>state</strong> at rest in the warehouse hub, and the <strong>declarations</strong>, the edges of transformations, metrics, and joins that produce it.</p>
</blockquote>
<h3 id="state-is-the-enemy-except-known-test-data">State is the Enemy, Except Known Test Data</h3>
<p>One element of the equation we can&rsquo;t leave out is the <strong>state of a system</strong>, and even more the state itself, the customers or our data.</p>
<p>For the system state, Sameer says:</p>
<blockquote>
<p>State is the enemy: the more mutable state there is in a system, the less you trust the output.</p>
</blockquote>
<p>The problem is <em>mutable</em> state. Planning should happen against fixed, known state: a test data set, a seed of data where you know the expected outcome. Without that fixed reference, verification is just guessing. This is the idea behind Transform tests in Metabase (upcoming in v65): known input rows, expected output, and a rollback after each run.</p>
<p>Usually, state is especially relevant when we deploy the system&rsquo;s data stack, e.g. visible in DevOps approaches with Kubernetes, where we need to deploy to different environments (dev, test, prod) and conserve state and relevant data for our data stack if we upgrade software or configurations.</p>
<h2 id="shift-assertions-left-catching-drift-at-build-time">Shift Assertions Left: Catching Drift at Build Time</h2>
<p>The last question is, <strong>when do we actually do the verification</strong>? During development, like a compiler that checks at the end of the development cycle, once we have defined metrics, and blocks and refuses to run anything?</p>
<p>Or better, like a linter that constantly shows us warnings and errors while we develop? Both are possible, depending on how rigid we want it to be.</p>
<p>Timing-wise, as early as possible is best. <strong>During development</strong>, before production, as verification <strong>during runtime</strong> is already well covered by orchestrators and integrated data quality tools. Again, the more we shift left, the better.</p>
<h3 id="catch-the-drift-good-data">Catch the Drift: Good Data</h3>
<p>But how do we know if measures and KPIs are verified, or tested well? What&rsquo;s important is a good data set and test suite that improves the data quality, the tests, and also the business quality. We need to measure the &ldquo;Goodness of data&rdquo;.</p>
<p>With an all-encompassing <strong>hierarchical lineage DAG</strong> that knows the business logic better than existing BI tools, we can use the declarative metrics, unit test them so they declare an outcome, build a compiler that does built-in assertions, and develop <strong>assertion programming</strong>. Today, most data checks — dbt data tests, Airflow checks, Snowflake data metric functions — run <em>after</em> the data is computed; they&rsquo;re runtime checks. dbt has started moving left: since v1.8, <a href="https://docs.getdbt.com/docs/dbt-versions/core-upgrade/upgrading-to-v1.8" target="_blank" rel="noopener noreffer">unit tests</a> check model logic on static inputs before materialization, and model contracts are enforced at build time. We need to take that further and <strong>shift assertions left</strong> across the whole stack, surfaced by a linter while the metric is being written, and enforced at build time before the pipeline runs.</p>
<p><strong>Avoid a definition drifting from its original definition</strong> by unit testing configuration against a large test suite and human intuition. Most BI drift today comes from the opposite arrangement: the dashboard built ad-hoc once with manual tests, and not touched after—drifting away.</p>
<p>The outcome is a <strong>system of components</strong> optimized for tests and good data quality, allowing fast iteration with <strong>high confidence and control</strong>.</p>
<h4 id="inspect-element-but-for-a-dashboard-number-devtool-for-data">Inspect Element, but for a Dashboard Number (DevTool for Data)</h4>
<p>Think of it like the <strong>Developer Tools in Chrome</strong>: one pane, full context, everything traceable from the rendered element back through the DOM, styles and network requests. That&rsquo;s what we&rsquo;re missing for data. A single interface where you can follow a number on a dashboard all the way back through metrics, semantic layer, transformations, and raw source—without switching tools or asking five people in the first place.</p>
<blockquote>
<p>[!tip] Slow down</p>
<p>Mario Zechner, creator of <a href="https://pi.dev/" target="_blank" rel="noopener noreffer">Pi</a>, calls for building &ldquo;modular&rdquo; systems in <a href="https://youtu.be/RjfbvDXpFls?si=OJIx4G25IgiAAbnB&amp;t=993" target="_blank" rel="noopener noreffer">Building pi in a World of Slop</a>. He also says: slow down, learn to say no.</p>
</blockquote>
<h2 id="whats-next-and-where-are-bi-and-human-written-code-heading">What&rsquo;s Next: And Where Are BI and Human-Written Code Heading</h2>
<p>We covered a lot: why verification is the new liability in an agentic BI stack, why we need test suites at five hierarchy levels (linting, compiler, unit, integration, end-to-end), why moving all logic into one declarative place helps with verification compared to having spread-out components, and why a unified hierarchical lineage DAG, built on ASTs, semantic diffs, and LSP-style linters, solves part of the linting and verification. We also looked at why state is the enemy of trust, and why assertions need to shift left from runtime checks to build-time guarantees.</p>
<p>But there are still open questions. How do we run tests deterministically and reliably? How do we write a &ldquo;verification rule engine&rdquo;? How do we actually create the unified hierarchical lineage DAG, compute the full hierarchy before runtime, and potentially compile it into a binary that runs fast, even on the web? And do LLMs help us with verifying?</p>
<p>This is where the thinking behind <a href="https://www.metabase.com/product/data-studio" target="_blank" rel="noopener noreffer">Data Studio</a> in Metabase is heading. Transforms, metrics and dashboards live in one place. Dependency tracking shows what depends on what, so you can see what a change will break before you ship it. Remote sync lets you version all of it in Git. It isn&rsquo;t yet the full linter for data described here, but it&rsquo;s the foundation with all the logic in one place, with a lineage dependency graph, transformations and reusable metrics.</p>
<hr>
<pre class=""><em>Full article published at <a href="https://www.metabase.com/blog/from-human-to-agent-verification" target="_blank" rel="noopener noreferrer">Metabase.com</a> - written as part of <a href="/services/">my services</a></em></pre>
<div class="footnotes" role="doc-endnotes">
<hr>
<ol>
<li id="fn:1">
<p>some call it an eval function or <em>harness</em>&#160;<a href="#fnref:1" class="footnote-backref" role="doc-backlink">&#x21a9;&#xfe0e;</a></p>
</li>
</ol>
</div>
]]></description>
</item>
<item>
    <title>Data Engineering Is the Cache Invalidation Problem Ft. Josh Wills</title>
    <link>https://www.ssp.sh/blog/cache-invalidation-problem-data-engineering/</link>
    <pubDate>Thu, 15 Oct 2026 06:40:08 &#43;0200</pubDate>
    <author>Simon Späti</author>
    <guid>https://www.ssp.sh/blog/cache-invalidation-problem-data-engineering/</guid><enclosure url="https://www.ssp.sh/blog/cache-invalidation-problem-data-engineering/featured-image.png" type="image/png" length="0" /><description><![CDATA[<p>In this episode, we dive into how much models actually matter: more like a preference, like whether you use an iPhone or Android, than their capabilities. We talk about bare-metal disks when running Kubernetes, then move to agents and how data engineering becomes like being an emergency pilot in a plane, and how we automate away the boring work with no more database migrations or unit tests.</p>
<p>We go into spiritual territory, where he feels in his gut whether a pipeline will work. Then we finish with where every data engineer or software engineer eventually wants to end up, as the field is evolving so fast: on a farm with beautiful flowers and no screen. This is interview #5. I hope you enjoy it.</p>
<p>This article is structured into four parts: <strong>(1)</strong> how Kubernetes and disk abstractions are key for his work, <strong>(2)</strong> how he works with the models and agents, and how much the model actually matters, <strong>(3)</strong> what tooling he uses and how agents ease his life at work, and <strong>(4)</strong> whether data engineering is automated away with agents.</p>
<h2 id="introducing-the-guest-5-josh-wills">Introducing the Guest: #5 Josh Wills</h2>
<p><a href="https://x.com/josh_wills" target="_blank" rel="noopener noreffer">Josh Wills</a> is a software and data engineer with 25 years of experience. At Google, he worked on the ad auction system and led the analytics infrastructure behind Google+. As head of data science at Cloudera, he founded the Apache Crunch project and co-authored O&rsquo;Reilly&rsquo;s <a href="https://www.oreilly.com/library/view/advanced-analytics-with/9781491912751/" target="_blank" rel="noopener noreffer">Advanced Analytics with Spark</a>, and he went on to build and lead Slack&rsquo;s data engineering team. He&rsquo;s also the original creator of the <a href="https://github.com/duckdb/dbt-duckdb" target="_blank" rel="noopener noreffer">dbt-duckdb adapter</a>.</p>
<p>Since 2024, Josh has been a Member of Technical Staff at DatologyAI, which helps teams train better models, faster and smaller. There he builds tools that automatically select the best data for training deep learning models, along with the distributed pipelines that process it at trillion-token pretraining scale. We go into more detail on what it takes to work with datasets that gigantic.</p>
<blockquote>
<p>[!tip] Fun Fact<br>
He basically retired in 2022, and &ldquo;the AI stuff got him back&rdquo; 😉</p>
</blockquote>
<h2 id="duckdb-yes-but-also-kubernetes-disk-abstractions">DuckDB Yes, but also Kubernetes Disk Abstractions</h2>
<p>As many of you might know, Josh was the initial creator of dbt-duckdb, so I asked him if he still uses dbt and, more importantly, how much DuckDB.</p>
<p>His answer was that everyone uses it: &ldquo;Everybody uses DuckDB in some capacity. I feel like anyone who knows about DuckDB uses DuckDB for something. Everyone has their own specific use case for it&rdquo;. He is using it less for his specific pipelines at work, as they have huge datasets, text data, not classical datasets: e.g., 30 TB is tiny. He uses Spark or Ray. He does much of the processing on text and multimodal data (time series, images, etc.), not much classical relational data in his day-to-day.</p>
<p>The use case for DuckDB he uses a lot is reading Parquet metadata that sits on S3, as the above data pipelines &ldquo;throw off enormous amounts of Parquet metadata, which is still substantial but much smaller, on the order of 100 GBs&rdquo;. Information about runs, when a dataset was last used to train a model, how much he pays to store it in S3 for indefinite periods. He usually asks his agents to read that on his dev box on EC2, which he runs these commands on, to cut down on transfer times, just for speed.</p>
<blockquote>
<p>[!note] DuckDB got integrated into dbt v2<br>
Interestingly, dbt-duckdb just got an update. The dbt adapter for DuckDB received its <a href="https://github.com/duckdb/dbt-duckdb/pull/3" target="_blank" rel="noopener noreffer">first pull request</a> on August 27, 2021, and in the meantime <a href="https://github.com/duckdb/dbt-duckdb" target="_blank" rel="noopener noreffer">has 1.4k stars on GitHub</a>⁠. Since then, dbt users have been able to install one Python package (dbt-duckdb, via <code>pip</code>), point it at a file (a local DuckDB database), and have a working project (models building into tables and views), without having to sign up for (and pay for) servers or warehouses. With the latest release, DuckDB now runs inside dbt with the dbt Fusion engine. See <a href="https://duckdb.org/2026/09/22/dbt-fusion" target="_blank" rel="noopener noreffer">DuckDB Now Ships inside dbt v2</a>.</p>
</blockquote>
<h3 id="we-lost-a-whole-generation-of-data-infra-people-retired-2022-ai-pulled-him-back">&ldquo;We Lost a Whole Generation&rdquo; of Data Infra People, Retired 2022, AI Pulled Him Back</h3>
<p>When talking about what has changed since he worked at Google as a staff engineer (2007–2011) and led data engineering at Slack (2015–2019), and how data engineering workloads differ today with AI, he said Snowflake is great. Still, we do <strong>not have many people anymore who know how the data is laid out on disk</strong>.</p>
<p>But not for his size of workload. Josh works with such big data that we normies can barely fathom, and that&rsquo;s why he uses lots of Kubernetes jobs and workloads. He likes <a href="https://github.com/apache/celeborn" target="_blank" rel="noopener noreffer">Apache Celeborn</a> (Pronunciation: spelled Celeborn, pronounced &ldquo;Keleborn&rdquo;), which <strong>abstracts the disks</strong> (not needing to know where they physically come from), because in Kubernetes you still do that manually, as Kubernetes is not really cloud-abstracted, he says:</p>
<blockquote>
<p>Kubernetes is fantastic in that it&rsquo;s in theory abstracted away from an individual cloud, but in practice it&rsquo;s not, because where does your disk come from? If you&rsquo;re on AWS or GCP you can use an EBS-like service, but if you&rsquo;re running bare metal, that doesn&rsquo;t exist the same way.</p>
</blockquote>
<p>Celeborn has something called push-based shuffle write, where mapper nodes skip local disk storage, ideal for cloud-native architectures, which lets you separate storage and compute, so</p>
<blockquote>
<p>The <strong>Spark jobs don&rsquo;t need to worry about where their disk comes from anymore</strong>, from a shuffle perspective. There&rsquo;s the shuffle service, no matter how much data you&rsquo;re going to shuffle. You have your local disk, and then you have your shuffle service for all your other disk needs.</p>
</blockquote>
<blockquote>
<p>[!note] Nobody Remembers How to Run a Spark Cluster<br>
Josh says the hardest thing is:<br>
&ldquo;<em>That there are relatively few people in places that need to think about this stuff anymore, at all. The whole data community during the late teens kind of went Snowflake happy. And I used Snowflake at my last company, it&rsquo;s a fantastic product. But we have sort of lost a whole generation. There&rsquo;s not many people left anymore who still remember how to run a large, effectively open source, Spark cluster themselves.</em>&rdquo;</p>
</blockquote>
<h2 id="how-much-does-the-model-matter-to-you">How Much Does the Model Matter to You?</h2>
<p>When asked about the models and how much they matter, Josh said for him it&rsquo;s like the iMessage blue bubbles vs. green bubbles. Android phones are fantastic, but he wants the blue bubbles. And Josh&rsquo;s prediction is that all the models will become competent, so the real question becomes:</p>
<blockquote>
<p>which one you like and enjoy hanging out with</p>
</blockquote>













  

























<figure><span class="img-expandable" data-full="/blog/cache-invalidation-problem-data-engineering/josh-tweet1.png">
<a target="_blank" href="/blog/cache-invalidation-problem-data-engineering/josh-tweet1.png" title="Tweet">

</a><button type="button" class="expand-btn" aria-label="Expand image" title="Expand image" hidden><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true"><path d="M15 3h6v6M9 21H3v-6M21 3l-7 7M3 21l7-7"/></svg></button>
</span><figcaption class="image-caption"><a href="https://x.com/josh_wills/status/2082241682452672942" target="_blank" rel="noopener noreffer">Tweet</a></figcaption>
</figure>
<p>Above, Josh explains how he disliked the Opus 5 model, and <a href="https://x.com/josh_wills/status/2102536326558241104" target="_blank" rel="noopener noreffer">continues to do so</a>. In this interview, he added that it&rsquo;s also the way it communicates. An interesting insight, he said, as someone who works on building models all day:</p>
<blockquote>
<p>the fact that Opus 5 is so bad, it deeply indicates to me that we literally have no idea what we&rsquo;re doing at all when it comes to training these models.</p>
</blockquote>
<p>The good thing: changing might be easier than ever<sup id="fnref:1"><a href="#fn:1" class="footnote-ref" role="doc-noteref">1</a></sup>, and he disliked the previous 5.0 so much that he changed his workflow and switched to OpenAI. He commented that:</p>
<blockquote>
<p>with no drop in productivity, it&rsquo;s kind of insane.</p>
</blockquote>
<blockquote>
<p>[!tip]<br>
One trick I learned: use the <a href="https://github.com/JuliusBrussee/caveman" target="_blank" rel="noopener noreffer">caveman skill</a>, and load it at the beginning. I use only the one MD file of it, and then every model sounds the same, and even uses fewer tokens and is less verbose. It also needs less brainpower to read through.</p>
</blockquote>
<h3 id="how-to-code-with-agents-these-days">How to Code with Agents These Days</h3>
<p>Next, we talked about working with agents. He jokingly came back to a <a href="https://x.com/josh_wills/status/2083290481921024222" target="_blank" rel="noopener noreffer">Tweet</a> where he wants to start a reinforcement learning (RL) environments company, where he does the teaching:</p>





































<span class="img-expandable" data-full="/blog/cache-invalidation-problem-data-engineering/josh-tweet2.png">
<a target="_blank" href="/blog/cache-invalidation-problem-data-engineering/josh-tweet2.png" title="Open image in full size">

</a><button type="button" class="expand-btn" aria-label="Expand image" title="Expand image" hidden><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true"><path d="M15 3h6v6M9 21H3v-6M21 3l-7 7M3 21l7-7"/></svg></button>
</span>
<p>Josh says:</p>
<blockquote>
<p>[..] a joke that I want to start my own RL environments company where it&rsquo;s just me teaching the models how not to write absolutely garbage data pipelines. Because I use agents to write all of my code, with very, very few exceptions. And yet I still find myself deeply unhappy with the data pipelines it writes.</p>
</blockquote>
<blockquote>
<p>[!tip] His favorite utility is still htop<br>
He <a href="https://youtu.be/9BXMWDXiugg?si=lhB3BnsroeU1znov" target="_blank" rel="noopener noreffer">said back in 2022</a> that he loves htop. Asked about his favorite tools, he says that htop is fantastic, and he still uses htop for a lot of stuff he does. In case you don&rsquo;t know, you see all processes and CPUs of your machine at a glance. See <a href="https://htop.dev/" target="_blank" rel="noopener noreffer">htop - an interactive process viewer</a>.</p>
</blockquote>
<h3 id="how-to-get-fast-feedback-loops-with-agents">How to Get Fast Feedback Loops with Agents?</h3>
<p>Josh says AI wins <strong>where there&rsquo;s a large training model and fast responses</strong>, because if it&rsquo;s not in the training data, it&rsquo;s slow and it needs to do a lot of stuff. He says: &ldquo;<em>Any sort of environment in which the models have highly reliable training data with fast feedback mechanisms, they&rsquo;re just going to <strong>dominate. Absolutely going to dominate</strong>. You see this with math, you see this with front-end engineering, any RL environment where there is a fast feedback mechanism.</em>&rdquo;</p>
<p>And that&rsquo;s exactly what&rsquo;s missing in large-scale data pipelines today:</p>
<blockquote>
<p>What&rsquo;s tricky about data pipelines, at least at a large scale, is that <strong>you don&rsquo;t actually have that fast feedback mechanism available</strong> to you, because running a giant pipeline can take a long time and a lot of computers.</p>
</blockquote>
<p>Fast feedback loops are also what Josh was already <a href="https://youtu.be/9BXMWDXiugg?si=lhB3BnsroeU1znov" target="_blank" rel="noopener noreffer">referring to almost four years</a> ago, before any of the AI hype. He liked <strong>fast feedback loops</strong>, and quoted Erik Bernhardsson:<br>





































<span class="img-expandable" data-full="/blog/cache-invalidation-problem-data-engineering/quote-bernhardsson.png">
<a target="_blank" href="/blog/cache-invalidation-problem-data-engineering/quote-bernhardsson.png" title="Open image in full size">

</a><button type="button" class="expand-btn" aria-label="Expand image" title="Expand image" hidden><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true"><path d="M15 3h6v6M9 21H3v-6M21 3l-7 7M3 21l7-7"/></svg></button>
</span></p>
<blockquote>
<p>[!note]<br>
Interestingly, today <a href="https://typesafe.ai/blog/introducing-system-one-models-and-jev" target="_blank" rel="noopener noreffer">Jev</a> came out to a lot of praise online, and it&rsquo;s based on Reinforcement Learning For Calibrated Decisions (RLCD), which is basically what Josh wanted.</p>
</blockquote>
<h3 id="feeling-the-tuples-flowing-through-the-pipelines-a-gut-feeling">Feeling the Tuples Flowing through the Pipelines, a Gut Feeling</h3>
<p>Josh, with his years of experience, has built a gut feeling:</p>
<blockquote>
<p>Through years and years of suffering and writing gigantic pipelines, I can look at a pipeline and it <strong>kind of feels like something to me</strong>. I can feel the tuples flowing through it, because I have a mental model of how this is going to go.</p>
</blockquote>
<p>He explains how SQL databases have a great <strong>fast feedback mechanism with their query explain plans</strong>. They tell you if it&rsquo;s a good or a bad query. But for a Spark job, it&rsquo;s not yet exactly that.<sup id="fnref:2"><a href="#fn:2" class="footnote-ref" role="doc-noteref">2</a></sup></p>
<p>Josh describes an aesthetic aspect of data pipelines:</p>
<blockquote>
<p>I have, weirdly, a kind of aesthetic sensibility when it comes to data pipelines. A data pipeline can be beautiful to me. It can be elegant, well designed, thoughtful. That makes me want to look, in the way other people would visit an art museum, or read math proofs because they find them beautiful.</p>
</blockquote>
<p>That&rsquo;s where he still sees a lot of &ldquo;ugliness&rdquo; in what the agents write. They were not yet beautiful when we talked a couple of weeks back. Josh said, &ldquo;<em>Some of the best programmers I&rsquo;ve worked with were musicians by training</em>&rdquo;. And he continues:</p>
<blockquote>
<p>One distinguished engineer at Google, his master&rsquo;s degree is in the violin, and he was the best coder I think I&rsquo;d ever seen, because <strong>his code was just like music. It was beautiful</strong>.</p>
</blockquote>
<p>I have a similar affinity for writing text, and good writing has a musical quality to it that certain people can hear. You develop an ear for good writing after a while. It sounds like something in your head, like poetry or prose. Josh says that &ldquo;This is something we have not figured out how to RL in any kind of way&rdquo;.</p>
<h3 id="the-cost-aspect-literally-lighting-money-on-fire">The Cost Aspect, Literally Lighting Money on Fire</h3>
<p>When talking about cost, Josh says that:</p>
<blockquote>
<p>&ldquo;the models might waste time on the most pedantic, stupid checks for errors that are simply not possible given my knowledge of the structure of the upstream data sources.&rdquo; &ldquo;Literally lighting money on fire&rdquo;</p>
</blockquote>
<p>He continues that the pipelines are huge and compute costs a lot. And models might write a pipeline for average-sized data, but not have the knowledge or the big training data on &ldquo;gigantic pipelines&rdquo;: &ldquo;It will work, it&rsquo;s correct. It&rsquo;s just stupidly cost inefficient&rdquo;.</p>
<p>He has seen this problem at companies getting rid of their data teams, as LLMs could vibe code a job in Databricks. He said it like this: &ldquo;<em>You can easily vibe code a job in Databricks that costs like two hundred thousand dollars a day to run, that a competent data engineer, or at least one who supervised it, would never have written</em>.&rdquo;</p>
<p>And it&rsquo;s not the model&rsquo;s fault, but a function of the training data that has not investigated or run a lot of &ldquo;<em>gigantic data pipelines for multiple hours across hundreds of machines</em>&rdquo;.</p>
<p>That&rsquo;s just not the way the reinforcement learning environments are structured right now:</p>
<blockquote>
<p>It&rsquo;s this fast feedback loop: tiny data, is it correct? Tiny front end, does it render the CSS correctly?</p>
</blockquote>
<p>Josh makes a great science analogy:</p>
<blockquote>
<p>People talk a lot about how science has the same problem. Labs, biology, physics, these are all real things where you <strong>literally have to wait for the culture to grow</strong>. <strong>Data engineering has a lightweight version of this</strong>. We are not as immediately amenable to this kind of feedback style right now.</p>
</blockquote>
<p>He found the models to be fantastic at SQL back when we held the interview. &ldquo;They&rsquo;re really, really good,&rdquo; he said. But for his kind of work (the raw Ray pipeline, the Spark pipeline), <strong>there is no explain plan</strong>. You&rsquo;re still building the thing from scratch, as he said.</p>
<h3 id="the-job-of-emergency-exception-handler">The Job of &lsquo;Emergency Exception Handler&rsquo;</h3>
<p>He mentions that in his job, because the models haven&rsquo;t learned everything yet, he is basically like a pilot who usually flies on autopilot, but <strong>in case of emergency, he is there to fix it or take over</strong>.</p>
<h2 id="what-is-the-tooling-he-uses--how-agents-ease-his-life-at-work">What Is the Tooling He Uses &amp; How Agents Ease His Life at Work</h2>
<p>As initially pointed out, he disliked Opus and switched to Codex, so now he is using Codex all the time, but he used Claude for a long time.</p>
<p>When asked how he works or reviews code, he said: mostly giving feedback, like a staff engineer does. His life as a senior technical IC has been trending towards that for a very long time, he says. He primarily gives feedback. That&rsquo;s his primary job. Interviewing people, reviewing design documents, and less hands-on, with very few exceptions.</p>
<p>He likes to work on high-demand, high-urgency work that forces him to create. This is back to the &rsquo;emergency exception handler':</p>
<blockquote>
<p>If there&rsquo;s a <strong>broken-ass data pipeline and it has to run right now</strong>, because a customer has a training job coming up and the data has to be ready for it. That&rsquo;s the <strong>primary value I provide</strong>.</p>
</blockquote>
<h3 id="what-josh-likes-about-agents-no-feelings-and-the-caffeine-dial">What Josh Likes about Agents: No Feelings and the Caffeine Dial</h3>
<p>Josh also revealed that he likes working with agents because agents have no feelings. He can give agents feedback on demand, force things to be created, he says:</p>
<blockquote>
<p>I don&rsquo;t have to be very nice to the agents.</p>
</blockquote>
<p>He can just say things:</p>
<blockquote>
<p>I don&rsquo;t have to care about their feelings or their career development, because they&rsquo;re going to cease to exist when I&rsquo;m done with this coding session. I can be like: this is bad and you should feel bad. Ctrl-C, you&rsquo;re dead, I&rsquo;m going to start over with someone else.</p>
</blockquote>
<p>As someone who calls himself &ldquo;a fairly mediocre manager, because I don&rsquo;t generally like caring about these things&rdquo;, this works well for him 🙂<sup id="fnref:3"><a href="#fn:3" class="footnote-ref" role="doc-noteref">3</a></sup>.</p>
<p>The other interesting thing he says:</p>
<blockquote>
<p><strong>I can dial up and down the work on demand</strong> as I see fit. If I&rsquo;m in a moment where I need five agents going, I can do it. If it gets to be too much, I dial it back. In the same way that I try to maintain a certain level of caffeine at any given moment of the day, I can maintain a certain pace to match my energy, to match what I&rsquo;m up to right now. Am I super excited, am I kind of bored? That&rsquo;s a virtue of this new world that was not true before.</p>
</blockquote>
<p>It&rsquo;s like the caffeine dose.</p>
<h3 id="no-more-unit-tests">No More Unit Tests!</h3>
<p>He also likes to <strong>automate most of the boring work</strong>. Who wants to do one more database migration? Or fix &ldquo;flaky unit tests&rdquo;? He likes to do the higher-level strategic stuff, which is how people end up <strong>becoming investors or product managers</strong>, he says.</p>
<p>Even more so:</p>
<blockquote>
<p>I have an agent whose whole job is just to watch for flaky tests and fix them. That&rsquo;s it, that&rsquo;s all it does. Database migrations? Absolutely not. I have an agent that does database migrations. I have automated away the shittiest, lowest-value, most unpleasant parts of my life, and I am here for it.</p>
</blockquote>
<p>For him, that&rsquo;s a massive quality increase. And he can focus very hard on things he likes, and where the leverage is high, to <strong>make hard decisions</strong>.</p>
<h3 id="decisions-made-are-what-is-left-and-communicating-why-is-key">Decisions Made Are What Is Left, and Communicating Why Is Key</h3>
<p>In regard to code review, one thing he is trying to be militant about in the world where agents do everything is:</p>
<blockquote>
<p>For every project, I&rsquo;m <strong>focusing really hard on the decisions I am making</strong>.</p>
</blockquote>
<p>He mentions a concrete example from Datology where he&rsquo;s building an index over datasets to figure out which parts of a dataset are reusable, wholesale or partially, someplace else:</p>
<ul>
<li>Option A: query the metadata catalog at read time and figure out the useful assets.</li>
<li>Option B: write an explicit index up front: &ldquo;this asset exists in this index and it is usable for this purpose&rdquo;</li>
</ul>
<p>He says:</p>
<blockquote>
<p>Either choice is valid, there are pros and cons. I&rsquo;m making an explicit trade-off here, and those are the decisions I need to communicate. The details of how the index works are much less important.</p>
</blockquote>
<p>He makes a great point that:</p>
<blockquote>
<p><strong>It&rsquo;s really the decisions we need to communicate</strong>. The decisions build the shared understanding, the choices we make, the trade-offs. That&rsquo;s still the meat of engineering work.</p>
</blockquote>
<p>I also think this very thing is the most important, and it can turn into a bad spiral if you are not careful, as someone vented in <a href="https://x.com/v0xium/status/2101526107128529120" target="_blank" rel="noopener noreffer">this tweet</a>. Plus, in my opinion, agents <strong>force you to focus on architecture, and that&rsquo;s why they&rsquo;re handier for seniors</strong>.</p>
<h2 id="is-data-engineering-automated-away-with-agents">Is Data Engineering Automated Away with Agents?</h2>
<p>Josh says clearly that data engineering is <em>not</em> going away. For the same reason it hasn&rsquo;t gone away for so long: the fundamental problems won&rsquo;t go away. We&rsquo;re still solving the problem of <strong>materializing views and caching</strong>!</p>
<blockquote>
<p>I don&rsquo;t see data engineering going away in any way, shape or form, even in this world. Aside from the fact that the RL environment problem makes it unusually difficult for the agents to be good at running these very long pipelines, <strong>the fundamental problem of data engineering is the same problem it&rsquo;s been my whole career, and 25 years before I started working</strong>. It&rsquo;s the materialized view problem.</p>
</blockquote>
<p>The questions are: &ldquo;What data should I pre-process and create now to make queries faster later on, and what stuff is not worth doing, what should I just do in the moment?&rdquo; These are the fundamental problems.</p>
<p>He says it will be a &ldquo;problem for the superintelligence&rdquo;, because:</p>
<blockquote>
<p>It&rsquo;s not a fixed thing, it&rsquo;s <strong>going to continuously move</strong>, and the right trade-off is going to change all the time.</p>
</blockquote>
<p>Josh says, aside from reinforcement learning:</p>
<blockquote>
<p>It&rsquo;s the <strong>two hard problems in computer science, right? Cache invalidation and naming things</strong>. And the agents still suck at them because they&rsquo;re legit hard.</p>
</blockquote>
<p>&ldquo;Data engineering is fundamentally the cache invalidation problem&rdquo;, he continues, &ldquo;just <strong>done in a batch-processing context</strong>&rdquo;.</p>
<blockquote>
<p>[!note] Even Hannes Started to Use Claude Code<br>
Hannes Mühleisen said in <a href="https://youtu.be/7WwuJS03AbM?t=644" target="_blank" rel="noopener noreffer">The Past, Present, and Future of DuckDB, DuckLabs</a> that he now uses Claude Code for DuckDB, since the Quack Protocol launch in May 2026 or so. So he hasn&rsquo;t written a lot of code since then, but he still looks at things.</p>
</blockquote>
<h3 id="humility-and-burnout">Humility and Burnout</h3>
<p>Lastly, we talked about humility and how not to get burned out.</p>
<p>It helps to stay humble, as he says he is very good at it, telling his family:</p>
<blockquote>
<p>I am simultaneously an idiot and also among the best in the world at what I do.</p>
</blockquote>
<p>I say that we all probably feel some kind of ambivalence, as the AI can do part of our job and we feel unneeded. That&rsquo;s where humility helps us. Josh also adds that he is kind of grateful that he can still be at the keyboard and program. It&rsquo;s &ldquo;tremendous fun&rdquo; for him, and he loves to be here for this moment in time.</p>
<p>I asked if he does not get <strong>burned out</strong> when agents do not generate code the way he does it. Or does he split into &ldquo;code I don&rsquo;t mind&rdquo; vs &ldquo;code I want perfect&rdquo;? He says that his advantage is having done it for a &ldquo;really, really long time&rdquo;:</p>
<blockquote>
<p>Old me tolerates things that younger me would never, ever, ever tolerate at all. I am used to cycles of feedback with somewhat &ldquo;stubborn&rdquo; people.</p>
</blockquote>
<p>He said that once, the agent couldn&rsquo;t find a problem he was telling it about: &ldquo;And I could not, for the life of me, get the agent to write the pipeline in the way it would do this&rdquo;. He was telling the agent &ldquo;you cannot use caching this way&rdquo;, and it couldn&rsquo;t help itself. He had to take over.</p>
<p>This again is the perfect example of the exception handling situation. It&rsquo;s &ldquo;kind of my job these days,&rdquo; Josh says, to &ldquo;identify these situations where, for whatever reason, the model literally isn&rsquo;t capable of doing what I am asking&rdquo;. But he says that the models are getting better every day:</p>
<blockquote>
<p>The reality is, I don&rsquo;t encounter that many of these problems anymore.</p>
</blockquote>
<h2 id="conclusion">Conclusion</h2>
<p>One main takeaway from this conversation is that data engineering is the cache invalidation problem, just done in a batch-processing context. That&rsquo;s important: when done right, agents dominate because of a fast feedback loop, like SQL with its explain plans or math. Gigantic Spark and Ray pipelines that run for hours across hundreds of machines don&rsquo;t have that cycle yet. That&rsquo;s why Josh still ends up as the emergency exception handler, and why others can vibe code a Databricks job that costs $200k a day.</p>
<p>What&rsquo;s interesting is how little the model itself matters to him. It&rsquo;s more about design and feel, e.g., blue bubbles vs. green bubbles: pick the one you enjoy hanging out with, switch when you don&rsquo;t like it anymore, or hand off the flaky tests and database migrations to an agent. What&rsquo;s left is what was always the hard part of data engineering: making the decisions and communicating the trade-offs.</p>
<p>We got a bit spiritual, with Josh feeling the tuples flow through a pipeline, and ended where many of us do as the field moves this fast: dreaming of a farm with beautiful flowers and no screen 🙂. Josh admits he periodically flirts with it too: &ldquo;Maybe I&rsquo;m just going to retire again and just go play chess. I&rsquo;m not made of stone&rdquo;.</p>
<p>I hope you enjoyed this episode of the interview series. Check out the others, starting with <a href="/blog/specs-over-vibes-interview-mark-freeman/" rel="">Mark Freeman</a>, <a href="/blog/how-to-use-ai-with-de-chris-riccomini/" rel="">Chris Riccomini</a>, <a href="/blog/how-to-use-ai-with-de-wes-mckinney/" rel="">Wes McKinney</a> and <a href="/blog/figma-for-agents-max-beauchemin/" rel="">Maxime Beauchemin</a>.</p>
<hr>
<p>If you read this far and liked it, also check out the talk with Mehdi about the &ldquo;<a href="https://motherduck.com/videos/duckdb-dbt-accelerating-the-developer-experience-with-local-power/" target="_blank" rel="noopener noreffer">Coupling Problem in Data Engineering</a>&rdquo; or check Josh&rsquo;s recent talk <a href="https://www.youtube.com/watch?v=zLfAkk91LIg" target="_blank" rel="noopener noreffer">Josh Wills on the End of Coding</a> at Pebblebed.</p>
<hr>
<pre class=""><em>Full article published at <a href="https://motherduck.com/blog/cache-invalidation-problem-data-engineering-josh-wills/" target="_blank" rel="noopener noreferrer">MotherDuck.com</a> - written as part of <a href="/services/">my services</a></em></pre>
<div class="footnotes" role="doc-endnotes">
<hr>
<ol>
<li id="fn:1">
<p>He also has no shame about hopping back when the model changes. With the latest model, he went back to Opus 5.5.&#160;<a href="#fnref:1" class="footnote-backref" role="doc-backlink">&#x21a9;&#xfe0e;</a></p>
</li>
<li id="fn:2">
<p>The same impression someone had on <a href="https://www.reddit.com/r/dataengineering/s/IxwxZSMY2f" target="_blank" rel="noopener noreffer">Reddit</a>: &ldquo;agents are absolutely dogshit AI at optimizing Spark jobs (or any sort of high complexity pipeline). They are laughably bad, in my experience.&rdquo;&#160;<a href="#fnref:2" class="footnote-backref" role="doc-backlink">&#x21a9;&#xfe0e;</a></p>
</li>
<li id="fn:3">
<p>I haven&rsquo;t worked under him, but I&rsquo;m sure that he is a great manager nonetheless!&#160;<a href="#fnref:3" class="footnote-backref" role="doc-backlink">&#x21a9;&#xfe0e;</a></p>
</li>
</ol>
</div>
]]></description>
</item>
<item>
    <title>Why We Need Yet Another (OSS) Semantic Layer</title>
    <link>https://www.ssp.sh/blog/why-yet-another-oss-sl/</link>
    <pubDate>Tue, 13 Oct 2026 06:40:08 &#43;0200</pubDate>
    <author>Simon Späti</author>
    <guid>https://www.ssp.sh/blog/why-yet-another-oss-sl/</guid><enclosure url="https://www.ssp.sh/blog/why-yet-another-oss-sl/featured-image.webp" type="image/webp" length="0" /><description><![CDATA[<p>Most semantic layers come with a great declarative modeling language to define metrics and measures well<sup id="fnref:1"><a href="#fn:1" class="footnote-ref" role="doc-noteref">1</a></sup>, but very soon after, you start building wrappers around the semantic layer that enable agentic work and context engineering, that work well with harnesses and interfaces, and that allow flexible queries at runtime, without the need to rebuild or recalculate the measures in YAML.</p>
<p>The other problem is that most data warehouse or analytics solutions basically lock you in with their proprietary semantic layer. The <a href="https://ossie.apache.org/" target="_blank" rel="noopener noreffer">Open Semantic Interchange (OSI, new Apache Ossie)</a> standard, making it possible to convert definitions from Snowflake to the dbt semantic layer, will reduce this, but all the glue code you build on top is still tightly integrated into that very semantic layer, or you might get some of the capabilities mentioned above from that proprietary software. So you might be using an open data format, or an OSS business intelligence tool to integrate measures into your semantic layer, but if that semantic layer is not open, you might still be locked in.</p>
<p>That&rsquo;s why <a href="https://github.com/MotleyAI/slayer" target="_blank" rel="noopener noreffer">SLayer</a> tries another approach and ships its open source Semantic Layer with a <strong>query engine, agent tooling, and context primitives</strong> out of the box, having all the wrappers that you&rsquo;d most certainly build anyway directly with it. And everything is under the MIT license.</p>
<h2 id="why-yet-another-semantic-layer">Why Yet Another Semantic Layer?</h2>
<p>If you follow the space, there are many semantic layer tools, starting as early as 1991 with SAP Business Objects, and more &ldquo;Modern Semantic Layer&rdquo; tools such as Cube or the dbt semantic layer, etc., which are mostly YAML and outside of the BI tools.</p>
<p>But why might we need yet another Semantic Layer tool today? Especially when there are new terms like Context Layer and Knowledge Graph floating around (I wrote a <a href="/blog/semantic-context-layer-primer/" rel="">primer</a> about it). This is a fair question.</p>
<p>The biggest reason is mostly this: if you start with any of the modern layers, once you have defined your metrics in YAML and have a good workflow of versioning them in git, you can change fast and re-deploy, roll back, and even agents can easily contribute, with changes mergeable and transparently seen in the git log with PRs if you want. But what you always end up with is writing glue code around your Semantic Layer.</p>
<p>For example, in 2018, when we built our own Semantic Layer at a previous job, a Metadata store held all our metrics in a simple SQLite database for our SmartAnalytics application, which then had all the complex queries pre-defined for users to use, querying in milliseconds against Druid as our OLAP engine.</p>
<p>But we ended up building an API to fetch/create new metrics. We had to build a lot of glue code so that the integration with Druid worked well, that the application could fetch the metrics in a way that worked with its C# application logic, that we could use it in our Dagster data pipelines, that data scientists could use the same metrics in Jupyter Notebooks, or in the web app where we showed millions of points that had to be plotted on a map when zooming around the map. The declaration was already a major win, as we could <strong>centralize the business logic in one place</strong> for everyone to use, but we had to add the APIs and glue code ourselves.</p>
<p>Today, <strong>with agents, there&rsquo;s one more layer</strong> that you need to build: the implementation for working with agents and for collaboration between humans and agents. So there you <strong>implement another wrapper layer</strong>. Usually, the paid solutions might solve some of these problems, but shouldn&rsquo;t that be included out of the box with open source? <a href="https://github.com/MotleyAI/slayer" target="_blank" rel="noopener noreffer">SLayer</a>, another semantic layer, and the company Motley think yes.</p>
<p>Also missing is an included query engine, though. MetricFlow and Malloy have an engine to generate and query, but the semantics are more constrained. SLayer, for example, comes with an engine out of the box that supports <a href="https://docs.motley.ai/slayer/concepts/formulas/" target="_blank" rel="noopener noreffer">powerful expressions</a> like <code>sum(revenue)</code>, <code>avg(revenue)</code>, <code>sum(revenue) / count(*)</code>, <code>time_shift(sum(revenue), -1, 'year')</code>, or <a href="https://docs.motley.ai/slayer/examples/06_multistage_queries/multistage_queries/" target="_blank" rel="noopener noreffer">multi-stage queries</a> such as:</p>
<blockquote>
<p>Orders grouped by customer activity bucket. First calculate order count per customer, bucket that, then use the bucketed result as a dimension to group orders by.</p>
</blockquote>
<p>This is a multi-stage query, a combo of two queries, and something that can be common in an enterprise, so it helps if we can define this with a simple expression language, as it&rsquo;s very difficult to express in SQL.</p>
<blockquote>
<p>[!info] Why not just dump the text into the agent?</p>
<p>Another question you might have: why not just dump the text directly into the chatbox of an agent? The reason is that it usually works on a simple demo project or a small one, but does not scale to the enterprise. One showcase of larger context needs is <a href="https://motley.ai/blog-posts/bird-interact-benchmark-top-score/" target="_blank" rel="noopener noreffer">LiveSQLBench-Large</a>. Another angle is the reiteration of agents, re-deriving cardinality, join paths, and metric definitions on every session instead of reading them once, as well as two people asking the same questions and getting different answers; an integrated Semantic Layer avoids drift in the metrics returned.</p>
</blockquote>
<h2 id="three-out-of-the-box-capability-layers-that-come-with-an-open-agentic-first-semantic-layer">Three Out-of-the-Box Capability Layers That Come with an Open Agentic-First Semantic Layer</h2>
<p>If we look at what the capabilities and requirements for a new agentic-first and fully open source semantic layer are, they are managing context and enabling queries easily based on it, flexibly and with an expressiveness that makes it unambiguously clear to humans, but also to the agents.</p>
<p>This needs tooling that has a more powerful expression language and a query engine that supports it, integrated deeply into the definitions but also into the query engine. <a href="https://www.linkedin.com/in/yannranchere/" target="_blank" rel="noopener noreffer">Yann Ranchere</a>, co-founder and CEO of SLayer, says it this way:</p>
<blockquote>
<p>A <strong>strong agent-first semantic layer</strong>, with an expressive query engine, agent tooling, and context primitives, <strong>is a hard problem</strong> and a key component of future agentic and analytics solutions and that it is better served by an open-source project so that <strong>developers can spend more resources and effort on context, agent harness, visualisations and interfaces</strong>.</p>
</blockquote>
<p>To tackle all of these, we can compress them into three pillars: <strong>context primitives, an expressive and flexible query engine, and being agent agnostic</strong>, with all of these capabilities integrated into OSS tooling that isn&rsquo;t gated behind a paywall<sup id="fnref:2"><a href="#fn:2" class="footnote-ref" role="doc-noteref">2</a></sup>.</p>
<h3 id="1-context-primitives-out-of-the-box-no-more-wrappers-and-glue-code">1. Context Primitives Out of the Box: No More Wrappers and Glue Code</h3>
<p>Pre-agentic Semantic Layers were built for dashboards that replay the same queries each time, so joins, aggregations, and time logic get defined once in YAML at design time. This is great for large and complex business logic, like revenue.</p>
<p>But the definition alone was never enough. Think back to the Metadata store example from above: the metrics lived in one place, but everything around them was glue code we wrote ourselves: the API to fetch and create metrics, the Druid integration, the access from C#, Dagster, and Jupyter. Every consumer needed its own way to find out what metrics exist, look up how they are defined, and query them.</p>
<p>With agents, the same three needs come back, only stronger. An agent doesn&rsquo;t know your business. It has to find the right measure among hundreds, inspect how it is defined and joined, and ideally learn from what worked the last time someone asked a similar question. This is what I call <strong>context primitives</strong>: the small, composable units a semantic layer exposes so an agent can retrieve exactly the business knowledge it needs for one question, without loading the whole model into its context. In SLayer, these are:</p>
<ul>
<li><strong>Models</strong>: measures, dimensions, joins with their cardinality, and grains, defined in YAML and versioned in git, or imported from dbt, Cube, or OSI.</li>
<li><strong>Search</strong>: one <a href="https://docs.motley.ai/slayer/concepts/search/" target="_blank" rel="noopener noreffer">search</a> tool over entities (datasources, models, columns, named measures) and memories, so an agent finds <code>orders.amount</code> from a natural-language question instead of reading every model file.</li>
<li><strong>Inspect</strong>: the rendered definition of exactly one entity, with descriptions and sample values, for when the agent already knows what it wants.</li>
<li><strong><a href="https://docs.motley.ai/slayer/concepts/memories/" target="_blank" rel="noopener noreffer">Memories</a></strong>: notes an agent writes about a part of the schema, optionally with an example query, tagged to the entities they belong to (&ldquo;Card TPV excludes refunds after day 45&rdquo;). The next agent finds them via search before it queries.</li>
</ul>
<p>Together they form the <code>search → inspect → query</code> flow we&rsquo;ll see later, and they ship as MCP tools, a REST API, a Python client, and a CLI. These are exactly the wrappers we would otherwise build again, around every semantic layer and for every harness.</p>
<p>In the end, we want to build fewer wrappers ourselves and less custom code, and have <strong>all semantic capabilities</strong> provided end-to-end as open source so developers can spend more resources and effort on <strong>context, agent harness, visualisations and interfaces</strong>. The same holds for the second capability: a flexible query language and engine belong to the semantic layer.</p>
<blockquote>
<p>[!info] A semantic layer should be a <strong>governed query engine</strong>, not a SQL wrapper</p>
<p>Below you see an example of the same business question, and two ways to answer it. One is SQL the agent has to get exactly right. The other is a structured request with governed joins, query-time formulas, and generated SQL underneath - producing the same governed answer every run:<br>













  

























<figure><span class="img-expandable" data-full="/blog/why-yet-another-oss-sl/sql-vs-yaml.png">
<a target="_blank" href="/blog/why-yet-another-oss-sl/sql-vs-yaml.png" title="Image from Motley">

</a><button type="button" class="expand-btn" aria-label="Expand image" title="Expand image" hidden><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true"><path d="M15 3h6v6M9 21H3v-6M21 3l-7 7M3 21l7-7"/></svg></button>
</span><figcaption class="image-caption">Image from <a href="https://motley.ai/slayer/" target="_blank" rel="noopener noreffer">Motley</a></figcaption>
</figure></p>
</blockquote>
<h3 id="2-expressiveness--flexible-query-engine-that-works-with-ai-agents-agnostically">2. Expressiveness + Flexible Query Engine That Works with AI Agents, Agnostically</h3>
<p>Better expressiveness and more integration also mean <a href="https://motley.ai/blog-posts/we-tried-to-benchmark-slayer-and-cube-we-failed/" target="_blank" rel="noopener noreffer">more efficiency with agents</a>, instead of going through many wrappers and non-integrated, non-battle-tested code with much longer round trips, meaning that agents otherwise use lots of tokens, with more ambiguity and less speed.</p>
<p>This is essentially the origin story of SLayer: building a reporting automation on Cube, whose wrapper grew into a complete rewrite. But in order for <strong>agents to express their query intent in a way that&rsquo;s as concise as possible</strong>, and just formal enough to be unambiguous, we need an expressive query language integrated with its query engine. The query engine of an integrated Semantic Layer needs to deterministically figure out the necessary joins, subqueries, and safeguards, both for <strong>correctness</strong> and to have the right context understanding, to avoid needing to query the full world or all of its huge context, saving context<sup id="fnref:3"><a href="#fn:3" class="footnote-ref" role="doc-noteref">3</a></sup>.</p>
<p>This is also where the static, design-time model hits its limits. If an agent asks a question that wasn&rsquo;t planned, the pre-defined pattern breaks. Or the workaround, a model that pre-declares every measure × aggregation × time-shift combination, explodes. But there are more complex things for which we need additional logic written, for example, doing an aggregation across different grains, connecting the missing dimension, and then aggregating based on the result set, all in a single concise expression. SLayer calls this <a href="https://docs.motley.ai/slayer/concepts/formulas/#re-aggregation-aggregate-over-an-attached-value" target="_blank" rel="noopener noreffer">re-aggregation</a>: a multi-stage aggregation inline in one query, no second stage needed, and guaranteed fan-out safe (the <a href="https://docs.motley.ai/slayer/examples/06_multistage_queries/multistage_queries/" target="_blank" rel="noopener noreffer">multi-stage query</a> introduced above does the same across two stages): <code>avg(sum(orders.total, partition_by=[city, region]))</code> grouped by <code>region</code>, the unweighted average of city totals per region.</p>
<p>Another feature some OLAP engines like Druid or ClickHouse bring is <strong>moving decisions to query time</strong>, so you can define metrics while querying your data (not at processing or development time). But you need the engine for it and <strong>now write custom integrations and APIs</strong> for each query engine again, whether you use Snowflake, Cube, or any other engine.</p>
<p>Handling different <a href="https://www.ssp.sh/brain/granularity/" target="_blank" rel="noopener noreffer">grains</a>, <a href="https://en.wikipedia.org/wiki/Cardinality" target="_blank" rel="noopener noreffer">cardinality</a> when joining, and many-to-many relationships are hard problems, and every bit of integration in that direction helps the domain experts querying and defining complex metrics in large organizations, once. A Semantic Layer is <a href="https://motley.ai/blog-posts/why-a-semantic-layer-is-more-than-a-database-schema/" target="_blank" rel="noopener noreffer">much more than a database schema</a>.</p>













  

























<figure><span class="img-expandable" data-full="/blog/why-yet-another-oss-sl/slayer-architecture.png">
<a target="_blank" href="/blog/why-yet-another-oss-sl/slayer-architecture.png" title="How a flexible query engine with context primitives works, here in red is what SLayer has built | Principles SQL">

</a><button type="button" class="expand-btn" aria-label="Expand image" title="Expand image" hidden><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true"><path d="M15 3h6v6M9 21H3v-6M21 3l-7 7M3 21l7-7"/></svg></button>
</span><figcaption class="image-caption">How a flexible query engine with context primitives works, here in red is what SLayer has built | <a href="https://github.com/MotleyAI/slayer/blob/main/architecture/sql.arc42.md" target="_blank" rel="noopener noreffer">Principles SQL</a></figcaption>
</figure>
<p>An agent needs to express its query intent concisely and unambiguously. The joins, subqueries, and safeguards are the engine&rsquo;s job, and they have to be deterministic. SLayer&rsquo;s <a href="https://github.com/MotleyAI/slayer/blob/main/architecture/sql.arc42.md" target="_blank" rel="noopener noreffer">SQL principles</a> show that by using an <a href="https://en.wikipedia.org/wiki/Abstract_syntax_tree" target="_blank" rel="noopener noreffer">AST (Abstract Syntax Tree)</a> end to end and SQLGlot transpilation. Check out <a href="https://dev.to/zmeigorynych/try-slayer-the-open-source-semantic-layer-for-agents-4amj" target="_blank" rel="noopener noreffer">Try SLayer</a> for an example.</p>
<p>For the <strong>agent</strong>, this means it <strong>states the <em>what</em></strong>, such as which measures, at which grain, etc. The <strong>engine deterministically owns the <em>how</em></strong>, like any <a href="https://en.wikipedia.org/wiki/Query_plan" target="_blank" rel="noopener noreffer">query planner</a> on a database, but on top of our defined metrics, with the intent to produce the same SQL every time. This leads to more trust in the agent&rsquo;s answer.</p>
<blockquote>
<p>[!note] A Quick Evolution of the Semantic Layer<br>
A quick recap of the history and evolution of semantic layers. Originally, and still, the key purpose of a semantic layer is to have a virtual layer between the raw data and the dashboard or end-user analytics, without needing to manage direct access and permissions to your raw data.</p>
<p>This short recap shows the evolution and where that comes from (originally shared <a href="https://www.ssp.sh/blog/rise-of-semantic-layer-metrics/" target="_blank" rel="noopener noreffer">here</a>, but extended with the latest):</p>
<ul>
<li><strong>1991</strong>: SAP BusinessObjects Universe and BI semantic layer</li>
<li><strong>1997</strong>: SSAS and MDX, with their logical modeling layer with MDX, define business metrics and dimensions in a structured way</li>
<li><strong>2013</strong>: Kimball discussed the concept of a semantic layer in <a href="https://www.kimballgroup.com/2013/08/design-tip-158-making-sense-of-the-semantic-layer/" target="_blank" rel="noopener noreffer">#158 Making Sense of the Semantic Layer</a></li>
<li><strong>2016</strong>: Maturing BI tools with an integrated semantic layer, such as Tableau, TARGIT, PowerBI, Apache Superset, etc., have their own metrics layer definition</li>
<li><strong>2019</strong>: Looker and LookML were popularized as the first semantic layer</li>
<li><strong>2022</strong>: Declarative Semantics and metrics with tools such as Cube, MetriQL, MetricFlow, Minerva, and dbt arose with the explosion of data tools around 2022</li>
<li><strong>2023/24</strong>: The evolution of data querying and natural language queries with the integration of LLMs and catalogs. Text-to-SQL, embeddings &amp; Retrieval-Augmented Generation (RAG)</li>
<li><strong>2025</strong>: Resurrection of Knowledge Graphs &amp; Ontologies</li>
<li><strong>2026</strong>: Agent-written Context Layer &amp; Karpathy self-curating LLM</li>
</ul>
<p>Evolution from Semantic Layer. See also related <a href="https://www.ssp.sh/blog/from-obsidian-to-enterprise-company-brain/#how-it-started-enterprise-knowledge-management" target="_blank" rel="noopener noreffer">Enterprise &amp; Personal Knowledge Management Evolution</a>, and you can find another opinion in <a href="https://www.iandmacomber.com/blog/post-ai-data-stack#why-semantic-layers-are-mainstream-now" target="_blank" rel="noopener noreffer">The Shape and Feel of the Post-AI Data Stack</a>.</p>
</blockquote>
<h3 id="3-use-your-harness-of-choice-agentic-tooling-native-with-unambiguous-semantics">3. Use Your Harness of Choice: Agentic-Tooling Native, with Unambiguous Semantics</h3>
<p>Other challenges are quickly changing queries while we explore the data with agents, as well as that we might need to use Copilot on Microsoft because it&rsquo;s integrated, or we like the way Claude works. So the semantic layer must integrate into these tools, not the other way around, where each semantic layer builds its own AI harness.</p>
<p>Similarly important is to define metrics unambiguously, so that the time dimension, for example, one of the hardest dimensions to define<sup id="fnref:4"><a href="#fn:4" class="footnote-ref" role="doc-noteref">4</a></sup>, is <a href="https://motley.ai/blog-posts/what-do-truly-simple-query-semantics-look-like/" target="_blank" rel="noopener noreffer">clear and flexible</a>: <code>time_shift(sum(order_total), -1, 'year')</code>. Imagine pre-defining these in YAML at pre-build time, for all <strong>dimension/granularity combinations</strong>. Instead, we make it flexible at query time, at runtime, for agents to simply adapt to their needs.</p>
<p>The goal: Combine different grains - be very flexible, not depending on technical limitations such as grain or cardinality, but based on business demands. The query engine and its semantics should handle the rest, and agents can help us with it. Letting the <strong>agent ask what it needs</strong>, instead of <strong>what the semantic layer can express in its limited way</strong>. We know the limitations from DSLs (Domain Specific Languages): they are good for non-technical people to not break anything or to just stay within the prepared queries, but not so much if you need new queries or have fast-changing requirements. So we don&rsquo;t need a DSL; we need flexibility and more expressiveness.</p>
<p>Being able to use any harness, being agnostic, is also what keeps the tool out of vendor lock-in, as it works within your existing environment.</p>
<p><a href="https://www.linkedin.com/in/egorkraev/" target="_blank" rel="noopener noreffer">Egor Kraev</a>, co-founder of SLayer, says:</p>
<blockquote>
<p>An agent should be able to express its query intent in a way that&rsquo;s as <strong>concise as possible, and just formal enough to be unambiguous</strong>, but let the deterministic machinery figure out the necessary joins, subqueries, and safeguards, for both safety/correctness and context-saving reasons.</p>
</blockquote>
<blockquote>
<p>[!info] What is a &ldquo;(AI-) harness&rdquo;?<br>
The term popped up on social media, and it means scaffolding around model (tool loop, prompts, context management), working autonomously, not needing to constantly ask us, but that can run for 20 minutes and solve a hard problem. Harnesses are Pi Coding Agent, OpenCode, Aider, Goose, Cursor, Amp, Claude Code, and Codex, which have now built in this functionality.</p>
</blockquote>
<h2 id="what-an-embeddable-agentic-first-semantic-layer-looks-like">What an Embeddable, Agentic-First Semantic Layer Looks Like</h2>
<p>So with all of this in mind, what would yet another Semantic Layer look like with the three foundations of avoiding building wrappers, including an expressive query language and query engine, and being able to use our harness of choice?</p>
<p>Luckily, we can look at SLayer, an open source implementation of these principles. SLayer is focused on the common agentic <strong>search → inspect → query</strong> flow with a <a href="https://docs.motley.ai/slayer/concepts/search/" target="_blank" rel="noopener noreffer">search</a> tool for efficient discovery and a <a href="https://docs.motley.ai/slayer/concepts/memories/" target="_blank" rel="noopener noreffer">memory store</a> for linking the relevant business context. Try it on <a href="https://github.com/MotleyAI/slayer" target="_blank" rel="noopener noreffer">GitHub</a>, and start with the <a href="https://docs.motley.ai/slayer/getting-started/" target="_blank" rel="noopener noreffer">quick start</a>:</p>
<div class="highlight"><div class="chroma open"><div class="code-header language-sh"><span class="code-title"><i class="arrow svg-icon icon-code-right"></i></span><span class="ellipses"><i class="svg-icon icon-ellipsis"></i></span><span class="copy" title="Copy to clipboard"><i class="svg-icon icon-copy"></i></span></div><div class="table-wrapper">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span><span class="lnt">2
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl">git clone git@github.com:MotleyAI/slayer.git
</span></span><span class="line"><span class="cl">uv tool install <span class="s1">&#39;motley-slayer[all]&#39;</span></span></span></code></pre></td></tr></table>
</div></div></div>
<p>And use the demo data of Jaffle Shop, preloaded with zero config needed, with your agent of choice, here Claude, but you can use any MCP integration, included in the OSS version. Try it and get a feel for it:</p>
<div class="highlight"><div class="chroma open"><div class="code-header language-sh"><span class="code-title"><i class="arrow svg-icon icon-code-right"></i></span><span class="ellipses"><i class="svg-icon icon-ellipsis"></i></span><span class="copy" title="Copy to clipboard"><i class="svg-icon icon-copy"></i></span></div><div class="table-wrapper">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl">claude mcp add slayer_demo -- slayer mcp --demo</span></span></code></pre></td></tr></table>
</div></div></div>
<p>Or even better, with your own data - a Postgres DB in this case:</p>
<div class="highlight"><div class="chroma open"><div class="code-header language-sh"><span class="code-title"><i class="arrow svg-icon icon-code-right"></i></span><span class="ellipses"><i class="svg-icon icon-ellipsis"></i></span><span class="copy" title="Copy to clipboard"><i class="svg-icon icon-copy"></i></span></div><div class="table-wrapper">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl">slayer datasources create <span class="s1">&#39;postgresql://user:${DB_PASSWORD}@hostname/db_name&#39;</span></span></span></code></pre></td></tr></table>
</div></div></div>
<p>All of the integration is better served open-source, and it is with SLayer.</p>
<h2 id="whats-next">What&rsquo;s Next?</h2>
<p>The usual flow of building a semantic layer is that you start with a cloud warehouse, you start up something quick and fast, the dashboard or insight gets more useful, more people use it, more want new metrics added, so you patch and update the ETL pipeline. The pipeline gets slow, so people ask to improve it, so you build caching mechanisms and materialized tables to speed it up, but all of a sudden, you end up with a mess. All your metrics and business transformations are scattered around in the ETL pipelines, in the materialized views, in the newly patched scripts you build, and in ad-hoc dashboards.</p>
<p>So instead, we could use an agentic semantic layer that is prepared for fast-changing metrics and business requirements with its extendable query engine, integrated with any popular AI harness, as well as absorbing and defining the right amount of business context through context primitives.</p>
<p>In this article, we learned why we might need yet another semantic layer that is open source and built for today&rsquo;s needs. If you <a href="https://motley.ai/blog-posts/how-do-you-know-if-your-semantic-layer-is-bad-part-1-analyzing-usage/" target="_blank" rel="noopener noreffer">decide on a semantic layer</a>, look at agent-friendliness, query-time expressiveness, and entity and context discoverability. If it&rsquo;s not included, you usually end up building it yourself. You want a semantic layer so agents don&rsquo;t end up writing raw SQL.</p>
<p>Again, agents should be able to express their query intent in a way that&rsquo;s as concise as possible, and just formal enough to be unambiguous, but let the deterministic machinery figure out the necessary joins, subqueries, and safeguards, for both safety/correctness and context-saving reasons. This increases query expressiveness and simplicity, so dimensions can be derived from aggregations, as well as multi-stage aggregations, or guaranteed fan-out.</p>
<hr>
<p>Curious to learn more? See related blog articles and architecture decisions:</p>
<ul>
<li>Check out the amazing explanation on concepts like Models, Queries, etc. at <a href="https://docs.motley.ai/slayer/concepts/terminology/" target="_blank" rel="noopener noreffer">Docs.Motley.ai</a>.</li>
<li><a href="https://github.com/MotleyAI/slayer/blob/main/architecture/semantics.arc42.md" target="_blank" rel="noopener noreffer">Architecture decisions</a> SLayer made.</li>
<li>Some comparisons such as <a href="https://motley.ai/compare/slayer-vs-metricflow/" target="_blank" rel="noopener noreffer">dbt semantic Layer (MetricFlow) vs. SLayer</a>, or <a href="https://motley.ai/blog-posts/we-tried-to-benchmark-slayer-and-cube-we-failed/" target="_blank" rel="noopener noreffer">Why our SLayer vs Cube agent benchmark couldn&rsquo;t finish</a></li>
<li><a href="https://motley.ai/blog-posts/why-a-semantic-layer-is-more-than-a-database-schema/" target="_blank" rel="noopener noreffer">Why a Semantic Layer Is More Than a Database Schema</a></li>
</ul>
<hr>
<pre class=""><em>Full article published at <a href="https://motley.ai/blog-posts/agent-says-what-engine-says-how/" target="_blank" rel="noopener noreferrer">Motley.ai</a> - written as part of <a href="/services/">my services</a></em></pre>
<div class="footnotes" role="doc-endnotes">
<hr>
<ol>
<li id="fn:1">
<p>e.g., <a href="https://www.ssp.sh/brain/semantic-layer-measure-definition-examples/" target="_blank" rel="noopener noreffer">Semantic Layer Measure Definition Examples</a>&#160;<a href="#fnref:1" class="footnote-backref" role="doc-backlink">&#x21a9;&#xfe0e;</a></p>
</li>
<li id="fn:2">
<p>Some of the semantic layers do have an expressive query language, or APIs or enhanced features to integrate into the existing data stack, but they are behind a paid service.&#160;<a href="#fnref:2" class="footnote-backref" role="doc-backlink">&#x21a9;&#xfe0e;</a></p>
</li>
<li id="fn:3">
<p>This is also a good place to mention that a semantic layer is not the same as newer upcoming terms such as Context Layer, which is more about managing and ingesting context at large, keeping it up to date and managed. A semantic layer is more about the definition of <a href="https://www.ssp.sh/brain/metrics/" target="_blank" rel="noopener noreffer">metrics</a> and business-relevant KPIs, not so much scraping or updating the actual &ldquo;context&rdquo; or information.&#160;<a href="#fnref:3" class="footnote-backref" role="doc-backlink">&#x21a9;&#xfe0e;</a></p>
</li>
<li id="fn:4">
<p>E.g., time dimension: When we define one year, is it from today, or the end of last month, or of the week? Time or natural language is hard for this.&#160;<a href="#fnref:4" class="footnote-backref" role="doc-backlink">&#x21a9;&#xfe0e;</a></p>
</li>
</ol>
</div>
]]></description>
</item>
<item>
    <title>A Year of Linux, a Month of Omarchy Quattro—Part 3</title>
    <link>https://www.ssp.sh/blog/omarchy-linux-quattro/</link>
    <pubDate>Sat, 19 Sep 2026 08:40:00 &#43;0200</pubDate>
    <author>Simon Späti</author>
    <guid>https://www.ssp.sh/blog/omarchy-linux-quattro/</guid><enclosure url="https://www.ssp.sh/blog/omarchy-linux-quattro/featured-image.png" type="image/png" length="0" /><description><![CDATA[<p>This is my Part 3 about [[Omarchy]], after using it for more than a year full time, as my main daily driver first on Lenovo ThinkBook 14 AMD, and now <a href="https://x.com/sspaeti/status/1966052590988476910" target="_blank" rel="noopener noreffer">TUXEDO InfinityBook</a>, for my business and personal use, replacing my MacBook Pro M1 after using macOS for 15 years.</p>
<p>I am sharing the newest updates of the Quattro version, which onboarded a whole lot more people. One would say it went a little viral. It&rsquo;s everywhere on X and on socials. This is my take after using it for a month, comparing it to the previous versions, and showing what I like most, and maybe some things you should still be aware of.</p>
<blockquote>
<p>[!info]<br>
See more in <a href="/blog/macbook-to-arch-linux-omarchy/" rel="">Part 1</a> about my transition, what tools I needed, and in <a href="/blog/linux-omarchy-the-good-bad-and-fixable/" rel="">Part 2</a>, the good, the bad, and the fixable. I&rsquo;m also the original author of the Windows VM work (<a href="https://github.com/omacom/omarchy/pull/1333" target="_blank" rel="noopener noreffer">PR #1333</a>, merged via #2462), making Excel and Word available for me as I needed to write offers in Word and my daughters needed it for school. Recently I have also contributed a couple of plugins, the most used being the timezone plugin.</p>
</blockquote>
<h2 id="so-whats-new-in-quattro">So What&rsquo;s New in Quattro?</h2>
<p>Maybe the biggest question: what is new that started the <a href="https://omarchy.org/news/2026/09/quattro-crosses-200000-iso-downloads/" target="_blank" rel="noopener noreffer">hype</a> even more? Why is it all over social media when it was already out there for a full year?</p>
<p>The main reason is its <strong>integrated design</strong> with <a href="https://quickshell.org/" target="_blank" rel="noopener noreffer">Quickshell</a> (written in C++, Qt, QtQuick), which made the full interface one cohesive OS that is ultra fast<sup id="fnref:1"><a href="#fn:1" class="footnote-ref" role="doc-noteref">1</a></sup>. It feels like an OS such as macOS, not like 100 different tools patched together, which is what Linux usually is. Sure, most distros have a cohesive look, but as soon as you want to change anything, you need to look at different dotfiles, different ways of configuring, some use toml, some json, others .ini files, etc. Omarchy built it all on the same tool chain, which is well chosen, ultra fast, and looks beautiful, and the config is unified with Hyprland bindings, monitors and toggles in Lua and the shell itself with <a href="https://doc.qt.io/qt-6/qmlreference.html" target="_blank" rel="noopener noreffer">QML</a>. If you don&rsquo;t know the details, everything is available through the integrated Omarchy Menu.</p>
<p>![[omarchy-menu.png]]</p>
<p>And even more so, if you want to change monitor settings, you can just do it from the top bars, and Omarchy will change the settings in your dotfiles. It&rsquo;s still the same tools underneath (most of them, as Omarchy comes with lots of great tools that are designed for Omarchy, e.g. <a href="https://github.com/tobi/omasnap" target="_blank" rel="noopener noreffer">Omasnap</a>, the best screen capture tool, which finally replaced my beloved Snagit adequately on Linux - also because I added the cut-out feature myself and scrolling capture was recently added too, omacut for video editing, omawrite, and a bunch of other tools). But otherwise it&rsquo;s the best-of-breed Linux utils and most importantly, <strong>[[TUIs]]</strong>.</p>






<figure><video
  controls
  width="1280"
  height="720"
  style="max-width: 100%; height: auto;"
  autoplay
  loop
  muted
  
  
>
  <source src="/blog/omarchy-linux-quattro/omasnap-scrolling-obsidian-nvim.mp4" type="video/mp4">
  Your browser does not support the video tag.
</video><figcaption class="image-caption">Omasnap, replaced beloved Snagit Screencasting with scrollable capture and horizontal and vertical in-line cut out</figcaption>
</figure>
<blockquote>
<p>[!note] Unified Menus, Settings, Launcher<br>
The new launcher is amazing in two distinct ways. Opening it and typing is so fast. It feels instant. With the old [[Walker Launcher]], I always had to physically wait before I typed what I searched for, as otherwise it would swallow the first letter.</p>
<p>Second, something I&rsquo;ve <a href="https://github.com/sspaeti/dotfiles/blob/4fa79fdb99da770185f60af2637f1485ba6ab3df/hypr/.config/hypr/sspaeti/omarchy-menu-flat" target="_blank" rel="noopener noreffer">built for myself</a> from day one: you can fuzzy search the config entries below the tree. E.g. if you want to change the background, you don&rsquo;t need to remember or know that it is under the parent <code>Style</code> and search for it for a couple of seconds, going into the wrong branches a couple of times. Instead, you just search <code>back..+ enter</code> and you&rsquo;re there.</p>
</blockquote>
<h3 id="pluggable-change-your-operating-system-the-malleable-os">Pluggable: Change Your Operating System, the Malleable OS</h3>
<p>But probably the biggest release and unlock for most people coming new into Omarchy (and Linux: remember, the target audience of Omarchy is not existing Linux users, who already know most of the glory and sheer beauty of tools out there, but macOS and Windows users) is the <strong><a href="https://plugins.omarchy.org/" target="_blank" rel="noopener noreffer">plugin marketplace</a></strong> (<a href="https://x.com/chyldm5d/status/2097614697046708414" target="_blank" rel="noopener noreffer">3000 in the less than a month</a>, currently at <code>3548</code>).</p>
<p>But why is this such a big thing, you might ask? Because it opens up the genie (Fable or GPT-6 Astra) to basically add any tool or visual to your OS that you want. Yeah, does not sound impressive, right? But ask Microsoft or Apple to add a timezone plugin into the actual OS, or change the ugly (personal taste) liquid glass back to the standard view, so it does not take <a href="https://x.com/abasisgenius/status/1997973419779096975" target="_blank" rel="noopener noreffer">drain battery</a> out of your laptop for making the windows translucent. You can&rsquo;t. You just get what you get. And the last couple of years, or months, were a disaster for macOS and Windows: instead of adding useful features, they shipped surveillance (hello <a href="https://youtu.be/PKmr2jF26sc" target="_blank" rel="noopener noreffer">Windows Recall</a>), or bad <a href="https://x.com/rossmllr/status/1987255842693922923" target="_blank" rel="noopener noreffer">rounded corners</a> on macOS, or bad liquid glass design choices you had no control over.</p>
<p>If you experience it once: one prompt to change this, or to integrate your personal API into your OS, and it changes your perspective. That&rsquo;s why people, especially non-technical ones who didn&rsquo;t even have the possibility to program an app before, can now just ask to build an alert, or add an OCR function to your saved clipboard images (as a <a href="https://plugins.omarchy.org/plugin.html?id=sspaeti.clipboard" target="_blank" rel="noopener noreffer">Plugin</a>, <a href="https://github.com/omacom/omarchy/pull/7452" target="_blank" rel="noopener noreffer">PR</a> to add to Omarchy), or update the fuzzy finder to search files, etc. I have literally changed 100s of things in my Omarchy setup. It might look similar to the default, but it&rsquo;s very customized to my workflow. Which is what I love most.</p>






<figure><video
  controls
  width="1124"
  height="568"
  style="max-width: 100%; height: auto;"
  autoplay
  loop
  muted
  
  
>
  <source src="/blog/omarchy-linux-quattro/omarchy-screen-theme-changes.mp4" type="">
  Your browser does not support the video tag.
</video><figcaption class="image-caption">Custom made themes, based on my own pictures, as Omarchy theme.</figcaption>
</figure>
<p>I can customize the OS to work for me, instead of me needing to adapt to how the OS is working. Again, very hard to put into words if you haven&rsquo;t experienced it. That&rsquo;s why I recommend to everyone who is a little curious: take an old laptop that can&rsquo;t work anymore with the latest macOS or Windows, and just install Omarchy (needs a USB stick), it literally takes less than a minute (current world record, not released yet, <a href="https://x.com/dhh/status/2100916741429711312" target="_blank" rel="noopener noreffer">9 seconds</a>).</p>
<h2 id="its-not-a-better-macos-or-windows">It&rsquo;s not a Better macOS or Windows</h2>
<p>Also, DHH, the creator of Omarchy, didn&rsquo;t intend to make a better macOS or Windows. Instead, he created a whole new OS that didn&rsquo;t exist yet.</p>
<p>People who said it&rsquo;s just a couple of dotfiles are totally wrong. Because when I initially tried Linux, the sheer amount of work to make external monitors, internal camera, fingerprint, etc. work was astronomical. When I installed Omarchy the first time, it all just worked, out of the box. Most of my favorite tools were installed already, and design and theming are top notch.</p>
<p>Even more, it has a tiling manager, one thing I had in my macOS setup anyway, and it&rsquo;s very terminal and TUI centric, another thing I was <a href="https://www.youtube.com/watch?v=sStKFOwNaSM" target="_blank" rel="noopener noreffer">already doing</a> on macOS, so the switch was super natural to me. But I understand that for a normal Windows or macOS user, moving windows around, maximizing and closing windows with the mouse, this new OS might be overwhelming at first.</p>
<p>This OS is not meant to be learnt in minutes, it takes some effort to learn, and that&rsquo;s intentional. Because all good things, ways of working that are different from what we are used to, need some work. The best thing I can think of, as a [[Vim Language (and Motions)|Vim Motions]] lover, is Vim. You don&rsquo;t learn the commands and way of working in a day, you need at least a week to be roughly as proficient as with your old way. For full proficiency, it will take at least 3 months.</p>
<p>But they make it easier and easier to learn. There&rsquo;s a shortcut to just show all key shortcuts, or you can just pop up Learn Omarchy.</p>
<h2 id="what-else-the-agentic-os">What Else? The Agentic OS?</h2>
<p>I think that&rsquo;s it, these are the most critical changes compared to the version before. But wait, there&rsquo;s one more. The <strong><a href="https://world.hey.com/dhh/the-malleable-computer-7c187a9b" target="_blank" rel="noopener noreffer">malleable computer</a></strong>, as DHH likes to say. It integrates with any agent of choice, and they&rsquo;re all installable with &ldquo;one menu item&rdquo;. Every harness or model you can think of is there. And why is that? Because you can ask your agents to fix bugs with your monitor, or to set things up when you are at a presentation or a new co-working place. Before you might have needed to google and spend lots of time, now you are just one prompt away from almost anything.</p>
<p>This is what Linux could do before Omarchy, but not macOS or Windows. And it&rsquo;s now accessible, packaged in a single under-1min installer, beautifully designed and with all the features you want anyway, built by a large community.</p>
<p>This is what I haven&rsquo;t seen before. That&rsquo;s why there are so many people showing up, building things I needed anyway, and then sharing theirs with others. It&rsquo;s so infectious. That&rsquo;s why people who don&rsquo;t use it can&rsquo;t believe it. And the pace at which changes come in is so rapid that it&rsquo;s hard to keep up, and not to have an outdated opinion about it. Because the Omarchy I wrote about in <a href="/blog/macbook-to-arch-linux-omarchy/" rel="">Part 1</a>, or in <a href="/blog/linux-omarchy-the-good-bad-and-fixable/" rel="">Part 2</a>, is not the Omarchy Quattro of today anymore. And by the time I share this article, or you read this, I&rsquo;m sure there are 100 other new cool improvements worth sharing.</p>
<p>That&rsquo;s why you should keep an eye on the <a href="https://omarchy.org/news/rss.xml" target="_blank" rel="noopener noreffer">RSS feed</a> or <a href="https://omarchy.org/news/" target="_blank" rel="noopener noreffer">website news</a> to see what&rsquo;s going on. Also DHH has already hired through the <a href="https://omarchy.org/foundation/" target="_blank" rel="noopener noreffer">Omacom Foundation</a> a bunch of Linux folks who work on <a href="https://omarchy.org/news/2026/08/omacom-foundation-to-be-exclusive-hyprland-sponsor/" target="_blank" rel="noopener noreffer">Hyprland</a>, <a href="https://omarchy.org/news/2026/09/omacom-foundation-hires-outfoxxed/" target="_blank" rel="noopener noreffer">QuickShell</a> and <a href="https://omarchy.org/news/2026/09/omacom-foundation-hires-emir-beganovic/" target="_blank" rel="noopener noreffer">more</a>. People who otherwise had to do that in their free time can now work on it full time, hopefully with a comfortable salary, making the <strong>Linux experience better for everyone</strong>.</p>
<h3 id="improving-the-linux-experience-for-everyone-open-source-based">Improving the Linux Experience for Everyone, Open-Source Based</h3>
<p>This is what I fell in love with throughout my career anyway: open source software, sharing what you build for anyone to see your code, forking or contributing. Working on a common goal together, instead of each one in their private repos.</p>
<p>This is what Omarchy is: an open Linux repo where all the fixes each of us would <strong>otherwise have needed to suffer through</strong> now get shared, and even packaged in a way that we can install in a crazy 9 seconds!!!!</p>
<p>That&rsquo;s why everyone is so excited, at least the ones who realise this, or don&rsquo;t have countless hours to set up a hard disk, or a partition. At least, that&rsquo;s what I did in my early years, 100 times with Windows, and also a few times with Linux, and it was always a pain. Being afraid to hit the wrong partition, to make it too small and then later needing to repartition or reinstall the OS because I didn&rsquo;t choose a good default. These are things I don&rsquo;t enjoy.</p>
<h3 id="making-it-my-own-fonts-workflow-optimizations">Making it My Own: Fonts, Workflow Optimizations</h3>
<p>But what I enjoy are <strong>aesthetics and workflow improvements</strong>. I want to change the fonts in my terminal, I want to change my workflow for taking notes, or capturing print screens that have worked for me for the last 20 years, that I have optimized so diligently. So now there&rsquo;s an OS where I can take that to the moon, and I did.</p>
<p>Sure, there&rsquo;s a lot of time &ldquo;wasted&rdquo;, but I&rsquo;d say I loved it, I learned a ton, and why wouldn&rsquo;t I spend a ton of time optimizing the toolchain I use every day for my work? I&rsquo;m an author and data engineer who works 8-10 hours every day on the computer, sometimes even in my free time playing around with nerdy stuff like neovim, Obsidian and distraction-free typewriters. I love this. But every second I optimize is joy given back when I use the operating system. It&rsquo;s how I interface with the computer.</p>
<p>Omarchy has made it possible to take an awesome starting point, customize it to my needs, make it my own, while still getting all the new cool features that I might not have known I needed, but once there, I can just use them. E.g. just one example, the speech-to-text integration with voxtype is just so cool and handy, I&rsquo;m not a talker to my computer, but here and there I might use it. So I would not spend hours to set it up, but you know what, I once accidentally saw it on Twitter, I tried it, and it just worked.</p>






<figure><video
  controls
  width="1280"
  height="720"
  style="max-width: 100%; height: auto;"
  autoplay
  loop
  muted
  
  
>
  <source src="/blog/omarchy-linux-quattro/voxtype-omarchy.mp4" type="video/mp4">
  Your browser does not support the video tag.
</video><figcaption class="image-caption">This is me just speaking and see how fast the real time translation is. That came just out of the box, I didn&rsquo;t setup anything. These are the kind of feature you&rsquo;d expect from an OS update.</figcaption>
</figure>
<p>This is really the beauty of Omarchy, for me, and why Quattro took off so much. And potentially for you too? But we are just at the start, so there&rsquo;s much more to come, and I&rsquo;m very excited for it. Though I also just value using the system, I need to get work done. So even if you don&rsquo;t want all the hype or changes, you can just use Omarchy, and you get the best Linux experience out there. The latest update included a bespoke <a href="https://github.com/omacom/omarchy/releases/tag/v4.0.4" target="_blank" rel="noopener noreffer">Omarchy Linux Kernel</a>, just for Omarchy, to keep the desktop responsive and multitasking smooth, even under heavy load or memory pressure.</p>
<p>So that&rsquo;s a lot of words for the 4.0 version of a Linux distro, but I hope I could make it clearer what it is all about.</p>
<p>If you want to know more about <a href="https://www.ssp.sh/brain/my-terminal-workflow-with-macos-and-linux/" target="_blank" rel="noopener noreffer">my terminal workflows,</a> (note-taking, database, writing with Zen and Nvim) or nerdy Omarchy-related stuff, check out my second brain note on [[Omarchy]] with all its backlinks and graph, where you can see related notes. Especially check out the beautiful [[TUIs]], this is really my favorite places to be in when on a computer. For example, for this article is written on a [[My Distraction-Free Typewriter (Micro Journal)|Typewriter]], no GUI, just plain terminal style (Simple Raspberry Pi Zero 2 with Debian and [[Neovim]]).</p>













  

























<figure><span class="img-expandable" data-full="/blog/omarchy-linux-quattro/microjournal.jpg">
<a target="_blank" href="/blog/omarchy-linux-quattro/microjournal.jpg" title="Typed on my beloved Distraction-Free Typewriter (Micro Journal)">

</a><button type="button" class="expand-btn" aria-label="Expand image" title="Expand image" hidden><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true"><path d="M15 3h6v6M9 21H3v-6M21 3l-7 7M3 21l7-7"/></svg></button>
</span><figcaption class="image-caption">Typed on my beloved <a href="https://www.ssp.sh/brain/my-distraction-free-typewriter-micro-journal/" target="_blank" rel="noopener noreffer">Distraction-Free Typewriter (Micro Journal)</a></figcaption>
</figure>
<p>Find more related links and the custom plugins I&rsquo;ve contributed to Omarchy so far. Thanks for reading this far. Feel free to share your workflow and how you use Omarchy—I&rsquo;m always interested in learning more.</p>
<h2 id="further-reads">Further Reads</h2>
<ul>
<li>[[Omarchy|Omarchy Note]] with backlinks and interactive graph to find related notes.</li>
<li><a href="/blog/macbook-to-arch-linux-omarchy/" rel="">Part 1: My Journey from macOS to Arch Linux with Omarchy</a></li>
<li><a href="/blog/linux-omarchy-the-good-bad-and-fixable/" rel="">Part 2: Arch Linux (Omarchy) — 8 Months Later: The Good, the Bad, and the Fixable</a></li>
<li><a href="https://youtu.be/XOp8lngtmPg?si=_BUkQLEwBtEd4lC3" target="_blank" rel="noopener noreffer">My Omarchy workflow video</a> and <a href="https://www.youtube.com/watch?v=sStKFOwNaSM" target="_blank" rel="noopener noreffer">macOS for comparison</a></li>
<li><a href="https://luma.com/xmkodjwv" target="_blank" rel="noopener noreffer">Omarchy Event Switzerland (Biel P15)</a></li>
<li><a href="https://github.com/sspaeti/dotfiles/" target="_blank" rel="noopener noreffer">All my dotfiles</a>, including omarchy under Linux mostly under <code>linux_applications</code>, <code>omarchy</code>, <code>hypr</code></li>
</ul>
<h3 id="my-plugins">My Plugins</h3>
<p>All <a href="https://plugins.omarchy.org/?author=sspaeti" target="_blank" rel="noopener noreffer">my Omarchy plugins</a>:<br>
![[sspaeti-omarchy-plugins.png]]</p>
<h4 id="timezones">Timezones</h4>






<figure><video
  controls
  width="1280"
  height="720"
  style="max-width: 100%; height: auto;"
  autoplay
  loop
  muted
  
  
>
  <source src="/blog/omarchy-linux-quattro/timezone-plugin.mp4" type="video/mp4">
  Your browser does not support the video tag.
</video><figcaption class="image-caption">Timezone widget to see what time it is in my client&rsquo;s timezone</figcaption>
</figure>
<h4 id="search-images-with-ocr-from-clipboard">Search Images with OCR from Clipboard</h4>













  

























<figure><span class="img-expandable" data-full="/blog/omarchy-linux-quattro/oct-clipboard.png">
<a target="_blank" href="/blog/omarchy-linux-quattro/oct-clipboard.png" title="Plugin and change of Omarchy to text-search my clipboard images">

</a><button type="button" class="expand-btn" aria-label="Expand image" title="Expand image" hidden><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true"><path d="M15 3h6v6M9 21H3v-6M21 3l-7 7M3 21l7-7"/></svg></button>
</span><figcaption class="image-caption">Plugin and change of Omarchy to text-search my clipboard images</figcaption>
</figure>
<h5 id="and-this-is-how-i-search-my-files">And this is how I search my files</h5>






<figure><video
  controls
  width="1280"
  height="720"
  style="max-width: 100%; height: auto;"
  autoplay
  loop
  muted
  
  
>
  <source src="/blog/omarchy-linux-quattro/omarchy-file-content-search.mp4" type="video/mp4">
  Your browser does not support the video tag.
</video><figcaption class="image-caption">How I search files on my machine</figcaption>
</figure>
<h4 id="tui-email-client-in-the-top-bar">TUI Email Client in the top bar</h4>






<figure><video
  controls
  width="1280"
  height="720"
  style="max-width: 100%; height: auto;"
  autoplay
  loop
  muted
  
  
>
  <source src="/blog/omarchy-linux-quattro/omarchy-neomd-plugin.mp4" type="video/mp4">
  Your browser does not support the video tag.
</video><figcaption class="image-caption">Integrated email for Omarchy with my email client Neomd</figcaption>
</figure>
<h4 id="my-website-analytics-in-the-top-bar">My Website Analytics in the top bar</h4>






<figure><video
  controls
  width="1280"
  height="720"
  style="max-width: 100%; height: auto;"
  autoplay
  loop
  muted
  
  
>
  <source src="/blog/omarchy-linux-quattro/preview-goatcounter-omarchy-plugin.mp4" type="video/mp4">
  Your browser does not support the video tag.
</video><figcaption class="image-caption">Goatcounter, my website analytics, integrated into my Operating system</figcaption>
</figure>
<h4 id="cliamp-listening-music-in-a-tui">Cliamp: Listening Music in a TUI</h4>
<p>Not my plugin, but one I tested, and super cool to listen Spotify:<br>


<div class="x-embed-wrapper" style="display: flex; justify-content: center; margin: 1.5em 0;">
          <blockquote class="twitter-tweet" data-dnt="true"><p lang="en" dir="ltr">Need a better Spotify client that looks cool and uses 2GB less memory? <br><br>Try Cliamp, inspired by Winamp. Beautiful little TUI. <a href="https://t.co/l5MWBxhAnk">https://t.co/l5MWBxhAnk</a> <a href="https://t.co/2Nk6HDyBY6">pic.twitter.com/2Nk6HDyBY6</a></p>&mdash; Simon Späti 🏔️ (@sspaeti) <a href="https://x.com/sspaeti/status/2088903240175722719?ref_src=twsrc%5Etfw">August 16, 2026</a></blockquote>
<script async src="https://platform.x.com/widgets.js" charset="utf-8"></script>


        </div>
        <script>
        (function() {
          function updateXTheme() {
            var isDark = document.body.getAttribute('theme') === 'dark';
            var theme = isDark ? 'dark' : 'light';
            
            document.querySelectorAll('blockquote.twitter-tweet').forEach(function(el) {
              el.setAttribute('data-theme', theme);
            });
            
            document.querySelectorAll('.x-embed-wrapper iframe').forEach(function(iframe) {
              var src = iframe.src;
              if (src) {
                var url = new URL(src);
                if (url.searchParams.get('theme') !== theme) {
                  url.searchParams.set('theme', theme);
                  iframe.src = url.toString();
                }
              }
            });
          }
          
          updateXTheme();
          
          new MutationObserver(function(mutations) {
            mutations.forEach(function(m) {
              if (m.attributeName === 'theme') updateXTheme();
            });
          }).observe(document.body, { attributes: true });
        })();
        </script></p>
<div class="footnotes" role="doc-endnotes">
<hr>
<ol>
<li id="fn:1">
<p>Quickshell is newly used for the <em>bar, launcher, menus, notifications, on-screen displays, control panels, lock screen, and polkit agent</em> now all live inside a single long-running shell process with a <strong>plugin architecture</strong>. That means <em>Waybar, Walker, Mako, SwayOSD, hyprlock, hypridle, swaybg, and polkit-gnome</em> are all gone, replaced by one coherent, fully-themed, IPC-scriptable shell. <a href="https://github.com/omacom/omarchy/releases/tag/v4.0.0" target="_blank" rel="noopener noreffer">Release notes</a>&#160;<a href="#fnref:1" class="footnote-backref" role="doc-backlink">&#x21a9;&#xfe0e;</a></p>
</li>
</ol>
</div>
]]></description>
</item>
<item>
    <title>Obsidian Vault to Enterprise Company Brain: Where Agents Write, Branch and Merge</title>
    <link>https://www.ssp.sh/blog/from-obsidian-to-enterprise-company-brain/</link>
    <pubDate>Tue, 15 Sep 2026 08:00:08 &#43;0200</pubDate>
    <author>Simon Späti</author>
    <guid>https://www.ssp.sh/blog/from-obsidian-to-enterprise-company-brain/</guid><enclosure url="https://www.ssp.sh/blog/from-obsidian-to-enterprise-company-brain/featured-image.png" type="image/png" length="0" /><description><![CDATA[<p>I&rsquo;ve been using a personal second brain for many years. I started with OneNote and pivoted to Obsidian due to the linking feature. Since then, I have built a full net of knowledge for my personal life, but not only that: I also manage my solo business with Obsidian, such as my CRM or everything knowledge-related to my company.</p>
<p>But what if you want the same approach for a bigger company, enterprise scale with lots of information internally, but also available externally? How do you manage knowledge in that context, with multiple writers, lots of consumers, and always up to date? Though enterprise knowledge management isn&rsquo;t something new, a self-curating LLM Wiki that Andrej Karpathy shared in a short <a href="https://gist.github.com/karpathy/442a6bf555914893e9891c11519de94f" target="_blank" rel="noopener noreffer">gist</a> went viral, and it showed what&rsquo;s possible for a small personal, auto-updated knowledge wiki. But it&rsquo;s not working at enterprise scale, and also, there&rsquo;s no verification process or versioning happening.</p>
<p>In this article, we go from a personal brain to an enterprise company brain and show the feature differences, what enables them, and how agents help us not only read context but also write and update information. We explore how agents write on their own branches (with changes that don&rsquo;t collide and with collisions where humans review and decide). Everything is accompanied by two showcases at the end that compare the two brains and their scale.</p>
<h2 id="how-it-started-enterprise-knowledge-management">How it Started: Enterprise Knowledge Management</h2>
<p>If we look at the history of six decades of knowledge management, we see that it&rsquo;s not something entirely new, but the way we work, from foundational to wikis, over to graphs and now LLM-enhanced, is interesting:</p>
<div class="mermaid-container">
    <div class="mermaid" id="id-3"></div><button type="button" class="expand-btn" aria-label="Expand diagram" title="Expand diagram" hidden><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true"><path d="M15 3h6v6M9 21H3v-6M21 3l-7 7M3 21l7-7"/></svg></button>
</div><!-- 












  

























<figure><span class="img-expandable" data-full="/blog/from-obsidian-to-enterprise-company-brain/mermaid-knowledge-management-evolution.png">
<a target="_blank" href="/blog/from-obsidian-to-enterprise-company-brain/mermaid-knowledge-management-evolution.png" title="Enterprise &amp; Personal Knowledge Management Evolution">

</a><button type="button" class="expand-btn" aria-label="Expand image" title="Expand image" hidden><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true"><path d="M15 3h6v6M9 21H3v-6M21 3l-7 7M3 21l7-7"/></svg></button>
</span><figcaption class="image-caption">Enterprise &amp; Personal Knowledge Management Evolution</figcaption>
</figure> -->
<p>For my personal knowledge brain, I use a graph to connect my personal notes for my personal life, school, and even work. It started with Roam, but you can use any linked note-taking app such as Obsidian or Logseq. I&rsquo;d suggest using an open file format like <strong>Markdown plaintext files</strong>, so your knowledge is not tied to the tool.</p>
<p>If we assess what a single-user connected graph system looks like, we can then compare its limitations and how it compares to enterprise knowledge management. A personal system stands for:</p>
<ul>
<li>A place to <strong>capture and collect</strong> &ldquo;knowledge&rdquo; for long-term retention (an open format that still works in 100 years)</li>
<li><strong>Idea creation</strong>, a place where we can <strong>curate and write</strong> knowledge</li>
<li><strong>Understanding and learning</strong> new things through interlinking notes (building the graph below)</li>
<li>Knowledge retrieval and getting insights from connections that have been written over years</li>
<li>Templates to automate common note structures, integration with knowledge capturing tools (e.g. <a href="https://obsidian.md/clipper" target="_blank" rel="noopener noreffer">Obsidian Web Clipper</a>)</li>
</ul>
<p>There are probably many more, but these are the essence of what a personal system should provide you.</p>













  
<figure><span class="img-expandable" data-full="/blog/from-obsidian-to-enterprise-company-brain/obsidian-graph.webp">
<a target="_blank" href="/blog/from-obsidian-to-enterprise-company-brain/obsidian-graph.webp" title="Open image in full size">

</a><button type="button" class="expand-btn" aria-label="Expand image" title="Expand image" hidden><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true"><path d="M15 3h6v6M9 21H3v-6M21 3l-7 7M3 21l7-7"/></svg></button>
</span><figcaption class="image-caption">Interconnected graph of personal knowledge, and how your system looks in graph form. | More at  <a href="https://ssp.sh/brain/todays-daily-graphs-obsidian-graph/" target="_blank" rel="noopener noreffer">Todays Daily Graphs</a></figcaption>
</figure>
<h3 id="limitations-of-a-personal-knowledge-brain">Limitations of a Personal Knowledge Brain</h3>
<p>There are real practical limitations and disadvantages a personal brain has over a company and enterprise brain. There are <strong>no multi-user capabilities</strong>, or hardly any, with just local Markdown files (you&rsquo;d need to sync them with <a href="https://en.wikipedia.org/wiki/Conflict-free_replicated_data_type" target="_blank" rel="noopener noreffer">CRDTs</a> or find another way), but ultimately, text files or Markdown files are not made for it.</p>
<p>The graph also has no types or way to guarantee that a data type is persistent. It&rsquo;s unstructured, &ldquo;free-flow&rdquo; text. Linked notes (mostly <a href="https://en.wikipedia.org/wiki/Zettelkasten" target="_blank" rel="noopener noreffer">Zettelkasten</a>) are provided with limited semantics between the notes and the relations between them. This is what Sergei Simonovi <a href="https://www.lesswrong.com/posts/DtpjeBf9bzzqNJDmr/rethinking-the-second-brain-from-storing-information-to-1" target="_blank" rel="noopener noreffer">says as well</a>, noting that this can lead to &ldquo;friction points when working with a large number of notes&rdquo;.</p>
<p>If we have not 1000s, but millions of notes, we need an index for fast retrieval, we might need embeddings/clustering, and we need something that scales with the company size and all types of data (TXT, CSV, APIs, JSON, etc.).</p>
<h2 id="enterprise-knowledge-management-scale-multiple-users-concurrent-writes-auto-update">Enterprise Knowledge Management Scale: Multiple Users, Concurrent Writes, Auto Update</h2>
<p>Surprisingly maybe, all of the requirements we have for a personal brain, we also have for a business. We need to <strong>retrieve last month&rsquo;s/year&rsquo;s sales numbers</strong>, we <strong>want to learn new insights</strong> from an ever-changing business environment (new laws, new provided data we can use), and we <strong>want to share with internal and external stakeholders</strong>.</p>
<p>But it&rsquo;s on a much bigger scale. We need to work with multiple users and bigger, more sophisticated data sets. We can&rsquo;t just copy-paste from a website. We need data pipelines, a data warehouse.</p>
<p>We want automation, as well as governance. In a sense, you can <strong>imagine replacing some custom software products</strong> like CRMs or ERPs that need dedicated systems and SW, especially CRMs, which gather all sorts of context, from customers combined with inputs from the sales reps on when they called last, what the customer said, what their temperature is right now (hot/warm/cold), etc. If that can be gathered from notes of sales reps automatically, or from dedicated logs from the phone if approved, or similar, these states can be managed in a company brain, and it is a good example of what we need.</p>
<h3 id="features-of-such-an-enterprise-company-brain">Features of such an Enterprise Company Brain</h3>
<p>An enterprise company&rsquo;s brain needs multiple users to write to it concurrently, and we need automation. This is where agents join the picture, and agents play a big part, but not the only one. Being able to version state when multiple concurrent users write is key, or you need a storage system that can handle all requests and the volume.</p>
<h4 id="agents-first-governance-for-auto-update-context">Agents-First Governance for Auto-update Context</h4>
<p>Agents are very good at <strong>capturing information</strong> in any format. Agents should give us the comfort of doing that autonomously. We want them to read defined locations with information that can be valid for a company brain. Staying with the CRM example, all customers from the database should be automatically updated every day, calls and docs should be ingested and updated, deals and contracts should be related and attached to each customer, and so on.</p>
<p>But how do they write new context to the company brain?</p>
<h4 id="versioned-with-branches">Versioned: with Branches</h4>
<p>That&rsquo;s where we need branching. Not only because 100s of AI agents adding knowledge at once will trip over each other, but also because every change can be <strong>reviewed before it lands</strong>. Without that, a company brain fed by agents drifts into noise. Auto-changing a wrong phone number, or a hallucinated deal status, can lead to an untrustworthy state in a few weeks.</p>
<p>So we give each agent its own branch and its own private copy. It writes there, and then its changes get merged back into the <code>main</code> branch, exactly like a GitHub pull request. Nothing lands on the &ldquo;real&rdquo; version until it&rsquo;s approved. <strong>Humans can review and decline certain merges</strong>, or revert them later, and you get a full history of who changed what.</p>
<p>On top of that, agents and humans can work at the same time without corrupting anything. This avoids conflicts and lets multiple agents work in parallel. Branches are also great for <strong>long-running tasks</strong>, since they can run concurrently and merge back when they&rsquo;re done. So you get <strong>verification</strong> and multi-concurrency in one go.</p>
<p>More generally, a <strong>requirement for a useful company brain</strong> is that it stays continuously up to date, correct, and enriched (see CRMs that are always stale, missing, or incorrect, so humans patch by asking colleagues, but agents act directly). Branches are what make &ldquo;continuously updated&rdquo; and &ldquo;still correct&rdquo; work together.</p>
<h4 id="cheap-storage-accessible-for-everyone-object-storage">Cheap Storage, Accessible for Everyone: Object Storage</h4>
<p>We need an open space where data can be written, where we can version our data. The best place, one that is affordable in price, is object storage. Besides its easy setup and ease of use, it also allows using open formats such as Apache Parquet or other [[Data Lake File Formats|open file formats]] (you can also use <a href="https://www.startdataengineering.com/post/what_why_table_format/" target="_blank" rel="noopener noreffer">open table formats</a> if you like, with added database features on top of files) in a place for anyone to read the information with the right access, unlike piping the data into a proprietary database format.</p>
<p>There&rsquo;s no database server to run either: your whole graph is a bunch of files.</p>
<h4 id="consistency-with-agents-typed-graph">Consistency with Agents: Typed Graph</h4>
<p>So how do we make sure that agents write the information grepped from various sources in a consistent way? Unlike the Obsidian Markdown example, where we link them with <code>[ [wikilinks] ]</code> and data is stored free-flow, we can use a typed graph. Meaning the data is stored in a graph linked like Obsidian, but typed with a datatype. So the system you use makes sure that the agents consistently write a number for a client&rsquo;s phone number, or that dates are aligned, etc.</p>
<p>These types act as <a href="https://datacontract.com/" target="_blank" rel="noopener noreffer">data contracts</a> for agents on how to store, but also how to retrieve the right information. It&rsquo;s also key for agents to avoid writing bad data. Instead of separate tables, a typed graph stores everything as a graph (dots and lines). <em>Dots</em> are things (a person, a company, a deal). <em>Lines</em> are how they connect (this person founded that company). It&rsquo;s basically the <strong>&ldquo;connections&rdquo; view in Obsidian</strong>, or how a social network knows who&rsquo;s friends with who.</p>
<p><strong>&ldquo;Typed&rdquo; means it has rules</strong>. Every dot and line has a defined shape you write down first (a Person must have a name, and a FoundedBy line only connects a person to a company). So nothing unrelated can sneak in. Think of it like a form with required fields vs. a blank notebook where anyone writes anything.</p>
<p>We can store <strong>graphs as code</strong>. Here&rsquo;s an example of the node <code>Organization</code>:</p>
<div class="highlight"><div class="chroma open"><div class="code-header language-fallback"><span class="code-title"><i class="arrow svg-icon icon-code-right"></i></span><span class="ellipses"><i class="svg-icon icon-ellipsis"></i></span><span class="copy" title="Copy to clipboard"><i class="svg-icon icon-copy"></i></span></div><div class="table-wrapper">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span><span class="lnt">2
</span><span class="lnt">3
</span><span class="lnt">4
</span><span class="lnt">5
</span><span class="lnt">6
</span><span class="lnt">7
</span><span class="lnt">8
</span><span class="lnt">9
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-fallback" data-lang="fallback"><span class="line"><span class="cl">node Organization {
</span></span><span class="line"><span class="cl">    slug: String @key
</span></span><span class="line"><span class="cl">    name: String @index
</span></span><span class="line"><span class="cl">    brief: String?
</span></span><span class="line"><span class="cl">    description: String?
</span></span><span class="line"><span class="cl">    website: String?
</span></span><span class="line"><span class="cl">    founded_year: I32?
</span></span><span class="line"><span class="cl">    hq: String?
</span></span><span class="line"><span class="cl">...</span></span></code></pre></td></tr></table>
</div></div></div>
<p>Explained in Obsidian terms: a graph link is a connection you declared (&ldquo;A links to B&rdquo;), while an embedding is a resemblance the model inferred (&ldquo;A reads like B&rdquo;). A company brain that holds both can retrieve on meaning and on typed relationships, not just on vector similarity alone.</p>
<p>Together with branches that are versioned, being able to revert certain changes or decline them altogether, built on an open and standard storage layer such as S3, R2, or others, we can increase the quality and consistency a lot.</p>
<p>This is something we&rsquo;ve tried to keep in check with Master Data Management (MDM), where we used Excel for <a href="https://en.wikipedia.org/wiki/Data_steward" target="_blank" rel="noopener noreffer">stewardship</a> of data, but human-powered, which was always the bottleneck: domain experts were already the busiest, and now they get one more job, to check if the data was correct and approve it. With agents, we can accelerate this process, if we have quality documentation and up-to-date files the models can verify against.</p>
<p>Also, there&rsquo;s no absolute truth, and agents can also surface contradictions that naturally happen in the data. Maybe one piece of documentation says the last call for a client was last month, while a log entry shows something else. In such a system, the human can always intercept and change the data too, same as the agents would.</p>
<p>It&rsquo;s a <strong>continuously shared understanding</strong> that is developed together with the agents and the whole company.</p>
<h3 id="do-we-need-ontologies">Do We Need Ontologies?</h3>
<p>But with graphs, we can model data with more accuracy and more detail. This is one advantage. We can model world knowledge into ontologies, and combine them with the enterprise data, which helps the model get more domain understanding with the right &ldquo;connected&rdquo; world+local and business knowledge.</p>
<p>The graph is the most generalized version of an ontology, Ragnor <a href="https://x.com/kozlovski/status/2066182400002990216" target="_blank" rel="noopener noreffer">says</a>. Text links linearly to other texts. A graph has many categories. Agents need an understanding of the domain (what&rsquo;s a customer -&gt; connection to data model etc.). An <strong>ontology is a world of objects that connect together</strong>, and the graph that connects it all, with indexes, embeddings, and the open storage format.</p>
<p>These ontologies are especially helpful for company brains, as they help find a common denominator across different departments. Personal Obsidian knowledge brains don&rsquo;t need them, but they can still be helpful if you want to add the complexity.</p>
<p>A graph can be represented as a table, JSON, etc., but a table can&rsquo;t be converted back into a graph, so you still get the tabular format if you need it. A16z <a href="https://a16z.com/your-data-agents-need-context/" target="_blank" rel="noopener noreffer">argues</a> that the reason using agents hasn&rsquo;t worked so far was &ldquo;<strong>a lack of proper data context</strong>&rdquo;, and that &ldquo;Enterprise data today is still incredibly disparate and messy&rdquo;, which is why data agents struggle to answer basic questions.</p>
<p>And why not use a relational database? Andrew <a href="https://x.com/kozlovski/status/2066182400002990216" target="_blank" rel="noopener noreffer">reframes</a> the problem: Postgres is 40-something years old, and was made due to compute and other restrictions of its time. A design from first principles for agents that need lots of interconnected, real-world knowledge combined with our data is essentially a graph, not a tabular format. Combined with ontologies that describe the entities in the world, this can be extremely powerful for context.</p>
<h2 id="showcase-managing-crm-with-obsidian-and-with-multiple-agents">Showcase: Managing CRM with Obsidian, and with Multiple Agents</h2>
<p>Let&rsquo;s look at the personal brain versus the enterprise company brain.</p>













  

























<figure><span class="img-expandable" data-full="/blog/from-obsidian-to-enterprise-company-brain/personal-vs-company-brain.png">
<a target="_blank" href="/blog/from-obsidian-to-enterprise-company-brain/personal-vs-company-brain.png" title="From Personal to Company Brain">

</a><button type="button" class="expand-btn" aria-label="Expand image" title="Expand image" hidden><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true"><path d="M15 3h6v6M9 21H3v-6M21 3l-7 7M3 21l7-7"/></svg></button>
</span><figcaption class="image-caption">From Personal to Company Brain</figcaption>
</figure>
<h3 id="personal-brain-with-obsidian">Personal Brain with Obsidian</h3>
<p>The example of a CRM is chosen somewhat illustratively, as I have built and [[Managing My Business with Obsidian|manage my own CRM system within Obsidian]]. I use a note for each client, and then, with a dedicated #hashtag, bring them together in one table. I use the <a href="https://dev.to/dailydevtips1/what-exactly-is-frontmatter-123g" target="_blank" rel="noopener noreffer">Frontmatter</a> (metadata of a Markdown file in the header) to attribute each client: how active everyone is, and who I need to reach out to.</p>
<p>With different views such as <strong>Sales Funnel</strong> or <strong>overview</strong>, I can then see different things. Sales Funnel with <strong>Kanban View</strong> - based on the same data as the above table:</p>













  
<figure><span class="img-expandable" data-full="/blog/from-obsidian-to-enterprise-company-brain/obsidian-sales-funnel.webp">
<a target="_blank" href="/blog/from-obsidian-to-enterprise-company-brain/obsidian-sales-funnel.webp" title="Open image in full size">

</a><button type="button" class="expand-btn" aria-label="Expand image" title="Expand image" hidden><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true"><path d="M15 3h6v6M9 21H3v-6M21 3l-7 7M3 21l7-7"/></svg></button>
</span><figcaption class="image-caption">From Managing My Business with Obsidian</figcaption>
</figure>
<h3 id="company-brain-with-omnigraph">Company Brain with OmniGraph</h3>
<p>If we expand this to a company brain with <em>agents writing, everything versioned, stored in an open format</em>, here&rsquo;s the example with <a href="https://github.com/ModernRelay/omnigraph" target="_blank" rel="noopener noreffer">OmniGraph</a>: it uses <a href="https://github.com/lancedb/lance" target="_blank" rel="noopener noreffer">Lance</a> as the open columnar storage format on object storage (your graph is just files in a bucket you own, no database server), <a href="https://github.com/apache/datafusion" target="_blank" rel="noopener noreffer">DataFusion</a> as the query engine, and builds the typed graph with git-style branches on top.</p>
<p>I took my own Obsidian CRM and rebuilt it as a Company Brain at <a href="https://github.com/ssp-data/company-brain-crm" target="_blank" rel="noopener noreffer">company-brain-crm</a> (adapted from the <a href="https://github.com/ModernRelay/omnigraph-cookbooks/tree/main/vc-os" target="_blank" rel="noopener noreffer"><code>vc-os</code> cookbook example</a>), a company brain for my company, SSP Data, scaled up to a fictional 50-person version that does a lot of outreach for data-engineering articles and consulting.</p>
<p>Every field from my Obsidian frontmatter got a type added: my <code>Hotness: 5-Cold</code> becomes <code>hotness: enum(hot, warm, cold)</code> that the system enforces (an agent physically can&rsquo;t write &ldquo;5-Cold-ish&rdquo;), my <code>## Log</code> section becomes <code>Interaction</code> nodes (call / email / meeting / note), and my <code>#crmssp</code> tag becomes the <code>Company</code> node type itself.</p>
<p>The whole CRM is <strong>three files you commit to git</strong>: <a href="https://github.com/ssp-data/company-brain-crm/blob/main/schema.pg" target="_blank" rel="noopener noreffer"><code>schema.pg</code></a> (4 node types — Company, Person, Deal, Interaction — and 7 edge types):</p>
<div class="highlight"><div class="chroma"><div class="code-header language-js"><span class="code-title"><i class="arrow svg-icon icon-code-right"></i></span><span class="ellipses"><i class="svg-icon icon-ellipsis"></i></span><span class="copy" title="Copy to clipboard"><i class="svg-icon icon-copy"></i></span></div><div class="table-wrapper">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt"> 1
</span><span class="lnt"> 2
</span><span class="lnt"> 3
</span><span class="lnt"> 4
</span><span class="lnt"> 5
</span><span class="lnt"> 6
</span><span class="lnt"> 7
</span><span class="lnt"> 8
</span><span class="lnt"> 9
</span><span class="lnt">10
</span><span class="lnt">11
</span><span class="lnt">12
</span><span class="lnt">13
</span><span class="lnt">14
</span><span class="lnt">15
</span><span class="lnt">16
</span><span class="lnt">17
</span><span class="lnt">18
</span><span class="lnt">19
</span><span class="lnt">20
</span><span class="lnt">21
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-js" data-lang="js"><span class="line"><span class="cl"><span class="nx">node</span> <span class="nx">Company</span> <span class="p">{</span>
</span></span><span class="line"><span class="cl">    <span class="nx">slug</span><span class="o">:</span> <span class="nb">String</span> <span class="err">@</span><span class="nx">key</span>
</span></span><span class="line"><span class="cl">    <span class="nx">name</span><span class="o">:</span> <span class="nb">String</span> <span class="err">@</span><span class="nx">index</span>
</span></span><span class="line"><span class="cl">    <span class="nx">kind</span><span class="o">:</span> <span class="kr">enum</span><span class="p">(</span><span class="nx">us</span><span class="p">,</span> <span class="nx">prospect</span><span class="p">,</span> <span class="nx">client</span><span class="p">,</span> <span class="nx">publisher</span><span class="p">,</span> <span class="nx">partner</span><span class="p">)</span> <span class="err">@</span><span class="nx">index</span>
</span></span><span class="line"><span class="cl">    <span class="c1">// the old Obsidian frontmatter `Hotness: 5-Cold`, now enforced
</span></span></span><span class="line"><span class="cl">    <span class="nx">hotness</span><span class="o">:</span> <span class="kr">enum</span><span class="p">(</span><span class="nx">hot</span><span class="p">,</span> <span class="nx">warm</span><span class="p">,</span> <span class="nx">cold</span><span class="p">)</span><span class="o">?</span> <span class="err">@</span><span class="nx">index</span>
</span></span><span class="line"><span class="cl">    <span class="nx">segment</span><span class="o">:</span> <span class="nb">String</span><span class="o">?</span>
</span></span><span class="line"><span class="cl">    <span class="nx">notes</span><span class="o">:</span> <span class="nb">String</span><span class="o">?</span>
</span></span><span class="line"><span class="cl">    <span class="c1">// ...
</span></span></span><span class="line"><span class="cl"><span class="p">}</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="nx">node</span> <span class="nx">Deal</span> <span class="p">{</span>
</span></span><span class="line"><span class="cl">    <span class="c1">// ...
</span></span></span><span class="line"><span class="cl">    <span class="nx">stage</span><span class="o">:</span> <span class="kr">enum</span><span class="p">(</span><span class="nx">lead</span><span class="p">,</span> <span class="nx">contacted</span><span class="p">,</span> <span class="nx">proposal</span><span class="p">,</span> <span class="nx">won</span><span class="p">,</span> <span class="nx">lost</span><span class="p">)</span> <span class="err">@</span><span class="nx">index</span>  <span class="c1">// the sales funnel
</span></span></span><span class="line"><span class="cl">    <span class="nx">value_usd</span><span class="o">:</span> <span class="nx">F64</span><span class="o">?</span>
</span></span><span class="line"><span class="cl"><span class="p">}</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="c1">// the [[wikilinks]], but with meaning
</span></span></span><span class="line"><span class="cl"><span class="nx">edge</span> <span class="nx">WorksAt</span><span class="o">:</span> <span class="nx">Person</span> <span class="o">-&gt;</span> <span class="nx">Company</span> <span class="p">{</span> <span class="nx">role</span><span class="o">:</span> <span class="nb">String</span><span class="o">?</span> <span class="p">}</span>
</span></span><span class="line"><span class="cl"><span class="nx">edge</span> <span class="nx">Knows</span><span class="o">:</span> <span class="nx">Person</span> <span class="o">-&gt;</span> <span class="nx">Person</span> <span class="p">{</span> <span class="nx">context</span><span class="o">:</span> <span class="nb">String</span><span class="o">?</span> <span class="p">}</span>
</span></span><span class="line"><span class="cl"><span class="nx">edge</span> <span class="nx">DealWith</span><span class="o">:</span> <span class="nx">Deal</span> <span class="o">-&gt;</span> <span class="nx">Company</span></span></span></code></pre></td></tr></table>
</div></div></div>
<p><a href="https://github.com/ssp-data/company-brain-crm/blob/main/queries/crm.gq" target="_blank" rel="noopener noreffer"><code>queries/crm.gq</code></a> with the recurring questions, written as typed, lintable stored queries:</p>
<div class="highlight"><div class="chroma"><div class="code-header language-js"><span class="code-title"><i class="arrow svg-icon icon-code-right"></i></span><span class="ellipses"><i class="svg-icon icon-ellipsis"></i></span><span class="copy" title="Copy to clipboard"><i class="svg-icon icon-copy"></i></span></div><div class="table-wrapper">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt"> 1
</span><span class="lnt"> 2
</span><span class="lnt"> 3
</span><span class="lnt"> 4
</span><span class="lnt"> 5
</span><span class="lnt"> 6
</span><span class="lnt"> 7
</span><span class="lnt"> 8
</span><span class="lnt"> 9
</span><span class="lnt">10
</span><span class="lnt">11
</span><span class="lnt">12
</span><span class="lnt">13
</span><span class="lnt">14
</span><span class="lnt">15
</span><span class="lnt">16
</span><span class="lnt">17
</span><span class="lnt">18
</span><span class="lnt">19
</span><span class="lnt">20
</span><span class="lnt">21
</span><span class="lnt">22
</span><span class="lnt">23
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-js" data-lang="js"><span class="line"><span class="cl"><span class="c1">// The sales funnel — the kanban board as a query.
</span></span></span><span class="line"><span class="cl"><span class="nx">query</span> <span class="nx">sales_funnel</span><span class="p">()</span> <span class="p">{</span>
</span></span><span class="line"><span class="cl">    <span class="nx">match</span> <span class="p">{</span>
</span></span><span class="line"><span class="cl">        <span class="nx">$d</span><span class="o">:</span> <span class="nx">Deal</span>
</span></span><span class="line"><span class="cl">        <span class="nx">$d</span> <span class="nx">dealWith</span> <span class="nx">$c</span>
</span></span><span class="line"><span class="cl">    <span class="p">}</span>
</span></span><span class="line"><span class="cl">    <span class="k">return</span> <span class="p">{</span> <span class="nx">$d</span><span class="p">.</span><span class="nx">stage</span><span class="p">,</span> <span class="nx">$d</span><span class="p">.</span><span class="nx">name</span><span class="p">,</span> <span class="nx">$c</span><span class="p">.</span><span class="nx">name</span><span class="p">,</span> <span class="nx">$d</span><span class="p">.</span><span class="nx">kind</span><span class="p">,</span> <span class="nx">$d</span><span class="p">.</span><span class="nx">value_usd</span> <span class="p">}</span>
</span></span><span class="line"><span class="cl">    <span class="nx">order</span> <span class="p">{</span> <span class="nx">$d</span><span class="p">.</span><span class="nx">stage</span><span class="p">,</span> <span class="nx">$d</span><span class="p">.</span><span class="nx">name</span> <span class="p">}</span>
</span></span><span class="line"><span class="cl"><span class="p">}</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="c1">// Warm-intro path: which SSP teammate knows someone at the target company?
</span></span></span><span class="line"><span class="cl"><span class="nx">query</span> <span class="nx">warm_intro</span><span class="p">(</span><span class="nx">$slug</span><span class="o">:</span> <span class="nb">String</span><span class="p">)</span> <span class="p">{</span>
</span></span><span class="line"><span class="cl">    <span class="nx">match</span> <span class="p">{</span>
</span></span><span class="line"><span class="cl">        <span class="nx">$target</span><span class="o">:</span> <span class="nx">Company</span> <span class="p">{</span> <span class="nx">slug</span><span class="o">:</span> <span class="nx">$slug</span> <span class="p">}</span>
</span></span><span class="line"><span class="cl">        <span class="nx">$contact</span><span class="o">:</span> <span class="nx">Person</span>
</span></span><span class="line"><span class="cl">        <span class="nx">$contact</span> <span class="nx">worksAt</span> <span class="nx">$target</span>
</span></span><span class="line"><span class="cl">        <span class="nx">$teammate</span><span class="o">:</span> <span class="nx">Person</span>
</span></span><span class="line"><span class="cl">        <span class="nx">$teammate</span> <span class="nx">knows</span> <span class="nx">$contact</span>
</span></span><span class="line"><span class="cl">        <span class="nx">$teammate</span> <span class="nx">worksAt</span> <span class="nx">$ssp</span>
</span></span><span class="line"><span class="cl">        <span class="nx">$ssp</span><span class="o">:</span> <span class="nx">Company</span> <span class="p">{</span> <span class="nx">slug</span><span class="o">:</span> <span class="s2">&#34;com-ssp&#34;</span> <span class="p">}</span>
</span></span><span class="line"><span class="cl">    <span class="p">}</span>
</span></span><span class="line"><span class="cl">    <span class="k">return</span> <span class="p">{</span> <span class="nx">$teammate</span><span class="p">.</span><span class="nx">name</span><span class="p">,</span> <span class="nx">$contact</span><span class="p">.</span><span class="nx">name</span><span class="p">,</span> <span class="nx">$contact</span><span class="p">.</span><span class="nx">role</span><span class="p">,</span> <span class="nx">$target</span><span class="p">.</span><span class="nx">name</span> <span class="p">}</span>
</span></span><span class="line"><span class="cl"><span class="p">}</span></span></span></code></pre></td></tr></table>
</div></div></div>
<p>and <a href="https://github.com/ssp-data/company-brain-crm/blob/main/seed.jsonl" target="_blank" rel="noopener noreffer"><code>seed.jsonl</code></a> (the data — one JSON line per node or edge):</p>
<div class="highlight"><div class="chroma open"><div class="code-header language-json"><span class="code-title"><i class="arrow svg-icon icon-code-right"></i></span><span class="ellipses"><i class="svg-icon icon-ellipsis"></i></span><span class="copy" title="Copy to clipboard"><i class="svg-icon icon-copy"></i></span></div><div class="table-wrapper">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span><span class="lnt">2
</span><span class="lnt">3
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-json" data-lang="json"><span class="line"><span class="cl"><span class="p">{</span><span class="nt">&#34;type&#34;</span><span class="p">:</span> <span class="s2">&#34;Company&#34;</span><span class="p">,</span> <span class="nt">&#34;data&#34;</span><span class="p">:</span> <span class="p">{</span><span class="nt">&#34;slug&#34;</span><span class="p">:</span> <span class="s2">&#34;com-nordbahn&#34;</span><span class="p">,</span> <span class="nt">&#34;name&#34;</span><span class="p">:</span> <span class="s2">&#34;Nordbahn Logistik&#34;</span><span class="p">,</span> <span class="nt">&#34;kind&#34;</span><span class="p">:</span> <span class="s2">&#34;prospect&#34;</span><span class="p">,</span> <span class="nt">&#34;hotness&#34;</span><span class="p">:</span> <span class="s2">&#34;warm&#34;</span><span class="p">,</span> <span class="nt">&#34;segment&#34;</span><span class="p">:</span> <span class="s2">&#34;logistics&#34;</span><span class="p">,</span> <span class="err">...</span><span class="p">}}</span>
</span></span><span class="line"><span class="cl"><span class="p">{</span><span class="nt">&#34;type&#34;</span><span class="p">:</span> <span class="s2">&#34;Person&#34;</span><span class="p">,</span> <span class="nt">&#34;data&#34;</span><span class="p">:</span> <span class="p">{</span><span class="nt">&#34;slug&#34;</span><span class="p">:</span> <span class="s2">&#34;per-tom-vermeer&#34;</span><span class="p">,</span> <span class="nt">&#34;name&#34;</span><span class="p">:</span> <span class="s2">&#34;Tom Vermeer&#34;</span><span class="p">,</span> <span class="nt">&#34;role&#34;</span><span class="p">:</span> <span class="s2">&#34;Account Executive&#34;</span><span class="p">,</span> <span class="err">...</span><span class="p">}}</span>
</span></span><span class="line"><span class="cl"><span class="p">{</span><span class="nt">&#34;edge&#34;</span><span class="p">:</span> <span class="s2">&#34;Knows&#34;</span><span class="p">,</span> <span class="nt">&#34;from&#34;</span><span class="p">:</span> <span class="s2">&#34;per-tom-vermeer&#34;</span><span class="p">,</span> <span class="nt">&#34;to&#34;</span><span class="p">:</span> <span class="s2">&#34;per-lars-petersen&#34;</span><span class="p">,</span> <span class="nt">&#34;data&#34;</span><span class="p">:</span> <span class="p">{</span><span class="nt">&#34;context&#34;</span><span class="p">:</span> <span class="s2">&#34;met at Data Council booth&#34;</span><span class="p">}}</span></span></span></code></pre></td></tr></table>
</div></div></div>
<p>Run it with <code>make init &amp;&amp; make seed</code>, and you have a <strong>98-node / 123-edge</strong> CRM, locally on your disk, no database needed. You can swap the path for an <code>s3://…</code> bucket and the exact same flow runs on object storage. From there, every view I had in Obsidian, such as the sales-funnel kanban or the follow-up table, is a <strong>stored query you invoke by name</strong> (<code>sales_funnel</code>, <code>hot_prospects</code>, <code>company_log</code>). Every result of this demo is captured in <a href="https://github.com/ssp-data/company-brain-crm/blob/main/DEMO.md" target="_blank" rel="noopener noreffer">DEMO.md</a>, such as <a href="https://github.com/ssp-data/company-brain-crm/blob/main/DEMO.md#make-funnel" target="_blank" rel="noopener noreffer">the sales funnel as a query result</a>, the same data as my Obsidian kanban above.</p>
<p>The <strong>context layer is versioned, diffable, and reproducible</strong> from a clean checkout, exactly like the rest of your infrastructure.</p>
<h4 id="how-do-agents-or-users-get-context-out">How Do Agents or Users Get Context Out?</h4>
<p>How does an agent (or a colleague) actually <em>get</em> context out of this? It&rsquo;s via calling a query. Take the question my Obsidian backlinks could never answer across 50 people&rsquo;s networks: &ldquo;who can warm-intro us at a target company?&rdquo;</p>
<p>The result is one traversal: <code>teammate → knows → contact → works</code> at target:</p>
<div class="highlight"><div class="chroma open"><div class="code-header language-bash"><span class="code-title"><i class="arrow svg-icon icon-code-right"></i></span><span class="ellipses"><i class="svg-icon icon-ellipsis"></i></span><span class="copy" title="Copy to clipboard"><i class="svg-icon icon-copy"></i></span></div><div class="table-wrapper">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span><span class="lnt">2
</span><span class="lnt">3
</span><span class="lnt">4
</span><span class="lnt">5
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">$ omnigraph query warm_intro --params <span class="s1">&#39;{&#34;slug&#34;:&#34;com-nordbahn&#34;}&#39;</span> ...
</span></span><span class="line"><span class="cl">teammate.name <span class="p">|</span> contact.name  <span class="p">|</span> contact.role <span class="p">|</span> target.name
</span></span><span class="line"><span class="cl">--------------+---------------+--------------+------------------
</span></span><span class="line"><span class="cl">Tom Vermeer   <span class="p">|</span> Lars Petersen <span class="p">|</span> Head of BI   <span class="p">|</span> Nordbahn Logistik
</span></span><span class="line"><span class="cl">...</span></span></code></pre></td></tr></table>
</div></div></div>
<h4 id="writing-back-to-the-crm">Writing back to the CRM</h4>













  

























<figure><span class="img-expandable" data-full="/blog/from-obsidian-to-enterprise-company-brain/agents-write-humans-merge.png">
<a target="_blank" href="/blog/from-obsidian-to-enterprise-company-brain/agents-write-humans-merge.png" title="How auto-merge and conflicts are handled: agents write on branches, humans decide on collisions">

</a><button type="button" class="expand-btn" aria-label="Expand image" title="Expand image" hidden><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true"><path d="M15 3h6v6M9 21H3v-6M21 3l-7 7M3 21l7-7"/></svg></button>
</span><figcaption class="image-caption">How auto-merge and conflicts are handled: agents write on branches, humans decide on collisions</figcaption>
</figure>
<p>And now the write-back side, which most context layers or agents can&rsquo;t do yet, but which OmniGraph supports. A CRM goes stale the day nobody updates it, so in this demo two agents keep it fresh, and neither writes to <code>main</code> directly. Commands from the repo you can try, such as <code>make agents</code>, run them:</p>
<div class="highlight"><div class="chroma open"><div class="code-header language-bash"><span class="code-title"><i class="arrow svg-icon icon-code-right"></i></span><span class="ellipses"><i class="svg-icon icon-ellipsis"></i></span><span class="copy" title="Copy to clipboard"><i class="svg-icon icon-copy"></i></span></div><div class="table-wrapper">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span><span class="lnt">2
</span><span class="lnt">3
</span><span class="lnt">4
</span><span class="lnt">5
</span><span class="lnt">6
</span><span class="lnt">7
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="c1"># the inbox agent logs this morning&#39;s replies on ITS OWN branch — main untouched</span>
</span></span><span class="line"><span class="cl">omnigraph load --data agents/inbox-scan.jsonl --mode merge <span class="se">\
</span></span></span><span class="line"><span class="cl">  --branch agent/inbox-scan --from main --as agent-inbox --store graphs/crm.omni
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="c1"># meanwhile the billing agent marks a signed PoC as won — on a second branch</span>
</span></span><span class="line"><span class="cl">omnigraph load --data agents/billing-sync.jsonl --mode merge <span class="se">\
</span></span></span><span class="line"><span class="cl">  --branch agent/billing-sync --from main --as agent-billing --store graphs/crm.omni</span></span></code></pre></td></tr></table>
</div></div></div>
<h5 id="auto-merge">Auto-Merge</h5>
<p>The two changes touch different rows, so both merges are clean and go through without human verification and are <strong>auto-merged</strong>. There&rsquo;s three-way and row-level merging, one atomic commit each:</p>
<div class="highlight"><div class="chroma open"><div class="code-header language-bash"><span class="code-title"><i class="arrow svg-icon icon-code-right"></i></span><span class="ellipses"><i class="svg-icon icon-ellipsis"></i></span><span class="copy" title="Copy to clipboard"><i class="svg-icon icon-copy"></i></span></div><div class="table-wrapper">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span><span class="lnt">2
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">omnigraph branch merge agent/inbox-scan --into main --as agent-inbox --store graphs/crm.omni
</span></span><span class="line"><span class="cl"><span class="c1"># merged agent/inbox-scan into main: fast_forward</span></span></span></code></pre></td></tr></table>
</div></div></div>
<h5 id="conflict-handling">Conflict Handling</h5>
<p>The interesting case is <strong>when writers disagree</strong> (<code>make conflict</code> in the repo): the inbox agent flags Nordbahn as <code>hot</code> (&ldquo;CEO replied today&rdquo;) while a CRM-hygiene agent downgrades the same row to <code>cold</code> (&ldquo;no touchpoint in 60 days&rdquo;). The first merge lands, and the second is blocked:</p>
<div class="highlight"><div class="chroma open"><div class="code-header language-fallback"><span class="code-title"><i class="arrow svg-icon icon-code-right"></i></span><span class="ellipses"><i class="svg-icon icon-ellipsis"></i></span><span class="copy" title="Copy to clipboard"><i class="svg-icon icon-copy"></i></span></div><div class="table-wrapper">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span><span class="lnt">2
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-fallback" data-lang="fallback"><span class="line"><span class="cl">Error: merge conflicts: [MergeConflict { row_id: &#34;com-nordbahn&#34;,
</span></span><span class="line"><span class="cl">       kind: DivergentUpdate, ... }]</span></span></code></pre></td></tr></table>
</div></div></div>
<p>Nothing is published, and there&rsquo;s <strong>no silent last-write-wins</strong>. Instead, a human (or a policy/data contract) decides. And because every write records an actor (<code>--as agent-inbox</code>), <code>omnigraph commit list</code> gives an audit trail where &ldquo;who set this client to cold, and when?&rdquo; has an actual answer. You can find the full captured run of both cases, <a href="https://github.com/ssp-data/company-brain-crm/blob/main/DEMO.md#make-agents" target="_blank" rel="noopener noreffer">the auto-merge</a> and <a href="https://github.com/ssp-data/company-brain-crm/blob/main/DEMO.md#make-conflict" target="_blank" rel="noopener noreffer">the blocked conflict</a>, in the repo.</p>
<p>This is a fictive demo, with very little data to illustrate the concept, but I hope you got the gist of how this enables totally different context-related use cases, and eases life with auto-merge and agent help to update stale documentation and context.</p>
<blockquote>
<p>[!example] <a href="https://github.com/ModernRelay/omnigraph-cookbooks/tree/main/second-brain" target="_blank" rel="noopener noreffer">Another Second Brain approach with OmniGraph</a></p>
<p>If you want another personal second brain example, and an application with OmniGraph as a personal life ontology, this showcases a typed graph to answer questions like:</p>
<ul>
<li>Who haven&rsquo;t I talked to in a while that I want to?</li>
<li>What did Sarah recommend that I haven&rsquo;t read yet?</li>
<li>What do I still owe Theo?</li>
<li>What&rsquo;s on my mind about parenting / work / health?</li>
</ul>
</blockquote>
<h2 id="building-enterprise-brains-and-whats-next">Building Enterprise Brains, and What&rsquo;s Next?</h2>
<p>I hope you got a good understanding of the difference between a personal wiki and a fully automated LLM wiki where agents write back. And why features such as versioned branches, open-format object storage, and types help form a graph that describes rich context much better than plain text or scattered, outdated documentation ever could, especially with the help of agents: collecting and scraping useful information, but also updating existing context and raising awareness where contradictions in the data have been made.</p>
<p>This new approach is worth remembering for building an enterprise company brain. It&rsquo;s not only embeddings you search by similarity, but also typed, declared knowledge plus inferred similarity, versioned like code, so a hundred agents can write to it while humans keep it from drifting into noise, by reviewing what merges back to the main branch.</p>
<p>In the end, it&rsquo;s the same bet I made when I moved my personal brain to plain Markdown. Open files <a href="https://stephango.com/file-over-app" target="_blank" rel="noopener noreffer">outlive every tool</a> that reads them, and a company brain stored as open files in your own bucket will survive whatever CRM or wiki is used today. What&rsquo;s new is that the files now carry types, history, and a merge workflow, so the knowledge no longer depends on one careful owner. My Obsidian vault needs me, the single user. An enterprise company brain, <a href="https://modernrelay.com/articles/graph-as-code" target="_blank" rel="noopener noreffer">a graph database designed for agents</a>, kept fresh by agents and reviewed by humans, mostly needs someone to hit &ldquo;merge&rdquo;.</p>
<p>This difference compounds and can be the key to managing ever-growing information, moving from a wiki you maintain to an enterprise brain your company actually uses.</p>
<hr>
<p>If you want to get started, the <a href="https://github.com/ModernRelay/omnigraph-cookbooks" target="_blank" rel="noopener noreffer">omnigraph-cookbooks</a> are the fastest path. Feed one to the agent of your choice and get ready-to-run graphs with real seed data (company brain, VC operating system, pharma and industry intel). And for a deeper discussion, co-founders Andrew and Ragnor talk it through with Stanislav Kozlovski in <a href="https://x.com/kozlovski/status/2066182400002990216" target="_blank" rel="noopener noreffer">why agents need typed graphs to coordinate</a>.</p>
<!-- * * * -->
<!-- <pre class=""><em>Full article published at <a href="https://www.modernrelay.com..." target="_blank" rel="noopener noreferrer">Kaelio.com</a> - written as part of <a href="/services/">my services</a></em></pre> -->
]]></description>
</item>
<item>
    <title>The Grammar of Data: From Definition to Execution</title>
    <link>https://www.ssp.sh/blog/from-definition-to-execution-grammar-of-data/</link>
    <pubDate>Mon, 14 Sep 2026 08:00:08 &#43;0200</pubDate>
    <author>Simon Späti</author>
    <guid>https://www.ssp.sh/blog/from-definition-to-execution-grammar-of-data/</guid><enclosure url="https://www.ssp.sh/blog/from-definition-to-execution-grammar-of-data/featured-image.png" type="image/png" length="0" /><description><![CDATA[<p>In <a href="/blog/grammar-data-engineering/" rel="">Part 1</a>, we discovered the grammar for data: a way to define a data project with its complex requirements and how we define it declaratively as a grammar in one sentence with nouns (sources), transformations (verbs), templates, and modifiers, essentially being able to define it once and run it anywhere with different execution engines.</p>
<p>This Part 2 will demonstrate how this looks in a data engineering digest project where we process data from RSS feeds, a live Bluesky firehose, and GitHub datasets, and find trends with an all-integrated horizontal data architecture running xorq based on the grammar described.</p>
<p>We use dlt for ingestion (outside the grammar), then Ibis, DataFusion/DuckDB/Snowflake for the engine, a cataloging feature to compress and discover metrics, and a small ML job. This article will guide you through that project and explain why xorq and the grammar of data are helpful to you.</p>
<blockquote>
<p>[!Note] Want to jump right into the code: GitHub Repo<br>
Then follow along, the repository is at <a href="https://github.com/ssp-data/de-ecosystem-digest" target="_blank" rel="noopener noreffer">de-ecosystem-digest</a>, the showcase we will go through as an example for the grammar of data below.</p>
</blockquote>
<h2 id="the-grammar-of-data-in-action">The Grammar of Data in Action</h2>
<p>As a reminder, the grammar dedicated to data consists of these parts and constructs a full sentence as our data project:</p>













  

























<figure><span class="img-expandable" data-full="/blog/from-definition-to-execution-grammar-of-data/grammar-overview.png">
<a target="_blank" href="/blog/from-definition-to-execution-grammar-of-data/grammar-overview.png" title="The project read as one sentence - five grammar parts · one named, executable, re-runnable expression">

</a><button type="button" class="expand-btn" aria-label="Expand image" title="Expand image" hidden><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true"><path d="M15 3h6v6M9 21H3v-6M21 3l-7 7M3 21l7-7"/></svg></button>
</span><figcaption class="image-caption">The project read as one sentence - five grammar parts · one named, executable, re-runnable expression</figcaption>
</figure>
<p>In our <a href="https://github.com/ssp-data/de-ecosystem-digest" target="_blank" rel="noopener noreffer">data engineering digest example project</a> we create a data engineering digest based on my <a href="https://www.ssp.sh/brain/rss-feeds-for-data-engineering/" target="_blank" rel="noopener noreffer">DE RSS Feeds</a> I collected over the years, Bluesky posts, raw PyPI downloads and GitHub Archive events as source data that we ingest with <a href="https://github.com/dlt-hub/dlt" target="_blank" rel="noopener noreffer">dlt</a>. Here&rsquo;s an overview of the project:</p>













  

























<figure><span class="img-expandable" data-full="/blog/from-definition-to-execution-grammar-of-data/grammar-of-data-ececution.png">
<a target="_blank" href="/blog/from-definition-to-execution-grammar-of-data/grammar-of-data-ececution.png" title="Grammar of Data executed as a Sentence.">

</a><button type="button" class="expand-btn" aria-label="Expand image" title="Expand image" hidden><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true"><path d="M15 3h6v6M9 21H3v-6M21 3l-7 7M3 21l7-7"/></svg></button>
</span><figcaption class="image-caption">Grammar of Data executed as a Sentence.</figcaption>
</figure>
<p><em>Model once, represent everywhere - the transformation never changes, only the engine binding does | Read left to right: every part of speech maps to a xorq call</em></p>
<p>We transform the data with xorq expressions (mutate, filter, group by, aggregate, order by), use templates to bind the sentence to any repo (dbt-core, polars, &hellip;) and modifiers to bind the engine (or a fitted ML model), and manifest it as a unique hash. Each named expression can be registered as a <strong>content-addressed, git-versioned catalog entry</strong> with the <a href="https://docs.xorq.dev/api_reference/cli/index.html#catalog" target="_blank" rel="noopener noreffer">catalog</a> being the shelf of all of them (such as <code>star_velocity_30d</code>, <code>download_trend_90d</code>), each reproducible on its own because xorq bundles the source read at build time.</p>
<p>Then we run those reusable metric definitions on any engine with pre-existing pipelines to make it easier to run with <code>make preview</code>, which executes every named expression, while <code>make catalog</code> registers the curated ones as versioned entries. The default engine is DataFusion, but I added DuckDB and Snowflake, using xorq&rsquo;s <strong>multi-compute engine capabilities</strong>.</p>
<h3 id="mapping-the-grammar-to-xorq">Mapping the Grammar to Xorq</h3>
<p>To illustrate the grammar and expression of the grammar in plain Python, here is how <a href="https://github.com/ssp-data/de-ecosystem-digest/blob/main/src/de_ecosystem/catalog/github.py" target="_blank" rel="noopener noreffer">github.py</a> could look, in six lines:</p>
<div class="highlight"><div class="chroma open"><div class="code-header language-python"><span class="code-title"><i class="arrow svg-icon icon-code-right"></i></span><span class="ellipses"><i class="svg-icon icon-ellipsis"></i></span><span class="copy" title="Copy to clipboard"><i class="svg-icon icon-copy"></i></span></div><div class="table-wrapper">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt"> 1
</span><span class="lnt"> 2
</span><span class="lnt"> 3
</span><span class="lnt"> 4
</span><span class="lnt"> 5
</span><span class="lnt"> 6
</span><span class="lnt"> 7
</span><span class="lnt"> 8
</span><span class="lnt"> 9
</span><span class="lnt">10
</span><span class="lnt">11
</span><span class="lnt">12
</span><span class="lnt">13
</span><span class="lnt">14
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="k">def</span> <span class="nf">star_velocity_30d</span><span class="p">(</span><span class="n">con</span><span class="p">,</span> <span class="n">repo</span><span class="p">):</span>          <span class="c1"># TEMPLATE: bind this sentence to any repo</span>
</span></span><span class="line"><span class="cl">    <span class="n">cutoff</span> <span class="o">=</span> <span class="n">datetime</span><span class="o">.</span><span class="n">now</span><span class="p">()</span> <span class="o">-</span> <span class="n">timedelta</span><span class="p">(</span><span class="n">days</span><span class="o">=</span><span class="mi">30</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">    <span class="n">t</span> <span class="o">=</span> <span class="n">con</span><span class="o">.</span><span class="n">table</span><span class="p">(</span><span class="s2">&#34;raw_github_events&#34;</span><span class="p">)</span>      <span class="c1"># NOUN: a lazy pointer, no computation yet</span>
</span></span><span class="line"><span class="cl">    <span class="k">return</span> <span class="p">(</span>
</span></span><span class="line"><span class="cl">        <span class="n">t</span><span class="o">.</span><span class="n">filter</span><span class="p">([</span>                          <span class="c1"># VERB</span>
</span></span><span class="line"><span class="cl">            <span class="n">t</span><span class="o">.</span><span class="n">repo_name</span> <span class="o">==</span> <span class="n">repo</span><span class="p">,</span>
</span></span><span class="line"><span class="cl">            <span class="n">t</span><span class="o">.</span><span class="n">type</span> <span class="o">==</span> <span class="s2">&#34;WatchEvent&#34;</span><span class="p">,</span>
</span></span><span class="line"><span class="cl">            <span class="n">t</span><span class="o">.</span><span class="n">created_at</span> <span class="o">&gt;</span> <span class="n">cutoff</span><span class="p">,</span>
</span></span><span class="line"><span class="cl">        <span class="p">])</span>
</span></span><span class="line"><span class="cl">        <span class="o">.</span><span class="n">mutate</span><span class="p">(</span><span class="n">week</span><span class="o">=</span><span class="n">t</span><span class="o">.</span><span class="n">created_at</span><span class="o">.</span><span class="n">truncate</span><span class="p">(</span><span class="s2">&#34;W&#34;</span><span class="p">))</span>   <span class="c1"># VERB</span>
</span></span><span class="line"><span class="cl">        <span class="o">.</span><span class="n">group_by</span><span class="p">(</span><span class="s2">&#34;week&#34;</span><span class="p">)</span>                          <span class="c1"># VERB</span>
</span></span><span class="line"><span class="cl">        <span class="o">.</span><span class="n">agg</span><span class="p">(</span><span class="n">stars</span><span class="o">=</span><span class="n">t</span><span class="o">.</span><span class="n">id</span><span class="o">.</span><span class="n">count</span><span class="p">())</span>                   <span class="c1"># VERB</span>
</span></span><span class="line"><span class="cl">        <span class="o">.</span><span class="n">order_by</span><span class="p">(</span><span class="s2">&#34;week&#34;</span><span class="p">)</span>                          <span class="c1"># VERB</span>
</span></span><span class="line"><span class="cl">    <span class="p">)</span></span></span></code></pre></td></tr></table>
</div></div></div>
<p>Every one of these functions and the <a href="https://github.com/ssp-data/de-ecosystem-digest/blob/main/Makefile" target="_blank" rel="noopener noreffer">Makefile</a> lets us run the grammar as steps of the grammatical grammar, building a sentence like this. I added this for illustration, but as an overview, if we map the commands to <strong>a xorq call</strong>, we can see the connection from the grammar of data to the xorq function:</p>
<table>
	<thead>
			<tr>
					<th><code>make</code> target</th>
					<th>xorq / Python call</th>
					<th>grammar part</th>
			</tr>
	</thead>
	<tbody>
			<tr>
					<td><code>make noun</code></td>
					<td><code>con.table(...)</code></td>
					<td>noun (source)</td>
			</tr>
			<tr>
					<td><code>make verb</code></td>
					<td><code>.filter/.mutate/.agg</code> (deferred expr)</td>
					<td>verbs (transform)</td>
			</tr>
			<tr>
					<td><code>make template</code></td>
					<td><code>star_velocity_30d(con, repo)</code></td>
					<td>template (bind by arg)</td>
			</tr>
			<tr>
					<td><code>make modifier</code></td>
					<td><code>settings.backend(engine)</code></td>
					<td>modifier (engine/fit)</td>
			</tr>
			<tr>
					<td><code>make lineage</code></td>
					<td><code>expr.op()</code> / <code>ibis.to_sql</code> / <code>expr.ls</code></td>
					<td>lineage (what xorq sees)</td>
			</tr>
			<tr>
					<td><code>make manifest</code></td>
					<td><code>xorq build expr.py -e star_velocity</code></td>
					<td>model once → expr.yaml</td>
			</tr>
			<tr>
					<td><code>make catalog</code></td>
					<td><code>xorq catalog add … → ./catalog</code></td>
					<td>versioned entry store</td>
			</tr>
			<tr>
					<td><code>make run-sentence</code></td>
					<td><code>digest.main()</code> → <code>.execute()</code></td>
					<td>execute the sentence</td>
			</tr>
			<tr>
					<td><code>make engines</code></td>
					<td><code>settings.backend(x)</code> + <code>expr.execute()</code></td>
					<td>represent everywhere</td>
			</tr>
	</tbody>
</table>
<blockquote>
<p>[!note] Ingestion and installation are excluded on purpose here</p>
<p>To initialize, we also need <code>make install</code> to install dependencies and <code>make ingest</code> to load data with dlt locally. <code>make run-sentence</code> or <code>make full-pipeline</code> runs the full grammar of data. Additional commands <code>preview</code> <code>catalog</code> <code>catalog-run</code> <code>summary</code> <code>digest</code> <code>ml</code> <code>test</code> <code>clean</code> are added separately.</p>
</blockquote>
<h3 id="the-data-engineering-digest-what-we-found">The Data Engineering Digest: What We Found</h3>
<p>If we run the <a href="https://github.com/ssp-data/de-ecosystem-digest" target="_blank" rel="noopener noreffer">demo project</a> with the 90-day windows (PyPI max provides this window without storing data ourselves), we get a couple of interesting insights that this demo project produces from <strong>digesting the full Data Engineering ecosystem</strong>. The digest ranks tools and terms of data engineering by their <strong>momentum</strong> with PyPI download growth and GitHub data, and enriches each tool with its Bluesky chatter on socials<sup id="fnref:1"><a href="#fn:1" class="footnote-ref" role="doc-noteref">1</a></sup>.</p>
<p>This is how it looks with <code>make digest</code>:</p>
<div class="highlight"><div class="chroma open"><div class="code-header language-text"><span class="code-title"><i class="arrow svg-icon icon-code-right"></i></span><span class="ellipses"><i class="svg-icon icon-ellipsis"></i></span><span class="copy" title="Copy to clipboard"><i class="svg-icon icon-copy"></i></span></div><div class="table-wrapper">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt"> 1
</span><span class="lnt"> 2
</span><span class="lnt"> 3
</span><span class="lnt"> 4
</span><span class="lnt"> 5
</span><span class="lnt"> 6
</span><span class="lnt"> 7
</span><span class="lnt"> 8
</span><span class="lnt"> 9
</span><span class="lnt">10
</span><span class="lnt">11
</span><span class="lnt">12
</span><span class="lnt">13
</span><span class="lnt">14
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">package          growth_pct  recent_daily  total_downloads   buzz
</span></span><span class="line"><span class="cl">xorq                  130.9           968          125,104     10
</span></span><span class="line"><span class="cl">ibis-framework         49.5        90,384       13,655,147     15
</span></span><span class="line"><span class="cl">sqlglot                44.7     2,484,432      379,638,408     17
</span></span><span class="line"><span class="cl">duckdb                 42.5     1,712,837      263,396,944  3,200
</span></span><span class="line"><span class="cl">dagster                39.7       283,339       43,951,132    275
</span></span><span class="line"><span class="cl">polars                 35.8     2,160,110      339,334,602     61
</span></span><span class="line"><span class="cl">pydantic               30.0    35,567,354    5,688,585,163     90
</span></span><span class="line"><span class="cl">sqlmesh                28.6        17,964        2,885,574     13
</span></span><span class="line"><span class="cl">pyiceberg              24.4     1,300,103      211,933,200    640
</span></span><span class="line"><span class="cl">prefect                19.7       441,434       73,236,617     38
</span></span><span class="line"><span class="cl">dbt-core                9.9     3,527,875      609,587,211    369
</span></span><span class="line"><span class="cl">apache-airflow          8.6       702,582      122,123,125    113
</span></span><span class="line"><span class="cl">dlt                   -13.8       237,792       46,500,226    178</span></span></code></pre></td></tr></table>
</div></div></div>
<p>Interesting to see that we get a <strong>rise of the dataframe &amp; query engines</strong>: the fastest-growing DE packages over the last 90 days are all query/dataframe engines:</p>
<ul>
<li><code>ibis-framework</code> +49%, <code>sqlglot</code> +45%, <code>DuckDB</code> +42%, <code>Polars</code> +36%.</li>
</ul>
<p>One caveat: I included xorq. It has the biggest growth, but it&rsquo;s also the smallest package overall and still early, so the growth can have more spikes (we went from ~400 to ~968). And it&rsquo;s worth mentioning that xorq, the tool we use for the grammar series, uses and is built on <code>ibis</code>, its great expression layer, as xorq builds on a rising dataframe for a composable, in-process engine.</p>
<p>We also see that <strong>sqlmesh keeps climbing</strong> even after the Fivetran acquisition and dbt Labs joining Fivetran:</p>
<ul>
<li><code>sqlmesh</code> grew +28.6% over 90 days, while <code>dbt-core</code> grew the slowest of the pack (+9.9%).</li>
</ul>
<p>Not surprising, <strong>DuckDB wins social media</strong> attention. On Bluesky, its buzz score is 3200, 5× more than the next tool (pyiceberg 640, dbt 369). DuckDB is the tool that is both growing fast and the &ldquo;loudest&rdquo;.</p>
<p><strong>Number 1</strong> by raw downloads <strong>is pydantic</strong>. By absolute volume, pydantic tops everything at 5.64B downloads (~9× dbt-core&rsquo;s 610M):</p>
<div class="highlight"><div class="chroma open"><div class="code-header language-text"><span class="code-title"><i class="arrow svg-icon icon-code-right"></i></span><span class="ellipses"><i class="svg-icon icon-ellipsis"></i></span><span class="copy" title="Copy to clipboard"><i class="svg-icon icon-copy"></i></span></div><div class="table-wrapper">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span><span class="lnt">2
</span><span class="lnt">3
</span><span class="lnt">4
</span><span class="lnt">5
</span><span class="lnt">6
</span><span class="lnt">7
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">── Naive leaderboard: raw PyPI downloads (all-time) ──
</span></span><span class="line"><span class="cl">package            downloads
</span></span><span class="line"><span class="cl">pydantic       5,639,574,035
</span></span><span class="line"><span class="cl">dbt-core         603,522,561
</span></span><span class="line"><span class="cl">sqlglot          376,710,633
</span></span><span class="line"><span class="cl">polars           335,901,439
</span></span><span class="line"><span class="cl">duckdb           261,307,529</span></span></code></pre></td></tr></table>
</div></div></div>
<p>This is probably because [Pydantic]https://github.com/pydantic/pydantic) is powering half of PyData while it doesn&rsquo;t really have a lot of hype, but is a <a href="https://www.ssp.sh/brain/data-engineering-toolkit/" target="_blank" rel="noopener noreffer">Data Engineering Toolkit</a> for data validation and settings management using Python type annotations, used by any data engineer. It&rsquo;s a part of the grammar that makes sure re-runs run deterministically.</p>
<blockquote>
<p>[!note] What the blogs (RSS) say<br>
My RSS feeds were the noisiest signal: titles skew to whoever writes the most, e.g. Mr. Robin Moffatt (rmoff&rsquo;s random ramblings alone are ~690 of ~1,600 articles) 😉. General sentiment clusters around the incumbents (dbt, dagster, Spark, Snowflake), while the surging engines (polars, SQLMesh) are barely mentioned. Blog coverage <em>lags</em> the download signal, which is precisely why the digest triangulates four sources instead of trusting just one.</p>
</blockquote>
<h2 id="the-whole-stack-in-one-file-stackyaml-and-the-exchangeable-engine">The Whole Stack in One File: <code>stack.yaml</code> and the Exchangeable Engine</h2>
<p>The key is really that model and execution are separated. Once the stack is defined (in our demo project I used <code>stack.yaml</code> as a declarative config), we can just change the engine by editing a YAML file, and everything else stays the same:</p>
<div class="highlight"><div class="chroma open"><div class="code-header language-yaml"><span class="code-title"><i class="arrow svg-icon icon-code-right"></i></span><span class="ellipses"><i class="svg-icon icon-ellipsis"></i></span><span class="copy" title="Copy to clipboard"><i class="svg-icon icon-copy"></i></span></div><div class="table-wrapper">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt"> 1
</span><span class="lnt"> 2
</span><span class="lnt"> 3
</span><span class="lnt"> 4
</span><span class="lnt"> 5
</span><span class="lnt"> 6
</span><span class="lnt"> 7
</span><span class="lnt"> 8
</span><span class="lnt"> 9
</span><span class="lnt">10
</span><span class="lnt">11
</span><span class="lnt">12
</span><span class="lnt">13
</span><span class="lnt">14
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-yaml" data-lang="yaml"><span class="line"><span class="cl"><span class="nt">engine</span><span class="p">:</span><span class="w"> </span><span class="l">datafusion             </span><span class="w"> </span><span class="c"># duckdb | datafusion | snowflake  &lt;- swap the engine here</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="nt">db_path</span><span class="p">:</span><span class="w"> </span><span class="l">de_ecosystem.duckdb</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="nt">sources</span><span class="p">:</span><span class="w">                        </span><span class="c"># nouns — dlt ingests these (outside the grammar)</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span><span class="nt">bluesky</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">max_pages</span><span class="p">:</span><span class="w"> </span><span class="m">40</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span><span class="nt">github</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">slice</span><span class="p">:</span><span class="w"> </span><span class="s2">&#34;data/raw/gharchive/*.json.gz&#34;</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="nt">momentum</span><span class="p">:</span><span class="w">                       </span><span class="c"># the digest metric</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span><span class="nt">window_days</span><span class="p">:</span><span class="w"> </span><span class="m">90</span><span class="w">               </span><span class="c"># 90 = laptop pulse; 365 = warehouse year-in-review</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span><span class="nt">tools</span><span class="p">:</span><span class="w"> </span><span class="p">[</span><span class="l">dbt-core, dagster, dlt, ibis-framework, xorq, apache-airflow, polars,</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">          </span><span class="l">duckdb, great-expectations, pyiceberg, prefect, mage-ai, sqlmesh,</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">          </span><span class="l">soda-core, pydantic, sqlglot]</span></span></span></code></pre></td></tr></table>
</div></div></div>
<p>Imagine in your deploy scripts for <code>dev</code> you&rsquo;d use DataFusion and on <code>prod</code> you&rsquo;d just specify Snowflake as the variable. No implementation code is touched as in a typical imperative workflow.</p>
<p>With <code>make manifest</code> we can compile the full data stack&rsquo;s expressions into a deferred execution file <code>builds/&lt;hash&gt;/expr.yaml</code>, which builds deterministically and is diffable. The demo shows that point well: if we make the above engine change to <code>engine=duckdb</code> from <code>datafusion</code> and rebuild, the <em>semantic</em> change shows up as a reviewable <code>git diff</code>.</p>
<p>Let&rsquo;s run manifest with <code>engine: datafusion</code>:</p>
<div class="highlight"><div class="chroma open"><div class="code-header language-fallback"><span class="code-title"><i class="arrow svg-icon icon-code-right"></i></span><span class="ellipses"><i class="svg-icon icon-ellipsis"></i></span><span class="copy" title="Copy to clipboard"><i class="svg-icon icon-copy"></i></span></div><div class="table-wrapper">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span><span class="lnt">2
</span><span class="lnt">3
</span><span class="lnt">4
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-fallback" data-lang="fallback"><span class="line"><span class="cl">make manifest
</span></span><span class="line"><span class="cl">....
</span></span><span class="line"><span class="cl">Written &#39;star_velocity&#39; to builds/10671a1c33cf
</span></span><span class="line"><span class="cl">builds/10671a1c33cf</span></span></code></pre></td></tr></table>
</div></div></div>
<p>Now changing <code>engine: duckdb</code> and re-running:</p>
<div class="highlight"><div class="chroma open"><div class="code-header language-fallback"><span class="code-title"><i class="arrow svg-icon icon-code-right"></i></span><span class="ellipses"><i class="svg-icon icon-ellipsis"></i></span><span class="copy" title="Copy to clipboard"><i class="svg-icon icon-copy"></i></span></div><div class="table-wrapper">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span><span class="lnt">2
</span><span class="lnt">3
</span><span class="lnt">4
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-fallback" data-lang="fallback"><span class="line"><span class="cl">make manifest
</span></span><span class="line"><span class="cl">....
</span></span><span class="line"><span class="cl">Written &#39;star_velocity&#39; to builds/f02f2c4dca81
</span></span><span class="line"><span class="cl">builds/f02f2c4dca81</span></span></code></pre></td></tr></table>
</div></div></div>
<p>The diff shows a couple of interesting bits, e.g. xorq changed the scale for timestamps for duckdb (see both files <a href="https://github.com/ssp-data/de-ecosystem-digest/blob/dde2fbfc19948a3147178bd36781247a8d78e98a/builds/10671a1c33cf/expr.yaml#L16" target="_blank" rel="noopener noreffer">datafusion</a> and <a href="https://github.com/ssp-data/de-ecosystem-digest/blob/dde2fbfc19948a3147178bd36781247a8d78e98a/builds/f02f2c4dca81/expr.yaml#L16" target="_blank" rel="noopener noreffer">DuckDB</a>):</p>
<div class="highlight"><div class="chroma open"><div class="code-header language-fallback"><span class="code-title"><i class="arrow svg-icon icon-code-right"></i></span><span class="ellipses"><i class="svg-icon icon-ellipsis"></i></span><span class="copy" title="Copy to clipboard"><i class="svg-icon icon-copy"></i></span></div><div class="table-wrapper">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span><span class="lnt">2
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-fallback" data-lang="fallback"><span class="line"><span class="cl">  -      scale: 9      # datafusion → nanosecond timestamps
</span></span><span class="line"><span class="cl">  +      scale: ~      # duckdb → microsecond timestamps</span></span></code></pre></td></tr></table>
</div></div></div>
<p>The <code>profile.yaml</code> shows the literal change we did:</p>
<div class="highlight"><div class="chroma open"><div class="code-header language-fallback"><span class="code-title"><i class="arrow svg-icon icon-code-right"></i></span><span class="ellipses"><i class="svg-icon icon-ellipsis"></i></span><span class="copy" title="Copy to clipboard"><i class="svg-icon icon-copy"></i></span></div><div class="table-wrapper">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span><span class="lnt">2
</span><span class="lnt">3
</span><span class="lnt">4
</span><span class="lnt">5
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-fallback" data-lang="fallback"><span class="line"><span class="cl">  -  con_name: xorq_datafusion
</span></span><span class="line"><span class="cl">  -    config: ~
</span></span><span class="line"><span class="cl">  +  con_name: duckdb
</span></span><span class="line"><span class="cl">  +    database: &#34;:memory:&#34;
</span></span><span class="line"><span class="cl">  +    read_only: false</span></span></code></pre></td></tr></table>
</div></div></div>
<p>This shows that swapping the engine by configuration has a real impact: DataFusion carries Timestamp(scale=9) (nanoseconds) and DuckDB defaults to microseconds. The <strong>manifest captures that difference explicitly</strong> even before we run anything, <strong>reviewable instead of a silent runtime error</strong> through the built <a href="https://docs.xorq.dev/getting_started/your_first_expression.html" target="_blank" rel="noopener noreffer">expression graphs</a> before executing them with <strong>one expression, many engines</strong>.</p>
<h2 id="additional-capabilities-of-the-de-digest-project">Additional Capabilities of the DE Digest Project</h2>
<p>Apart from the grammar we look at, the project comes with catalog and ML functions to showcase the full capabilities of xorq and what you typically want to do in a data engineering project.</p>
<p>The full data lineage can also be tracked and shown.</p>
<h3 id="the-catalog-and-ml-capabilities">The Catalog and ML Capabilities</h3>
<p>The project has added a catalog to retrieve versioned entries of our metric and created artifacts. With <code>make catalog</code>, this project with xorq-catalog registers a curated set of expressions as <strong>versioned, content-addressed entries</strong> in a local, git-backed catalog at <code>./catalog</code>. The <code>catalog.yaml</code> manifest is the shelf where entries are addressed by content hash, and aliases are the human-readable handles:</p>
<div class="highlight"><div class="chroma open"><div class="code-header language-yaml"><span class="code-title"><i class="arrow svg-icon icon-code-right"></i></span><span class="ellipses"><i class="svg-icon icon-ellipsis"></i></span><span class="copy" title="Copy to clipboard"><i class="svg-icon icon-copy"></i></span></div><div class="table-wrapper">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt"> 1
</span><span class="lnt"> 2
</span><span class="lnt"> 3
</span><span class="lnt"> 4
</span><span class="lnt"> 5
</span><span class="lnt"> 6
</span><span class="lnt"> 7
</span><span class="lnt"> 8
</span><span class="lnt"> 9
</span><span class="lnt">10
</span><span class="lnt">11
</span><span class="lnt">12
</span><span class="lnt">13
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-yaml" data-lang="yaml"><span class="line"><span class="cl"><span class="nt">entries</span><span class="p">:</span><span class="w">                     </span><span class="c"># content hashes (a new hash = a new version)</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span>- <span class="l">5adcf6bccba9            </span><span class="w"> </span><span class="c"># dbt-star-velocity</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span>- <span class="l">a4f38c87079a            </span><span class="w"> </span><span class="c"># dbt-download-trend</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span>- <span class="l">a636a49497fb            </span><span class="w"> </span><span class="c"># dbt-momentum</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span><span class="c"># …</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="nt">aliases</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span>- <span class="l">dbt-star-velocity</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span>- <span class="l">dbt-download-trend</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span>- <span class="l">dbt-momentum</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span>- <span class="l">duckdb-buzz</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span>- <span class="l">dbt-mentions</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span>- <span class="l">dbt-health</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span>- <span class="l">rising-tools</span></span></span></code></pre></td></tr></table>
</div></div></div>
<p>Each entry holds its own metadata sidecar with the <em>expression + metadata + cached result, addressed by hash</em>. Here is <code>dbt-download-trend</code>, the whole metric captured declaratively (kind, output schema, the compiled SQL over the source table, and the cache key):</p>
<div class="highlight"><div class="chroma"><div class="code-header language-yaml"><span class="code-title"><i class="arrow svg-icon icon-code-right"></i></span><span class="ellipses"><i class="svg-icon icon-ellipsis"></i></span><span class="copy" title="Copy to clipboard"><i class="svg-icon icon-copy"></i></span></div><div class="table-wrapper">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt"> 1
</span><span class="lnt"> 2
</span><span class="lnt"> 3
</span><span class="lnt"> 4
</span><span class="lnt"> 5
</span><span class="lnt"> 6
</span><span class="lnt"> 7
</span><span class="lnt"> 8
</span><span class="lnt"> 9
</span><span class="lnt">10
</span><span class="lnt">11
</span><span class="lnt">12
</span><span class="lnt">13
</span><span class="lnt">14
</span><span class="lnt">15
</span><span class="lnt">16
</span><span class="lnt">17
</span><span class="lnt">18
</span><span class="lnt">19
</span><span class="lnt">20
</span><span class="lnt">21
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-yaml" data-lang="yaml"><span class="line"><span class="cl"><span class="nt">md5sum</span><span class="p">:</span><span class="w"> </span><span class="l">5a7d75db1e0cf46dc59a713a6ffa9573</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="nt">backends</span><span class="p">:</span><span class="w"> </span><span class="p">[</span><span class="l">xorq_datafusion]</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="nt">expr_metadata</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span><span class="nt">kind</span><span class="p">:</span><span class="w"> </span><span class="l">expr</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span><span class="nt">schema_out</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">date</span><span class="p">:</span><span class="w"> </span><span class="l">timestamp(9)</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">downloads</span><span class="p">:</span><span class="w"> </span><span class="l">int64</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">package</span><span class="p">:</span><span class="w"> </span><span class="l">string</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span><span class="nt">cache_keys</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">key</span><span class="p">:</span><span class="w"> </span><span class="l">xorq_cache-snapshot-4788a41e541c0526df207922813c0377</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">relative_path</span><span class="p">:</span><span class="w"> </span><span class="l">parquet</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span><span class="nt">sql_queries</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span>- - <span class="l">main</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span>- <span class="l">xorq_datafusion</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span>- <span class="p">|-</span><span class="sd">
</span></span></span><span class="line"><span class="cl"><span class="sd">        SELECT &#34;t0&#34;.&#34;date&#34;, &#34;t0&#34;.&#34;downloads&#34;, &#34;t0&#34;.&#34;package&#34;
</span></span></span><span class="line"><span class="cl"><span class="sd">        FROM &#34;raw_pypi_downloads&#34; AS &#34;t0&#34;
</span></span></span><span class="line"><span class="cl"><span class="sd">        WHERE &#34;t0&#34;.&#34;package&#34; = &#39;dbt-core&#39;
</span></span></span><span class="line"><span class="cl"><span class="sd">          AND &#34;t0&#34;.&#34;category&#34; = &#39;without_mirrors&#39;
</span></span></span><span class="line"><span class="cl"><span class="sd">          AND &#34;t0&#34;.&#34;date&#34; &gt; DATE_TRUNC(&#39;DAY&#39;, &#39;2026-05-14&#39;)
</span></span></span><span class="line"><span class="cl"><span class="sd">        ORDER BY &#34;t0&#34;.&#34;date&#34; ASC</span></span></span></code></pre></td></tr></table>
</div></div></div>
<p>Because xorq bundles the source read at build time, an entry is self-contained: <code>make catalog-run ALIAS=dbt-momentum</code> re-executes it with <strong>no re-ingest</strong>. Edit an expression (say <code>days=30 → 90</code>) and its content hash changes, so it registers as a <em>new</em> version while the old one stays retrievable.</p>
<p>The project also ships a small ML task (build feature matrix, split, fit a sklearn <code>LogisticRegression</code> wrapped in a xorq <code>Pipeline</code>, predict an adoption label) to mimic prediction and training of a real-life project. It could be interesting to add more sophisticated logic once more data is downloaded, and potentially even more sources are added.</p>
<p>With that example, we use the grammar of data with xorq to get essentially needed steps as part of the <a href="https://www.oreilly.com/library/view/fundamentals-of-data/9781098108298/ch02.html#the_data_engineering_lifecycle-id000095" target="_blank" rel="noopener noreffer">Data Engineering Lifecycle</a>. We can have full lineage, we get deterministic reruns, we get the metrics in the catalog. Plus, we get extensibility at each stage if we need it.</p>
<p>E.g. extend the metrics from &lsquo;catalog -&gt; <a href="https://github.com/boringdata/boring-semantic-layer" target="_blank" rel="noopener noreffer">Boring Semantic Layer</a>&rsquo;, or use dlt for ingestion as I did in this project to load data incrementally into a staging area.</p>
<h4 id="the-lineage">The Lineage</h4>
<p>For instance, <code>make lineage</code> shows everything xorq knows about a sentence <em>before</em> it touches a single row: its source nouns, output schema, bound engine, and the verbs compiled to SQL. This is how it looks:</p>
<div class="highlight"><div class="chroma"><div class="code-header language-text"><span class="code-title"><i class="arrow svg-icon icon-code-right"></i></span><span class="ellipses"><i class="svg-icon icon-ellipsis"></i></span><span class="copy" title="Copy to clipboard"><i class="svg-icon icon-copy"></i></span></div><div class="table-wrapper">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt"> 1
</span><span class="lnt"> 2
</span><span class="lnt"> 3
</span><span class="lnt"> 4
</span><span class="lnt"> 5
</span><span class="lnt"> 6
</span><span class="lnt"> 7
</span><span class="lnt"> 8
</span><span class="lnt"> 9
</span><span class="lnt">10
</span><span class="lnt">11
</span><span class="lnt">12
</span><span class="lnt">13
</span><span class="lnt">14
</span><span class="lnt">15
</span><span class="lnt">16
</span><span class="lnt">17
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">LINEAGE — what xorq knows before any data is read:
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">&gt;&gt; expr.op().find(DatabaseTable)   — the source nouns this expression reads:
</span></span><span class="line"><span class="cl">     [&#39;raw_github_events&#39;]
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">&gt;&gt; expr.schema()                   — the output columns (resolved at build time):
</span></span><span class="line"><span class="cl">     ibis.Schema { week: timestamp; stars: int64 }
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">&gt;&gt; expr.ls.backends                — the engine(s) bound to it (MODIFIER):
</span></span><span class="line"><span class="cl">     [&#39;Backend&#39;]
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">&gt;&gt; ibis.to_sql(expr)               — the VERB chain, compiled to SQL:
</span></span><span class="line"><span class="cl">SELECT &#34;t1&#34;.&#34;week&#34;, COUNT(&#34;t1&#34;.&#34;id&#34;) AS &#34;stars&#34;
</span></span><span class="line"><span class="cl">FROM ( SELECT DATE_TRUNC(&#39;WEEK&#39;, &#34;created_at&#34;) AS &#34;week&#34;, &#34;id&#34;
</span></span><span class="line"><span class="cl">       FROM &#34;raw_github_events&#34;
</span></span><span class="line"><span class="cl">       WHERE &#34;repo_name&#34; = &#39;dbt-labs/dbt-core&#39; AND &#34;type&#34; = &#39;WatchEvent&#39; )
</span></span><span class="line"><span class="cl">GROUP BY &#34;t1&#34;.&#34;week&#34; ORDER BY &#34;t1&#34;.&#34;week&#34;</span></span></code></pre></td></tr></table>
</div></div></div>
<p>If you use the xorq Desktop app, this is integrated into a nice UI like this:</p>













  

























<figure><span class="img-expandable" data-full="/blog/from-definition-to-execution-grammar-of-data/xorq-desktop-lineage.png">
<a target="_blank" href="/blog/from-definition-to-execution-grammar-of-data/xorq-desktop-lineage.png" title="Lineage view in xorq&rsquo;s upcoming Desktop app">

</a><button type="button" class="expand-btn" aria-label="Expand image" title="Expand image" hidden><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true"><path d="M15 3h6v6M9 21H3v-6M21 3l-7 7M3 21l7-7"/></svg></button>
</span><figcaption class="image-caption">Lineage view in xorq&rsquo;s upcoming Desktop app</figcaption>
</figure>
<h3 id="machine-learning-as-another-modifier">Machine Learning as Another Modifier</h3>
<p>The tool-adoption model reuses the same four parts of speech: <code>fit(...)</code> attaches a <strong>modifier</strong> - the fitted model rides along as metadata (xorq tracks a <code>training_hash</code>) without changing what the expression computes, which is precisely <a href="/blog/grammar-data-engineering/" rel="">Part 1</a>&rsquo;s definition of a modifier. <code>predict(...)</code> is just a verb returning an Ibis table expression. And because predict is an expression, <code>xorq build</code> can manifest the <em>inference</em> pipeline too. Deploying a model collapses into the same <code>write → manifest → execute</code> cycle as deploying a metric.</p>
<blockquote>
<p>[!example] Add Semantic Layer<br>
Here we use the inbuilt catalog and metrics are defined as expressions in Ibis. If you like, you could lift the catalog metrics into the Boring Semantic Layer for dimensions/measures. BSL is built by Hussain, the creator of xorq, and is tightly integrated. Check <a href="https://github.com/boringdata/boring-semantic-layer" target="_blank" rel="noopener noreffer">boring-semantic-layer</a> if that is of interest, or check a recent article I wrote, <a href="https://motherduck.com/blog/semantic-layer-duckdb-tutorial/" target="_blank" rel="noopener noreffer">Why Semantic Layers Matter</a>, with a practical example.</p>
</blockquote>
<h2 id="so-what-did-we-learn-applying-the-grammar-for-data">So What Did We Learn Applying the Grammar for Data?</h2>
<p><a href="/blog/grammar-data-engineering/" rel="">Part 1</a> introduced the concept of grammar for data. With the data engineering digest project, we applied it to a demo project to capture the momentum of a tool in the data ecosystem. We mapped xorq&rsquo;s features to the grammar to illustrate it better, and we&rsquo;ve built a deterministic and versionable data stack with a single <code>stack.yaml</code>, providing the end-to-end data capabilities a data engineering project needs. Everything supports the case for a grammar for data.</p>
<p>xorq gives us the bottom-up approach, working with our data, mapping all parts of the DE lifecycle, running it locally on multiple engines and discovering errors at pre-run time. Ultimately, <a href="https://www.rilldata.com/blog/what-shifting-left-means-and-why-it-matters-for-data-stacks" target="_blank" rel="noopener noreffer">shifting left</a> once more.</p>
<p>The grammar buys us two guarantees: answers that are <em>faithful</em> to the expression that produced them, and <em>reproducible</em> whenever we rerun it. But that doesn&rsquo;t always mean correct. For example, the expression can still encode the wrong interpretation of the question. That third guarantee comes from reviewed definitions (the catalog entries and semantic models we built above). You can learn more about it in a follow-up article <a href="https://xorq.dev/blog/faithful-reproducible-wrong/" target="_blank" rel="noopener noreffer">Faithful, Reproducible, Wrong</a>, where a checker plus a reviewed semantic model takes an agent from 4/100 to 100/100 correct answers on the same question.</p>
<p>Another related question is: if the grammar defines and the manifest records, who verifies it? That&rsquo;s what we look at next in this series. You can get a sneak peek with a checker inside an agent harness (<a href="https://pi.dev/" target="_blank" rel="noopener noreffer">pi</a>), where every quantitative claim must be discharged by rerunning a content-addressed expression with its lineage intact. You can watch the loop in action in <a href="https://asciinema.org/a/1263221" target="_blank" rel="noopener noreffer">this recording</a> and reproduce it from the <a href="https://github.com/xorq-labs/pi-xorq-verification-example" target="_blank" rel="noopener noreffer">pi-xorq-verification-example</a> repo. More on verification in Part 3.</p>
<hr>
<p>If you got interested and want to know more about how xorq works, check out the <a href="https://docs.xorq.dev/" target="_blank" rel="noopener noreffer">docs</a>, or the open source repo on <a href="https://github.com/xorq-labs/xorq" target="_blank" rel="noopener noreffer">GitHub</a>.</p>
<p>Also check out the <a href="https://xorq.dev/" target="_blank" rel="noopener noreffer">upcoming xorq Desktop app</a> (join the waitlist), which targets data analysts from the top down. It&rsquo;s a desktop app on macOS and a trusted harness. It has additional features that do a verification check and more.</p>
<h2 id="appendix">Appendix</h2>
<p>Additional project information for running the GitHub project, if you are interested in running it yourself and having a closer look.</p>
<h3 id="quick-note-on-dlt-ingestion">Quick Note on dlt Ingestion</h3>
<p>All four sources use idempotent upsert, so re-running only adds new rows / updates existing ones (never duplicates):</p>
<ul>
<li><strong>RSS + Bluesky</strong> → dlt <code>write_disposition=&quot;merge&quot;</code> on <code>primary_key=&quot;id&quot;</code> (article URL / post URI)</li>
<li><strong>PyPI</strong> → <code>INSERT OR REPLACE</code> on <code>(package, date, category)</code></li>
<li><strong>GitHub</strong> → <code>INSERT OR IGNORE</code> on event <code>id</code></li>
</ul>
<h3 id="loading-1-year-on-snowflake">Loading 1 Year on Snowflake</h3>
<p>To run a full year or more, just use Snowflake, for example by installing <code>xorq[snowflake]</code> and ingesting the data into Snowflake. Re-running is always safe (idempotent merge), so just pull more and re-run. Each source has its own ceiling:</p>
<div class="highlight"><div class="chroma open"><div class="code-header language-bash"><span class="code-title"><i class="arrow svg-icon icon-code-right"></i></span><span class="ellipses"><i class="svg-icon icon-ellipsis"></i></span><span class="copy" title="Copy to clipboard"><i class="svg-icon icon-copy"></i></span></div><div class="table-wrapper">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt"> 1
</span><span class="lnt"> 2
</span><span class="lnt"> 3
</span><span class="lnt"> 4
</span><span class="lnt"> 5
</span><span class="lnt"> 6
</span><span class="lnt"> 7
</span><span class="lnt"> 8
</span><span class="lnt"> 9
</span><span class="lnt">10
</span><span class="lnt">11
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="c1"># 1. More Bluesky history — edit src/de_ecosystem/ingest/bluesky.py</span>
</span></span><span class="line"><span class="cl"><span class="nv">MAX_PAGES</span> <span class="o">=</span> <span class="m">200</span>            <span class="c1"># 40 → 200, pages much further back in time</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="c1"># 2. More GitHub events — download extra hours into data/raw/gharchive/ (gitignored)</span>
</span></span><span class="line"><span class="cl"><span class="k">for</span> h in <span class="k">$(</span>seq <span class="m">0</span> 23<span class="k">)</span><span class="p">;</span> <span class="k">do</span>
</span></span><span class="line"><span class="cl">  wget -nc -P data/raw/gharchive <span class="s2">&#34;https://data.gharchive.org/2026-08-05-</span><span class="nv">$h</span><span class="s2">.json.gz&#34;</span>
</span></span><span class="line"><span class="cl"><span class="k">done</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="c1"># 3. Re-ingest (safe, merges) and re-run the whole sentence</span>
</span></span><span class="line"><span class="cl">make ingest
</span></span><span class="line"><span class="cl">make run-sentence</span></span></code></pre></td></tr></table>
</div></div></div>
<p>The one limit is that the live <code>pypistats.org</code> API only serves ~180 days of downloads, so PyPI momentum caps at a 90-day-vs-prior-90-day window.</p>
<p>A <em>full-year</em> digest needs a source that actually stores that history, and that is where Snowflake (or BigQuery&rsquo;s public <code>bigquery-public-data.pypi.file_downloads</code>) comes in, both holding years of daily download stats.</p>
<p>Because the grammar separates <em>what</em> from <em>where</em>, you don&rsquo;t rewrite the metric. You just point the <strong>noun</strong> at the warehouse and run the same sentence:</p>
<div class="highlight"><div class="chroma open"><div class="code-header language-bash"><span class="code-title"><i class="arrow svg-icon icon-code-right"></i></span><span class="ellipses"><i class="svg-icon icon-ellipsis"></i></span><span class="copy" title="Copy to clipboard"><i class="svg-icon icon-copy"></i></span></div><div class="table-wrapper">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span><span class="lnt">2
</span><span class="lnt">3
</span><span class="lnt">4
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">uv sync                       <span class="c1"># the snowflake driver ships as a base dependency</span>
</span></span><span class="line"><span class="cl"><span class="c1"># put SNOWFLAKE_ACCOUNT / USER / PASSWORD / ROLE / DATABASE / WAREHOUSE / SCHEMA</span>
</span></span><span class="line"><span class="cl"><span class="c1"># in .env (or export them in your shell)</span>
</span></span><span class="line"><span class="cl">make engines                  <span class="c1"># runs star_velocity on DuckDB, DataFusion AND Snowflake</span></span></span></code></pre></td></tr></table>
</div></div></div>
<p>And with the same verb and only the engine binding changed:</p>
<div class="highlight"><div class="chroma open"><div class="code-header language-python"><span class="code-title"><i class="arrow svg-icon icon-code-right"></i></span><span class="ellipses"><i class="svg-icon icon-ellipsis"></i></span><span class="copy" title="Copy to clipboard"><i class="svg-icon icon-copy"></i></span></div><div class="table-wrapper">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span><span class="lnt">2
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="n">con</span> <span class="o">=</span> <span class="n">settings</span><span class="o">.</span><span class="n">backend</span><span class="p">(</span><span class="s2">&#34;snowflake&#34;</span><span class="p">)</span>                             <span class="c1"># xo.snowflake.connect_env()</span>
</span></span><span class="line"><span class="cl"><span class="n">momentum</span> <span class="o">=</span> <span class="n">download_momentum</span><span class="p">(</span><span class="n">con</span><span class="p">,</span> <span class="s2">&#34;duckdb&#34;</span><span class="p">,</span> <span class="n">window_days</span><span class="o">=</span><span class="mi">365</span><span class="p">)</span>    <span class="c1"># a full year</span></span></span></code></pre></td></tr></table>
</div></div></div>
<p>The catalog code itself has no engine awareness. <code>settings.backend(&quot;duckdb&quot; | &quot;datafusion&quot; | &quot;snowflake&quot;)</code> is the only thing that changes. Define once, represent it everywhere: your laptop for a 90-day pulse, a warehouse for the year-in-review.</p>
<p>The one-time grants (<code>de_digest</code> must exist and <code>DLT_LOADER_ROLE</code> needs <code>CREATE TABLE</code> <strong>and</strong> <code>CREATE STAGE</code>, since the loader stages the tables before copying them in):</p>
<div class="highlight"><div class="chroma open"><div class="code-header language-sql"><span class="code-title"><i class="arrow svg-icon icon-code-right"></i></span><span class="ellipses"><i class="svg-icon icon-ellipsis"></i></span><span class="copy" title="Copy to clipboard"><i class="svg-icon icon-copy"></i></span></div><div class="table-wrapper">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt"> 1
</span><span class="lnt"> 2
</span><span class="lnt"> 3
</span><span class="lnt"> 4
</span><span class="lnt"> 5
</span><span class="lnt"> 6
</span><span class="lnt"> 7
</span><span class="lnt"> 8
</span><span class="lnt"> 9
</span><span class="lnt">10
</span><span class="lnt">11
</span><span class="lnt">12
</span><span class="lnt">13
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-sql" data-lang="sql"><span class="line"><span class="cl"><span class="c1">-- run once as ACCOUNTADMIN; the demo materialises the 4 raw tables into de_digest.PUBLIC
</span></span></span><span class="line"><span class="cl"><span class="n">USE</span><span class="w"> </span><span class="k">ROLE</span><span class="w"> </span><span class="n">ACCOUNTADMIN</span><span class="p">;</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="k">CREATE</span><span class="w"> </span><span class="k">DATABASE</span><span class="w"> </span><span class="k">IF</span><span class="w"> </span><span class="k">NOT</span><span class="w"> </span><span class="k">EXISTS</span><span class="w"> </span><span class="n">de_digest</span><span class="p">;</span><span class="w">   </span><span class="c1">-- PUBLIC schema is created automatically
</span></span></span><span class="line"><span class="cl"><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="k">GRANT</span><span class="w"> </span><span class="k">USAGE</span><span class="w">          </span><span class="k">ON</span><span class="w"> </span><span class="k">DATABASE</span><span class="w"> </span><span class="n">de_digest</span><span class="w">       </span><span class="k">TO</span><span class="w"> </span><span class="k">ROLE</span><span class="w"> </span><span class="n">DLT_LOADER_ROLE</span><span class="p">;</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="k">GRANT</span><span class="w"> </span><span class="k">USAGE</span><span class="w">          </span><span class="k">ON</span><span class="w"> </span><span class="k">SCHEMA</span><span class="w">   </span><span class="n">de_digest</span><span class="p">.</span><span class="k">PUBLIC</span><span class="w"> </span><span class="k">TO</span><span class="w"> </span><span class="k">ROLE</span><span class="w"> </span><span class="n">DLT_LOADER_ROLE</span><span class="p">;</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="k">GRANT</span><span class="w"> </span><span class="k">CREATE</span><span class="w"> </span><span class="k">TABLE</span><span class="w">   </span><span class="k">ON</span><span class="w"> </span><span class="k">SCHEMA</span><span class="w">   </span><span class="n">de_digest</span><span class="p">.</span><span class="k">PUBLIC</span><span class="w"> </span><span class="k">TO</span><span class="w"> </span><span class="k">ROLE</span><span class="w"> </span><span class="n">DLT_LOADER_ROLE</span><span class="p">;</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="k">GRANT</span><span class="w"> </span><span class="k">CREATE</span><span class="w"> </span><span class="n">STAGE</span><span class="w">   </span><span class="k">ON</span><span class="w"> </span><span class="k">SCHEMA</span><span class="w">   </span><span class="n">de_digest</span><span class="p">.</span><span class="k">PUBLIC</span><span class="w"> </span><span class="k">TO</span><span class="w"> </span><span class="k">ROLE</span><span class="w"> </span><span class="n">DLT_LOADER_ROLE</span><span class="p">;</span><span class="w">  </span><span class="c1">-- adbc/pandas bulk
</span></span></span><span class="line"><span class="cl"><span class="k">load</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="k">GRANT</span><span class="w"> </span><span class="k">USAGE</span><span class="p">,</span><span class="w"> </span><span class="n">OPERATE</span><span class="w"> </span><span class="k">ON</span><span class="w"> </span><span class="n">WAREHOUSE</span><span class="w"> </span><span class="n">COMPUTE_WH</span><span class="w">      </span><span class="k">TO</span><span class="w"> </span><span class="k">ROLE</span><span class="w"> </span><span class="n">DLT_LOADER_ROLE</span><span class="p">;</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="k">GRANT</span><span class="w"> </span><span class="k">ROLE</span><span class="w"> </span><span class="n">DLT_LOADER_ROLE</span><span class="w"> </span><span class="k">TO</span><span class="w"> </span><span class="k">USER</span><span class="w"> </span><span class="n">loader</span><span class="p">;</span><span class="w">   </span><span class="c1">-- if not already</span></span></span></code></pre></td></tr></table>
</div></div></div>
<p>And the tables it created in Snowflake if everything works correctly:</p>
<p><span class="img-expandable" data-full="/blog/from-definition-to-execution-grammar-of-data/snowflake-tables.webp"><a target="_blank" href="/blog/from-definition-to-execution-grammar-of-data/snowflake-tables.webp" title="snowflake-tables.webp" >
        
    </a><button type="button" class="expand-btn" aria-label="Expand image" title="Expand image" hidden><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true"><path d="M15 3h6v6M9 21H3v-6M21 3l-7 7M3 21l7-7"/></svg></button>
</span></p>
<hr>
<pre class=""><em>Full article published at <a href="https://xorq.dev/blog/grammar-of-data-part2-definition-execution/" target="_blank" rel="noopener noreferrer">xorq.dev</a> - written as part of <a href="/services/">my services</a></em></pre> 
<div class="footnotes" role="doc-endnotes">
<hr>
<ol>
<li id="fn:1">
<p>Bluesky has a firehose and can simply be queried with DuckDB, e.g. see <a href="https://www.ssp.sh/brain/querying-bluesky-with-duckdb-and-sql/" target="_blank" rel="noopener noreffer">Querying Bluesky with DuckDB and SQL</a>&#160;<a href="#fnref:1" class="footnote-backref" role="doc-backlink">&#x21a9;&#xfe0e;</a></p>
</li>
</ol>
</div>
]]></description>
</item>
<item>
    <title>Context, Semantics, and Ontology: A Primer for the Agentic Era</title>
    <link>https://www.ssp.sh/blog/semantic-context-layer-primer/</link>
    <pubDate>Sat, 12 Sep 2026 06:40:08 &#43;0200</pubDate>
    <author>Simon Späti</author>
    <guid>https://www.ssp.sh/blog/semantic-context-layer-primer/</guid><enclosure url="https://www.ssp.sh/blog/semantic-context-layer-primer/featured-image.png" type="image/png" length="0" /><description><![CDATA[<p>There&rsquo;s so much talk about new ways of working with agent engineering supported workflows. New models are independently creating new metrics and transformations, finding gaps in the business data, reviewing the SQL they write, and verifying everything works with your data platform.<br>
All of it is autonomous, so one might say, why do we still need BI tools, or therefore a semantic layer, or even a context layer? It&rsquo;s hard to predict the future, but as someone working with newer models as well as older ones, I could see that Fable for example is one-shotting work in minutes that previously took me many iterations with Opus 4.8 (below you see my recent Claude and Codex use (roborev only)). With the right workflows to brainstorm first a spec, then an implementation plan, it&rsquo;s really amazing how fast and precisely one can build with the right amount of inputs we give, and <a href="https://substack.com/home/post/p-189793289" target="_blank" rel="noopener noreffer">taste</a>.</p>
<p>So what then is left for us humans to do in the data work context? Many are defaulting to adding or curating context, ergo the <strong>rise of a context layer</strong>. I see even more talks about added Ontologies. Maybe you ask yourself, what is that even? Do we need all of it?</p>
<p>This article is a primer about the context layer, the difference between a classical semantic layer contained in every BI tool, and an external semantic layer.</p>
<blockquote>
<p>[!Note] The other Surface level<br>
Besides context, I&rsquo;d add that the other big surface level where a lot is currently happening, with human in the loop vs autonomous agents working, is verification, especially verification in data engineering work.</p>
</blockquote>
<h2 id="what-is-context-and-its-context-layer">What is Context, and Its Context Layer?</h2>
<p>But we can&rsquo;t talk about the new shiny context layer tools, ontologies or any other, before we define context, and how much context we need. If we go by the definition of the word context, <a href="https://dictionary.cambridge.org/dictionary/english/context" target="_blank" rel="noopener noreffer">Cambridge Dictionary</a> says:</p>
<blockquote>
<p>The situation within which something exists or happens, and that can help explain it</p>
</blockquote>
<p><a href="https://jessicatalisman.substack.com/" target="_blank" rel="noopener noreffer">Jessica Talisman</a>, who writes about semantics, the vocabulary and the intersections of ontologies, <a href="https://jessicatalisman.substack.com/p/the-context-problem" target="_blank" rel="noopener noreffer">defines</a> context in information science as:</p>
<blockquote>
<p>Describes the <strong>relational structure that holds meaning in place</strong>.</p>
</blockquote>
<p>This sounds very much like metadata, the data about the data we collect in logs, orchestration runs, table information, index information. But let&rsquo;s go one step further, what&rsquo;s a Context Layer?</p>
<h3 id="whats-a-context-layer">What&rsquo;s a Context Layer?</h3>
<p>There are multiple definitions out there, and bear in mind, this term is less than a year old, but Andreessen Horowitz <a href="https://a16z.com/your-data-agents-need-context/" target="_blank" rel="noopener noreffer">describes a &ldquo;Modern Context Layer&rdquo; to contain</a><sup id="fnref:1"><a href="#fn:1" class="footnote-ref" role="doc-noteref">1</a></sup> three pieces:</p>
<blockquote>
<p>1) <strong>Accessing the right data</strong>. [&hellip;] we’d want to ensure the agent has access to all the data it needs [&hellip;] captured in internal systems, GDrive/Slack, etc.</p>
<p>2) <strong>Automated context construction</strong> [&hellip;] emphasis of <strong>focus should be on high signal context</strong> – for example, looking through past query history can be high signal in determining the most referenced tables and most common joins, and data modeling solutions like dbt or LookML can provide clear definitions for business metrics.</p>
<p>3) <strong>Human refinement</strong> – Automated context construction may be able to form a large portion of the context corpus, but it can’t create the full picture. [&hellip;]</p>
</blockquote>
<p>I defined it in <a href="https://www.kaelio.com/blog/building-a-context-layer-for-the-agentic-era" target="_blank" rel="noopener noreffer">Beyond the Semantic Layer</a> in a similar fashion:</p>
<blockquote>
<p>The context layer primarily <strong>supports the accuracy of SQL queries, continuous updates to the business context</strong>, and governance. Additionally, with a newer context layer, we can <strong>include more relevant business insights</strong> that are stored internally, usually in <strong>unstructured form</strong>, in tools like Notion as business documentation.</p>
</blockquote>
<p>So it seems clear, we focus on less &ldquo;classical&rdquo; data sources from databases, or structured tables, but more free-flow text that humans wrote in docs, Confluence, Notion.</p>
<h3 id="comparison-to-a-semantic-layer-and-how-they-work-together">Comparison to a Semantic Layer, and how They Work together</h3>
<p>Now that we defined context and its layer, it begs the question, what&rsquo;s the difference to a semantic layer (which, to some, might be another rather vague definition)? I know, I have <a href="https://www.ssp.sh/blog/rise-of-semantic-layer-metrics/" target="_blank" rel="noopener noreffer">written about</a> past BI integrated ones, and more modern ones like Cube, Malloy, dbt one, but it still seems everyone has a different definition.</p>
<p>The definition of a semantic layer, as we discussed in <a href="/blog/semantic-layer-duckdb/" rel="">Why Semantic Layers Matter</a> (including an example of how to build one), is defined by Julian Hyde, creator of Morel Language, and an early employee of Looker and LookML:</p>
<blockquote>
<p>A semantic layer, also known as a metrics layer, lies between business users and the database, and lets those users compose queries in the concepts that they understand. It also governs access to the data, manages data transformations, and can tune the database by defining materializations.<br>
Like many new ideas, the semantic layer is a distillation and evolution of many old ideas, such as query languages, multidimensional OLAP, and query federation.</p>
</blockquote>
<p>So that means, a <strong>semantic layer understands the semantics, the metrics and governance access</strong> and data transformation, and has a link to (multi-dimensional) OLAP and query languages, while the <strong>context layer is more focused on gathering context and refinement between humans and agents</strong>.</p>
<p>I see the two, a semantic layer and a context layer, working for distinct fields, and working hand in hand:</p>
<ul>
<li><strong>Semantic Layer</strong>: Definition is <strong>written as logic that compiles to SQL</strong>, like a metric or a dimension</li>
<li><strong>Context layer</strong>: Holds everything else: the rules that can&rsquo;t be explained, and everything that is <strong>unrelated to a dedicated query</strong>.</li>
</ul>
<h2 id="the-context-layer-and-agents-paradox">The Context Layer and Agents Paradox</h2>
<p>In a semantic layer, Notion Docs, Confluence pages, and other unstructured text didn&rsquo;t count as real data sources. There&rsquo;s no incremental load on Markdown, so we didn&rsquo;t include them.</p>
<p>There is also another angle in play. Before agents, it was hard to keep track of free flow Markdown text, finding out what has changed in the incremental load, and what&rsquo;s useful, what has the biggest signal as a16z said above. But with the help of agents, we can now integrate more. Agents can do the bulk of the work, and that&rsquo;s why context layers popped up in the first place.</p>
<p>It&rsquo;s a <strong>paradox</strong>: if we <strong>didn&rsquo;t have agents, we wouldn&rsquo;t need this much context</strong>. But we <strong>need more context because of agents</strong>, and we <strong>can only manage it because we have agents</strong>.</p>
<p>We can load more data than ever now <strong><em>because</em> agents do the integration work</strong> that wasn&rsquo;t feasible before, but we also need to load more data than ever because agents need to be smarter to use it well. The agent needs every bit of human-written information to increase its context and make better decisions, but that&rsquo;s only possible because of agents in the first place.</p>
<p>Jacob saw a similar paradox in <a href="https://analyticshour.io/2026/06/23/300-are-semantic-layers-really-necessary/" target="_blank" rel="noopener noreffer">Are Semantic Layers Really Necessary?</a> and says:</p>
<blockquote>
<p><strong>there&rsquo;s a little bit of a paradox</strong>:  you need some level of conformity to communicate well, but also if you have too much conformity, you have a commodity. You need space to have some differentiation.</p>
</blockquote>
<blockquote>
<p>[!note] The crucial part of how to include more unstructured &lsquo;Context&rsquo; is how the integration is updated continuously<br>
As with the above definition, I&rsquo;d 100% agree that the crucial part, and also the challenge, is the combination of agents with human inputs, as <a href="/blog/figma-for-agents-max-beauchemin/" rel="">data warehouse projects are all messy</a> as we recently discussed in the Maxime Beauchemin interview.</p>
</blockquote>
<h3 id="how-much-context-do-we-need-and-what-kind">How much Context Do We Need? And what Kind?</h3>
<p>That begs the question: How much context do we need, and what kind? Should we gather all Markdown files we find, or use the JIRA tickets where we defined our tasks?</p>
<p>And what&rsquo;s the quality of these JIRA tickets? They might be super up-to-date, but missing a whole lot of information, so what kind of &ldquo;context&rdquo; do we get from them, or do we want?</p>
<p>With agents, we could probably say the more context, the better, and hopefully the agent identifies the high-signal and valuable data out of empty Jira tickets 😉. But assuming we gathered all of the above context, how do we actually manage it? How do we update it, how do we make sure it&rsquo;s correct?</p>
<p>This is actually where we always land at the same fundamental questions of <em>Data Engineering Lifecycle</em> and <em>data governance</em>, especially in an enterprise setting with multiple actors and people. Because it&rsquo;s easy to build up context initially, once. But the hard part is updating it, maintaining it, having rules, having a governance strategy.</p>
<p>So the Context Layer integration, as well as the semantic layer, becomes a data governance and enterprise process definition problem.</p>
<h2 id="open-standards-for-metrics-and-data-quality">Open Standards for Metrics and Data Quality</h2>
<p>What helps us here are open standards. Luckily we just recently got the <strong>Open Semantic Interchange (OSI)</strong> standard, recently renamed to <a href="https://github.com/apache/ossie" target="_blank" rel="noopener noreffer">Apache Ossie</a>. They standardise the syntax around semantic layer declarative configuration. The goal is to have an <strong>open-source, vendor-agnostic specification for describing and exchanging semantic models</strong>.</p>
<p>Not that we end up with many different proprietary YAML definitions for LookML, Cube, dbt Semantic Layer, Snowflake&rsquo;s internal one, etc. as we have it today. If you write in the standard, it can be easily mapped to any semantic layer definition.</p>
<h3 id="metrics-to-measure-the-data-quality-of-context">Metrics to Measure the Data Quality of Context</h3>
<p>Another part of the puzzle and how good context layers will be, is the data quality. The outcome, the <strong>context itself, strongly depends on the quality</strong> and how up-to-date and <em>correct</em> the data is.</p>
<p>One thing I was pondering for a long time: how do we measure that? In my previous job we had a single test score to represent data quality, something like an <a href="https://www.rohde-schwarz.com/us/knowledge-center/videos/interview-nps-the-single-qoe-centric-network-score-from-rs_251220-621634.html" target="_blank" rel="noopener noreffer">Net Performance Score (NPS)</a> we used to represented the mobile network and network quality as a <strong>single metric that characterizes the overall performance</strong>. So as a network provider, I won&rsquo;t need to check every number on each phone call. I can aggregate it up to an NPS score as part of a region, commune, or country. This is a common approach in network profiling, but in data we don&rsquo;t have that luxury yet. Maybe we should?</p>
<p>Why am I saying all of this? Because to be able to massively ingest context, and documentation autonomously, without checking it, we need a measure. And that needs an open standard on data quality. Measures such as <code>last updated date, creator (agent/human), ratings, etc.</code> would be needed to condense a full score. If we have this, we can add a load more context, faster.</p>
<p>But right now, we do not have it, unless we use a [[data catalog]], where catalogs scan metadata and humans rate data sets etc. But with faster agents and everything autonomous, this model needs some improvements.</p>
<h2 id="and-what-the-heck-is-an-ontology">And what the Heck is an Ontology?</h2>
<p>Another term I see more frequently used and talked about, is an Ontology. I include it here, because if we talk about context, and the newly created context layer, I believe it&rsquo;s a good vehicle to explain the world for agents that need to understand not only the data our business holds, but also need to link it to common sense and how the world functions in real life. And that is what ontologies are really good at.</p>
<h3 id="ontology-broader-context-to-explain-world-models">Ontology: Broader Context to Explain World Models</h3>
<p>These are not something new. I used them back in 2017, when Airbus (where I was working at the time) <a href="https://www.airbus.com/en/newsroom/press-releases/2017-06-airbus-launches-skywise-aviations-open-data-platform" target="_blank" rel="noopener noreffer">announced Skywise</a>, an open data platform for airplane parts. And do you know what it was built on? On <a href="https://www.palantir.com/docs/foundry" target="_blank" rel="noopener noreffer">Palantir Foundry</a>, a data lake with a deep foundation in Ontologies.</p>
<p>If we go to Wikipedia, it <a href="https://en.wikipedia.org/wiki/Ontology_%28information_science%29" target="_blank" rel="noopener noreffer">defines</a> an Ontology as follows:</p>
<blockquote>
<p>In information science, an ontology <strong>encompasses a representation, formal naming, and definitions</strong> of the <strong>categories, properties, and relations</strong> between the <strong>concepts, data, or entities</strong> that pertain to one, many, or all domains of discourse.</p>
</blockquote>
<p>In simpler words, usually existing objects in the world can be described through an ontology. For example, an ontology is seen as the whole below:</p>













  
<figure><span class="img-expandable" data-full="/blog/semantic-context-layer-primer/ontology-foundry.webp">
<a target="_blank" href="/blog/semantic-context-layer-primer/ontology-foundry.webp" title="Open image in full size">

</a><button type="button" class="expand-btn" aria-label="Expand image" title="Expand image" hidden><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true"><path d="M15 3h6v6M9 21H3v-6M21 3l-7 7M3 21l7-7"/></svg></button>
</span><figcaption class="image-caption">Source: <a href="https://www.palantir.com/docs/foundry/ontology/core-concepts#ontology" target="_blank" rel="noopener noreffer">Core concepts for Palantir - Docs</a></figcaption>
</figure>
<p>Palantir <a href="https://www.palantir.com/docs/foundry/ontology/core-concepts#ontology" target="_blank" rel="noopener noreffer">defines</a> it inside their tool called Foundry as:</p>
<blockquote>
<p>Ontology is a categorization of the world, <strong>it&rsquo;s the digital twin of an organization</strong>, integrating the organization&rsquo;s data and models into a coherent whole by mapping them to object types, properties, link types, and action types.</p>
</blockquote>
<p>The <code>Airport, Flight, Delay, Airline, Aircraft</code> each result in an object type, which is the <strong>schema definition</strong> of a real-world entity or event, not an ontology in itself.</p>
<p>Arrows (Departed From, Operated By, Hub For, etc.) are <strong>link types</strong> and the schema definition of a relationship between two object types, similar to how we model connections in the relational model in an Entity Relationship Diagram (ERD).</p>
<p>Things like <code>Duration, Founding Date, Range</code> are <strong>properties</strong>, which are the schema definition of a characteristic of a real-world entity or event. So the ontology is the whole schema (all five tables/datasets plus how they join together).</p>
<blockquote>
<p>[!Tip] Onto goes back to the Greek and 4th century BC<br>
If you want to get philosophical, the term onto describes efforts to understand what it means for something to exist, constructed from the Greek root &ldquo;ontos,&rdquo; meaning being, and the idea originated with Aristotle in his work on metaphysics.</p>
<p>But in terms of computer/information science, the term was first used in information systems in 1967 by Mealy, though the more significant early work came from McCarthy and Hayes in 1969, who argued that intelligent machines need metaphysically adequate representations of the world. Hayes&rsquo; 1978 paper &ldquo;Naive Physics I: Ontology for Liquids&rdquo; appears to be the first computer science paper with &ldquo;ontology&rdquo; in the title. Find more in <a href="https://arxiv.org/pdf/1810.09171" target="_blank" rel="noopener noreffer">What is an Ontology? (2018)</a></p>
</blockquote>
<h3 id="compare-semantic-with-context-layer-and-knowledge-graph-and-ontologies">Compare Semantic with Context Layer, and Knowledge Graph and Ontologies</h3>
<p>Others such as Ananth Packkildurai <a href="https://www.dataengineeringweekly.com/p/an-ontology-for-ai-agents-is-a-system" target="_blank" rel="noopener noreffer">share</a> it combined into a simple diagram where taxonomy and knowledge graph get added to showcase the technical semantic architecture leading to the context graph:</p>













  

























<figure><span class="img-expandable" data-full="/blog/semantic-context-layer-primer/technical-semantic-architecture-ai-agents.jpg">
<a target="_blank" href="/blog/semantic-context-layer-primer/technical-semantic-architecture-ai-agents.jpg" title="Source: What an Ontology for AI Agents Actually Needs">

</a><button type="button" class="expand-btn" aria-label="Expand image" title="Expand image" hidden><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true"><path d="M15 3h6v6M9 21H3v-6M21 3l-7 7M3 21l7-7"/></svg></button>
</span><figcaption class="image-caption">Source: <a href="https://www.dataengineeringweekly.com/p/an-ontology-for-ai-agents-is-a-system" target="_blank" rel="noopener noreffer">What an Ontology for AI Agents Actually Needs</a></figcaption>
</figure>
<p>So another term, &ldquo;<strong>Knowledge Graph</strong>&rdquo;, simply explained, means information stored in a graph database and visualized as a graph structure, prompting the term knowledge &ldquo;graph&rdquo;. But it helps us see the semantics as the start (the definitions -&gt; can be independent of database or tooling if you have an external layer), and then external elements of the world outside of my company&rsquo;s business are described as an ontology, what Ananth calls the &ldquo;schema layer,&rdquo; since it defines the classes, properties, and rules everything else has to conform to, which, combined with a graph (the &ldquo;instance layer,&rdquo; holding the actual data), leads to the &ldquo;context graph&rdquo;.</p>
<blockquote>
<p>[!note] Other Opinions<br>
Jessica Talisman <a href="https://www.linkedin.com/posts/jmtalisman_context-is-still-a-nebulous-concept-that-share-7493443496671010816-rCJC/?utm_source=share&amp;utm_medium=member_desktop&amp;rcm=ACoAABkA2pgBYM4xDO0z2ChYuxFhBfu4h7jp4Lo" target="_blank" rel="noopener noreffer">illustrates and says</a> it well too, that semantics is an umbrella for the vocabulary, metadata and ontology. She elaborates in great detail in <a href="https://contextandchaos.substack.com/p/ontologies-context-graphs-and-semantic" target="_blank" rel="noopener noreffer">Ontologies, Context Graphs, and Semantic Layers</a>.</p>
<p>Mehdi calls the difference between a <a href="https://motherduckdb.github.io/analytics-agent-duckdb-workshop/context/" target="_blank" rel="noopener noreffer">semantic and context</a> (page 5): &ldquo;&lsquo;Semantic&rsquo; is just a fancy word meaning there&rsquo;s a <strong>specific meaning</strong> for certain concepts and metrics in a company. Some are easy and stable; others live in people&rsquo;s heads and shift over time.&rdquo; And says that the good news is that <strong>LLMs are very good at pulling data from many sources</strong>, so we can use the full semantic context and not just a separate layer.</p>
</blockquote>
<h2 id="whats-the-take-away-graphs-and-ai-agent-integration">What&rsquo;s the Take Away? Graphs and AI Agent Integration?</h2>
<p>I know that was a lot, with a lot of definitions and potentially new terms brought together.</p>
<p>What got clearer to me, is that data <strong>gets more interconnected</strong>. When you follow the data news, as I do, many call for the context layer and connect it <strong>with a graph</strong>, because the graph is the best representation of complex interconnected knowledge, internal, external or models for describing the world, as the airport/flight example above shows.</p>
<p>Hamilton, Till, Jacob and Garret though make a counter argument in <a href="https://motherduck.com/blog/context-belongs-in-the-warehouse/" target="_blank" rel="noopener noreffer">Context belongs in the warehouse</a>, saying not to overcomplicate with sophisticated retrievals (embeddings, graphs). They showcase MotherDuck&rsquo;s new Guides work by having the agent browse a topic tree of curated guide titles and pick the right one without any keyword or vector search. This suggests that sometimes a simple index is enough.</p>
<blockquote>
<p>[!example] How do Guides work and simplify my life?<br>
Check out <a href="https://motherduck.com/docs/key-tasks/guides/" target="_blank" rel="noopener noreffer">Using MotherDuck&rsquo;s Guides to improve AI query accuracy and personalize agents</a> to help you with that, and learn more about how it works.</p>
</blockquote>
<h3 id="sophistication-is-a-cost-not-a-default">Sophistication Is a Cost, Not a Default</h3>
<p>Put those two paragraphs side by side and you get a contradiction: interconnected knowledge argues for a graph, and MotherDuck&rsquo;s own Guides argue that a flat index of titles beats embeddings and graph traversal. Both are right, they&rsquo;re just answering different questions.</p>
<p>Sophistication is a cost you should only pay if the outcome is worth much more than that cost. The airport/flight ontology earns a graph because the domain genuinely is cross-domain and interconnected: an aircraft links to a flight, a flight to an airline, an airline to a hub, and the value is in traversing those relationships. MotherDuck&rsquo;s guide index doesn&rsquo;t need that, because the actual bottleneck isn&rsquo;t relating entities to each other, it&rsquo;s picking the one right document out of a hundred, and an agent does that more reliably by scanning titles than by ranking similarity scores. A graph would have added retrieval overhead and, per MotherDuck&rsquo;s own evals, picked worse.</p>
<p>The same lens explains why a semantic layer earns a deterministic, machine-callable interface (SQL, REST, GraphQL) that a context layer doesn&rsquo;t get. It comes down to who&rsquo;s actually asking, and what it costs to be wrong. A semantic layer&rsquo;s numbers get called directly by a dashboard or a scheduled job, with no human and no LLM in the loop, so it has to be right every time, and that guarantee is worth the cost of building and maintaining it. A context layer feeds an agent that&rsquo;s still reasoning, still capable of misreading a guide or picking the wrong table, so there&rsquo;s still a checkpoint between the context and the number that ships. A context layer doesn&rsquo;t carry that weight, at least not yet: it depends entirely on your setup and your data governance. As more agent-mediated work goes straight to a dashboard with nobody reviewing it, the case for giving context layers their own consistency guarantees only gets stronger.</p>
<p>So before reaching for a graph, an ontology, or a deterministic interface, ask what the retrieval or consistency problem actually is, who consumes the result, and what a wrong answer costs. Match the tool to that answer, not to what&rsquo;s trendy this quarter.</p>
<h3 id="the-way-forward-tools-and-ai-agent-integration">The Way Forward: Tools and AI Agent Integration</h3>
<p>You might also ask, if agents like Fable are one-shotting work that used to take many iterations, what&rsquo;s actually left for humans to do?</p>
<p>There&rsquo;s already a handful of context layer tool that build a Context Layer. I have written about <a href="https://github.com/Kaelio/ktx" target="_blank" rel="noopener noreffer">ktx</a>, and am checking out <a href="https://github.com/ModernRelay/omnigraph" target="_blank" rel="noopener noreffer">OmniGraph</a>, but there are many more with <a href="https://github.com/getnao/nao" target="_blank" rel="noopener noreffer">Nao</a> or more data catalog flavored <a href="https://github.com/marmotdata/marmot" target="_blank" rel="noopener noreffer">Marmot</a>, <a href="https://github.com/open-metadata/OpenMetadata" target="_blank" rel="noopener noreffer">OpenMetadata</a> or <a href="https://github.com/datahub-project/datahub" target="_blank" rel="noopener noreffer">DataHub</a> just to name a few, and all working closely with AI agents to ease governance and management.</p>
<p>Another integration is through the ORM (Object-Relational Mapping). I once read: &ldquo;an ORM to a database is what a semantic layer is to a domain knowledge&rdquo;, so maybe we just need ORMs for agents?</p>
<p>So what&rsquo;s the way forward then?</p>
<h3 id="ai-agents-read-the-business-knowledge">AI Agents Read the Business Knowledge</h3>
<p>When we give an AI agent the business knowledge it needs through a context layer, or semantics with SQL queries and joins, it can query a warehouse correctly.</p>
<p>An agent can read a table&rsquo;s schema, but the schema won&rsquo;t reveal the inside knowledge of how &ldquo;revenue&rdquo; is defined, which tables join to which, or which columns are unreliable. A semantic layer and a context layer are two different answers to that gap and are not mutually exclusive.</p>
<p>We can see a real-world illustration of how the two layers of semantic and context can cooperate in Anthropic&rsquo;s <a href="https://claude.com/blog/how-anthropic-enables-self-service-data-analytics-with-claude" target="_blank" rel="noopener noreffer">self-service data analytics with Claude</a>. They write about how their agents are using skill instructions to leverage the semantic layer first for self-service data analytics. The skill file itself states plainly that the semantic layer is the mandatory default path for every data question, with raw SQL as the fallback used only once the semantic-layer path is shown not to cover the ask. MotherDuck Guides play a related role as curated knowledge for the agent, though MotherDuck ships the context layer first and treats a dedicated semantic layer as a separate, later question, so the routing is not the same.</p>
<h2 id="in-the-end">In the end?</h2>
<p>So, back to where I started: if a model like Fable can one-shot in minutes what used to take me many rounds with Opus, what&rsquo;s actually left for us in the data work context? Looking back at the initial semantic layer, the evolution to a context layer, and combining it with an ontology, these are not really competing tools or methodologies. They are all interconnected and work in a net. <strong>The definitions for the metrics in SQL/YAML in a semantic layer, ingestion pipeline of unstructured text and keeping it up-to-date with context layers, and making sense of the world for the agents with ontologies</strong>.</p>
<p>And most of what we have evolved to, is mostly due to the sheer power and advancement of agentic work, that agents can autonomously keep up with metadata and data we want to convert into context. But at the same time, it always <strong>defaults back to the fundamental question of what my data governance</strong> looks like, and what my overall data architecture is to achieve the goal at hand.</p>
<p>And as a16z&rsquo;s three-part context layer implied, as well as Anthropic&rsquo;s semantic-layer-first skill: <strong>someone still has to decide what&rsquo;s true</strong>. We still need the human in the loop, especially with data. And that&rsquo;s the whole crux of Amdahls Law, as long as a person or a team needs to decide or gets involved, we lose the overall speed, but I think that&rsquo;s the price we still pay, if we want good, verified data quality in our enterprise data warehouse or analytics platforms.</p>
<p>And as I raised with the metric to measure data quality, which we do not have, it confirms another true statement, that the hard part in data is never building semantics or the context once, it&rsquo;s how and who keeps it <em>correct</em> and <em>maintained</em>. That&rsquo;s the answer to my opening question: not a tool, but judgment, the same judgment behind the &ldquo;human refinement&rdquo; step a16z pointed to, and the same one behind deciding whether a problem is worth a graph or is better served by a flat index.</p>
<p>Large language models are getting exceptionally good at writing the SQL with the right context, and at maintaining just that. But most often, deciding what &ldquo;revenue&rdquo; means still requires deep company-specific knowledge (for now).</p>
<hr>
<p>Listen more on these very related discussed topics with the already teased Jacob&rsquo;s podcast about <a href="https://analyticshour.io/2026/06/23/300-are-semantic-layers-really-necessary/" target="_blank" rel="noopener noreffer">Are Semantic Layers Really Necessary?</a>. Or check out the great example of how AI agents can help with creating a semantic layer using the open source semantic layer Malloy at <a href="https://motherduck.com/blog/AI-writes-the-semanrites-the-semantic-layer/" target="_blank" rel="noopener noreffer">AI Writes the Semantic Layer | MotherDuck</a>.</p>
<hr>
<pre class=""><em>Full article published at <a href="https://motherduck.com/blog/context-layer-vs-semantic-layer-ontology/" target="_blank" rel="noopener noreferrer">MotherDuck.com</a> - written as part of <a href="/services/">my services</a></em></pre>
<div class="footnotes" role="doc-endnotes">
<hr>
<ol>
<li id="fn:1">
<p>They call it a &ldquo;modern&rdquo; context layer. I&rsquo;m not sure we already went through the evolution of context layers, so calling it modern does not add much value. To me it&rsquo;s the first version of a context layer.&#160;<a href="#fnref:1" class="footnote-backref" role="doc-backlink">&#x21a9;&#xfe0e;</a></p>
</li>
</ol>
</div>
]]></description>
</item>
<item>
    <title>If You Always Enjoy It, You&#39;re Not Pushing It Hard Enough—Benn Stancil (Show Your Workflow #1)</title>
    <link>https://www.ssp.sh/blog/benn-stancil-on-deadlines-and-storytelling/</link>
    <pubDate>Fri, 11 Sep 2026 07:00:00 &#43;0200</pubDate>
    <author>Simon Späti</author>
    <guid>https://www.ssp.sh/blog/benn-stancil-on-deadlines-and-storytelling/</guid><enclosure url="https://www.ssp.sh/blog/benn-stancil-on-deadlines-and-storytelling/featured-image.png" type="image/png" length="0" /><description><![CDATA[<p>I had the pleasure to discuss and analyze the workflow of none other than <a href="https://www.linkedin.com/in/benn-stancil" target="_blank" rel="noopener noreffer">Benn Stancil</a>, legendary writer and storyteller in the data space and beyond, who started writing back in 2013 (with a seven-or-eight-year startup break in between). This is the first interview in the series «<a href="/show-your-workflow/" rel="">Show your Workflow</a>», and I couldn&rsquo;t be happier to start with Benn.</p>
<p>As this series is all about how writers write, how to come up with stories, how to take notes (or not), and each one&rsquo;s workflow, I asked Benn about the origin of his writing and how it all started with his weekly Friday &ldquo;<a href="https://benn.substack.com/" target="_blank" rel="noopener noreffer">let&rsquo;s fight articles</a>&rdquo;, how he uses deadlines to push him beyond perfect, how he processes ideas, and how he mastered the art of storytelling with analogies he learned from his talks he gave, converting it into his writing style and voice. We talk about how he uses Sublime Text and Google Docs, and end with approaches on how to start today.</p>
<p>This episode is filled with insights to get better at writing. I hope you enjoy it as much as I did when talking to Benn.</p>
<blockquote>
<p>[!abstract] Who is Benn Stancil: An Introduction<br>
<a href="https://www.linkedin.com/in/benn-stancil/" target="_blank" rel="noopener noreffer">Benn Stancil</a> is mostly known as the founder of <a href="https://mode.com/" target="_blank" rel="noopener noreffer">Mode</a> (a modern BI tool), where he started the company blog and became known as one of the most prolific writers in data. He co-founded Mode in 2013 and worked there until 2024, after it got acquired by ThoughtSpot in 2023. Since then he has been writing weekly on his <a href="https://benn.substack.com/" target="_blank" rel="noopener noreffer">own Substack</a>.</p>
</blockquote>
<h2 id="how-benn-got-into-writing">How Benn Got into Writing</h2>
<p>Starting at the beginning of how Benn started writing, he told me that it started by accident, as it so often does. When he started a company called Mode in 2013, there were three of them, and he didn&rsquo;t build or lead the company as a CEO, so he started writing the company blog posts. That was &ldquo;pre content marketing&rdquo;, he mentions, before there was &ldquo;the obvious playbook of go be an influencer on linkedin&rdquo;, and he started writing about topics that interested him. It wasn&rsquo;t about Mode, but about the data space—also because there was no product to write about in the early beginning, he said 😉.</p>
<p>He noticed that people started to like it. After a while though, he was more involved in daily work and building a startup, which meant he didn&rsquo;t have time to write too much anymore. He &ldquo;always kind of had this notion that I would get back to doing writing more at some point&rdquo;.</p>
<p>Much later, around 2021, when he did get back to it, his blog that he started had evolved into something different, &ldquo;very much just classic company blog&rdquo;. Much later, around 2021, when he did get back to it, the original Mode blog had evolved into something different, &ldquo;very much just classic company blog&rdquo;, so they made a decision to start a new one <a href="https://benn.substack.com/" target="_blank" rel="noopener noreffer">Substack</a>. Not really deliberately, but because that was the thing you used, and with no fixed plan—the very first posts were still data-team-ish, and it evolved from there:</p>
<blockquote>
<p>The first posts that were kind of data posts were a little bit more like things you learn at work, it was a little more like data teamy stuff. But at some point it just sort of evolved into whatever it became.</p>
</blockquote>
<p>Now he writes about general topics, what he wants to write about or what he experienced during the week.</p>
<h3 id="if-you-dont-hate-it-sometimes-you-dont-push-enough">If You Don&rsquo;t Hate It Sometimes, You Don&rsquo;t Push Enough</h3>
<p>He mentioned that, back in college and earlier, he didn’t particularly enjoy writing, and was more drawn to math and other things. So I asked whether more than a decade of writing had changed that:</p>
<blockquote>
<p>I mean, I don&rsquo;t know. You like it sometimes and <strong>you hate it sometimes</strong> [&hellip;] and <strong>there are days you&rsquo;re like it&rsquo;s fun</strong>.</p>
</blockquote>
<p>Writing is not like a regular job:</p>
<blockquote>
<p>It&rsquo;s not something you&rsquo;re like: great, I&rsquo;m going to <strong>sit down at nine and work until five</strong>, and I have my nine to five that I just do it. It&rsquo;s like you&rsquo;re not doing that, because it doesn&rsquo;t come out that way.</p>
</blockquote>
<p>He also doesn&rsquo;t want to call it a job, as currently, it isn&rsquo;t his job to write. He does it because he wants to, but he said something interesting that I believe is so true:</p>
<blockquote>
<p><strong>If you always enjoy it, you&rsquo;re not pushing it hard enough.</strong> Like, if you love playing basketball and you&rsquo;re good at it, and all you do is you&rsquo;re like: I will play to the point where I no longer just love playing it, then you&rsquo;re not actually pushing yourself very hard. You have to get to a point where you kind of hate it. That doesn&rsquo;t mean you&rsquo;re gonna hate it always, doesn&rsquo;t mean you&rsquo;re gonna resent it, it doesn&rsquo;t mean you&rsquo;re gonna walk away from this thing being like: oh my god, I can&rsquo;t do this anymore. But I think to make something good, you have to hate it sometimes.</p>
</blockquote>
<p>As an example of basketball:</p>
<blockquote>
<p>I&rsquo;m sure LeBron loves playing basketball, I&rsquo;m sure various great writers that we all like love writing things [&hellip;] I&rsquo;m sure there are days they hate it, and I think they have to. I think that&rsquo;s why they&rsquo;re the best ones.</p>
</blockquote>
<h3 id="having-a-schedule-a-deadline-is-the-most-important-tool">Having a Schedule, a Deadline, Is the Most Important Tool</h3>
<p>On that note of &ldquo;whatever it became&rdquo;, I asked him how he got his schedule fixed (he posts every Friday), and how he found his writing voice.</p>
<p>Benn said clearly that deadlines are <strong>something useful to have</strong>. It&rsquo;s the thing that gets the thing done. Later he added, it&rsquo;s even more important when you start out. You might think that you don&rsquo;t have something interesting to say, and you never feel ready to publish. That&rsquo;s why you need to just ship it a handful of times: you need to have some standard of quality and expectations, but otherwise, just ship.</p>
<p>Many people have this:</p>
<blockquote>
<p>They have an idea and it&rsquo;s not sort of fully baked, and because they have no real deadline or timeline to hit, it always feels like it&rsquo;s not quite ready [&hellip;] it&rsquo;s not ready to be released yet.</p>
</blockquote>
<p>In the end, he thinks, you can&rsquo;t just wait until it&rsquo;s perfect.</p>
<blockquote>
<p>[!tip] His deadline arrived from a joke, &ldquo;It&rsquo;s Friday, let&rsquo;s fight&rdquo;<br>
After he started his own Substack, he once posted <a href="https://benn.substack.com/p/the-case-against-sql-formatting" target="_blank" rel="noopener noreffer">The case against SQL formatting</a>. The whole post was a little bit of a joke, he said. Because of that, he <a href="https://x.com/bennstancil/status/1403368021872320519" target="_blank" rel="noopener noreffer">tweeted</a> it on Twitter as a joke: &ldquo;it&rsquo;s friday let&rsquo;s fight&rdquo;, not really a serious thing, but that we can fight about SQL formatting (a thing data people do 😉).</p>
<p>![[tweet-started-it-all.png]]</p>
<p><a href="https://benn.substack.com/p/the-more-the-merrier#footnote-2" target="_blank" rel="noopener noreffer">Someone at the company</a> kind of liked that Friday fun fight angle, and it also fit Benn a little bit as a character, a less serious thing, talking about a specific topic. And then it just became kind of an accidental thing, and he started posting stuff on Fridays, and at some point, that was kind of his deadline for the Friday fights.</p>
</blockquote>
<h2 id="benns-process-of-idea-creation">Benn&rsquo;s Process of Idea Creation</h2>
<p>When I asked Benn how he comes up with these refreshing and interesting new ideas he has every Friday, he said the <strong>ideas roll around with him during the week</strong>. What&rsquo;s sometimes the hardest part is turning them into a story (more on that below).</p>
<p>Usually he takes them with him and they are very messy:</p>
<blockquote>
<p>[&hellip;] you have <strong>some working things in your head</strong> that are <strong>usually a mess</strong>. You have to sort of run around in the world with those things in your head and they run into things. It&rsquo;s like you will find all these connections, because you have something sort of in the back of your mind, it will suddenly <strong>connect to a bunch of things</strong> [&hellip;] that are <strong>not obvious connections</strong>.</p>
</blockquote>
<p>And so ideas get formed really that way:</p>
<blockquote>
<p>It&rsquo;s a thing that exists that you sort of roll around in the world, and it picks up little pieces as it goes, and <strong>eventually something kind of interesting comes out</strong> of that.</p>
</blockquote>
<h3 id="random-strings-pulled-together">Random Strings Pulled Together</h3>
<p>Another speciality of Benn is to have lots of links to random things as part of his blogs. Some hate it, others love it (I love them!). He said something interesting, as many ask him if he adds them at the end. He says no. It&rsquo;s all part of the writing process.</p>
<p>He might think of a song, search for it on YouTube, and watch it. While watching, he gets a completely new emotion, or idea, that will fit back to the topic. And sometimes, these short distractions or links that come to mind are influencing the story. So besides being added while the idea evolved, they <strong>even influence the storyline itself</strong>.</p>
<h2 id="the-art-of-storytelling-of-benn">The Art of Storytelling of Benn</h2>
<p>If you haven&rsquo;t read Benn&rsquo;s articles, you are missing some of the best storytelling in the whole data space, and beyond. Once he has come up with an idea, added links, and talked with people about it, he <strong>finds analogies in real life</strong>.</p>
<p>The <strong>storytelling is the hardest part</strong>, he says. The worst is when he has a lot of ideas with &ldquo;here&rsquo;s a lot of notes&rdquo;, but no story, no connected thread. Then it takes him much longer, and he might not find a story to tell.</p>
<p>Some other times though, the story <strong>emerges naturally</strong>, and it&rsquo;s a point of relief. It&rsquo;s always different though. Sometimes he has the beginning he really likes, which carries the point. Or other times he has a paragraph that is fixed and great, and then he finds the story around it.</p>
<h3 id="benns-trick-to-tell-a-good-story-finding-or-setting-up-an-analogy">Benn&rsquo;s Trick to Tell a Good Story: Finding or Setting Up an Analogy</h3>
<p>A great story for Benn is having a great analogy. Finding a good intro is really, really hard, he says.</p>
<p>Then he kind of &ldquo;cheats&rdquo;: he finds an analogy from Batman, basketball, or whatever comes to mind, and the analogy starts to drive the whole point he wanted to make.</p>
<p>This <strong>way of storytelling emerged for him from the many presentations he did</strong>, and swapped over to writing. In his decks there is a talk track, the thing he is saying, and the slides are a kind of background commentary: a point that is analogous to Batman simply gets a slide of Batman next to it. And once one piece of the analogy fits, &ldquo;you tacked the points onto the analogy rather than the analogy onto the points&rdquo;—which is what <strong>makes it look so tight and clever</strong>.</p>
<blockquote>
<p>[!note] This reminds me of Derek Sivers<br>
This reminded me of Derek Sivers too: when you have writer&rsquo;s block, just add [[constraints]]. In music, say you want to play with only two chords, or only two instruments, and suddenly your creativity is flourishing. You have clear boundaries you can play with, instead of having an open end, where everything is possible, and it is very hard for the mind to start or finish anything. I think that&rsquo;s a little bit what&rsquo;s happening here too: if you start with Batman, the figure, you start with a constraint.</p>
</blockquote>
<p>Some say, when they read, &ldquo;get to the point&rdquo;, because he writes so indirectly through an analogy, but for him, &ldquo;there&rsquo;s no fun in that&rdquo;, and <strong>he&rsquo;s &ldquo;not trying to make an argument in court&rdquo;</strong>.</p>
<p>Also because he has a deadline on Friday, he needs to get it done every Friday, and that&rsquo;s where the mood influences the piece as well. I agree, and I call it [[Writing from The Heart|Write from the Heart]]: if you feel angry or emotional, that is felt in the writing, and it can give the piece the needed elevation or realness.</p>
<h2 id="workflow-the-process-the-note-taking">Workflow: The Process, The Note-taking</h2>
<p>This series is also about behind the scenes, about tooling, text editors and workflow each uses. We discuss Benn&rsquo;s process and what he uses below.</p>
<h3 id="the-writing-tools-google-docs-and-sublime">The Writing Tools: Google Docs and Sublime</h3>
<p>He typically starts by just writing ideas in <a href="https://www.sublimetext.com/" target="_blank" rel="noopener noreffer">Sublime Text</a>. He likes it: it&rsquo;s distraction-free, undecorated, so he can just focus on the text at hand, and write without formatting, grammar, or errors in mind. Once there&rsquo;s a bit more material, he moves it into <strong>Google Docs</strong> and works through it there, adding ideas, paragraphs, and links, with some docs staying open (and growing to 10 pages) for a very long time.</p>
<p>He just starts writing, whatever comes to mind or happens: bullet points, conversations, and paragraphs.</p>
<h4 id="the-publishing-workflow">The Publishing Workflow</h4>
<p>Ideally he has it completely done in Google Docs and just copies it over to Substack, but usually he still proofreads it a couple of times there and fixes small last-minute things. He doesn&rsquo;t use the Substack editor for anything material.</p>
<h3 id="why-not-obsidian">Why Not Obsidian?</h3>
<p>I asked Benn why he didn&rsquo;t use Obsidian as it seems that he is big on connections, and that they are a big part of his writing style. He said that Google Docs is good enough. He tried Obsidian-typish notes with connections, but it never stuck.</p>
<p>He even tried to vibe-code such a thing himself, something that &ldquo;reads your writings and can kind of present you related ideas as you do it&rdquo; (sounds similar to <a href="https://gist.github.com/karpathy/442a6bf555914893e9891c11519de94f" target="_blank" rel="noopener noreffer">Karpathy LLM Wiki</a>), but usually it turned out to be &ldquo;more of a distraction&rdquo; than he wanted it to be, and on top of that, he&rsquo;s &ldquo;not convinced that there isn&rsquo;t a good way to do that somehow&rdquo;.</p>
<p>He also has &ldquo;a very unproven theory&rdquo; for why this kind of <strong>connection-finding is exactly where AI struggles</strong>:</p>
<blockquote>
<p>The things that are often most interesting are disparate connections between things that don&rsquo;t obviously have a connection (more on that below).</p>
</blockquote>
<p>He instead has this kind of &ldquo;<strong>serendipity type way</strong>&rdquo;, &ldquo;where you run into various things around the world&rdquo;. In a way, it&rsquo;s applying the Obsidian-type notes more to real life.</p>
<p>Also organization-wise, his ideas are all over the place, rather than in one note-app:</p>
<blockquote>
<p>Currently on my <strong>desktop</strong> I have two lists of blog post notes and a <strong>Sublime thing</strong>, there is a list in an <strong>Excel sheet somewhere</strong>, a <strong>Google Sheet somewhere</strong>, there is obviously a <strong>bunch of half-written drafts</strong> and <strong>Google Docs</strong>.</p>
</blockquote>
<h3 id="why-benn-does-not-use-ai-tools-for-writing">Why Benn Does Not Use AI Tools for Writing</h3>
<p>When asked how he uses AI as a tool, he said he does not use Grammarly, and he doesn&rsquo;t give posts to Claude or ChatGPT for edits. The one exception: Google Docs&rsquo; built-in AI-generated grammar suggestions (the blue squigglies), those he does use. But what he uses a lot is ChatGPT for research, as an enhanced Google to explain a thing in history, or why it happens.</p>
<p>The other big use case is for <a href="https://www.thesaurus.com/" target="_blank" rel="noopener noreffer">Thesaurus</a> kind of questions: &ldquo;I am trying to figure out a word to describe X&rdquo;, where you &ldquo;can give it two words and be like: something like this&rdquo;.</p>
<p>He is very intentional about not using Grammarly, because of the way <strong>AI wants to compress the writing</strong>. He said GenAI generally tries to make the writing tight. It hates meandering, but Benn likes meandering.</p>
<p>He already hated compressing before AI. E.g., when they collected ten important statements about the company that they came up with during a brainstorming session with the team, the sticky notes sessions, and then tried to compress them into 1-2 sentences of a mission statement. In the end, the outcome was always to his dissatisfaction.</p>
<h2 id="where-does-benn-get-his-inspiration-from">Where Does Benn Get His Inspiration From?</h2>
<p>I asked him where his inspiration came from, and if he believes that to write &ldquo;interesting things&rdquo;, you have an interesting life<sup id="fnref:1"><a href="#fn:1" class="footnote-ref" role="doc-noteref">1</a></sup>. Would you agree?</p>
<p>He thinks you need to be exposed to &ldquo;stuff&rdquo;. His <strong>initial ideas come from conversations, being out there</strong>. He says you can&rsquo;t start with the objective of writing to generate &ldquo;lead flow for potential investments&rdquo;. He told me about a VC he knows who writes infrequently, but when he does, people care. That VC gets a bunch of people reaching out asking how to write a blog like that for lead flow. And his (and Benn&rsquo;s) take is:</p>
<blockquote>
<p>If you&rsquo;re starting from the objective of: the point of this is to create leads, or the point of this is to generate people clicking on my company website [&hellip;] then you sort of already lost the plot [&hellip;], just write interesting things on its own.</p>
</blockquote>
<p>Interestingly, Benn thinks people:</p>
<blockquote>
<p>Slightly overrate the point of having a point.</p>
</blockquote>
<p>You don&rsquo;t have to say something that&rsquo;s never been said before, you just have to <strong>tell it in an interesting way</strong>. And, Benn also said, it must be fun (sometimes, as we heard above).</p>
<h3 id="benns-very-unproven-theory-for-why-ai-struggles-with-writing">Benn&rsquo;s Very Unproven Theory for Why AI Struggles with Writing</h3>
<p>He makes the example of the board game <a href="https://en.wikipedia.org/wiki/Codenames_%5c%28board_game%5c%29" target="_blank" rel="noopener noreffer">Codenames</a>: you give your team a one-word clue and a number, and they have to find the cards it links. &ldquo;Hogwarts, four&rdquo; obviously covers <em>magic</em> and <em>school</em>, but it might also cover <em>train</em>, because of the Hogwarts Express. The point is that the words are</p>
<blockquote>
<p>associated in a weird way [&hellip;] you wouldn&rsquo;t necessarily associate magic and train.</p>
</blockquote>
<p>That, he thinks, is roughly how creativity works in general:</p>
<blockquote>
<p>You have exposure to some particular thing and then you have some idea, like whatever business thing you care about, and you make those connections. [&hellip;] You want to talk about data stuff, but you also know a lot about, I don&rsquo;t know, camping. You find this connection between these two things, where these things are not at all related, but it tells an interesting story.</p>
</blockquote>
<p>Every human has a &ldquo;relatively sparse knowledge of the world&rdquo;, and Benn says this is a lot of <strong>what creativity is</strong>:</p>
<blockquote>
<p>People smashing together very strange things, because their experiences are like this eclectic collection of things that aren&rsquo;t obviously all tied together.</p>
</blockquote>
<blockquote>
<p>[!note] The Opposite way, of &ldquo;saying something that sounds smart&rdquo;<br>
&ldquo;Making a smart point&rdquo; or &ldquo;saying something smart&rdquo; didn&rsquo;t work for him, because you can&rsquo;t see these interesting connections between things that don&rsquo;t obviously exist. So having an interesting life is helpful for that.</p>
</blockquote>
<h3 id="finding-your-writing-voice">Finding Your Writing Voice</h3>
<p>In that regard, as finding your writing voice is inevitable and important for you as a writer, I asked how he found his &ldquo;Writing Voice&rdquo;.</p>
<p>Benn said it just emerges: &ldquo;you probably don&rsquo;t go in being like, this is the voice I want to have, and now you do it&rdquo;. His voice emerged in Slack channels, where he wrote paragraphs upon paragraphs. He didn&rsquo;t say it exactly like that 😉, but these were essentially reps of just him writing to inform his peers at work. Doing that often, you might find ways that work better, and things that don&rsquo;t.</p>
<h4 id="dont-strip-out-too-much-of-the-story">Don&rsquo;t Strip Out Too Much of the Story</h4>
<p>He also made an interesting point, one that a lot of writers face: if you strip out too much of the story and your voice, all you&rsquo;re left with is having to say something that is, by itself and in plain language, original, and &ldquo;it&rsquo;s really hard to say original stuff&rdquo;.</p>
<p>Reduce a novel to a bullet list of plot points and those points are pretty unoriginal, because &ldquo;there aren&rsquo;t that many stories you can tell&rdquo;. <strong>The interest comes from how you tell it</strong>.</p>
<p>Same with databases: the bare bullets are hard and dry, and that&rsquo;s where his writing style with analogies and making a story really works.</p>
<h2 id="what-approach-would-you-suggest-to-someone-starting-out-today">What Approach Would You Suggest to Someone Starting Out Today?</h2>
<p>Before we wrapped up, I asked him one last question, about what he would suggest for someone starting to write today.</p>
<p>He gave three clear pointers:</p>
<ol>
<li>Have deadlines, which is critical especially early on</li>
<li>Your motivation has to be pure. You kind of need to want to do it (like a musician who likes to play the instrument). Otherwise, do something else. And keep your ego out of it. Readers come for the ideas, not for you: &ldquo;<strong>you&rsquo;re not always the main character</strong>&rdquo;.</li>
<li>And <strong>the writing is not the bullet points</strong>, it&rsquo;s filling things in between, <strong>filling in the text between the bullet points</strong>. Like the stand-up Slack messages he had to write to the team, he enjoyed them.</li>
</ol>
<p>I hope you enjoyed this typed-out interview with Benn Stancil as much as I did learning from him in our conversations. Benn is an exceptional writer, and seeing his process and workflow of how he writes is pure joy to me. I hope I could bring some of this joy over, and that, if you are a writer, you could learn something.</p>
<p>Please follow him on all his <a href="https://benn.website/" target="_blank" rel="noopener noreffer">socials</a>, and subscribe to his Friday Fights at <a href="https://benn.substack.com/" target="_blank" rel="noopener noreffer">Benn&rsquo;s Substack</a>. Also check out his latest article and learn more about <a href="https://benn.substack.com/p/how-to-have-ideas" target="_blank" rel="noopener noreffer">How to have ideas</a>, or <a href="https://benn.substack.com/p/how-to-find-insights" target="_blank" rel="noopener noreffer">How to find insights</a>.</p>
<div class="footnotes" role="doc-endnotes">
<hr>
<ol>
<li id="fn:1">
<p>Andrew Sean Greer says on <a href="https://youtu.be/0kkAl04_0og" target="_blank" rel="noopener noreffer">Write Better Stories in 72 Minutes</a>: &ldquo;highly recommend[s] life experiences,&rdquo; ideally through an interesting day job.&#160;<a href="#fnref:1" class="footnote-backref" role="doc-backlink">&#x21a9;&#xfe0e;</a></p>
</li>
</ol>
</div>
]]></description>
</item>
<item>
    <title>Writing really is an Emotional Rollercoaster</title>
    <link>https://www.ssp.sh/blog/writing-since-2015/</link>
    <pubDate>Fri, 28 Aug 2026 11:18:22 &#43;0200</pubDate>
    <author>Simon Späti</author>
    <guid>https://www.ssp.sh/blog/writing-since-2015/</guid><enclosure url="https://www.ssp.sh/blog/writing-since-2015/featured-image.png" type="image/png" length="0" /><description><![CDATA[<p>[[Writing]] has become my passion over time; I have built a whole company based on technical writing services (even though most say that&rsquo;s impossible). After doing it for 11 years publicly (much longer privately), I still enjoy it every day. If I could have one dream, I&rsquo;d probably imagine the book-author lifestyle, where I go to a faraway place or island and just write in my journal, articles from my vast notes system (<a href="/brain/everything-ive-published-came-out-of-one-obsidian-vault/" rel="">~3 million words</a>, or 2-3 books.</p>
<p>But also, I wanted to have a medium to express [[My Terminal Workflow with MacOS and Linux|my workflow]], <strong>discuss how others write</strong>, and learn even more. It&rsquo;s truly an art form and a craft to write, at least it is to me. It&rsquo;s not something you just sit down and do for 5 hours (as my upcoming guest liked to say). It&rsquo;s essentially your life. You observe, you find things to write about, you get angry, you find a cool hack, you create a story. It&rsquo;s all of it! And you can&rsquo;t plan it.</p>
<p>Some days you write 2-3 articles/notes in parallel; other weeks you write none at all. And then the imposter syndrome. Everything you write is public. <strong>My writing process is usually</strong>:</p>
<ol>
<li>Ohh this is so great, this is so interesting, I&rsquo;m looking forward to sharing</li>
<li>Next day: oh what&rsquo;s that, this is crap, why should I publish this?</li>
<li>Then the loss of motivation: the hard part. When you need to make it work, you change, but it&rsquo;s not right. You change again, you get feedback, you change. And eventually you see the light and can say, OK, yes, this is good!</li>
</ol>
<p><strong>Writing really is an emotional rollercoaster</strong>, and it&rsquo;s been that way with all the articles I have written. Less so with the notes on my second brain, there I&rsquo;m less &ldquo;storytelling&rdquo;, but more like &ldquo;curating facts&rdquo;.</p>
<p>So long story short, yes, this is what my new show is all about: «<a href="/show-your-workflow/" rel="">Show Your Workflow</a>». I hope you like it. Subscribe if you haven&rsquo;t already to get the next one, if that is something that interests you.</p>
<hr>
<p>Above written is the writer flow at a high level, and how I experience it most of the time. Here I share writing process over time as I have documented that over time. Each part is similar in a way, but also holds some different key pieces and determined how I wrote at that time. These are rather raw [[journaling|journals]], but maybe interesting to see.</p>
<h2 id="my-writing-process-as-of-2025-10-23">My writing process as of 2025-10-23</h2>
<p>I start thinking, I write, outline, and, very importantly, I stop. I sleep, I go into [[nature]], I just let it sit.</p>
<p>After coming back, I write some more. Then again, I talk to people and anyone about the topic, and I brainstorm with AI. And I write some more.</p>
<p>All happens in markdown ([[Obsidian]] for me), and I&rsquo;m <strong>constantly</strong> changing titles, adding new ones, and <strong>reorganizing</strong>.</p>
<p>The flow does feel off. I start restructuring again. The key point for me is that when I begin merging related topics, sometimes similar, and putting the essential message further up.</p>
<p>Sometimes I write an intro, add some context, and include some relevant info. I&rsquo;m adding more insights. And the most important one that I wanted to talk about is very far down.</p>
<p>Now that I&rsquo;m at the point where the main content will be naturally moved up, I&rsquo;m deleting or removing content. This is when it will start to feel cohesive. The reading flow starts to make sense. And from there, I just keep putting it together, making the reading flow perfectly.</p>
<p>Each chapter already has tons of notes, links, and insights, so finishing a first draft from here is usually easy and exciting.</p>
<p>Once I have a draft, I fix grammar with Claude Code and get feedback now, requesting very high-level feedback. Before I do another major rework, bring a great first draft. Go over 3-5 more times. I will notice how my changes are getting smaller and smaller until I know deep in my [[Gut Feeling|gut]] it&rsquo;s ready.</p>
<h3 id="a-trick-i-learnedabout-deleting-writing">A trick I learned—about deleting writing</h3>
<p>It was always <strong>hard for me to cut out my hard-earned content</strong>. So I discovered a trick.</p>
<p>By just adding a <code># Take Out</code> chapter at the end of each article, it tricks my brain into thinking: &ldquo;it&rsquo;s not deleted&rdquo;, &ldquo;I can get it back&rdquo;, and this way it&rsquo;s much easier to take out writing than to delete hard-earned hours on a paragraph.</p>
<h2 id="my-writing-from-as-of-2025-09-17">My Writing from as of 2025-09-17</h2>
<p>My process of writing is in two phases and the [[My Distraction-Free Typewriter (Micro Journal)|distraction-free typewriter]] helps me with the writing phase a lot in the first writing phase:</p>
<h3 id="1-outlining">1. Outlining</h3>
<ul>
<li>this is just exploring, listing (!! this is key)</li>
<li>and write anything that comes to mind, no matter how good, or the other it fits in</li>
<li>then I have my [[Second Brain]] with ExcaliBrain and Graph view with backlinks that give me interesting insight which notes might link or are related. I like Graph Analysis (Today [[Obsidian Smart Connections]]). This will give me many related ideas that the plugin finds via embedding, locally, without AI. Gives me <strong>ideas through the connections that I otherwise wouldn&rsquo;t</strong> have.</li>
<li>All of this usually happens on my laptop with [[Obsidian]].</li>
</ul>
<h3 id="2-writing-phase">2. Writing phase</h3>
<ul>
<li>Nowadays, as I have the [[My Distraction-Free Typewriter (Micro Journal)]] device, I will commit that state to the private GitHub repo, and pull it on my micro journal. After that, I&rsquo;m offline, only with these ideas and my backlinks, and I&rsquo;m trying to figure it out.
<ul>
<li>The Micro Journal has allowed me to think more, take a break, and focus for hours on writing, instead of constant distraction writing at the computer</li>
</ul>
</li>
<li>A key here is also the [[Markdown]] format: I can simply move stuff around without losing formatting or anything else.</li>
<li>sometimes I copy existing paragraphs from my [[Second Brain]] that I have written before.</li>
</ul>
<h3 id="finalizing">Finalizing</h3>
<ol start="3">
<li>After a while, I sit <strong>back and review</strong>.</li>
<li><strong>Write more</strong>&hellip;</li>
<li><strong>Get a mental breakdown</strong> as I think all I have written is so bad.</li>
<li>Next day, change the flow, use AI to help me with the reading structure, maybe heading names.</li>
<li>Finalize, edit, grammar check.</li>
<li><strong>Publish</strong>.</li>
</ol>
<p>That&rsquo;s my workflow for writing an article. There are other [[Type of Notes]] that can be written and other [[Type of Notetakers]]. Which might help to organize your knowledge.</p>
<p>I think it&rsquo;s important to have a place where you store your knowledge (notes from books, insights you read online, ideas, etc.) that can help you when you write too.</p>
<h2 id="my-writing-process-as-of-2022-08-19">My Writing Process as of 2022-08-19</h2>
<p>Write at least two crappy pages a day. The writing is in fact re-writing. A <strong>process of reviewing</strong>:</p>
<ul>
<li>first-round review for yourself, what you like</li>
<li>the second one do it for your fans</li>
<li>third for your critics, what they might come up with (bad) and improve</li>
</ul>
<p>Then <strong>questions / proof-reading</strong>:</p>
<ul>
<li>look for confusing stuff, that should not be in there (if unsure or in doubt: take it out!)</li>
<li>What are 10% that you would cut if you had to? Or what are 10% that you will keep for sure</li>
</ul>
<p>And again, the [[Writing is Thinking]]!</p>
<p>I also like to write about things I don&rsquo;t know, like Morgan Housel <a href="https://www.youtube.com/watch?v=C02Jy2pCZz0" target="_blank" rel="noopener noreffer">discussed</a> in his interview with David Perell. It&rsquo;s <strong>following my curiosity</strong>. First, I will learn something ([[Learn for Life]]), I will get [[Clarity]], and it&rsquo;s interesting. This kind of flow or fun to write, will translate to the reader too.<br>
according to David: <strong>laughter is the sound of comprehension</strong>. It&rsquo;s when you get an idea, when it clicks or you make a connection. Happens to me when I find new insight while writing the second brain, I&rsquo;ll smile.</p>
<h2 id="my-writing-process-initially-documented">My writing process initially documented</h2>
<p>I always need to remind myself:</p>
<blockquote>
<p>[[Writing is hard]]. It&rsquo;s easy to start, hard to finish. You get stuck, you have a blockage, your creativity is low, you get interrupted, and you lose confidence in your writing. Reminding myself that the first 10 minutes are the hardest and envisioning the end product keeps me motivated.</p>
</blockquote>
<h3 id="writing-phase">Writing Phase</h3>
<p>This is what brought me to writing. To release my thoughts ([[Brain Dump]]), make my brain accessible for more, and be creative. I like to brainstorm, change, delete, add, research, and do the thinking while writing. When writing on a computer, I can do it almost at the speed of my thinking; I do not lose thoughts as I would when writing on paper ([[Digital vs Paper]]). I can stop at any given time and come back, as all the thinking is written down. As well, I love the editing part. Making it better, finding correlations, and things I wouldn&rsquo;t have expected before.</p>
<p>But before getting into the editing phase, during the initial phase, when drafting or coming up with the content itself, I try to get into distraction-free [[Deep Work|Flow]]. Long chunks of uninterrupted time, Cal Newport talks about [[Deep Work]] in his book.</p>
<h3 id="editing-phase">Editing Phase</h3>
<p>Usually, editing is when I learn the most, but at the same time, it&rsquo;s also the most challenging step. I will get into a [[Writers Block]] and want to start a new thing instead. But by switching between [[Creativity vs Productivity]] or just going into nature with my thoughts and nothing else, usually one of them helps. Or if not, I leave it for a couple of days, weeks, or months and come back another time. Keeping the [[Ultradian Rhythm]] in mind also helps overcome the initial hardest ten minutes.</p>
<p>When I let the writing stay for a while, that typically leads to better quality because when I come back, I have new insight and might delete or change existing thoughts. The longer the wait, the more insightful that note will get. Therefore, I prefer to keep it slow. In the end, the reader will not mind if you spend one day or three months on an article; he appreciates it if the <strong>reader flow</strong> is good and he can learn. At least that is my goal as a writer: to give readers some learning.</p>
<p>Writing doesn&rsquo;t always need to be about an article. You can just put some thought, [[Journaling]], or something you learned or find interesting, into a note. Save it for later. You mostly don&rsquo;t need the thing you just knew at that moment. Something you find interesting today is doubtful to be of value right now. But maybe, in two years from now.</p>
<blockquote>
<p>[!quote] David Perell</p>
<p>Writing is so painful when you write about something you do not care about and so blissful when you write with your [[Principles]] aligned. Writing from a blank page reveals the true things you deeply care about. <a href="https://youtu.be/aIWDvuJhVm8?si=r_EEzGIMrxsqslPU" target="_blank" rel="noopener noreffer">YouTube</a> with Paul Millerd</p>
</blockquote>
<p><em>This last initial process was is shared as part of <a href="/brain/writing/#writing-process" rel="">On Writing</a> note.</em></p>
]]></description>
</item>
</channel>
</rss>
