{
  "version": "https://jsonfeed.org/version/1",
  "title": "ontology on Context may be all you need",
  "icon": "https://www.gravatar.com/avatar/8d4e83e124462d944a8d448a6f213e9f?s=96&d=https%3A%2F%2Fmicro.blog%2Fimages%2Fblank_avatar.png",
  "home_page_url": "https://matt.thompson.gr/",
  "feed_url": "https://matt.thompson.gr/feed.json",
  "items": [
      {
        "id": "http://thompsonson.micro.blog/2026/08/13/ia-series-n-ontologies-doctrine.html",
        "title": "[IA Series 13/n] Ontologies, Doctrine, and Ubiquitous Language",
        "content_html": "<p><em>This is an addition to the original term sheet. The core terminology is unchanged; the <strong><a href=\"https://matt.thompson.gr/2025/05/16/ia-series-n-intelligent-agents.html\">Agent Design Process</a></strong> has gained an <strong>Ontology / Vocabulary</strong> layer — a living document you revisit without end, not a numbered step in a sequence.</em></p>\n<h2 id=\"introduction\">Introduction</h2>\n<p>I&rsquo;ve come around to ontology. It speaks to me, my interest in meaning goes back to reading the Thesaurus as a kid, grammar didn&rsquo;t interest me as much though, meaning is fascinating, probably the birth of Context Is All you Need :)</p>\n<p>I arrived at this point whilst building an agent that navigates through a maze of infrastructure. The agent creates a typical graph of nodes and edges: the nodes are labelled by domains, types, and legal actions, and the edges are labelled to express the relation between the nodes.</p>\n<p>This led to this comment in my session with Claude (spelling mistake is kept for honesty!):</p>\n<blockquote>\n<p>&ldquo;I am thinking that this could be a use case for one type of system however I am now thinking we need an ontological for the nodes and edges defined clearly. it would not be a generic discovery agent, rather an Infra Discovery Agent and use an ontology documented in the atomicguard repo: docs/design/notes/topology_sensing_dsa_belief_state_and_agent_function.md&rsquo;s &lsquo;Node and Edge ontology&rsquo; section&hellip; take a step back and consider what an environment for that would look like.&rdquo;</p>\n</blockquote>\n<p>The conversation has progressed to the point where I wanted to understand what an ontology really is and why it is making sense, central to my work, and where in my approach and workflow should I be defining it.</p>\n<h3 id=\"what-is-an-ontology\">What is an Ontology</h3>\n<p>Ontology definition from <a href=\"https://en.wikipedia.org/wiki/Ontology\">Wikipedia</a>:</p>\n<blockquote>\n<p>Ontology is the philosophical study of being.</p>\n</blockquote>\n<p>This was a big blocker to why I thought it wasn&rsquo;t relevant, I do not buy into AI being conscious so this triggered me.</p>\n<p>This is getting more useful as a definition - <a href=\"https://en.wikipedia.org/wiki/Formal_ontology\">Formal Ontology from Wikipedia</a>:</p>\n<blockquote>\n<p>In philosophy, the term formal ontology is used to refer to an ontology defined by axioms in a formal language with the goal to provide an unbiased (domain- and application-independent) view on reality, which can help the modeler of domain- or application-specific ontologies to avoid possibly erroneous ontological assumptions encountered in modeling large-scale ontologies.</p>\n</blockquote>\n<p>It&rsquo;s a graph of objects with specific relations. Voilà.</p>\n<h3 id=\"frameworks-with-ontologies\">Frameworks with ontologies</h3>\n<p>In connecting the dots I like to refer to frameworks that help me understand the world I work in. These are frameworks I&rsquo;ve actively applied, which I&rsquo;ve found to be common sense and to make situations flow.</p>\n<p>In looking at ontology in greater detail, I see that these frameworks themselves have inherent ontologies that define the world and provide approaches to navigate the situation. For a given context I find them excellent for their simplicity and clarity.</p>\n<ul>\n<li><strong><a href=\"https://en.wikipedia.org/wiki/Situational_leadership_theory\">Situational Leadership</a>:</strong> The ontology defines the developmental level of the individual (their competence and commitment). The doctrine is the specific leadership style applied to that exact profile.</li>\n<li><strong><a href=\"https://en.wikipedia.org/wiki/Cynefin_framework\">Cynefin Framework</a>:</strong> The ontology defines the state of the environment (Clear, Complicated, Complex, Chaotic). The doctrine dictates how you must alter your decision-making process for that specific state.</li>\n<li><strong><a href=\"https://www.philvenables.com/post/segmentation-technologies---zero-trust\">Segmentation Technologies / Zero Trust</a> (Phil Venables):</strong> The ontology defines your boundaries—what an asset, workload, or trusted zone actually is. The doctrine is the isolation strategy enforcing those boundaries.</li>\n<li><strong><a href=\"https://en.wikipedia.org/wiki/Domain-driven_design\">Domain-Driven Design</a>:</strong> The ontology is the &ldquo;Ubiquitous Language&rdquo; defining bounded contexts, aggregates, and entities. The doctrine is the software architecture built on top of that shared meaning.</li>\n</ul>\n<p>This quote from the DDD wiki page is key for any software engineering (formal or otherwise):</p>\n<blockquote>\n<p>Ubiquitous language is one of the pillars of DDD together with strategic design and tactical design.</p>\n</blockquote>\n<p>The way to look at it is that ontology is a symbolic structure that defines the terrain. Doctrine and frameworks offer an imperfect way to navigate that terrain.</p>\n<blockquote>\n<p>If ontology is the map, doctrine is your strategy.</p>\n</blockquote>\n<p>Here is how they stack together in system design:</p>\n<ul>\n<li><strong>Ontology (The &ldquo;What&rdquo;):</strong> Defines what exists. It establishes the vocabulary, entities, boundaries, and relationships in your environment. You have to formally define what a &ldquo;workload,&rdquo; &ldquo;trusted zone,&rdquo; or &ldquo;critical asset&rdquo; actually is.</li>\n<li><strong>Doctrine (The &ldquo;How&rdquo;):</strong> Defines how you behave. It establishes the rules, policies, and strategic intent governing those entities (e.g., &ldquo;critical assets must be isolated from untrusted zones&rdquo;).</li>\n</ul>\n<p>In formal systems or orchestration layers, your ontology is the foundational state space and schema (like the definitions in a belief store). Your doctrine provides the deterministic constraints and logic applied to that state.</p>\n<p>PEAS? Its a framework and vocabulary that helps define how an intelligent agent perceives and interacts with a given world.</p>\n<p>This post is the synthesis of the two grammars in this series: the ontology&rsquo;s predicates are written in the <a href=\"https://matt.thompson.gr/2026/08/13/125930.html\">grammar of logic (Series 11)</a>, and its ubiquitous language is the <a href=\"https://matt.thompson.gr/2026/08/13/131513.html\">grammar of natural language (Series 12)</a> vocabulary the design documents share.</p>\n<h2 id=\"facts-as-justifiably-held-belief\">Facts as justifiably held belief</h2>\n<p>A fact, in the philosophically accepted sense, is a <a href=\"https://en.wikipedia.org/wiki/Justified_true_belief\">justified true belief</a> — the analysis of knowledge that runs from Plato&rsquo;s <em>Theaetetus</em> forward: a proposition you hold, that is true, and that you are justified in holding. Everything the world ontology names is exactly that: a belief the agent holds about the world. And <strong>Kind is the justification</strong> — what entitles the agent to hold it.</p>\n<table>\n<thead>\n<tr>\n<th>Kind</th>\n<th>Justified by</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><strong>exogenous</strong></td>\n<td>sensing the world — a belief about the state at the moment of sensing</td>\n</tr>\n<tr>\n<td><strong>controllable</strong></td>\n<td>the agent&rsquo;s own action — it made the fact so</td>\n</tr>\n<tr>\n<td><strong>static</strong></td>\n<td>setup — granted once, fixed for the task</td>\n</tr>\n<tr>\n<td><strong>derived</strong></td>\n<td>inference — entailed by other justified beliefs</td>\n</tr>\n</tbody>\n</table>\n<p>These four kinds are not new coinage — each is an established concept:</p>\n<ul>\n<li><strong>static</strong> predicates are standard in planning (<a href=\"https://en.wikipedia.org/wiki/Planning_Domain_Definition_Language\">PDDL</a>)</li>\n<li><strong>exogenous</strong> state variables — &ldquo;one whose dynamics are independent of the agent&rsquo;s actions&rdquo; — come from planning under uncertainty (<a href=\"https://arxiv.org/abs/1909.13870\">Chitnis &amp; Lozano-Pérez 2019</a>)</li>\n<li><strong>derived</strong> predicates appear in <a href=\"https://en.wikipedia.org/wiki/Planning_Domain_Definition_Language\">PDDL 2.2</a> (Edelkamp &amp; Hoffmann 2004), in Datalog&rsquo;s intensional predicates (the <a href=\"https://en.wikipedia.org/wiki/Datalog\">EDB/IDB split</a>), and in situation calculus&rsquo;s defined fluents (<a href=\"https://en.wikipedia.org/wiki/Situation_calculus\">Reiter 2001</a>)</li>\n</ul>\n<p>What this project contributes is the sharper <strong>synchronous-entailment test</strong> — <em>does the effector&rsquo;s successful return entail the fact?</em> — which draws the controllable/exogenous boundary without ambiguity, and the decision to tag every predicate with an explicit kind.</p>\n<p>Multiple Kind tables are not redundancy — each reads the same coin through a different lens. The facts section reads Kind as <strong>justification</strong>: what entitles the agent to hold the belief. The ubiquitous language reads it as <strong>determination</strong>: what sets the fact&rsquo;s truth, judged by the synchronous-entailment test. The belief state reads it as <strong>belief</strong>: what the agent actually holds, which may be false. That is the honest epistemic position — a fact is a justified true belief, but the agent never directly knows the <em>true</em>: it can only hold justifiably held beliefs. The most it can claim is that a fact was <em>true at the point in time it was sensed, or the action was taken</em>.</p>\n<p>Two consequences worth holding onto:</p>\n<ul>\n<li><strong>Justification is not truth.</strong> A belief can be well-justified and false — truth is determined relative to a model (the Grammar of Logic&rsquo;s Determination, Series 11), and a model can be wrong. The minimal loop&rsquo;s <code>&quot;FINAL:&quot;</code> marker is a belief justified by the very system being measured — an &ldquo;irrational performance measure&rdquo; — not by the world.</li>\n<li><strong>The belief state is the controllable side.</strong> Which facts the agent holds is justified by its own actions (sensing, recording); the exogenous facts are justified for it by the world at the point in time the sensing or acting happens. Kind draws that line before the agent&rsquo;s belief state appears later in this post.</li>\n</ul>\n<h2 id=\"ontology--vocabulary--a-living-layer-of-the-agent-design-process\">Ontology / Vocabulary — a living layer of the Agent Design Process</h2>\n<p>In formal systems or orchestration layers, an ontology is the state space and schema (like a graph of infra) that an agent navigates. As I&rsquo;ve been learning about PEAS I didn&rsquo;t think the vocabulary for the environment was important past defining a ubiquitous language. I saw it as a maze to be solved but hadn&rsquo;t looked at the composition of that maze.</p>\n<p>So defining your environment is a practice that begins before PEAS — a first pass, then a living document, re-entered whenever a later step exposes a gap. As with DDD, the model — and its use — benefits from being considered flexible, both in terms of correcting mistakes made earlier in the process and adapting to new information.</p>\n<p>Two artefacts, because they fail differently:</p>\n<table>\n<thead>\n<tr>\n<th>Artefact</th>\n<th>What it holds</th>\n<th>Its failure mode</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><strong>Schema</strong></td>\n<td>The types and predicates of the domain, each classified by its <strong>Kind</strong> — <strong>controllable</strong>, <strong>exogenous</strong>, <strong>static</strong>, or <strong>derived</strong> (the definitions live in the ubiquitous language)</td>\n<td><em>&ldquo;I&rsquo;m missing a predicate&rdquo;</em> — the structure can&rsquo;t express something the design needs</td>\n</tr>\n<tr>\n<td><strong>Ubiquitous language</strong></td>\n<td>The shared naming and vocabulary for those types and predicates, agreed so every design document means the same thing by the same word</td>\n<td><em>&ldquo;Two docs use the same word for different things&rdquo;</em> — the naming drifts and the design reads inconsistently</td>\n</tr>\n</tbody>\n</table>\n<p>Scope it honestly: this is the <strong>world ontology</strong> — the environment the agent navigates and acts in: its entities, predicates, actions, and connections. It is not the <strong>agent ontology</strong>, which uses the PEAS framework to define the agent loop itself (percept, agent function). Confusing the two is the crux of the mistake I have made, and clarifying the delineation between them is the point of these posts.</p>\n<p><strong>When the ontology is re-entered:</strong> it is a <em>normal, expected</em> loop-back, not a process violation. The clearest signals are in Step 2 (the environment&rsquo;s properties don&rsquo;t fit what the ontology declared) and Step 3 (a persistent-state variable has no home in the schema). For me, it surfaced mid-build — &ldquo;I need an ontology&rdquo; — as I was drawing the graph of nodes and edges.</p>\n<h2 id=\"the-agent-design-process-in-practice-the-infra-discovery-agent\">The Agent Design Process in practice: the infra discovery agent</h2>\n<p>The infra discovery agent walks an unknown pipeline graph — <code>commit</code> → <code>lint</code>, <code>unit-tests</code> → <code>integration-tests</code> → <code>merge-gate</code> → <code>deploy</code> — building belief one sensed node at a time. It builds on the two threads that came before: the search algorithms that solve a maze, and the dual-state agent that separates the workflow state from the environment — where the LLM lives — and the world, where actions are taken and facts are sensed via effectors. I have been framing infrastructure as a maze where the agent is tasked with finding the exit, so I created a graph for the agent to walk. The fun part is that the graph&rsquo;s details are unknown until the agent walks it. The world holds the whole topology but withholds it: the agent can only query a node it has already reached. Here the world is the point, and the ontology earns its keep.</p>\n<p><strong>The world, as instances:</strong></p>\n<p><img src=\"https://matt.thompson.gr/uploads/2026/world-instances.svg\" alt=\"The world, as instances\"></p>\n<h3 id=\"the-world-ontology\">The world ontology</h3>\n<p><strong>Entities:</strong></p>\n<table>\n<thead>\n<tr>\n<th>Type</th>\n<th>Meaning</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>Node</code></td>\n<td>a stage in the estate — <code>commit</code>, <code>lint</code>, <code>unit-tests</code>, <code>merge-gate</code>, <code>deploy</code></td>\n</tr>\n<tr>\n<td><code>Edge</code></td>\n<td>a connection between nodes, in one of two directions</td>\n</tr>\n<tr>\n<td><code>Domain</code></td>\n<td>the system a topology lives in</td>\n</tr>\n<tr>\n<td><code>Status</code></td>\n<td>a node&rsquo;s condition from the agent&rsquo;s point of view — known, visited, cleared, blocked</td>\n</tr>\n</tbody>\n</table>\n<p><strong>Predicates, classified by Kind:</strong></p>\n<table>\n<thead>\n<tr>\n<th>Predicate</th>\n<th>Kind</th>\n<th>Why</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>node(id)</code></td>\n<td>exogenous</td>\n<td>sensed — the node exists in the estate</td>\n</tr>\n<tr>\n<td><code>notifies(id, target)</code></td>\n<td>exogenous</td>\n<td>sensed per node — the push edge, who this node tells</td>\n</tr>\n<tr>\n<td><code>requires(id, target)</code></td>\n<td>exogenous</td>\n<td>sensed per node — the pull edge, what this node needs</td>\n</tr>\n<tr>\n<td><code>known(id)</code></td>\n<td>controllable</td>\n<td>the agent&rsquo;s belief — it has heard of this id</td>\n</tr>\n<tr>\n<td><code>visited(id)</code></td>\n<td>controllable</td>\n<td>the agent&rsquo;s belief — it has been there</td>\n</tr>\n<tr>\n<td><code>cleared(id)</code></td>\n<td>controllable</td>\n<td>the agent&rsquo;s belief — the node&rsquo;s requirements are met</td>\n</tr>\n<tr>\n<td><code>reachable(from, to)</code></td>\n<td>derived</td>\n<td>a path over already-sensed edges</td>\n</tr>\n<tr>\n<td><code>is-leaf(id)</code></td>\n<td>derived</td>\n<td>no <code>notifies</code> — a structural goal or dead end</td>\n</tr>\n</tbody>\n</table>\n<p><strong>Actions:</strong> <code>SENSE(node)</code>, <code>WALK(edge)</code>, <code>BACKTRACK</code>, <code>RECORD(belief)</code>, <code>REPORT(descriptor)</code>.</p>\n<p>Predicates are the facts of the state — what can be asserted about the world, each classified by Kind. Actions are the operations that change the state, and an action is defined <em>over</em> predicates: its precondition is a set of predicates that must hold, and its effect is a set of predicates it makes or unmakes true. <code>SENSE</code> and <code>RECORD</code> above are actions; <code>node</code>, <code>notifies</code>, and <code>known</code> are the predicates they read and write.</p>\n<p><strong>Connections:</strong> <code>notifies</code> and <code>requires</code> edges link nodes; the agent&rsquo;s belief is the discovered subgraph.</p>\n<p><strong>The belief state</strong> — the point of this example. The world ontology is what gives the agent something to <em>hold belief about</em>: the minimal loop&rsquo;s world was the conversation, and there was nothing to model. Here the agent&rsquo;s belief is a real model of the world, built incrementally — <code>known</code> (heard of), <code>visited</code> (been there), <code>cleared</code> (requirements met) grow one sense at a time as the agent walks. This is the schema&rsquo;s controllable side doing real work.</p>\n<p><strong>The world ontology, as a graph:</strong></p>\n<p><img src=\"https://matt.thompson.gr/uploads/2026/world-ontology.svg\" alt=\"The world ontology, as a graph\"></p>\n<p><strong>The formal ontologies — schema.org, RDF(S), and OWL:</strong></p>\n<p>The world ontology above is informal — entities, predicates, actions, and connections, with a Kind for each fact. When the ontology must be shared, queried, or reasoned over by tools, it gets written in a formal ontology language. Three stand out:</p>\n<ul>\n<li><strong>schema.org</strong> — the practical vocabulary of the web: a large shared set of types and properties (THINGS) that sites use to describe themselves. You <em>reuse</em> its types rather than define your own — the ready-made cousin of the ontology&rsquo;s ubiquitous language. Its cost: it&rsquo;s someone else&rsquo;s vocabulary; the terms aren&rsquo;t yours to agree.</li>\n<li><strong>RDF / RDFS</strong> — the triple model: every fact is a <code>subject predicate object</code> statement. The post&rsquo;s predicates map straight onto it — <code>notifies(lint, merge-gate)</code> is the triple <code>lint notifies merge-gate</code>. RDFS layers class and property hierarchies on top (<code>subClassOf</code>, <code>subPropertyOf</code>).</li>\n<li><strong>OWL</strong> — the Web Ontology Language, built on description logic: classes, properties, individuals, and axioms, with a reasoner that <em>entails</em> what follows. This is where the post&rsquo;s <code>derived</code> predicates meet the Grammar of Logic&rsquo;s entailment (⊨) — OWL axioms are the rules, and the reasoner computes <code>reachable</code> and <code>is-leaf</code> exactly as the logic sheet&rsquo;s Determination describes. What OWL does not express is <strong>Kind</strong>: nothing in RDF(S)/OWL says whether a fact is exogenous, controllable, static, or derived. That determination axis is this post&rsquo;s addition — the one the formal standards leave to you.</li>\n</ul>\n<p><strong>The schema.org decision — serialisation, not semantics:</strong></p>\n<p>In the project this has been applied to, I made the decision to use schema.org — and only as serialisation, so the project adheres to a common understanding. That rests on a distinction worth naming:</p>\n<table>\n<thead>\n<tr>\n<th></th>\n<th><strong>Serialisation</strong></th>\n<th><strong>Semantics</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><strong>Answers</strong></td>\n<td><em>how is the fact written down?</em></td>\n<td><em>what does the fact mean?</em></td>\n</tr>\n<tr>\n<td><strong>Concern</strong></td>\n<td>form — storage, sharing, auditing, interop</td>\n<td>meaning — truth, entailment, legality</td>\n</tr>\n<tr>\n<td><strong>A serialised fact is…</strong></td>\n<td>inert: structure but no truth yet</td>\n<td>true or false only once interpreted</td>\n</tr>\n<tr>\n<td><strong>schema.org gives</strong></td>\n<td>✓ vocabulary + shape (JSON-LD)</td>\n<td>✗ — no preconditions, effects, derived facts, reasoner</td>\n</tr>\n<tr>\n<td><strong>In this project</strong></td>\n<td>the JSON-LD audit record</td>\n<td>the planning layer, where the facts are determined and entailed</td>\n</tr>\n<tr>\n<td><strong>This post&rsquo;s terms</strong></td>\n<td>the serialised record</td>\n<td>Kind, and the Grammar of Logic&rsquo;s Determination (no truth without a model)</td>\n</tr>\n</tbody>\n</table>\n<p>Serialisation is the form a fact takes to be shared; semantics is what determines its truth. schema.org buys a common <em>shape</em> — two systems agree on the record&rsquo;s form because they share its vocabulary — but not common <em>meaning</em>: agreement on what follows, what is legal, what is true. That is why the decision uses schema.org only as the audit view, keeping the authority in the semantics layer.</p>\n<p>The world ontology&rsquo;s facts serialize onto schema.org Action types and properties: <code>actionStatus</code> (the lifecycle + guard verdict), <code>agent</code> (the acting entity), <code>object</code> (the entity acted on), <code>result</code> (the verdict), <code>instrument</code> (the effector), <code>target</code> (the grounded task), <code>error</code> (the failure cause).</p>\n<p>This is also where the ubiquitous language artefact does real work: schema.org has no <code>Agent</code>, <code>SensedFact</code>, <code>WorldState</code>, or <code>passed</code>/<code>predicate</code>/<code>args</code>/<code>value</code>, so the custom terms are scoped to a <code>dev:</code> namespace in the JSON-LD context. That is the ontology&rsquo;s UL in action — the terms that don&rsquo;t exist in the shared vocabulary are namespaced into your own, so they never collide with schema.org&rsquo;s.</p>\n<p>Which leaves the post&rsquo;s point standing: the Kind axis is exactly what schema.org cannot express. <code>reachable</code> and <code>is-leaf</code> are derived facts with no serialization home — their determination must live in the semantics layer, not the audit view. Using schema.org <em>only</em> is a decision about which layer carries what, not a claim that the ontology is shallow.</p>\n<p><strong>The world ontology, as JSON-LD — the audit record:</strong></p>\n<div class=\"highlight\"><pre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\"><code class=\"language-json\" data-lang=\"json\">{\n  <span style=\"color:#f92672\">&#34;@context&#34;</span>: {\n    <span style=\"color:#f92672\">&#34;@vocab&#34;</span>: <span style=\"color:#e6db74\">&#34;https://schema.org/&#34;</span>,\n    <span style=\"color:#f92672\">&#34;dev&#34;</span>: <span style=\"color:#e6db74\">&#34;https://dev.example.org/&#34;</span>,\n    <span style=\"color:#f92672\">&#34;Agent&#34;</span>: { <span style=\"color:#f92672\">&#34;@id&#34;</span>: <span style=\"color:#e6db74\">&#34;dev:Agent&#34;</span>, <span style=\"color:#f92672\">&#34;@subClassOf&#34;</span>: <span style=\"color:#e6db74\">&#34;https://schema.org/Organization&#34;</span> },\n    <span style=\"color:#f92672\">&#34;Node&#34;</span>: <span style=\"color:#e6db74\">&#34;dev:Node&#34;</span>,\n    <span style=\"color:#f92672\">&#34;SensedFact&#34;</span>: <span style=\"color:#e6db74\">&#34;dev:SensedFact&#34;</span>,\n    <span style=\"color:#f92672\">&#34;notifies&#34;</span>: <span style=\"color:#e6db74\">&#34;dev:notifies&#34;</span>,\n    <span style=\"color:#f92672\">&#34;requires&#34;</span>: <span style=\"color:#e6db74\">&#34;dev:requires&#34;</span>\n  },\n  <span style=\"color:#f92672\">&#34;@type&#34;</span>: <span style=\"color:#e6db74\">&#34;Action&#34;</span>,\n  <span style=\"color:#f92672\">&#34;actionStatus&#34;</span>: <span style=\"color:#e6db74\">&#34;CompletedActionStatus&#34;</span>,\n  <span style=\"color:#f92672\">&#34;agent&#34;</span>: { <span style=\"color:#f92672\">&#34;@type&#34;</span>: <span style=\"color:#e6db74\">&#34;Agent&#34;</span>, <span style=\"color:#f92672\">&#34;@id&#34;</span>: <span style=\"color:#e6db74\">&#34;dev:discovery-agent&#34;</span> },\n  <span style=\"color:#f92672\">&#34;object&#34;</span>: { <span style=\"color:#f92672\">&#34;@type&#34;</span>: <span style=\"color:#e6db74\">&#34;Node&#34;</span>, <span style=\"color:#f92672\">&#34;@id&#34;</span>: <span style=\"color:#e6db74\">&#34;dev:merge-gate&#34;</span> },\n  <span style=\"color:#f92672\">&#34;result&#34;</span>: {\n    <span style=\"color:#f92672\">&#34;@type&#34;</span>: <span style=\"color:#e6db74\">&#34;SensedFact&#34;</span>,\n    <span style=\"color:#f92672\">&#34;notifies&#34;</span>: <span style=\"color:#e6db74\">&#34;dev:deploy&#34;</span>,\n    <span style=\"color:#f92672\">&#34;requires&#34;</span>: <span style=\"color:#e6db74\">&#34;dev:lint, dev:integration-tests&#34;</span>\n  }\n}\n</code></pre></div><p>The serialization carries the facts — there is no Kind field. How each fact is determined stays in the semantics layer, exactly as the serialisation/semantics split above sets out.</p>\n<h3 id=\"the-belief-state--storing-a-fact-as-a-belief\">The belief state — storing a fact as a belief</h3>\n<p>The world ontology names facts; the agent stores them as <em>beliefs</em>. A fact is what is the case in the world; a belief is the agent&rsquo;s stored, justified representation of it. Storing a fact as a belief is the loop&rsquo;s core move — <strong>SENSE → RECORD</strong>: the agent senses the world&rsquo;s exogenous predicates (<code>node</code>, <code>notifies</code>, <code>requires</code>) and records them into its own controllable predicates (<code>known</code>, <code>visited</code>, <code>cleared</code>).</p>\n<p>This is where Kind does its real work, tying back to the facts section: the exogenous facts are justified by the world at the moment they are sensed; the belief is justified by the agent&rsquo;s own actions of sensing and recording. The sequence below shows a fact entering belief, and the belief evolving as the agent acts.</p>\n<p><strong>The belief state — schema (JSON-LD context):</strong></p>\n<div class=\"highlight\"><pre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\"><code class=\"language-json\" data-lang=\"json\">{\n  <span style=\"color:#f92672\">&#34;@context&#34;</span>: {\n    <span style=\"color:#f92672\">&#34;@vocab&#34;</span>: <span style=\"color:#e6db74\">&#34;https://schema.org/&#34;</span>,\n    <span style=\"color:#f92672\">&#34;dev&#34;</span>: <span style=\"color:#e6db74\">&#34;https://dev.example.org/&#34;</span>,\n    <span style=\"color:#f92672\">&#34;BeliefState&#34;</span>: <span style=\"color:#e6db74\">&#34;dev:BeliefState&#34;</span>,\n    <span style=\"color:#f92672\">&#34;known&#34;</span>: <span style=\"color:#e6db74\">&#34;dev:known&#34;</span>,\n    <span style=\"color:#f92672\">&#34;visited&#34;</span>: <span style=\"color:#e6db74\">&#34;dev:visited&#34;</span>,\n    <span style=\"color:#f92672\">&#34;cleared&#34;</span>: <span style=\"color:#e6db74\">&#34;dev:cleared&#34;</span>,\n    <span style=\"color:#f92672\">&#34;blocked&#34;</span>: <span style=\"color:#e6db74\">&#34;dev:blocked&#34;</span>\n  },\n  <span style=\"color:#f92672\">&#34;@type&#34;</span>: <span style=\"color:#e6db74\">&#34;BeliefState&#34;</span>\n}\n</code></pre></div><p>The schema defines the belief state as a JSON-LD object: the <code>BeliefState</code> type with four properties — <code>known</code>, <code>visited</code>, <code>cleared</code>, <code>blocked</code>.</p>\n<p><strong>Building belief, as a sequence:</strong></p>\n<p><img src=\"https://matt.thompson.gr/uploads/2026/building-belief.svg\" alt=\"Building belief, as a sequence\"></p>\n<p><strong>An example belief state, from a run:</strong></p>\n<p>The walk <code>commit → lint → merge-gate → deploy</code> leaves this belief state:</p>\n<div class=\"highlight\"><pre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\"><code class=\"language-json\" data-lang=\"json\">{\n  <span style=\"color:#f92672\">&#34;@context&#34;</span>: {\n    <span style=\"color:#f92672\">&#34;@vocab&#34;</span>: <span style=\"color:#e6db74\">&#34;https://schema.org/&#34;</span>,\n    <span style=\"color:#f92672\">&#34;dev&#34;</span>: <span style=\"color:#e6db74\">&#34;https://dev.example.org/&#34;</span>,\n    <span style=\"color:#f92672\">&#34;BeliefState&#34;</span>: <span style=\"color:#e6db74\">&#34;dev:BeliefState&#34;</span>,\n    <span style=\"color:#f92672\">&#34;known&#34;</span>: <span style=\"color:#e6db74\">&#34;dev:known&#34;</span>,\n    <span style=\"color:#f92672\">&#34;visited&#34;</span>: <span style=\"color:#e6db74\">&#34;dev:visited&#34;</span>,\n    <span style=\"color:#f92672\">&#34;cleared&#34;</span>: <span style=\"color:#e6db74\">&#34;dev:cleared&#34;</span>,\n    <span style=\"color:#f92672\">&#34;blocked&#34;</span>: <span style=\"color:#e6db74\">&#34;dev:blocked&#34;</span>\n  },\n  <span style=\"color:#f92672\">&#34;@type&#34;</span>: <span style=\"color:#e6db74\">&#34;BeliefState&#34;</span>,\n  <span style=\"color:#f92672\">&#34;known&#34;</span>: [<span style=\"color:#e6db74\">&#34;dev:commit&#34;</span>, <span style=\"color:#e6db74\">&#34;dev:lint&#34;</span>, <span style=\"color:#e6db74\">&#34;dev:unit-tests&#34;</span>, <span style=\"color:#e6db74\">&#34;dev:merge-gate&#34;</span>, <span style=\"color:#e6db74\">&#34;dev:deploy&#34;</span>],\n  <span style=\"color:#f92672\">&#34;visited&#34;</span>: [<span style=\"color:#e6db74\">&#34;dev:commit&#34;</span>, <span style=\"color:#e6db74\">&#34;dev:lint&#34;</span>, <span style=\"color:#e6db74\">&#34;dev:merge-gate&#34;</span>, <span style=\"color:#e6db74\">&#34;dev:deploy&#34;</span>],\n  <span style=\"color:#f92672\">&#34;cleared&#34;</span>: [<span style=\"color:#e6db74\">&#34;dev:commit&#34;</span>, <span style=\"color:#e6db74\">&#34;dev:lint&#34;</span>, <span style=\"color:#e6db74\">&#34;dev:merge-gate&#34;</span>, <span style=\"color:#e6db74\">&#34;dev:deploy&#34;</span>],\n  <span style=\"color:#f92672\">&#34;blocked&#34;</span>: []\n}\n</code></pre></div><p><code>unit-tests</code> is <code>known</code> — learned from <code>commit</code>&rsquo;s notifies — but unvisited, because the walk took the <code>lint</code> branch; <code>integration-tests</code> was never sensed.</p>\n<p>A stored belief is not a guaranteed fact — it is justified by the agent&rsquo;s actions, not guaranteed by the world. A belief can be well-stored and false, exactly as the facts section&rsquo;s &ldquo;justification is not truth&rdquo; set out.</p>\n<h3 id=\"the-ubiquitous-language\">The ubiquitous language</h3>\n<p>The shared vocabulary, agreed once so the schema above is checkable:</p>\n<p><strong>Kind definitions</strong> — a Kind says what <em>determines</em> a predicate&rsquo;s truth (the determination defined in the <a href=\"https://matt.thompson.gr/2026/08/13/125930.html\">Grammar of Logic term sheet</a>):</p>\n<table>\n<thead>\n<tr>\n<th>Kind</th>\n<th>Definition</th>\n<th>Example here</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><strong>controllable</strong></td>\n<td>the effector&rsquo;s successful return entails the fact — determined by the agent&rsquo;s own action</td>\n<td><code>known</code>, <code>visited</code>, <code>cleared</code></td>\n</tr>\n<tr>\n<td><strong>exogenous</strong></td>\n<td>the effector&rsquo;s successful return does not entail it — the world can change the fact after the action returns, so the fact is only a belief about the current state</td>\n<td><code>node</code>, <code>notifies</code>, <code>requires</code></td>\n</tr>\n<tr>\n<td><strong>static</strong></td>\n<td>true at setup, never changed by any action or sensing</td>\n<td><code>domain</code></td>\n</tr>\n<tr>\n<td><strong>derived</strong></td>\n<td>computed by the state model, never asserted — entailed from other predicates</td>\n<td><code>reachable</code>, <code>is-leaf</code></td>\n</tr>\n</tbody>\n</table>\n<p><strong>Term definitions — one agreed meaning each:</strong></p>\n<table>\n<thead>\n<tr>\n<th>Term</th>\n<th>Agreed meaning</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>notifies</code></td>\n<td>the push edge — who this node tells when it finishes</td>\n</tr>\n<tr>\n<td><code>requires</code></td>\n<td>the pull edge — what this node needs before it can clear</td>\n</tr>\n<tr>\n<td><code>known</code></td>\n<td>the agent has heard of this id</td>\n</tr>\n<tr>\n<td><code>visited</code></td>\n<td>the agent has been there</td>\n</tr>\n<tr>\n<td><code>cleared</code></td>\n<td>the node&rsquo;s requirements are met</td>\n</tr>\n<tr>\n<td><code>leaf</code></td>\n<td>a node with no <code>notifies</code> — structurally the goal or a dead end</td>\n</tr>\n</tbody>\n</table>\n<h3 id=\"the-degenerate-contrast-the-minimal-llm-loop\">The degenerate contrast: the minimal LLM loop</h3>\n<p>Even the minimal loop needs an ontology — a schema and a ubiquitous language are still required, and doing them from the start is right. But its world is the conversation: two exogenous facts (<code>received(prompt)</code>, <code>received(response)</code>), one accumulated state (<code>context</code>), and nothing to have belief <em>about</em>. Almost everything degenerates to exogenous, and there is no belief state. That is what this example fixes: the infra agent&rsquo;s ontology is the scaffold for a belief the minimal loop cannot hold. (The minimal loop&rsquo;s full walk-through is preserved as a draft for further work on the agent loop — <code>drafts/minimal-llm-loop.md</code>.)</p>\n<h3 id=\"re-entry-stays-open\">Re-entry stays open</h3>\n<p>The vocabulary was right from the start — nothing here needs re-entering yet. This work enables learning whilst doing and has the heady intent of &ldquo;doing it properly&rdquo; via the link to formalisation. It doesn&rsquo;t have to be perfect; being on the road to formalisation is enough.</p>\n<h2 id=\"appendix--a-predicate-as-rdf-triple-and-json-ld\">Appendix — a predicate as RDF triple and JSON-LD</h2>\n<p>The world ontology&rsquo;s predicates are atomic sentences of the grammar of logic (Series 11). A single fact, shown three ways:</p>\n<p><code>notifies(lint, merge-gate)</code></p>\n<p>as an RDF triple:</p>\n<div class=\"highlight\"><pre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\"><code class=\"language-text\" data-lang=\"text\">&lt;https://dev.example.org/lint&gt;  dev:notifies  &lt;https://dev.example.org/merge-gate&gt;\n</code></pre></div><p>and the same fact as compact JSON-LD:</p>\n<div class=\"highlight\"><pre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\"><code class=\"language-json\" data-lang=\"json\">{\n  <span style=\"color:#f92672\">&#34;@context&#34;</span>: {\n    <span style=\"color:#f92672\">&#34;@vocab&#34;</span>: <span style=\"color:#e6db74\">&#34;https://schema.org/&#34;</span>,\n    <span style=\"color:#f92672\">&#34;dev&#34;</span>: <span style=\"color:#e6db74\">&#34;https://dev.example.org/&#34;</span>,\n    <span style=\"color:#f92672\">&#34;notifies&#34;</span>: <span style=\"color:#e6db74\">&#34;dev:notifies&#34;</span>\n  },\n  <span style=\"color:#f92672\">&#34;@id&#34;</span>: <span style=\"color:#e6db74\">&#34;dev:lint&#34;</span>,\n  <span style=\"color:#f92672\">&#34;notifies&#34;</span>: <span style=\"color:#e6db74\">&#34;dev:merge-gate&#34;</span>\n}\n</code></pre></div><p>The predicate, the triple, and the JSON-LD are the same statement — the grammar determines the shape, the serialization chooses the form.</p>\n<h3 id=\"the-belief-state-as-a-lifecycle\">The belief state, as a lifecycle</h3>\n<p>The lifecycle of a single node&rsquo;s belief — from unknown, through known and visited, to cleared or blocked:</p>\n<p><img src=\"https://matt.thompson.gr/uploads/2026/belief-lifecycle.svg\" alt=\"The belief state, as a lifecycle\"></p>\n",
        "date_published": "2026-08-13T13:41:25+02:00",
        "url": "https://matt.thompson.gr/2026/08/13/ia-series-n-ontologies-doctrine.html",
        "tags": ["ia-series","ontology"]
      }
  ]
}
