<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Martin Tremblay on Medium]]></title>
        <description><![CDATA[Stories by Martin Tremblay on Medium]]></description>
        <link>https://medium.com/@martin_tremblay?source=rss-878e64ea00db------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*ze-3RUGDWnegkwOtVNerOg.jpeg</url>
            <title>Stories by Martin Tremblay on Medium</title>
            <link>https://medium.com/@martin_tremblay?source=rss-878e64ea00db------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 01:00:40 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@martin_tremblay/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[What a home boiler taught me about enterprise AI governance - Pt. 2]]></title>
            <link>https://medium.com/@martin_tremblay/what-a-home-boiler-taught-me-about-enterprise-ai-governance-95f27ca83f63?source=rss-878e64ea00db------2</link>
            <guid isPermaLink="false">https://medium.com/p/95f27ca83f63</guid>
            <category><![CDATA[ai-agents-in-action]]></category>
            <category><![CDATA[model-context-protocol]]></category>
            <category><![CDATA[smart-home-automation]]></category>
            <category><![CDATA[enterprise-architecture]]></category>
            <category><![CDATA[ai-governance]]></category>
            <dc:creator><![CDATA[Martin Tremblay]]></dc:creator>
            <pubDate>Tue, 13 Oct 2026 23:59:13 GMT</pubDate>
            <atom:updated>2026-10-16T15:32:54.164Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Putting an AI agent behind identity, authorization, isolation and audit, and what broke along the way. </em><strong><em>Part 2: governing the first write.</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yGA_jNllvuBP5GxKKq23rg.jpeg" /><figcaption><strong>The command went out. The boiler ignored it. And the gateway said so.</strong> <em>Generated with </em>Bing Image Creator</figcaption></figure><p><em>This is the second part of a series. </em><a href="https://medium.aspiroconsulting.ca/what-a-home-boiler-taught-me-about-enterprise-ai-governance-6e284074199a"><strong><em>Part 1</em></strong></a><em> set up the gateway and governed read access: identity for the agent, per-tool permissions, network isolation and a tamper-evident audit trail. This part gives the agent its first permission to change something.</em></p><p>I’d asked an AI agent to raise my hot-water tank’s setpoint from 54 to 54.5 °C. The gateway checked the agent’s permission, checked the value against its limits, recorded its decision, and sent the command. Then it waited for the boiler to report the new setpoint.</p><p>Twenty seconds later, the boiler still said 54. The tool’s answer was:</p><blockquote><em>“The command was sent, but the boiler didn’t report 54.5 °C within 20 seconds. It may or may not have applied it; check the status before trying again.”</em></blockquote><p>The agent checked the status, didn’t retry, and listed what might have gone wrong. Two minutes later, a request for 55 °C was confirmed in 5.2 seconds.</p><p>The device’s own interface accepts half degrees. The boiler, it turns out, doesn’t apply them to the tank. It just ignores them. Every automated test had passed, because the fake boiler in the tests did what the documentation said. A gateway that trusted the command instead of the boiler’s report would have told me it worked.</p><p>That’s Part 2 in one story: the first time an AI agent was allowed to change something real, and what it took to know whether it actually had.</p><h3>Where Part 1 left off</h3><p><a href="https://medium.aspiroconsulting.ca/what-a-home-boiler-taught-me-about-enterprise-ai-governance-6e284074199a">Part 1</a> covered read access. An AI agent (Claude Code) reads my boiler’s state through a governed gateway that speaks the Model Context Protocol (MCP). The agent has its own identity, a token bound to the gateway, a per-tool permission, and every request is recorded in a hash-chained audit trail before anything happens. The boiler is a stand-in for an enterprise system of record: real consequences, one owner, small blast radius.</p><p>Part 1 ended with a promise: the agent’s first permission to change something, with bounds, rate limits, read-back, a kill switch, and “the question of how an agent asks for more permission than it has”. This part delivers it, including the parts that didn’t go to plan.</p><h3>The design, before anything was live</h3><p>The first write tool changes one thing: the hot-water tank setpoint. I chose it because its range is the narrowest and its effect is easy to see. The rules were written down as an Architecture Decision Record before the code:</p><ul><li><strong>A separate permission.</strong> Writing needs boiler:write. Having boiler:read doesn&#39;t imply it, and the gateway never asks for it by default.</li><li><strong>Bounds in the gateway, not the device.</strong> The boiler accepts 40 to 82 °C. The gateway allows 40 to 60. A prompt-injected agent asking for 80 is refused before the boiler hears about it.</li><li><strong>A rate limit.</strong> One change every two minutes, across all agents, derived from the audit trail so it survives a restart.</li><li><strong>Audit before action.</strong> The decision is committed to the audit store before the command is sent. If it can’t be recorded, nothing is sent.</li><li><strong>Read-back.</strong> The result is confirmed, unconfirmed or failed, based on what the boiler reports afterwards, never on what was sent.</li><li><strong>No automatic retries.</strong> An unconfirmed change is checked, not repeated.</li><li><strong>Containment.</strong> The code that talks to the boiler refuses any setting not on an explicit list. In this increment, the list has one entry.</li><li><strong>A kill switch, off by default.</strong> While it’s off, the write tool doesn’t exist. The agent can’t call what it can’t see.</li></ul><p>All of this was tested against a fake boiler first. I also checked that the tests could fail: changing the upper limit to 82 or the rate limit to zero made four of them fail. A test that has only ever passed is a hypothesis, not evidence.</p><p>Then I waited. The boiler had a recurring fault that a technician was coming to fix, and one of the exit criteria was “no write testing while a known device fault is under investigation”. The first live write happened after the repair, with me at home, and a written runbook open.</p><h3>1. The command isn’t the outcome</h3><p>The opening story is the most important lesson in this part, so it’s worth saying plainly: a system accepting a command is not the same as the system doing it.</p><p>Enterprises learn this the expensive way. An API returns success, but the system of record never committed the change. A configuration push reports “applied” on a device that silently rejected half of it. A workflow marks a step complete because a message was sent, not because anything happened.</p><p>Here the boiler’s documented interface said “0.5 °C steps”. Its behaviour said “whole degrees, and I won’t tell you otherwise”. The only thing that caught the difference was comparing the boiler’s own report against the request.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KLM0NWKp4EWeoF2gtFRF4w.png" /><figcaption><em>The audit trail for both writes. The decision, with the value, is committed before the command; the outcome is what the boiler reported.</em></figcaption></figure><p>The fix had two parts. The gateway now refuses half degrees, so it never sends a command the boiler will ignore. And the decision record explains why, with the evidence: the device’s advertised range isn’t its behaviour, so bounds should follow what read-back confirms, not what the interface accepts.</p><p>For agents this matters more than for scripts. An agent will happily tell a user “done” if a tool says “done”. The tool’s honesty sets the ceiling on the agent’s.</p><h3>2. Asking for more permission, and a client that didn’t</h3><p>The design for elevation followed the MCP authorization specification (revision 2026–07–28). An agent with only boiler:read that tries to write gets a “403 insufficient scope” response naming the permission it lacks. The specification’s guidance for clients is:</p><blockquote><em>“Clients SHOULD respond to these errors by requesting a new access token with an increased set of scopes via a step-up authorization flow or handle the errors in other, appropriate ways.”</em></blockquote><p>and, for clients acting for a person:</p><blockquote><em>“Clients acting on behalf of a user SHOULD attempt the step-up authorization flow.”</em></blockquote><p>In other words: the agent hits the wall, a sign-in page opens, I see “Change boiler settings within the gateway’s limits”, and I approve or don’t. Just-in-time elevation, with a human deciding.</p><p>That’s not what happened. The gateway refused the first write, correctly, and recorded the refusal. Claude Code (the VS Code extension, version 2.1.296) reported that the server “needs additional permissions” and asked me to re-authenticate. I did. The consent screen offered exactly what I’d already granted: read access. The second write was refused too.</p><p>Claude Code’s documentation, as of October 2026, explains it:</p><blockquote><em>“Claude Code requests the pinned scopes rather than the scope the server named, so if you authenticate again without adding it, the token you get still lacks it.”</em></blockquote><p>The specification says “SHOULD”, not “MUST”, so this isn’t a violation. It’s a client that doesn’t support the flow my design depended on. The gateway’s half of the control worked perfectly. The half that depended on the client didn’t exist.</p><p>The workaround is to pin the extra permission in the client’s configuration, so every sign-in requests it. Then the consent screen showed “Change boiler settings within the gateway’s limits”, I approved it, and writes worked. But that changes the shape of the control. Consent now happens once, at sign-in, for the whole session, instead of at the moment the agent first needs it. While it’s pinned, every token from that client can write.</p><p>So I treated it as a time-boxed elevation, the way privileged access works in an enterprise: granted for a session, then revoked. The decision record now says so, and the threat model lists it as an accepted trade-off until the client supports step-up.</p><p>The enterprise lesson: check that every party in a control can do its part. A control that depends on a capability your client doesn’t have is a design, not a control.</p><h3>3. Revoking access has more layers than granting it</h3><p>Granting write access took one configuration change and one sign-in. Taking it away took three steps, at three different layers:</p><ol><li><strong>The client.</strong> Remove the pinned permission and sign in again, so new tokens are read-only.</li><li><strong>The identity provider.</strong> End the client’s sessions. Signing in again gives a new token, but it doesn’t by itself kill the old refresh token, which can keep minting tokens with the old permissions.</li><li><strong>The gateway.</strong> Turn the kill switch off, so the write tool doesn’t exist regardless of any token.</li></ol><p>The audit trail showed why the order matters. After I redeployed the gateway with a fix, Claude Code reconnected, and the first four records of the new session still carried boiler:write. For about two and a half minutes, until I signed in again, the client held write access I thought I&#39;d finished with. Nothing used it. But the trail, not my memory, is what told me.</p><p>Enterprises know this from offboarding: disabling a person’s account doesn’t revoke the API tokens they created. Agents add more of these long-lived credentials, and they’re easier to forget.</p><h3>4. A refusal is evidence too, so record what was attempted</h3><p>After the session I exported the audit trail and read it line by line against what I’d seen. Every step was there. The chain verified from the anchor I’d exported before the test. The refusals for a value out of bounds (65 °C) and for the rate limit (“Try again in 15 seconds”) were recorded with their reasons, and neither had an outcome record, which shows nothing reached the boiler.</p><p>But the two refusals for missing permission said only that a write was refused. Not what the agent had tried to set. The gateway refuses those requests before reading the request body, so it never saw the value.</p><p>An auditor would ask the obvious question: refused doing what? A record that something was stopped, without what was attempted, is half a record.</p><p>The fix was small but needed care, because the request hasn’t been validated at that point. The gateway now records the requested arguments for those refusals, with three guards: the request body must name the same tool as the routing header (so a lying header can’t pin one tool’s arguments on another), the body must be small, and arguments with credential-like names are dropped rather than stored.</p><p>The last guard needed a second look. The audit store already refuses to record anything that looks like a credential. If the gateway had passed those arguments through, the store would have refused the write, and an audit failure means the request fails without a record. A privacy control would have erased the evidence of the very attempt it was protecting against. Dropping the arguments instead keeps the refusal on record.</p><p>The fix was deployed the same afternoon and checked live: a write attempt with a read-only token, refused, now recorded as {&quot;celsius&quot;:55} with the token&#39;s scopes alongside.</p><p>A smaller readability fix came from the same review. Each write produces two decisions: the permission check and the policy check. In the trail, a refused out-of-bounds request read as “allow” followed immediately by “deny”. Both were true, but a reviewer shouldn’t need the source code to understand that. The first record is now labelled scope_ok.</p><h3>5. What the agent is told must match what it can do</h3><p>Two small findings, same theme.</p><p>The gateway sends the agent a short description of itself when it connects. Mine still said “Read-only access to a home boiler” while the write tool was switched on. The model reads that text. A server that describes itself as read-only while offering a write tool is giving the agent contradictory instructions. The description now follows the kill switch: read-only when writes are off, and when they’re on, a sentence saying changes count only when the boiler confirms them, and an unconfirmed change isn’t retried without checking.</p><p>The second was in the client. After I redeployed with the whole-degree fix, my existing session still listed the write tool with its old description, accepting “0.5 °C steps”. Claude Code keeps the tool list from when a session connects. Only a new session sees the change.</p><p>In Part 1, a field name misled the agent. Here, the server’s self-description and a cached tool list could have. The agent’s picture of what it may do comes from text, and that text needs the same change control as the code.</p><h3>6. Governing the builder, again</h3><p>The project is AI-assisted: Claude Code wrote most of the code and drafts of the documents, under standing instructions in the repository. The live write tested those instructions as much as the gateway.</p><p>What went well:</p><ul><li>The agent read the boiler’s status before every write and after the one that went wrong.</li><li>It didn’t retry the unconfirmed write. Asked why it failed, it listed three possible causes and ranked first the one that was unsafe: that the command had changed some other setting the gateway wasn’t watching. A whole-degree test ruled that out.</li><li>When I asked it to pin the write permission, it tried to edit its own client configuration, and its own tool blocked it as self-modification. I made the change myself. So the agent’s attempt to widen its own access was stopped twice in one afternoon: once by the gateway, once by the coding tool. Both times, a human had to act.</li></ul><p>What didn’t:</p><ul><li>It recommended the pinned-permission workaround as the clean option, saying “write access stays separate and you approve it explicitly”, before its own research showed that pinning makes every token carry write. It corrected itself and asked again before changing anything.</li><li>The commands it gave me for the audit export still contained the runbook’s placeholders. Bash and the database both rejected them. Nothing ran, but it was a reminder to read commands before pasting them, including ones from an assistant.</li><li>Earlier that day, it made a version of the very mistake Part 1 opened with. It read a fresh timestamp on the boiler’s error counter as a sign of a new error. The field said “last reported”, correctly. But the firmware re-sends that counter every thirty seconds whether it changes or not, so a fresh report proved nothing. The fix for one misreading doesn’t prevent the next one.</li></ul><p>The working rule from Part 1 still did the heavy lifting: verify against the source, and quote rather than paraphrase. It’s how the specification’s “SHOULD” in lesson 2 stayed a “SHOULD” in this article.</p><h3>What’s still open</h3><p>To keep this honest:</p><ul><li><strong>Prompt injection hasn’t been tried live.</strong> The limits that stop a manipulated agent (bounds, rate limit, one allowed setting) are tested, and the live refusals show them working. An actual injected instruction, planted where the agent will read it, is planned for the next part.</li><li><strong>Two fixes are tested but not yet exercised live</strong>: the whole-degree refusal and the scope_ok label. Writes stay off between supervised sessions, so they&#39;ll be checked at the next one.</li><li><strong>The next write is harder.</strong> The technician enabled the boiler’s outdoor reset, which adjusts heating from the outdoor temperature. The controller doesn’t expose that setting, so a space-heating setpoint change could be confirmed by read-back and still not do what the agent, or I, expected. I’m watching the boiler for a few days before designing that tool.</li></ul><h3>What an enterprise would add</h3><ul><li><strong>Just-in-time elevation through a privileged access workflow</strong>, so write permission is requested, approved and expired by policy, not by editing a client’s configuration.</li><li><strong>Alerting on refusals.</strong> One refused write is a test. A burst of them from one agent is an incident.</li><li><strong>Separation of duties</strong> for changing the limits themselves, and policy kept as version-controlled configuration, reviewed like code (the next increment does this).</li><li><strong>Device behaviour testing as part of onboarding</strong>: before an agent may change a setting, confirm what the device does with each kind of value, not what its interface says it accepts.</li></ul><h3>Next: risky actions</h3><p>This part had one setting, a narrow range, and an owner at home watching. Part 3 adds a second setting whose effect depends on configuration the gateway can’t see, policy as configuration, a live prompt-injection test, and the last open design decision: how a human approves an action an agent isn’t allowed to take alone.</p><p>The architecture, decisions, threat model and both compliance checks are public: <a href="https://github.com/MartyTremblay/navien-mcp-gateway">github.com/MartyTremblay/navien-mcp-gateway</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=95f27ca83f63" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Blind Mind’s Eye and the Machine That Never Had One]]></title>
            <link>https://medium.com/@martin_tremblay/the-blind-minds-eye-and-the-machine-that-never-had-one-40937ee6d7bc?source=rss-878e64ea00db------2</link>
            <guid isPermaLink="false">https://medium.com/p/40937ee6d7bc</guid>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[minds-eye]]></category>
            <category><![CDATA[analogy]]></category>
            <category><![CDATA[aphantasia]]></category>
            <dc:creator><![CDATA[Martin Tremblay]]></dc:creator>
            <pubDate>Sat, 10 Oct 2026 22:09:41 GMT</pubDate>
            <atom:updated>2026-10-10T23:07:48.596Z</atom:updated>
            <content:encoded><![CDATA[<p>What my daughter’s aphantasia and AI taught me about the many ways to imagine</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2Hjj2v6WedAIHzkUkeo4sA.jpeg" /><figcaption><strong>An AI’s attempt to picture a mind that doesn’t picture things.</strong> Image generated with AI.</figcaption></figure><h3>Before we start</h3><p><em>Full disclosure: I’m an enterprise architect (think city planner, but for a company’s tech systems), not a psychologist, neuroscientist, or anyone with letters after their name in the brain sciences. What follows is a curious dad’s thought experiment, not science. Where I lean on actual research, I’ve linked it at the bottom so you can read the real thing. And in the spirit of the topic: I drafted this with help from an AI assistant (Claude, by Anthropic). The story, the opinions, and the final edit are mine.</em></p><h3>Picture an apple</h3><p>Go ahead, close your eyes and picture an apple. Red, shiny, maybe a little leaf on the stem.</p><p>Most of us get <em>something</em>. A fuzzy snapshot, a vivid close-up, a cartoon. For a lot of my life I assumed that was universal, the way everyone assumes everyone else sees the same blue.</p><p>Then, about a year ago, we discovered that my teenage daughter gets nothing. No apple. No red. No shiny. Just the knowledge that an apple is a round, red fruit, sometimes with a stem. She has <strong>aphantasia</strong>, and she’d had it her whole life without either of us knowing there was a name for it.</p><p>I’ll be honest: my first reaction was a mix of fascination and a bit of parental guilt. How had I missed this? But the second reaction was relief, and some laughter. A whole collection of her curious, sometimes comical quirks suddenly made sense. Things I’d filed under “that’s just her” turned out to have an explanation.</p><p>And because I spend my working days around software and, lately, a lot of AI, my brain did what brains like mine do. It reached for an analogy.</p><h3>Seeing versus knowing</h3><p>The term is surprisingly young. Researchers describe aphantasia as an inability to form mental imagery, or having a “blind mind’s eye,” with the name coined by Adam Zeman and colleagues in 2015.</p><p>Here’s the part that hooked me. People with aphantasia aren’t missing the <em>knowledge</em>. Ask someone with aphantasia how many windows are on the front of their house and they can usually tell you. They just don’t get there by “looking” at a mental picture.</p><p>Researchers have a useful way of splitting this up. One group distinguishes <strong>visual-object imagery</strong> (colour, shape, brightness, texture) from <strong>visual-spatial imagery</strong> (locations, relations, and transformations). They point out these are separate skills: people who excel at one don’t necessarily excel at the other.</p><p>A philosophy paper titled <em>Aphantasia Reimagined</em> takes it further, proposing that aphantasia involves “a lack of visual-object imagery but preserved spatial imagery.” In plain dad-speak: no picture, but the map still works. That would explain why people with aphantasia often do well on spatial tasks despite reporting no mental images at all.</p><p>One more fun wrinkle. Imagery during dreams, or while drifting off to sleep, is often preserved in people with aphantasia. The lights are off when you go looking for them on purpose, but they sometimes flicker on by themselves.</p><p>So aphantasia isn’t really “can’t think visually.” It’s closer to “thinks in structure instead of pictures.” And that, it turns out, is exactly where the AI comparison gets interesting.</p><h3>The machine that never had a mind’s eye</h3><p>If you want an example of something that thinks in structure with zero pictures, look at a large language model, the kind of AI behind today’s chatbots.</p><p>Here’s the simplified version, from someone who works near this stuff rather than on it. When you type a sentence, the model first chops it into <strong>tokens</strong>: chunks of text, often whole words, sometimes pieces of words. Each token becomes a number, and each number becomes a long list of numbers called an <strong>embedding</strong>.</p><p>Those embeddings are where the magic, such as it is, happens. They don’t store what an apple <em>looks</em> like. They store how “apple” relates to everything else: closer to “pear” and “orchard,” further from “carburettor.” Ask a model what colour an apple is and it will say red, green, or yellow. Not because it pictured one, but because the relationships in its training point that way.</p><p>Sound familiar? The model has a very rich map and no picture at all. It’s spatial imagery’s distant cousin, taken to an extreme: pure relationships, no rendering step, ever.</p><p>I want to be careful here. I’m not saying my daughter thinks like a machine. I’m saying the machine gave <em>me</em> a mental model, ironically, for understanding how someone can know exactly what an apple is without ever seeing one in their head.</p><h3>Where the analogy falls apart</h3><p>Every good analogy has a breaking point, and this one has several. They’re honestly the most interesting part.</p><p><strong>She has experiences; we don’t know if the machine does.</strong> Aphantasia is a difference in conscious, inner experience. My daughter has a full inner life; it just isn’t a pictorial one. Whether an AI model experiences anything at all is an open question that people far smarter than me argue about. Comparing the two is comparing a person to a very clever filing system that may or may not have anyone home.</p><p><strong>The lights can come on in dreams.</strong> As mentioned earlier, imagery during sleep is often preserved in aphantasia. The machine has no equivalent. There’s no off-hours mode where the pictures sneak in.</p><p><strong>Even the scientists aren’t sure what “spatial imagery” is.</strong> One recent paper notes that it’s “not apparent what exactly constitutes the content of spatial ‘imagery’.” Other researchers suggest people with aphantasia may be relying on imagery that’s happening below conscious awareness. If the experts are still sorting out the human side, my tidy comparison should be taken with a generous pinch of salt.</p><p><strong>Aphantasia isn’t one thing.</strong> Researchers describe versions affecting different senses: visual, auditory (sometimes called “anauralia”), several senses, or all of them. One-size-fits-all comparisons, mine included, flatten a lot of real variety.</p><h3>Maybe imagination was never one thing</h3><p>Here’s where I’ve landed, a year in.</p><p>I used to think of imagination as a single dial, turned up high in artists and down low in accountants. Learning about my daughter’s mind broke that idea, and thinking about AI finished the job. There’s picturing, and there’s knowing, and they turn out to be different machines under the hood. You can have plenty of one with none of the other.</p><p>The discovery didn’t change who she is. She’s the same curious, funny kid she always was. What changed is that I understand her a little better, and I laugh <em>with</em> her quirks instead of quietly wondering about them.</p><p>And I’ve tried, more than once, to imagine not imagining. Close your eyes and think “apple” with no picture at all. I can’t do it. Which might be the most humbling part of this whole thing: the mind I find hardest to picture is the one that doesn’t picture anything.</p><p><em>Once more for the folks in the back: I’m a dad with a curious streak, not a scientist, and this piece was written with AI assistance. If this sparked your interest, the sources below are a far better place to learn than I am.</em></p><h3>Sources and further reading</h3><ul><li>Blazhenkova &amp; Pechenkova, <a href="https://research.sabanciuniv.edu/41301"><em>The two eyes of the blind mind: object vs. spatial aphantasia?</em></a> (2019). Object vs. spatial imagery; credits Zeman, Dewar &amp; Della Sala (2015) with coining the term.</li><li>Aphantasia Network summary of <a href="https://aphantasia.com/research/10.1111/nous.12551"><em>Aphantasia Reimagined</em></a> (Noûs). The “no picture, preserved spatial imagery” account.</li><li>Aphantasia Network summary of <a href="https://aphantasia.com/research/10.1016/j.cortex.2024.07.019"><em>Defining Aphantasia</em></a> (Cortex, 2024). Types of aphantasia and preserved dream imagery.</li><li><a href="https://arxiv.org/pdf/2510.20835"><em>Rethinking the Simulation vs. Rendering Dichotomy</em></a> (arXiv preprint). Open questions about what spatial imagery actually is.</li><li>Aphantasia Network, <a href="https://www.aphantasia.com/topic/spatial-imagery">Spatial Imagery topic page</a>. Accessible overview, including the unconscious imagery idea.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=40937ee6d7bc" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What a home boiler taught me about enterprise AI governance]]></title>
            <link>https://medium.com/@martin_tremblay/what-a-home-boiler-taught-me-about-enterprise-ai-governance-6e284074199a?source=rss-878e64ea00db------2</link>
            <guid isPermaLink="false">https://medium.com/p/6e284074199a</guid>
            <category><![CDATA[ai-agents-in-action]]></category>
            <category><![CDATA[model-context-protocol]]></category>
            <category><![CDATA[smart-home-automation]]></category>
            <category><![CDATA[enterprise-architecture]]></category>
            <category><![CDATA[ai-governance]]></category>
            <dc:creator><![CDATA[Martin Tremblay]]></dc:creator>
            <pubDate>Fri, 09 Oct 2026 22:33:30 GMT</pubDate>
            <atom:updated>2026-10-16T15:34:30.058Z</atom:updated>
            <content:encoded><![CDATA[<h3>What a home boiler taught me about enterprise AI governance - Pt. 1</h3><p><em>Putting an AI agent behind identity, authorization, isolation and audit, and what broke along the way. </em><strong><em>Part 1: governing read access.</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*l4jdtu8tP0rNdF5Go89BOQ.jpeg" /><figcaption><strong><em>An AI agent, a boiler, and the checkpoint between them.</em></strong><em> Generated with </em>Bing Image Creator</figcaption></figure><p>An AI agent read my boiler’s status and told me something was wrong.</p><p>It had noticed that the error counter carried a fresh timestamp, about thirty seconds old, and it suggested a fault might have just occurred and cleared itself. It was a reasonable inference. It was also wrong. The counter hadn’t changed in days.</p><p>The mistake wasn’t the model’s. It was mine. My gateway labelled each value with a field called last_changed, but the timestamp really meant &quot;last reported&quot;. The boiler&#39;s controller re-sends every value whenever a connection is made, and the gateway had just reconnected. So every value looked freshly changed.</p><p>I renamed the field to last_reported, added the time the connection was made, and wrote one sentence explaining the difference. Same model, same data. Asked again, the agent corrected itself: &quot;That was wrong: the timestamp only showed when the device last sent the count, so it gives no evidence of a new error.&quot;</p><p>That small exchange captures what this project taught me. AI governance gets real when an agent can touch a real system. Then the questions stop being about principles and become very specific: who is this agent, what may it do, what can it reach around the controls, what did it actually do, and what is it being told.</p><h3>How a boiler got here</h3><p>This didn’t start as an AI project. In my spare time I’m a home automation nerd: if something in the house has a sensor, a relay or a serial port, sooner or later it ends up in <a href="https://www.home-assistant.io/">Home Assistant</a>. The boiler was next on the list.</p><p>It started with a community project on GitHub (<a href="https://github.com/htumanyan/navien">htumanyan/navien</a>) that lets a small ESP32 board, running ESPHome firmware, talk to Navien boilers and water heaters through their NaviLink service port. With it, the boiler shows up in Home Assistant like any other device: temperatures, setpoints, operating state, error codes.</p><p>Neither my boiler (a Navien NHB-H, heat-only, with an indirect hot-water tank) nor my board (a Waveshare ESP32-S3-RS485-CAN, an industrial ESP32 board with a built-in RS485 port) was supported. So I added them. Support for the board and for my boiler’s model was merged upstream, along with better sensor metadata for Home Assistant. Two more changes are waiting for review: one that makes my boiler accept commands at all (it expects a different “system type” in every control packet), and one that shows the indirect tank properly. Until they’re merged, I run my own branch with them, plus a fix from another contributor that stops commands colliding with the boiler’s own traffic.</p><p>Once the boiler was working reliably on my network, the next question was obvious: what if an AI agent could read it, and eventually adjust it?</p><p>The question after that was the one that mattered to me professionally:</p><p><strong>How should it be <em>allowed</em> to?</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_CdoKxSp8Az9qmtE3cL2pA.jpeg" /><figcaption><strong><em>Permission isn’t assumed; it’s granted. </em></strong><em>Generated with Bing Image Creator</em></figcaption></figure><h3>Why a boiler</h3><p>I’m an enterprise architect. I’ve chaired architecture review boards and written plenty of policy. Like many people in my field, I could talk about AI governance far more fluently than I could show it working.</p><p>So I built something small and real, on top of that boiler. It’s a gas appliance in an occupied house, and the ESP32 board makes it reachable on the local network. It stands in for an enterprise system of record: something valuable, with real consequences if it’s changed carelessly, that an AI agent might reasonably want to use.</p><p>The rule was simple. No agent talks to the boiler directly. Every request goes through a gateway that does what an enterprise AI control plane would do: authenticate the agent, check what it’s allowed to do, apply policy, record everything, and keep the device’s own credentials out of the agent’s reach.</p><p>The stakes are real but contained: one owner, one device, and a small blast radius. That made it possible to build every control and test it end to end, which is rarely possible inside an enterprise.</p><p>One more thing up front: the project is AI-assisted. Most of the code, and drafts of the documentation, were written with Claude Code, Anthropic’s AI coding assistant. I’ll come back to what that meant for governance, because it turned out to be one of the more interesting parts.</p><h3>What I built</h3><p>The gateway speaks the Model Context Protocol (MCP), the emerging standard for connecting AI agents to tools and data. In front of it and around it:</p><ul><li><strong>Gateway.</strong> Written in Python with the official MCP SDK, it talks to the boiler’s controller over ESPHome’s encrypted native API.</li><li><strong>Identity.</strong> Keycloak, an open-source identity provider, issues short-lived tokens. I sign in, approve what an agent may do on a consent screen, and the agent gets a token that lasts five minutes.</li><li><strong>Authorization.</strong> Every tool needs a specific permission (a “scope”). Reading the boiler needs one scope; changing it will need another, and having one doesn’t imply the other.</li><li><strong>Isolation.</strong> The gateway, Keycloak and their own reverse proxy (Zoraxy, with a Let’s Encrypt certificate) run in separate containers on my Proxmox cluster, on a dedicated lab VLAN. My UniFi router allows only a handful of specific connections between it and the household network.</li><li><strong>Audit.</strong> Every request, including every refusal, is recorded in a tamper-evident log before anything else happens.</li><li><strong>Method.</strong> I used a lightweight version of the TOGAF Architecture Development Method: principles, a vision, baseline and target architecture, a roadmap of increments, and a compliance check at the end of each increment. Every significant decision is an Architecture Decision Record.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pbgt_RrYgy3Q2xnzZ_mXTQ.png" /><figcaption><strong><em>The architecture. The agent never talks to the boiler; only the gateway does, through one router rule.</em></strong></figcaption></figure><h3>Why these frameworks and standards</h3><p>For a home project, I could have skipped all of this and written a script. I didn’t, because the point was to practise the choices an enterprise would actually make, and to be able to explain them in the language an enterprise uses. Each framework was chosen because it answers a question I’ve heard in real architecture and risk reviews:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BYdwQa2A7k5rt1l2hfOIaw.png" /></figure><p>The common thread: an AI agent is a new kind of actor, but the enterprise concerns aren’t new. Identity, authorization, segmentation, evidence and change control already have mature frameworks. The work is applying them deliberately to agents, and noticing where agents stretch them.</p><p>Part 1 covers the first increment: read-only access. One tool, which reads the boiler’s state. It’s deployed, a real AI client (Claude Code) uses it, and it passed its compliance check. Writes come in Part 2.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*wr59S6CiYi9vqn-vdxLRxA.png" /><figcaption><em>Every request passes the same seven layers. Most of the lessons below come from one of them.</em></figcaption></figure><h3>Here’s what I learned…</h3><h4>1. A gateway governs only the paths that go through it</h4><p>Before writing any gateway code, I checked an assumption: could Home Assistant and the new gateway both connect to the boiler’s controller at the same time? They could. But while reading the controller’s configuration to confirm it, I found something else. It also ran a small web server, with no login, that could change the boiler’s settings from any browser on the network.</p><p>Every control I was about to build could have been bypassed by anything on my home network that knew where to look.</p><p>Enterprises do this all the time. A new API gateway goes in front of a system of record, and the old direct database connections stay open “for now”. The gateway’s dashboards look complete and its audit trail looks authoritative, but they only cover the traffic that chose to use them.</p><p>Closing it meant breaking one of my own scope rules (no firmware changes). I removed the web server and recorded why. Later, I caught myself designing the same mistake again: I’d let the lab network reach the household’s reverse proxy, which routes by hostname, so any lab container could have reached household services through it. The fix was a dedicated reverse proxy for the lab.</p><p>The cheapest control was removing a capability nobody used. Least functionality comes before least privilege.</p><h4>2. Agents need their own identity, and every action has two</h4><p>Every token the gateway accepts carries two identities: the person who granted access, and the agent acting for them. In the audit trail, the same person shows up with two different agents, and each action says which one did it.</p><p>That sounds obvious. It isn’t how most automation works today, where agents often borrow a person’s credentials or share a service account.</p><p>The tokens are also bound to the gateway: each one names the gateway as its audience, and the gateway refuses anything issued for anything else. This is what stops a token meant for one service being replayed against another, the classic “confused deputy”.</p><p>That control was tested for real. The first time Claude Code signed in, its token was refused. The client hadn’t sent the parameter that tells the identity provider which service the token is for, so the token named the wrong audience. The gateway rejected it, and recorded why, against a perfectly legitimate client. I applied a documented fallback to that one client, and the next token was right.</p><p>I’d listed exactly this as a risk to test rather than assume. It’s one of my favourite moments in the project: the control did its job even when the problem was ours.</p><h4>3. An audit trail is only a control if it can stop the action</h4><p>Most audit logging is after the fact: something happens, then a record is sent somewhere, eventually.</p><p>That’s useful for investigation. But it can’t support a rule like “nothing happens unless it’s recorded”, because the system doesn’t know whether the record arrived.</p><p>So the gateway writes its decision to a local store and commits it before anything else happens. If the write fails, the request is refused. Each record is chained to the one before it with a cryptographic hash, so editing or deleting a record breaks the chain.</p><p>I was careful about what that does and doesn’t prove. The chain detects tampering; it doesn’t prevent it. Someone with access to the file could rebuild the whole chain, or quietly cut off the newest records. Catching that needs a copy of the latest hash kept somewhere else, which is planned. The tests say so explicitly, rather than implying more protection than exists.</p><h4>4. A tool’s wording is part of what the model reasons with</h4><p>The opening story belongs here. The OWASP Top 10 for LLM Applications lists misinformation as a risk. We usually picture the model inventing things. In my case, the system misinformed the model: an imprecise field name led a capable model to a wrong but plausible conclusion.</p><p>The fix wasn’t a smarter model or a stricter prompt. It was a better field name, one extra value, and a sentence of explanation in the tool’s output.</p><p>I now think tool schemas, field names and descriptions deserve the same review as access controls. They are the agent’s view of reality.</p><p>The same thinking shaped what the tool shows at all. The boiler’s controller reports dozens of values, including network addresses, firmware details and undocumented raw bytes. The agent sees a curated dozen. Less exposure means less to leak and less to misread.</p><h4>5. Test what should pass, not only what should fail</h4><p>Some of the most useful failures were in my own testing.</p><p>When I set up the UniFi firewall rules between the lab and the household network, every “this should be blocked” test passed. It turned out all the “allow” rules had been saved as “block”. Everything was blocked, so of course the blocking tests passed. Only the test that expected traffic to get through caught it.</p><p>A few days later, the opposite. A test that expected the lab to be cut off from the household returned “open”. The rules were fine. One container I’d “moved” to the lab network was still on the household network: it had changed name and host, but not network.</p><p>And once, after moving a service’s secrets into a protected file, the service reported itself as “active” while it was actually restarting every twelve seconds. The restart count told the truth; the status didn’t.</p><p>Controls need tests in both directions, and tests that have never failed are hypotheses, not evidence.</p><h4>6. Proportionality is part of governance</h4><p>It would be easy to read this as “apply every enterprise control everywhere”. That isn’t what I learned.</p><p>When a firewall change would have touched the whole cluster that runs my household’s other services, I chose a separate lab network instead, because my real priority was not disrupting everyday services. When I found the open web server in the community project my boiler’s firmware comes from, I contributed an opt-in documentation change rather than forcing a login on every hobbyist’s build. And when one threat (any device on my home network could tie up the controller’s connections) wasn’t worth the effort to fix, I recorded it as an accepted risk, with a reason and a date.</p><p>Knowing when not to impose rigor is part of the architect’s job. Writing that decision down is what makes it governance rather than neglect.</p><h4>7. Governing the builder as well as the built</h4><p>I built this with Claude Code, under a set of standing instructions (a CLAUDE.md file in the repository): safety rules for the boiler, no secrets in the repository, plan before structural changes, verify against the real device.</p><p>Some of the most interesting governance happened there:</p><ul><li>Claude Code’s own safety checks blocked it from force-pushing to the repository. I ran those commands myself after reviewing them.</li><li>Secrets leaked into the conversation twice while I was debugging: once in a configuration export, once while setting an environment variable. Both were rotated immediately. Debug output and exports are a classic leak path, and AI chat sessions are no exception.</li><li>The project’s own instructions to the assistant contained home details (addresses, hostnames) that would have gone public with the repository. Instructions written for an AI are a data classification surface too.</li><li>Reading a community install script before running it, at the assistant’s suggestion, revealed a well-known default administrator password, fixed before the service went live.</li></ul><h3>Where AI helped most: breadth and depth</h3><p>The thing I didn’t expect: the biggest value of the AI wasn’t writing code. It was keeping the right standard in view at the right moment.</p><p>This small project, for one boiler, relies on 39 frameworks, standards and specifications. They include TOGAF, the NIST AI Risk Management Framework, the OWASP list, STRIDE threat modelling, the MCP specification and its authorization rules, OAuth 2.1, and a string of protocol standards (RFCs). No architect holds all of them in their head, with the right clause for each decision.</p><p>The assistant did. When choosing an identity provider, it compared four candidates against the specific requirements of the MCP authorization specification, in parallel, with quotes from each product’s documentation. Two of the four couldn’t bind a token to a single service at all, which ruled them out. When the newest MCP revision appeared, it pointed out that the protocol now copies the tool name into HTTP headers specifically “so that intermediaries (load balancers, gateways, observability tooling) can route and inspect requests without parsing the body”, which meant the protocol itself now expects gateways like mine.</p><p>The counterweight matters just as much. The assistant was wrong several times. It assumed my AI client used an older protocol version; the audit trail showed otherwise. It marked a migration done without checking one container’s network. A step in its own runbook was missed twice before we made it impossible to miss. It even miscounted the standards list, twice, before an actual count gave 39.</p><p>Every one of those was caught because the working rule was “verify with citations”: check each claim against its source, and quote rather than paraphrase. That rule is itself a governance control, applied to the AI.</p><p>So my answer to “can AI help with enterprise governance?” is yes, in a specific way. It widens the set of controls and standards an architect can apply consistently. It doesn’t remove the need to verify them. Governing the AI’s output is part of the job.</p><h3>What an enterprise would add</h3><p>This is a home lab practising enterprise patterns, not an enterprise deployment. At organizational scale, I’d add:</p><ul><li>a central identity provider and enterprise-managed authorization, so the organization, not each user, decides which agents may reach which tools;</li><li>audit records forwarded to a security operations platform, with the gateway’s own store kept as its record of what it authorized;</li><li>privileged access management and rotation for device credentials;</li><li>change management and separation of duties for policy, and for approvals once agents can act.</li></ul><p>The controls themselves (identity per agent, audience-bound tokens, per-tool authorization, synchronous audit, closed side doors, curated tool output) would carry over unchanged.</p><h3>Next: governing actions</h3><p>Reading is the easy half of <em>how should it be allowed to?</em> <a href="https://medium.aspiroconsulting.ca/what-a-home-boiler-taught-me-about-enterprise-ai-governance-95f27ca83f63">In Part 2</a>, the agent gets its first permission to change something: the hot-water tank’s setpoint, within limits set by the gateway, not the device. That brings bounds, rate limits, read-back (the boiler, not the command, decides whether a change happened), a kill switch, and the question of how an agent asks for more permission than it has.</p><p><a href="https://medium.aspiroconsulting.ca/what-a-home-boiler-taught-me-about-enterprise-ai-governance-95f27ca83f63?sharedUserId=martin_tremblay"><strong>Part 2 is out: governing the first write.</strong></a> The agent gets its first permission to change the boiler, and the boiler ignores the first command.</p><p>The architecture, decisions, threat model and compliance check are public: <a href="https://github.com/MartyTremblay/navien-mcp-gateway">GitHub repository</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6e284074199a" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>