<?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 Chris Tanner on Medium]]></title>
        <description><![CDATA[Stories by Chris Tanner on Medium]]></description>
        <link>https://medium.com/@ctannerdev?source=rss-69ed18b84ce5------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*i3UgY_DPVWxQqr45DgW5Sw.jpeg</url>
            <title>Stories by Chris Tanner on Medium</title>
            <link>https://medium.com/@ctannerdev?source=rss-69ed18b84ce5------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 04 Dec 2026 18:17:10 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ctannerdev/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[Making the Move: From MVC to Multi-Surface]]></title>
            <link>https://ctannerdev.medium.com/making-the-move-from-mvc-to-multi-surface-e2014abda577?source=rss-69ed18b84ce5------2</link>
            <guid isPermaLink="false">https://medium.com/p/e2014abda577</guid>
            <category><![CDATA[software-architecture]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[mcp-server]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[mvc]]></category>
            <dc:creator><![CDATA[Chris Tanner]]></dc:creator>
            <pubDate>Sun, 02 Aug 2026 00:04:16 GMT</pubDate>
            <atom:updated>2026-08-02T01:18:34.418Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Part 3 of 3 - The Multi-Surface Architecture</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ux8JbPPoY6-rf3fjyGy_Zw.png" /></figure><p>In <a href="https://ctannerdev.substack.com/p/part-1-what-are-we-building?r=7z048t">Part 1</a>, we looked at why there may be an upcoming shift focused more on <em>what</em> we build, rather than <em>how </em>(which is already largely solved). In <a href="https://ctannerdev.substack.com/p/part-2-the-multi-surface-architecture?r=7z048t">Part 2</a> we named a potential path forward: a <em>Multi-Surface Architecture</em> that can define an operation once as a <strong>capability</strong>, project it onto any surface, and bake the governance into <strong>one ordered pipeline</strong>.</p><p>If that all sounds plausible so far, we’ll round out this final installment with an actual implementation, and go step-by-step in answering, “how do we actually get there from the MVC apps we have right now?</p><h3>Nothing disappears, it just relocates</h3><p>In a traditional MVC app, a single user action is spread across a familiar column. For every action, you usually have a <strong>route</strong>, a <strong>controller action</strong>, a <strong>form request</strong>, a <strong>policy</strong>, a <strong>model</strong>, and a <strong>view</strong>. Every one of those pieces is critical to serving the round trip. The problem, again, is that we rebuild the whole column every time we need to add a new way to reach the operation. The ✨AI assistant is just the latest arrival to the party.</p><p>The capability layer can do everything MVC does, but just moves the operations out of a per-surface controller and into one reusable definition.</p><p>Here’s the side-by-side:</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fdatawrapper.dwcdn.net%2FCNJc8%2F2%2F&amp;display_name=Datawrapper&amp;url=https%3A%2F%2Fdatawrapper.dwcdn.net%2FCNJc8%2F2%2F&amp;image=https%3A%2F%2Fdatawrapper.dwcdn.net%2FCNJc8%2Fplain-s.png%3Fv%3D2&amp;type=text%2Fhtml&amp;schema=dwcdn" width="600" height="685" frameborder="0" scrolling="no"><a href="https://medium.com/media/e7ccbfc1104f29d7d70e92ade65cddc4/href">https://medium.com/media/e7ccbfc1104f29d7d70e92ade65cddc4/href</a></iframe><p>The biggest shift here is that, in MVC, the controller is where we assemble validation + authz + work + response <em>by hand, once per surface</em>. Here, that assembly happens <strong>once</strong> in the dispatcher, and the capability supplies only the parts that are actually unique to the operation (the schema, permissions, and the work).</p><blockquote>In MVC, every new surface is another copy of that column. In the capability version, every new surface is a <em>projection</em> of one definition.</blockquote><h3>A controller action, before and after</h3><p>Let’s build on the CRM example from Part 2. Let’s take a look at a typical Laravel-style architecture for creating a contact:</p><pre>// routes/api.php<br>Route::post(&#39;/contacts&#39;, [ContactController::class, &#39;store&#39;])-&gt;middleware(&#39;auth:api&#39;);<br><br>// app/Http/Controllers/ContactController.php<br>public function store(StoreContactRequest $request)   // FormRequest = validation<br>{<br>    $tenant = Tenant::findOrFail($request-&gt;tenant_id);<br>    // authz - and you&#39;d better hope every entry point remembers this line<br>    $this-&gt;authorize(&#39;createContact&#39;, $tenant);<br>    $contact = Contact::create([<br>        &#39;tenant_id&#39; =&gt; $tenant-&gt;id,<br>        &#39;name&#39;      =&gt; $request-&gt;name,<br>        &#39;email&#39;     =&gt; $request-&gt;email,<br>        &#39;owner_id&#39;  =&gt; $request-&gt;user()-&gt;id,<br>    ]);<br>    return new ContactResource($contact);              // the view / serializer<br>}<br>// app/Http/Requests/StoreContactRequest.php<br>public function rules(): array {<br>    return [<br>        &#39;tenant_id&#39; =&gt; &#39;required|integer&#39;,<br>        &#39;name&#39;      =&gt; &#39;required|string&#39;,<br>        &#39;email&#39;     =&gt; &#39;required|email&#39;,<br>    ];<br>}</pre><p>Now let’s look at the same operation as a <strong>capability:</strong> a descriptor plus a handler. Everything cross-cutting moves <em>out</em>, only what’s unique to “create a contact” stays:</p><pre>export const createContact = {<br>  name: &quot;contact.create&quot;,          // was: the route + controller action<br>  version: &quot;0.1.0&quot;,<br>  title: &quot;Create a contact&quot;,       // human label (drives the generated form)<br>  description:                     // written FOR a model — this is what makes the AI surface work<br>    &quot;Create a contact in the caller&#39;s workspace. A write: on autonomous surfaces &quot; +<br>    &quot;it must be confirmed before it commits.&quot;,<br>  domain: &quot;contact&quot;,<br>  effect: &quot;write&quot;,                 // read | write | destructive — drives confirm + exposure<br>  requiredScopes: [&quot;contact:write&quot;],           // Tier-1 coarse gate (was: auth middleware + role)<br>  resource: (raw) =&gt; ({ type: &quot;contact&quot;, id: &quot;(new)&quot;, tenant: raw.tenant }),<br>  authorize: resourceScopeAuthorizer,          // Tier-2 (was: $this-&gt;authorize(...))<br>  input: createContactInput,       // was: StoreContactRequest::rules(). ONE schema, reused everywhere.<br>  handler: async (input, ctx) =&gt; { // was: the body of store(). Pure work, nothing else.<br>    // owner is bound from the session — the caller can&#39;t forge ownership<br>    return contactsRepository.create(input.tenant, input.name, input.email, ctx.actor.id);<br>  },<br>};</pre><p>Now look at what’s <strong>gone</strong> from the “after”: no route, no $this-&gt;authorize() buried in the business logic, no separate FormRequest, no hand-written JSON Schema or form markup, no “are you sure?” dialog to build, no bespoke loggers. All of these are now inherited from the dispatcher. What remains is the part that actually differs: the handler body and the repository call.</p><p>Wheels starting to turn? Great. Let’s continue.</p><p>So now we look at both the before and after and ask: <em>how does the AI assistant call the “before” version?</em> Well, it doesn’t really, not without a second implementation of the schema, the authz check, and a “confirm before writing” gate that the form dialog hands humans for free. Same story for MCP, for a partner’s API, or any <em>n </em>surfaces that come around by the time you’re done implementing the last one.</p><p>In MVC, every new surface is another copy of that column. In the capability version, every new surface is a <em>projection</em> of one definition.</p><h3>The migration, one action at a time</h3><p>While I wouldn’t recommend you try to rebuild your entire production app into a <em>Multi-Surface Architecture</em> in a weekend (there are <a href="https://martinfowler.com/bliki/StranglerFigApplication.html">better ways</a>), I’m also not stopping you. One thing that will be left for you to answer here is how you hook this into to your existing architecture (data layer, identity, etc), and this is intentional. There are too many variables and too many opinions there to cover in a single article (but maybe a Part 4?). What I can say is that this architecture is designed to be <em>service-agnostic</em>. What you end up plugging into a capability’s handler only needs to be able to satisfy the contract it defines.</p><p>My only suggestion here, if you intend to plug in multiple systems-of-record into a single capability layer: define your domains clearly.</p><p>What we <em>will</em> cover here is a repeatable pattern to use to rethink how features are built:</p><p><strong>1. Give it a name.</strong> Every store / update / destroy becomes a stable, dotted domain.operation. ContactController@store → contact.create. ContactController@destroy → contact.delete. The name is a permanent public identifier, so let’s pick it like we mean it, and version the <em>behavior </em>separately.</p><p><strong>2. Classify the effect.</strong> Tag it read, write, or destructive. This one field can decide a lot for us (see callout below): read might never need a confirmation and is exposed to every surface; write might commit directly from a form or REST call but require a confirm token from an agent; destructive might always require an explicit human confirm <em>and be withheld from the LLM and MCP surfaces entirely.</em> That last part is how contact.delete would be safe to register at all (the model can’t select a tool it was never handed).</p><blockquote>A quick note: the guidance in #2 above is highly-opinionated and more for illustration. Withholding caps from different surfaces is not a hard rule for implementing a Multi-Surface Architecture. You can absolutely expose delete ops to your public MCPs, but.. should you?</blockquote><p><strong>3. Move the rules into a Zod </strong>input<strong>.</strong> Now let’s translate our FormRequest rules into one Zod schema, and add .describe() on each field. Those descriptions become helper text in the form <em>and</em> guidance for the model. The schema is now the <em>only</em> place validation is defined.</p><p><strong>4. Split authz into two tiers.</strong> Our old policy check splits into a coarse question and a resource question. The coarse “can this <em>kind</em> of user do this <em>kind</em> of thing” gate (requiredScopes + policy) stays with the capability layer. The fine-grained “may <em>this</em> actor act on <em>this</em> resource” question (resource + authorize) delegates back to the system that actually owns the resource. We aren’t centralizing everyone’s permission model here - we’re relocating <em>where the question gets asked</em>, not rewriting <em>who answers it.</em> The layer is the enforcement point; the underlying app/API stays the decision point.</p><p><strong>5. Move the method body into </strong>handler<strong>.</strong> Now let’s copy the controller body over, then strip out the authz call, the validation plumbing, and any manual logging (our dispatcher does all of those now). What’s left is just business logic and repository calls. The handler receives pre-validated, strongly-typed input and a ctx carrying the resolved actor.</p><p><strong>6. Register it, and stop writing surfaces.</strong> Finally, let’s add the capability to the registry. We do <strong><em>not</em></strong> write a route, a form, a tool definition, or an MCP handler — registering the cap lights up our REST endpoint, the generative-UI form, LLM tool-calling, and MCP simultaneously. Delete the old controller action once the surfaces that depended on it are cut over.</p><p>Six steps, one action at a time, old and new stacks running side by side. No big bang.</p><h3>Define once, project everywhere</h3><p>Let’s take a second to demystify why Step 6 seems like magic. There are really only five moving parts, and only the first is something we author per operation:</p><ol><li><strong>The capability</strong> — the descriptor + handler. The only thing we write.</li><li><strong>The registry</strong> — a typed catalog. We register a capability into it once and surfaces enumerate it. They never hard-code a list.</li><li><strong>The dispatcher</strong> — the one pipeline, in the one fixed order: resolve → authorize → confirm → validate → idempotency → dispatch → audit. This is your MVC middleware stack, unified into one place and applied to every capability, so security is structural instead of “wherever someone remembered to add the middleware.”</li><li><strong>The surfaces</strong> — REST, generative UI, LLM tool-calling, MCP. Each is a thin adapter that reads the registry and forwards to the dispatcher. None of them re-implement validation, authz, confirmation, or audit (those already happened in the pipeline). The “thin adapter over a uniform spec” is a big part of the magic.</li><li><strong>The schema derivations</strong> — With all of that in place, our single Zod input can now feed three things from a single source: toJsonSchema() → the LLM tool def and MCP input schema, toFormSpec() → the generative-UI form fields, and safeParse() → runtime validation in the dispatcher. Change the schema and the form, the tool definition, the MCP schema, and the validation <em>all</em> change together. They can’t drift, because they’re the same object viewed three ways.</li></ol><p>And that’s the entire machine. One thing you author, four surfaces that generate themselves, one pipeline that governs them all.</p><h3>The mental shift</h3><p>If I’m being honest, I’ve been hesitant to talk about this idea at all, due mainly to how much of a departure this is from how we <em>think</em> about building. Even for me, at this very moment, it attacks something in my engineering brain that tells me to just keep building the safe thing.</p><p>The way you can re-frame it, in a more general sense:</p><blockquote><em>Stop thinking “I need to build an endpoint, a form, and a tool.” Start thinking </em><strong><em>“I need to define a capability.”</em></strong><em> The surfaces are just projections of that.</em></blockquote><p>Back in Part 1 I asked: as agents begin to route around the UI, <em>what are we actually building?</em> I see this as a potential reply. And in that reply I want to make something clear: keep building your UI, you are definitely going to need it (<em>YADGNI)</em>.</p><p>The real goal here is not to announce the death of the front-end. It’s to talk about a way forward that adapts to a changing landscape, reduces cognitive overhead, and makes things easier to manage long-term.</p><p>I like this idea for it’s simplicity (well, it <em>feels</em> simple), and I like that it doesn’t try to re-invent too much. In the end, it’s just a reassembling of pre-established patterns and existing technologies to fit the new use case.</p><p>And that’s the Multi-Surface Architecture. If you like talking about this sort of thing, let’s chat.</p><p><em>This concludes a three-part series on the Multi-Surface Architecture.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e2014abda577" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Multi-Surface Architecture: Not Your Grandma’s Semantic Layer]]></title>
            <link>https://ctannerdev.medium.com/the-multi-surface-architecture-not-your-grandmas-semantic-layer-dae260238b4f?source=rss-69ed18b84ce5------2</link>
            <guid isPermaLink="false">https://medium.com/p/dae260238b4f</guid>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[mcp-server]]></category>
            <category><![CDATA[software-architecture]]></category>
            <category><![CDATA[mvc]]></category>
            <dc:creator><![CDATA[Chris Tanner]]></dc:creator>
            <pubDate>Fri, 31 Jul 2026 22:58:28 GMT</pubDate>
            <atom:updated>2026-08-02T01:20:19.911Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Part 2 of 3 — The Multi-Surface Architecture</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*C6et0dO6zY9CwAD26eRYqQ.png" /></figure><blockquote>A <strong>capability</strong> is just a descriptor plus a handler.</blockquote><p>In <a href="https://ctannerdev.substack.com/p/part-1-what-are-we-building?r=7z048t">Part 1</a> I posited that the next shift we’re going to feel as technologists will be around <em>what</em> we build, now that a growing number of consumers of your app are agents that never load your UI. We surveyed our options and found nothing exciting, and then I hinted at something familiar: the semantic layer.</p><h3>The semantic layer you already know</h3><p>If you’ve spent time near analytics or BI, you’re probably well-acquainted. Semantic layers solve a specific, business-critical problem: everybody’s dashboard computes “monthly active users” or “net revenue” slightly different, and by Tuesday Finance and Product are in a meeting arguing about which number is right.</p><p>The semantic layer addresses this by defining each metric <strong>once</strong>, in one place, with its formula and its rules, and then every dashboard, every report, every export refers to <em>that</em> definition as the source of truth.</p><p><a href="https://enterprise-knowledge.com/top-semantic-layer-use-cases-and-applications-with-realworld-case-studies/">Organizations using this pattern</a> are never re-deriving “net revenue” in a spreadsheet. There’s one definition, and the surfaces (dashboards, reports) are just projections of it.</p><p>Great idea. Genuinely great. But for twenty years it’s only been applied to the reporting world, to <em>data</em>. Metrics, dimensions, dashboards — the read-only stuff.</p><h3>Point it at operations</h3><p>So now let’s take that idea and aim it at our <strong>operations</strong> instead of metrics.</p><p><strong>Define an operation</strong> <strong>once</strong>: its input schema, who’s allowed to call it, whether it’s destructive, and a plain-language description of what it does. Call that unit a <strong>capability</strong>. Then every surface (the LLM/MCP tool, the REST endpoint, the human form) is a <em>projection</em> of that one capability. You don’t build the feature and <em>then</em> build an API for it and <em>then</em> wire it up to an LLM. Describe the capability once, and the surfaces come for free.</p><p>A <strong>capability</strong> is just a descriptor plus a handler. Let’s take an example of what a CRM might define as a capability for creating a new contact record (contact.create):</p><pre>const createContact: Capability = {<br>  id: &quot;contact.create&quot;,<br>  effect: &quot;write&quot;,                      // read | write | destructive<br>  description:                          // written for a model — this IS the AI surface<br>    &quot;Create a contact in the caller&#39;s workspace. A write: on agent surfaces &quot; +<br>    &quot;it must be confirmed before it commits.&quot;,<br>  requiredScopes: [&quot;contact:write&quot;],    // Tier-1 coarse gate<br>  input: z.object({                     // the ONE schema definition<br>    tenant: z.string().min(1),          // JSON Schema, MCP + LLM tool def, form spec<br>    name:   z.string().min(1),<br>    email:  z.email(),<br>  }),<br>  // Tier 2: resource decision, co-located with the handler<br>  authorize: resourceScopeAuthorizer,    // &quot;may THIS actor act on THIS school?&quot;<br>  handler: async (i, ctx) =&gt;             // pure business logic<br>    store.create(i.tenant, i.name, i.email, ctx.actor.id),<br>};</pre><p>And that’s it.</p><p>From a single definition, we can now derive the LLM tool’s schema, the MCP tool’s schema, the human form, permissions, rules, and validation. The same fields, same required-ness, and the same enums all get projected onto every surface we decide to hook up.</p><p>But generating a tool schema from a validator is table stakes, every framework does that now. But that’s also not the point here, and if that were the whole idea I wouldn’t be writing this.</p><h3>Under the hood, it’s a command bus</h3><p>For my fellow engineers who want to place this in their mental model: the mechanism should also feel familiar. A <strong>capability</strong> is a generalized <strong>CQRS command</strong>, and the thing that routes them is a <strong>typed command bus</strong>. The <em>generalization</em> of the command is how we make this multi-surface.</p><p>A plain command carries its inputs, but a capability carries its inputs <em>and</em> its own schema, its permission model, the effect classification (is this a read, a write, or destructive?), and a human/LLM-readable description of itself. The bus isn’t just handling execution, it’s <em>projecting the whole catalog</em> onto any arbitrary transport (HTTP, MCP, LLM tool-calling, a UI form). The same command definition with many faces (or rather, <em>facets</em>).</p><p>For GraphQL fans, this may be starting to ring some bells. GraphQL unifies the <em>query and mutation shape</em> across one transport. The capability layer unifies the <em>operation definition</em> across <strong><em>many</em></strong><em> </em><strong><em>transports</em></strong> and bakes authorization, confirmation, and auditing into the definition itself.</p><p>This may feel like more responsibility, but that’s the kind of the point: the <em>pipeline</em> is the guarantee. The guarantee that every request is validated, authorized, and processed the same way.</p><blockquote>Offering a <strong>tool</strong> is not the same as authorizing a <strong><em>call</em></strong>.</blockquote><h3>“Not your grandma’s semantic layer”</h3><p>But why do I want a pipeline, and why do I want them to be the same?</p><p><strong>Governance</strong>.</p><p>We could absolutely bolt four surfaces onto a shared handler and let each surface decide for itself whether a given call is authorized, destructive, or needs confirming. I have no doubt that we as technologists will try.</p><p>But when we do that, we don’t have a <em>Multi-Surface Architecture</em>, we have four apps that have the potential guarantee to drift apart (the security bug from <a href="https://ctannerdev.substack.com/p/part-1-what-are-we-building?r=7z048t">Part 1</a>). The old BI semantic layer was only concerned with governed <em>reads</em>, and it only needed to be. Numbers were the only risk there. But when we want a semantic layer to govern <em>writes</em>, when an agent can <em>refund a charge</em> or <em>delete a user</em> through it, “don’t let the definitions drift” stops being about consistency and becomes about safety.</p><p>The Multi-Surface Architecture puts the governance in <strong>one place</strong>, before any surface can call a handler. One pipeline, one fixed order, every call, every surface:</p><pre>resolve → authorize → confirm/effect gate → validate → idempotency → dispatch → audit</pre><p>The ordering here isn’t just for illustration, it’s our security property. <strong>Authorize before validate</strong> means we deny an unauthorized caller before spending any work parsing their request. <strong>Confirm before validate</strong> means a dangerous action is gated before it’s even fully parsed. We can’t reach a handler without passing authorization and the effect gate first, because <em>there is no other path</em> to the handler.</p><p>The guarantee comes from the <em>shape of the pipeline</em>, not from remembering to call a check or implement a policy class. That’s the difference between “we authorize in the handler” (a convention any developer can forget) and “authorization is a step in the one pipeline every surface shares” (a built-in property you <em>can’t</em> forget).</p><p>Four things fall out of putting the pipeline in one place. These are the parts worth the price of admission.</p><p>With the pipeline in place, we start getting some things for free without needing to define (or remember to define) them in other areas of the code.</p><h3>1. A capability gate is not authorization</h3><p>So, we wire “delete customer” into our agent and gate it: the model only sees the tool if the session has some role. Feels safe.</p><p>But it isn’t.</p><p>Offering a tool is not the same as authorizing a <em>call</em>.</p><p>Whether <strong><em>this</em></strong> actor may delete <strong><em>this</em></strong> customer, <strong><em>right now</em></strong>, is a per-request, per-resource<br>decision. When the gate lives at tool-exposure time and the real decision lives… somewhere else (a middleware, an if in the handler, or nowhere). And now we’ve built a <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/confused-deputy.html"><strong>confused deputy</strong></a>.</p><p>The agent, holding broad capability, gets steered by natural-language input (a support ticket, a scraped page, or the contents of a document it was asked to summarize) into acting on a resource the underlying user (the principal) was never allowed to touch. “Refund charge #12345” is a perfectly well-formed request and gets <a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Status/202">202</a>’d. The question the gate never asked is whether <em>this</em> user owns charge #12345. A capability gate answers “may this agent <em>ever</em> call refund?” It doesn’t answer the better question “may this actor refund <em>this</em> charge?”</p><p>We probably want both.</p><p>This gap is starting to be partially filled in by <a href="https://modelcontextprotocol.io/community/working-groups/interceptors">MCP Interceptors</a>, and I’m excited to see where that goes. But since MCP is just one surface here, we still need to think about how we define this in a way that can apply everywhere.</p><p><em>See also: </em><a href="https://arxiv.org/abs/2606.28679">David Mellafe Zuvic<em>, Capability Gates Are Not Authorization: Confused-Deputy Failures in LLM Agent Frameworks </em>(arxiv, June 2026)</a></p><blockquote>You don’t opt each surface in, and you can’t accidentally leave one out.</blockquote><h3>2. Two-tier authz and the permission-less framework</h3><p>So let’s break authorization into two parts:</p><ul><li><strong>Tier 1: the coarse policy gate.</strong> “Does this actor’s role permit contact:write at all?” Cheap, capability-level. These are your standard RBACs that are probably included in your identity federation payloads already.</li><li><strong>Tier 2: the per-resource authorizer.</strong> “May <em>this</em> principal act on <em>this</em> resource?” This is the decision that stops the confused deputy. This is the resourceScopeAuthorizer from the Capability def, and it runs on the actual resource, on every call.</li></ul><p>You may notice the pattern holds <strong>no permission store of its own</strong>. Tier 2 is <em>our </em>business logic against <em>our</em> data, it delegates this to the system that actually knows the resource’s tenancy and ownership. The architecture just provides the <em>seam</em> and guarantees the <em>ordering</em>; it does not want to own our <a href="https://learn.microsoft.com/en-us/azure/architecture/patterns/anti-corruption-layer">ACL</a>s, and it shouldn’t.</p><p>A standalone authorization engine is a crowded, specialized market, and the pipeline we’re talking about here is not trying to be one. The capability layer is the thing that <em>routes calls to</em> one, uniformly, across every surface.</p><blockquote>The problem with a per-tool flag is that it’s only as good as when each surface remembers to honor it.</blockquote><h3>3. The effect ceiling is a pipeline invariant, not a per-tool flag</h3><p>Plenty of toolkits ship a “human approval” flag you set per tool, and capabilities are no different, with each capability declaring an effect: read, write, or destructive.</p><p>The problem with a per-tool flag is that it’s only as good as when each surface remembers to honor it. And if it lives in a single tool definition, a <em>different</em> surface invoking the same operation doesn’t inherit it.</p><p>But if we instead put the definition in the dispatcher, now it’s enforced <em>identically across surfaces</em> by nature. A destructive capability requires an explicit confirm whether it’s called by the autonomous LLM loop, an MCP client, a REST caller, or a human clicking submit. You don’t opt each surface in, and you can’t accidentally leave one out.</p><p>Better still, the ceiling can <em>withhold</em> a capability from a surface entirely: destructive operations don’t have to be handed to the LLM or MCP tool lists at all, and <strong><em>the model literally cannot select a tool it was never given</em>.</strong> Because the guarantee is a property of the pipeline, adding a fifth surface when the next big thing happens inherits all of it for free.</p><p>And to be clear: the confirm step shouldn’t be a checkbox the model can tick for itself. On a write or destructive call, we should imagine the dispatcher issuing a short-lived, server-signed token bound to the capability, the input, and the actor, wth the caller needing to echo it back in order to execute.</p><p>The dispatcher <em>verifies</em> a presented token rather than recomputing an expected one, so a model that knows the whole scheme still can’t self-issue a confirmation and skip the step. <strong>A human (or an explicit policy) stays in the loop.</strong></p><blockquote>Every other property here is a <strong>guarantee</strong>, but this one is <strong>evidence</strong>.</blockquote><h3>4. One uniform audit stream</h3><p>Honestly, I probably should have led with this, because I firmly believe it’s the one piece that rocks the hardest. If you work anywhere near compliance (so, everyone) — this one’s for you.</p><p>Let’s say we have our traditional MVC app, some AI features on top, <em>maybe</em> a public MCP that exposes actions.</p><p>Something changes in the DB, and now we need to figure out where it came from. If everything is funneling through your REST API — great, you can see it. But unless you’re capturing the source <em>and</em> the principal actor (not just a generic client version “MyMCP v.0.1”) <em>and </em>it has the same shape as every other audit event, we’re just complicating it.</p><p>And if it’s funneling through multiple sources, well, <em>good luck</em>.</p><p>In the Multi-Surface Architecture, because <em>every</em> terminal state on <em>every</em> surface emits one structured event ({ actor, effect, surface, resource, status, inputHash }) from the same place, you get something a pile of per-surface handlers simply cannot produce: a single, uniform, provable record that <em>this actor performed (or was denied) this effect on this resource, and it arrived over this surface.</em></p><p>Every other property here is a <strong>guarantee</strong>, but this one is <strong>evidence</strong>. It’s the answer to “prove it” for a compliance auditor, an incident responder, or a regression test. It’s also the only part of the system that <em>accumulates</em>.</p><p>If there’s anything that sticks from this pattern, I hope it’s this. Feel free to do the whole “define once, render four ways” trick however you’d like, that part’s copyable in a weekend.</p><h3>The human form is a peer, not an afterthought</h3><p>One last piece before we wrap this up. The form a human fills out is derived from the <em>same</em> schema the LLM’s tool definition is derived from: same fields, same required flags, same enums, same confirm behavior. It’s not downstream of the API, it’s a <em>sibling</em> of it. Add a field to the capability and it shows up in the LLM tool, the MCP tool, the REST contract, <em>and</em> the form, <strong>in one change</strong>. The human path and the agent path can’t drift, because they’re the same definition wearing different faces (facets).</p><p>And if you’re thinking “but generative UI is going to eat the hand-built form,” well, maybe, but this pattern doesn’t really care. A generative renderer still needs a typed, governed contract to generate against and a single chokepoint to submit through, or it’s just another ungoverned surface inventing its own copy of “is this destructive, may this actor do it.”</p><p>The cool thing here was never the rendered form. It’s the governed contract any renderer can bind to.</p><p>So that’s the Multi-Surface Architecture: the semantic layer’s old idea — define once, project everywhere, never drift — dragged out of the reporting world and pointed at your operations, riding on a typed command bus, with governance welded into a single ordered pipeline so that authorization, the effect ceiling, confirmation, and audit are properties of the shape rather than conventions each surface is trusted to re-implement.</p><p>It’s a big idea, but hopefully this seems more familiar and approachable. If you squint long enough at “a capability is a descriptor plus a handler, and the cross-cutting stuff lives in one pipeline,” you’ll notice it’s just your controller turned inside out.</p><p>In <a href="https://open.substack.com/pub/ctannerdev/p/making-the-move-from-mvc-to-multi?r=7z048t&amp;utm_campaign=post&amp;utm_medium=web">Part 3</a>, we’ll walk through how to make the move, one controller action at a time.</p><p><em>Next — </em><a href="https://open.substack.com/pub/ctannerdev/p/making-the-move-from-mvc-to-multi?r=7z048t&amp;utm_campaign=post&amp;utm_medium=web"><em>Part 3: Making the Move: From MVC to Multi-Surface.</em></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dae260238b4f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What Are We Building?]]></title>
            <link>https://ctannerdev.medium.com/what-are-we-building-eca7d6d8527b?source=rss-69ed18b84ce5------2</link>
            <guid isPermaLink="false">https://medium.com/p/eca7d6d8527b</guid>
            <category><![CDATA[software-architecture]]></category>
            <category><![CDATA[mvc]]></category>
            <category><![CDATA[mcp-server]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[ai]]></category>
            <dc:creator><![CDATA[Chris Tanner]]></dc:creator>
            <pubDate>Fri, 31 Jul 2026 11:54:32 GMT</pubDate>
            <atom:updated>2026-08-02T00:27:12.632Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Part 1 of 3 — The Multi-Surface Architecture</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ncvTv_4kvDXT-r83.png" /><figcaption>Until recently, our apps have been primarily built for two surfaces.</figcaption></figure><p>I’ve been doing this coding thing for almost 20 years, and these days I rarely find myself excited by new ideas.</p><p>It’s hype-fatigue more than anything. So many oversold technologies, frameworks, and packages that end up going unmaintained before they meet their potential. But every so often there’s an idea my brain refuses to let go of, and I’ve learned to listen to that.</p><p>The shift I feel coming, as everything and everyone becomes more AI-enabled, is away from transforming <em>how</em> we build things and toward transforming <em>what</em> we build. And while we’re starting to see inklings pop up in <a href="https://arxiv.org/abs/2606.28679">corners of the internet</a> around governing these AI-enabled surfaces, I don’t think the industry has arrived at just what to call this.</p><h3>The “how” is basically solved</h3><p>Coding assistance is table stakes. Build-an-app-in-an-hour is a weekend demo. Automated code review, test generation, refactors on request — all of it is real, all of it is shipping, and none of it is interesting anymore in the way it was eighteen months ago. The tooling that changed <em>how</em> we produce software has largely arrived. It works. We adapted.</p><p>Now we’ve all gone MCP-crazy, and it’s changing how we actually use the internet. Are we still going to Jira, Sentry, or Google Docs to pull the information we need for our deliverables? Are we even opening PowerPoint other than to spot-check how Claude assembled the deck?</p><p>How are people actually <em>consuming</em> the thing we built? As it’s creator, how do we <em>expose</em> what our software can do, now that the consumer might not be a person at all?</p><blockquote>So let’s ask the uncomfortable question: if the highest-growth consumer of our software never sees our interface, <strong>what are we actually building?</strong></blockquote><p>That’s the question this series is about. Three parts:</p><ol><li><strong>What Are We Building?</strong> (we’re here)</li><li><strong>The Multi-Surface Architecture: Not Your Grandma’s Semantic Layer</strong></li><li><strong>Making the Move: From MVC to Multi-Surface</strong></li></ol><h3>MCP moved the target</h3><p>I realized one day that navigating SaaS apps was <strong>too much work</strong>. Clicking around felt slow, and felt so <em>manual</em>.</p><p>Enter MCP (and the broader agent-tooling wave around it), which gave models a path <em>around</em> the browser, and straight to the data and the operations. The agent doesn’t load our page. It doesn’t parse our nav. It calls a tool.</p><p>Now look back at the work we’ve been doing. We spent months on a slick UI. Careful empty states, a component library, motion, the whole thing. An agent asked to “pull up my three most overdue invoices and email the customers” never sees a pixel of it. If it <em>did</em> somehow get our rendered markup, the first thing the model does is throw most of it away to clear its context window. Our beautiful DOM is noise to the one consumer that’s growing fastest.</p><p>So let’s ask the uncomfortable question: if the highest-growth consumer of our software never sees our interface, <strong>what are we actually building?</strong></p><blockquote>…throw away the interface entirely, let the model generate whatever surface it wants per request. It’s seductive, and it’s a trap.</blockquote><h3>So what are our options?</h3><p>In a normal line of sight, I’m not sure I see anything convincing.</p><p><strong>Wrong answer #1: AI summaries on top of an traditional SaaS product.</strong> Bolt a chat box in the corner, pipe some retrieval behind it, ship “✨ AI.”</p><p>Yawn.</p><p>The architecture underneath didn’t move an inch (if anything, it got <em>worse</em>). We’ve painted a smart layer onto a product that’s still fundamentally a pile of pages and endpoints built for a human with a mouse. It demos well but it ages badly, because the moment a user wants the assistant to <em>do</em> something (not summarize, <em>act</em>), we discover the assistant has no safe, uniform way to reach our operations. It’s decoration, not architecture.</p><p><strong>Wrong answer #2: the fully prompt-driven UI.</strong> The other extreme: throw away the interface entirely, let the model generate whatever surface it wants per request. It’s seductive, and it’s a trap.</p><p>The trap here is governance. A generative surface that invents its own screen every time also has to answer, every time, <em>is this action destructive? may this specific user do it right now? does it need a confirmation?</em> If those questions live inside the generated UI, we’ve re-implemented the most security-critical logic in our system in the least reliable place.</p><p>An ungoverned surface reinventing authorization per screen is not the future. It’s an incident waiting for a date with the on-call team.</p><p><strong>Wrong answer #3: Traditional stacks (trad-stacks?).</strong> In a classic MVC app, one operation (ex. “submit an evaluation,” “refund a charge”) is spread across a route, a controller, a form request, a policy, a model, a view. Seems normal.</p><p>The problem is that we rebuild that <em>entire column</em> every time we add a new way to reach the operation. Web form: one column. Mobile API: another column. Partner integration: another. And now, an AI agent, which is just another surface, except MVC was never designed for a caller that picks its own actions from natural-language input (that an attacker might have written).</p><p>Each new door is another full implementation of the same operation, and every copy is a chance for the validation, the permissions, and the “are you sure?” to drift apart. The problem here though: <strong>drift isn’t superficial</strong>. When one of those copies is the one an autonomous agent talks to, the drift is a <em>security issue</em>.</p><blockquote>What if we could just define it once, and reuse it everywhere, on <em>any</em> surface?</blockquote><h3>So where do we go from here?</h3><p>If it’s not summaries-on-a-SaaS, not a prompt-driven free-for-all, and <em>definitely</em> not MVC — what is it?</p><p>Well, let’s start by doing an inventory of what is true today. Our application is expected to answer to <em>several kinds of callers at once</em>, all performing the same underlying operations:</p><ul><li>an autonomous <strong>LLM</strong> loop that decides which tool to call,</li><li>an <strong>MCP</strong> client someone pointed at us from their own assistant,</li><li>a plain <strong>REST</strong> caller (a script, a partner, a batch job),</li><li>and a <strong>human</strong> at a form, same as ever.</li></ul><p>That’s four doors into the same house, which today probably looks like four separate implementations. But the operation behind them (“create this contact,” “refund this charge”) is <em>one</em> thing. The surfaces are just different ways of asking for it.</p><p>What if we could just define it once, and reuse it everywhere, on any surface?</p><p>That’s the pattern we’re going to get into. An app whose capabilities are served <em>identically</em> across agent surfaces (LLM/MCP), programmatic surfaces (REST), and human surfaces (UI), from <strong>one definition</strong>, behind <strong>one governed pipeline</strong>.</p><p>This is what I’ve started calling it a <strong>Multi-Surface Architecture</strong>. Before Single-Page Applications (“SPAs”), a web app was just a pile of server-rendered pages, but the name gave the ecosystem (routers, state libraries, build tools) a coherent target to organize around. For SPAs, the name came <em>after</em> the pattern, but it’s what made the pattern buildable. With the departure we’re witnessing from anything resembling traditional development (and the consumption of it’s output), I think we’ll soon be due for a new way to talk about it.</p><p>If there’s something I love about coding and architecture, it’s simplicity. The elegance of simple, expressive solutions always gets me. And I think that’s why the ideas we’re going to talk about here have stuck with me recently: the answer is <em>radically simple</em>.</p><p>This isn’t a new framework category or a novel abstraction nobody’s seen. It’s a rebirth of a pattern a lot of us already know. It’s the one that’s been solving exactly this “define it once, don’t let the definitions drift” problem in a completely different corner of the industry for years. But now we’re pointing it at <em>operations</em>.</p><p>It’s the <strong>semantic layer</strong> — but not the one you’re thinking of, and not where you’re used to seeing it. In Part 2, we’ll dive in.</p><p>Coding assistants changed <em>how</em> we build. The next shift changes <em>what</em> we build, and I think “what we build” turns out to be <em>capabilities</em>, defined once, with the doors coming for free.</p><p>Who doesn’t like free?</p><p><em>Next — Part 2: The Multi-Surface Architecture: Not Your Grandma’s Semantic Layer.</em></p><p><em>Originally published at </em><a href="https://ctannerdev.substack.com/p/part-1-what-are-we-building?r=7z048t"><em>https://ctannerdev.substack.com</em></a><em> on July 31, 2026.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=eca7d6d8527b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Elegantly cascade and sync Laravel model properties with DeepSync]]></title>
            <link>https://ctannerdev.medium.com/elegantly-cascade-and-sync-laravel-model-properties-with-deepsync-04a1afc54f2e?source=rss-69ed18b84ce5------2</link>
            <guid isPermaLink="false">https://medium.com/p/04a1afc54f2e</guid>
            <category><![CDATA[php]]></category>
            <category><![CDATA[laravel]]></category>
            <category><![CDATA[open-source]]></category>
            <category><![CDATA[laravel-11]]></category>
            <category><![CDATA[polymorphism]]></category>
            <dc:creator><![CDATA[Chris Tanner]]></dc:creator>
            <pubDate>Wed, 02 Oct 2024 21:23:41 GMT</pubDate>
            <atom:updated>2024-10-02T21:23:41.823Z</atom:updated>
            <content:encoded><![CDATA[<p>Recently, a project my team was building ran into the need to cascade and sync one of our shared model properties across complex polymorphic relationships. Since we couldn’t find a previously-solved solution in Laravel’s vast open source community, and with the business requirement still pressing, I decided to build one.</p><h3>Enter DeepSync</h3><p><a href="https://github.com/c-tanner/laravel-deep-sync">DeepSync</a> allows you to add minimal markup with powerful results. With the addition of Attributes in PHP 8, this becomes incredibly elegant. Let’s take a look at an example:</p><pre>#[ObservedBy([DeepSync::class])]<br>class User extends Model<br>{<br>    use HasFactory;<br>    use SoftDeletes;<br><br>    protected $fillable = [<br>        &#39;name&#39;,<br>        &#39;is_active&#39;<br>    ];<br><br>    // Properties that trigger DeepSync<br>    public $syncable = [&#39;is_active&#39;];<br><br>    #[SyncTo]<br>    public function posts(): HasMany<br>    {<br>        return $this-&gt;hasMany(Post::class, &#39;author_id&#39;);<br>    }<br>}</pre><p>Here, all we’re doing is adding 3 lines of code:</p><ul><li>Add the model observer to the class in the standard Laravel way</li><li>Add a $syncable array of model properties you want to sync with other models</li><li>Annotate the class method(s) with the #[SyncTo] attribute to indicate which downstream relationships should <em>sync to</em> changes in $syncable values</li></ul><p>Now, in our Post model:</p><pre>#[ObservedBy([DeepSync::class])]<br>class Post extends Model<br>{<br>    use HasFactory;<br>    use SoftDeletes;<br><br>    protected $fillable = [<br>        &#39;title&#39;,<br>        &#39;body&#39;,<br>        &#39;author_id&#39;,<br>        &#39;is_active&#39;<br>    ];<br><br>    // Properties that trigger DeepSync<br>    public $syncable = [&#39;is_active&#39;];<br><br>    #[SyncFrom]<br>    public function user(): BelongsTo<br>    {<br>        return $this-&gt;belongsTo(User::class, &#39;author_id&#39;);<br>    }<br>}</pre><p>The only difference here is that our users() relationship method is annotated with the #[SyncFrom] attribute, indicating that it should sync it’s values <em>from</em> the User model.</p><p>And that’s it. Now, when a User changes it’s is_active value, all related Posts will follow suit.</p><p>This example follows a one-to-many relationship, but DeepSync supports any type of polymorphic relationship. More on that below, where we talk about homogeneity.</p><h3>So how does it work?</h3><p>First, it’s important to understand the mechanisms by which DeepSync can be triggered:</p><ul><li>On save() or update(), when an attribute in the syncable array changes</li><li>On delete() , which will cascade deletes (and soft-deletes) across relationships</li></ul><ol><li>When one of the above events occurs, DeepSync uses reflection to find all methods tagged with #[SyncTo] and fetches the related “child” items.</li></ol><pre>private function reflector(Model $model, string $attributeClass): Collection<br>{<br>    $relatedItems = [];<br><br>    collect(<br>        // Get the model&#39;s public methods<br>        (new \ReflectionClass($model))<br>            -&gt;getMethods(\ReflectionMethod::IS_PUBLIC)<br>    )<br>        -&gt;filter(function (\ReflectionMethod $method) use ($attributeClass) {<br>            // Filter the method list by the requested attribute<br>            return $method-&gt;getAttributes($attributeClass);<br>        })<br>        -&gt;each(function ($method) use ($model, &amp;$relatedItems) {<br>            // Compile the list of items using the model method<br>            $methodName = $method-&gt;name;<br>            $relatedItems = [<br>                ...$relatedItems,<br>                ...$model-&gt;$methodName()-&gt;get()<br>            ];<br>        });<br>        <br>    return collect($relatedItems);<br>}</pre><p>2. The children then have all of their “parents” collected (methods marked with #[SyncFrom] in the child models), and the parent values are checked for homogeneity. If one parent does not share the same value (or, is not deleted), the child is not affected.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*nJhLrQt2eiCNBnk8exrkbw.png" /><figcaption>Example of homogeneity. The parent Task will not update it’s syncable property value until all related Subtask values are homogenous. Note that this parent/child relationship is the inverse of what we just talked about. We’ll get to that part.</figcaption></figure><p>3. If a child is updated/deleted and also uses DeepSync attributes, the process continues recursively, with the child’s state change also triggering DeepSync. This process continues down (or up!) the tree until all related records are in sync.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/750/1*eFdZwjdzyNT5GZyC3ka-Zw.png" /><figcaption>Cascading deletion event. Values sync recursively as far as DeepSync attributes are defined.</figcaption></figure><h3>Why not bulk updates/deletes?</h3><p>One commonly misunderstood aspect of model events in Laravel is that they do not trigger on bulk updates (i.e. $posts-&gt;whereIn(&#39;id&#39;, [1,2,3])...). The reasoning here is pretty simple: when you issue commands like this, the models aren’t actually retrieved, you’re effectively just executing a SQL statement. From the <a href="https://laravel.com/docs/5.3/eloquent#updates">docs</a>:</p><blockquote>When issuing a mass update via Eloquent, the saved and updated model events will not be fired for the updated models. This is because the models are never actually retrieved when issuing a mass update.</blockquote><p>No model, no event, nothing to observe.</p><h3>Omnidirectional cascades</h3><p>What you may have picked up on is that the use of “parent” and “child” is confusing, and that’s important. DeepSync relationships are inherently decoupled from Eloquent relationships, meaning they can operate in any direction. To me, this is really cool. Let’s take a real-world use case with Task and Subtask:</p><pre>#[ObservedBy([DeepSync::class])]<br>class Task extends Model<br>{<br>    use HasFactory;<br>    use SoftDeletes;<br><br>    protected $fillable = [<br>        &#39;name&#39;,<br>        &#39;is_complete&#39;<br>    ];<br><br>    public $syncable = [&#39;is_complete&#39;];<br><br>    #[SyncFrom]<br>    public function subtasks(): HasMany<br>    {<br>        return $this-&gt;hasMany(Subtask::class);<br>    }<br>}</pre><p><strong>Note that our “parent” Task class uses </strong><strong>#[SyncFrom] here.</strong></p><pre>#[ObservedBy([DeepSync::class])]<br>class Subtask extends Model<br>{<br>    use HasFactory;<br>    use SoftDeletes;<br><br>    protected $fillable = [<br>        &#39;name&#39;,<br>        &#39;is_complete&#39;,<br>        &#39;task_id&#39;<br>    ];<br><br>    public $syncable = [&#39;is_complete&#39;];<br><br>    #[SyncTo]<br>    public function task(): BelongsTo<br>    {<br>        return $this-&gt;belongsTo(Task::class);<br>    }<br>}</pre><p>Both our Task and Subtask models share a common property, is_complete. We want to automatically update that value on the <em>parent</em> Task only when all <em>child</em>Subtask is_complete values are the same. All subtasks complete means the Task will also be complete.</p><p>Diagrams and words are cool, but let’s see it in action:</p><pre>public function test_reverse_sync()<br>{<br>    $task = Task::factory()-&gt;has(<br>        Subtask::factory(3)-&gt;state(<br>            function(array $attributes, Task $task) {<br>                return [<br>                    &#39;task_id&#39; =&gt; $task-&gt;id<br>                ];<br>            }<br>        )<br>    )-&gt;create();<br><br>    $this-&gt;assertEquals(1, Task::count());<br>    $this-&gt;assertEquals(3, Subtask::count());<br>    $this-&gt;assertEquals(3, Task::find($task-&gt;id)-&gt;subtasks()-&gt;count());<br><br>    // Task only becomes complete when all subtasks are complete<br>    <br>    $subtask1 = Subtask::find(1);<br>    $subtask1-&gt;update([&#39;is_complete&#39; =&gt; 1]);<br><br>    $this-&gt;assertEquals(0, Task::find($task-&gt;id)-&gt;is_complete);<br><br>    $subtask2 = Subtask::find(2);<br>    $subtask2-&gt;update([&#39;is_complete&#39; =&gt; 1]);<br><br>    $this-&gt;assertEquals(0, Task::find($task-&gt;id)-&gt;is_complete);<br><br>    $subtask3 = Subtask::find(3);<br>    $subtask3-&gt;update([&#39;is_complete&#39; =&gt; 1]);<br><br>    $this-&gt;assertEquals(1, Task::find($task-&gt;id)-&gt;is_complete);<br>    <br>}</pre><pre>$ ~/laravel-deep-sync: vendor/bin/phpunit --testsuite=Feature --colors=always         <br>PHPUnit 11.3.6 by Sebastian Bergmann and contributors.<br><br>Runtime:       PHP 8.3.11<br>Configuration: /Users/christanner/Code/laravel-deep-sync/phpunit.xml<br><br>.                                                                   1 / 1 (100%)<br><br>Time: 00:00.238, Memory: 38.50 MB<br><br>OK (1 test, 6 assertions)</pre><p>Sweet.</p><p>This is my first Laravel package, and first solo contribution to OSS after many years of software development, leading engineering teams, and using great software from others. I have a deep admiration for everyone in open source, and am extremely happy to give back to the community. I sincerely hope this package helps out at least one person or team who faced the same challenges we did.</p><p>If you have ideas, questions, or issues, let’s chat. Cheers.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=04a1afc54f2e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Better Sprint Planning Through the Volatility Index (VI)]]></title>
            <link>https://ctannerdev.medium.com/better-sprint-planning-through-the-volatility-index-vi-5af16b12bdc8?source=rss-69ed18b84ce5------2</link>
            <guid isPermaLink="false">https://medium.com/p/5af16b12bdc8</guid>
            <category><![CDATA[volatility]]></category>
            <category><![CDATA[sprint-planning]]></category>
            <category><![CDATA[agile]]></category>
            <category><![CDATA[performance-management]]></category>
            <category><![CDATA[agile-methodology]]></category>
            <dc:creator><![CDATA[Chris Tanner]]></dc:creator>
            <pubDate>Wed, 21 Apr 2021 14:45:57 GMT</pubDate>
            <atom:updated>2021-04-22T01:44:56.799Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aOz8YmXXkepiKV5FBEAlKg.jpeg" /><figcaption>Pictured: Your team’s Sprint capacity over time</figcaption></figure><h3>Introduction</h3><p>If you’re like many Agile teams that work on abstract or greenfield projects filled with unknowns, landmines, rotating team members, or business-side counterparts that seemingly have the goalposts strapped to their back as they try to set a world record in the 500m (just kidding, they’re doing their best), “Sprint Planning” can be trigger words.</p><p>Having worked on teams ailed with these issues, it became near-impossible to accurately point user stories and plan our Sprints with any sort of accuracy. Not only did this state of flux deal a blow to team morale over time, but it created the issue of not allowing us to calculate deadlines with any certainty.</p><p>We needed a better way, and thus the Volatility Index was born.</p><p>The Volatility Index (VI) is a <strong>supplemental</strong> metric I began experimenting with and developing two years ago that can be leveraged to better plan, understand, and compensate for the inherent variability in a multitude of Agile processes. In essence, the VI is a measurement of “the unknown within” or “the uncertainty of” — and can relate to individual user stories, overall sprint performance, or the delta in contribution of individual team members over time.</p><blockquote>In essence, the VI is a measurement of “the unknown within” or “the uncertainty of” — and can relate to individual user stories, overall sprint performance, or the delta in contribution of individual team members over time.</blockquote><h3>Implementation</h3><h4>For User Stories / Tickets</h4><p>In practice, the VI is measured on either a numerical or contextual basis (1–5, low/med/high, etc). The assignment of the index can then be used to supplement existing metrics (priority, ticket size, etc) in order to better determine the “readiness” of the ticket.</p><p>For example, a ticket with a high VI may need additional discovery, and may be prioritized lower in the backlog compared to tickets of similar priority / scope / relevance that have a lower VI (i.e. are more “ready” or “understood”).</p><p>The VI can also be used to help make better capacity planning decisions. For example, a 2-point ticket with high VI may be treated as a 3-point ticket in terms of capacity planning, as the VI suggests that there are many unknowns around scope and/or deliverability. The VI can therefore be used to “pad” sprint capacities.</p><p>It should be noted that, in these use cases, the VI for a particular ticket can change over the course of the sprint. Depending on a team’s use-case, it may be beneficial to track deltas in overall volatility to be able to say, “How fast did we ‘close the gaps’ in knowledge / scope around our tickets?” With that said, a “static” approach to VI assignment may work better for some teams.</p><h4>For Overall Sprint Performance</h4><p>In order to utilize the Volatility Index to measure overall sprint performance, we compare committed points versus completed points per sprint. By following the formula below, we can determine the volatility of our planning efforts:</p><blockquote><em>PD = |C</em>ᵢ<em> - A</em>ᵢ₊₁<em>| + |C</em>ᵢ₊₁<em> - A</em>ᵢ₊₂<em>| + |C</em>ᵢ₊₂<em> - A</em>ᵢ₊₃<em>| + …</em></blockquote><p>Where Performance Delta <em>PD</em> is the sum of the absolute values of the differences between the committed points <em>C</em> and actual points <em>A</em>.</p><p>We can then either use the absolute value, or convert to percentage to use as our scale in determining the VI.</p><p>For the following example, we’ll use a simple scale to determine volatility where “LOW” represents a differential between 0–3, “MEDIUM” 4–7, and “HIGH” represents 8+.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/9d556360e346c25d07a44ca5d17ca94b/href">https://medium.com/media/9d556360e346c25d07a44ca5d17ca94b/href</a></iframe><h4>For Individual Performance</h4><p>In a similar vein to measuring overall sprint performance, the VI can be used as a supplemental metric to manage individual performance over time. In this use case, each individual is assigned a VI that changes over time. An individual’s VI is determined by the number of contributing points they complete during each sprint.</p><p>Example:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/247dbf68e55861c4421205dc3d3e247c/href">https://medium.com/media/247dbf68e55861c4421205dc3d3e247c/href</a></iframe><p>In this example, Bob’s contribution over time is highly variable from sprint to sprint, with a Performance Delta of 6 points. Performance Delta can be calculated using the following formula where Performance Delta <em>PD</em> is equal to the absolute value of the difference of point value contributions <em>C</em> between subsequent sprints:</p><blockquote><em>PD = |C</em>ᵢ<em> - C</em>ᵢ₊₁<em>| + |C</em>ᵢ₊₁<em> - C</em>ᵢ₊₂<em>| + |C</em>ᵢ₊₂<em> - C</em>ᵢ₊₃<em>| + …</em></blockquote><p><strong>Bob = |2-5| + |5-2| = 6 (High Volatility)</strong></p><p>Similarly, Sally’s consistent contribution equates to a Low Volatility rating:</p><p><strong>Sally = |3-3| + |3-3| = 0 (Low Volatility)</strong></p><p>Finally, Jane ends up with a VI of 3:</p><p><strong>Jane = |3-2| + |2-4| = 3 (Medium Volatility)</strong></p><p>Obviously, you will need to define the number of sprints you are summing and keep this constant, as this will in turn inform the range of what is determined “High”, “Medium”, and “Low” volatility, but this is intentionally left vague as to be adaptable to more teams / Agile structures.</p><p>Using this method, we can inform our capacity planning and assignments. The goal here is to be able to accurately and reliably predict the contributions of individuals, and therefore measure future capacity, while also knowing the limits of individual team members when assigning tasks.</p><p>It may also be useful in correcting velocity issues or managing an individual’s performance over time. It’s important to keep in mind that a high VI is not necessarily a negative performance indicator, as VI will be high when a team member’s contribution is steadily increasing. This is purely an information metric, and should be taken into consideration with existing performance indicators. The goal here is simply to maintain consistency when at all possible.</p><h3>Conclusion</h3><p>As with all things Agile, not all teams have the ability (or need) to integrate every methodology or framework. This method has proven most useful to teams who regularly deal with ambiguity in their work to better inform their planning process.</p><p>If you have any questions around the Volatility Index or implementation, please feel free to reach out.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5af16b12bdc8" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>