<?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 Mark Gibbons on Medium]]></title>
        <description><![CDATA[Stories by Mark Gibbons on Medium]]></description>
        <link>https://medium.com/@markgibbons25?source=rss-9359dffbca97------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*bmIw_J9j4xVGq7OB2zj92w.jpeg</url>
            <title>Stories by Mark Gibbons on Medium</title>
            <link>https://medium.com/@markgibbons25?source=rss-9359dffbca97------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 30 Nov 2026 13:20:51 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@markgibbons25/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[Managing Decision Fatigue in AI Driven Work]]></title>
            <link>https://markgibbons25.medium.com/managing-decision-fatigue-in-ai-driven-work-0119cb24f9ed?source=rss-9359dffbca97------2</link>
            <guid isPermaLink="false">https://medium.com/p/0119cb24f9ed</guid>
            <category><![CDATA[software-development]]></category>
            <dc:creator><![CDATA[Mark Gibbons]]></dc:creator>
            <pubDate>Thu, 02 Jul 2026 02:40:47 GMT</pubDate>
            <atom:updated>2026-07-02T02:40:47.703Z</atom:updated>
            <content:encoded><![CDATA[<p>Let’s talk about an age-old developer problem: getting interrupted mid-task. If you’ve been doing this job for more than a few years you know the feeling — you’re deep in a problem, holding half the codebase in your head, and someone taps you on the shoulder. Poof. Gone. <a href="https://www.sciencedirect.com/science/article/abs/pii/S0747563216304654">Previous research</a> famously pegged the recovery time at around 23 minutes per interruption, which honestly sounds about right to me.</p><p>You’d think AI coding tools would have improved this. Hand the grunt work to an agent, protect your focus for the hard stuff, right?</p><p>Here’s what I’ve noticed instead: the interruptions didn’t go away, they changed source. It used to be Slack, meetings, or the classic shoulder tap. Now it’s you. Developers can become their own worst enemies, and this can lead to burnout and delegation of important decisions to AI, unless it is recognised early and carefully managed.</p><h3>The prompt-and-wait gap</h3><p>The problem lives in the gap between sending a prompt and reading what comes back. Ten seconds, ninety seconds, sometimes a few minutes. It’s a weird dead zone — too short to start anything meaningful, and sitting there staring at a spinning icon just feels wasteful.</p><p>So what do we do? Check Slack. Glance at email. Or the really tempting one: open another terminal and kick off a second agent on something completely unrelated. I mean, why not, right? The first agent is busy, you’re just sitting there, might as well be productive.</p><p>Except none of this registers as an interruption, because you did it to yourself. There was no notification, no shoulder tap. It feels like using dead time well. But <a href="https://andre-meyer.ch/the-work-life-of-developers-activities-switches-and-perceived-productivity/">research following developers around in their actual work</a> found they rate their most productive days as the ones with the <em>fewest</em> context switches. Not the busiest days. The calmest ones. Running three parallel agent sessions feels productive while matching the exact pattern developers themselves describe as a bad day.</p><p>Interestingly, self-interruption isn’t even new. <a href="https://www.sciencedirect.com/science/article/abs/pii/S0747563216304654">A paper from back in 2005</a> found that roughly half of workplace interruptions were self-initiated, and they interestingly found that external interruptions are more expensive than interrupting yourself. The issue is we’ve now got tooling around a gap that invites it, dozens of times a day.</p><p>The defences we spent fifteen years building don’t work on this. Do-not-disturb, closed door, snoozed notifications — all of that intercepts things coming from <em>outside</em>. There’s no setting that stops you from alt-tabbing during an agent run.</p><h3>Your real job now is making decisions</h3><p>Here’s the bit I think maybe hasn’t sunk in for some people: the role has shifted. <a href="https://markcassidyconsulting.com/blog/engineering-resistance-to-ai/">This post from Mark Cassidy is excellent.</a> We’re not really programmers anymore, not in the keystrokes sense. Most of the day is now judgement calls — what should the agent build, is what it built actually right, what’s next. The typing was never the bottleneck. The deciding is.</p><p>And decision-making ability is finite. The exact mechanism is <a href="https://www.psychbizinc.com/post/decision-fatigue-theory-evidence-and-practical-implications">still argued about in the research</a> (the original “ego depletion” theory has taken some hits in replication), but the practical pattern is well established: decision quality drops as the day wears on, and tired people start accepting defaults without checking them. <a href="https://www.nature.com/articles/s41598-022-14682-0">Judges, doctors, parole boards</a> — same story everywhere.</p><p>Now here’s the kicker. Deciding whether to check Slack during an agent’s think-time is a decision. A tiny one, but it comes out of the same budget as “does this refactor actually do what I asked for?” Burn the budget on rubbish micro-decisions all morning and there’s less left for the calls that actually matter. That’s the real cost of the self-interruption habit — it’s not just scattered attention, it’s spending your scarcest resource on questions that weren’t worth asking.</p><h3>The burnout loop, and why it makes you a worse reviewer</h3><p>This has a mental health angle too, and it’s not a small one. Frequent context switching has been <a href="https://www.cannelevate.com.au/article/context-switching-productivity-hidden-cost-modern-work/">linked to burnout in knowledge workers independent of actual workload</a> — and it’s a loop, because burnout then eats the cognitive capacity you need to manage your tasks well, which leads to more fragmentation. Round and round.</p><p>The part that should worry you professionally: fatigue changes how you review agent output. There’s a <a href="https://pmc.ncbi.nlm.nih.gov/articles/PMC3240751/">whole body of research on automation bias</a> showing that people under higher cognitive load lean harder on automated output and verify less, because accepting is cheaper than checking. Sound familiar? It’s 4:30pm, you’ve been ping-ponging between four agent threads since lunch, a diff comes back, it <em>looks</em> fine… approve. Prompt fatigue is real, and a prompt-fatigued developer is exactly the one who blindly accepts the model’s work.</p><p>That’s when this stops being a personal energy problem and becomes a delivery problem. The code most likely to ship without a proper review is the code produced in exactly the state this habit creates.</p><h3>What I actually do about it</h3><p>None of this means ditching the agents. It means being deliberate about the gap. What’s been working for me:</p><ul><li><strong>Stay in the same problem space.</strong> If the gap tempts you to switch, switch to something <em>related</em> to what you’re already on. Don’t start an unrelated deep-work session — that’s a full context switch dressed up as productivity. Short shallow stuff (a one-line Slack reply, approving a small PR) is fine filler. A fresh design problem is not.</li><li><strong>Write the tangent down, don’t chase it.</strong> Agent output constantly surfaces related tasks and “oh we should also…” moments. Jot them in a notes file and keep moving. They’ll still be there in twenty minutes.</li><li><strong>Batch the review.</strong> Read the agent’s output in one proper pass rather than peeking at progress every fifteen seconds. The peeking is just self-interruption with extra steps.</li><li><strong>Cap concurrent sessions.</strong> One, maybe two unrelated threads max. Every extra thread is another mental model you have to rebuild on each switch.</li><li><strong>Delegate the thinking, keep the verifying.</strong> It’s genuinely fine to hand real thinking to an agent — scoping, first-pass design, exploratory refactors. Feel safe doing that, it’s the whole point. But it only works if you’ve protected enough decision-making capacity to properly check what comes back. If you notice fatigue doing the approving instead of you, that’s your cue to stop for the day, not to push through another three diffs.</li></ul><p>The tools changed, the fundamentals didn’t. Flow state still needs protecting — it’s just that the thing you’re protecting it from is now sitting in your own chair.</p><p>Make your own mental health your number one priority and you’ll hopefully find that your work life balance will improve.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0119cb24f9ed" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[LLM Cheat Sheet]]></title>
            <link>https://markgibbons25.medium.com/llm-cheat-sheet-398ebe04f2a1?source=rss-9359dffbca97------2</link>
            <guid isPermaLink="false">https://medium.com/p/398ebe04f2a1</guid>
            <category><![CDATA[llm]]></category>
            <dc:creator><![CDATA[Mark Gibbons]]></dc:creator>
            <pubDate>Wed, 24 Jun 2026 22:00:31 GMT</pubDate>
            <atom:updated>2026-06-24T22:00:31.604Z</atom:updated>
            <content:encoded><![CDATA[<p>I saw a recent post on X that called out a well known software engineer for not knowing how LLM’s actually work. And I realised, you know what? I’ve been using LLM’s for over a year now and I don’t really know how they work either!</p><p>So I did some reading into it and found that while most things I had picked up or intuited, there were definitely some useful learnings that really help understand LLM’s, their limitations, what they’re good at, and how to use them better.</p><p>I’ve distilled that knowledge into this Cheat Sheet, and I have ensured it is useful for any audience, not just software engineers.</p><h3>Definitions</h3><p>Let’s start with some definitions and key concepts as these are foundational.</p><p><strong>Large language model (LLM).</strong> A type of AI system trained to predict text. Given some text, it produces the most fitting continuation, one chunk at a time. Everything an LLM does — answering questions, writing code, summarizing documents — is a form of that one operation. Claude, ChatGPT, and Gemini are all LLMs.</p><p><strong>Token.</strong> The unit an LLM reads and writes. A token is roughly a word-piece: common words are usually a single token, while rarer words split into several. The model never sees letters or words exactly as you do — it sees sequences of tokens. This matters in practice, because length limits and usage costs are all measured in tokens, not words, and unusual text (code, other languages, long names) fragments into more tokens than you’d expect.</p><p><strong>Parameters (or weights).</strong> The billions of numbers, learned during training, that encode everything the model “knows.” They are fixed once training ends. Talking to a model does not change its weights.</p><p><strong>Training.</strong> The process that produces those parameters. The model is shown vast amounts of text and repeatedly tries to predict the next token; each wrong guess nudges its parameters toward a better one. Done across trillions of tokens, this is how the model absorbs grammar, facts, and reasoning patterns. Training happens once, before you ever use the model, and ends at a fixed cutoff date.</p><p><strong>Context window.</strong> The maximum amount of text the model can take in at one time. Your instructions, the conversation history, any files the model has opened, and the response it’s generating all share this single budget. If something isn’t in the window, the model has no access to it.</p><p><strong>Attention.</strong> The mechanism the model uses to decide what matters. As it reads, it weighs every token against every other token to work out which ones are relevant to what it’s generating. Attention is what lets the model connect a pronoun to the right noun or a question to the relevant detail — and because that weighing is spread across everything in the window, a fuller window means thinner, less reliable attention.</p><p><strong>Inference.</strong> The act of running a trained model to produce output — what happens every time you send a message. It is distinct from training, which happened once, beforehand.</p><p><strong>Harness.</strong> The software wrapped around the model that turns a raw text predictor into a usable tool. The model itself only reads a window and emits tokens; the harness is everything else — it assembles what goes into the window, gives the model tools it can call (search, running code, reading files), executes those calls, and feeds the results back in. A chat app and a coding assistant use the same kind of underlying model; the difference in what they can do is largely a difference in harness.</p><h3>Key concepts</h3><h4>Learning happens once, before you ever use it</h4><p>An LLM is built in a massive training phase. The model is shown enormous quantities of text and plays one relentless game: predict the next token. Each time it guesses wrong, its parameters are nudged slightly toward a better guess. Repeated across trillions of tokens, this process forces the model to internalize grammar, facts, reasoning patterns, and styles — not because anyone programmed those rules, but because predicting text accurately <em>requires</em> picking them up.</p><p>A second stage shapes the model’s behavior: it’s tuned, with human and automated feedback, to be helpful, to follow instructions, and to decline harmful requests. This changes how the model <em>acts</em>, not what it fundamentally <em>knows</em>. A well-mannered model can still be confidently wrong, because its knowledge all came from that first phase.</p><p>The practical consequence: a model’s knowledge is frozen at its training cutoff date. It has no built-in awareness of anything that happened afterward — recent events, new software versions, today’s prices — unless it can reach out through a tool such as web search.</p><h4>Inference is pattern completion over a window</h4><p>When you send a message, the model reads everything currently in its context window and produces the most plausible continuation, token by token. Two things follow from this, and they explain most of what people find puzzling.</p><p>First, <strong>the model has no memory between turns.</strong> It re-reads the entire window every single time it responds. The “memory” you experience in a conversation is simply the transcript being present and read again. The reliable way to give the model something is to make sure it’s in the window — in your prompt, in a file the model opens, or in a persistent project file that loads automatically at the start of a session.</p><p>Second, <strong>attention is shared across everything in the window.</strong> The model weighs every token against every other token to decide what matters — this mechanism, called attention, is the heart of how modern LLMs work. But that weight is finite and spread across the whole window. As the window fills up, earlier instructions carry less force, and quality tends to soften well before the window is technically full. A focused window keeps the model sharp; a cluttered one dilutes it.</p><h3>Fluency is not truth</h3><p>Because the model generates the most plausible continuation, its output is smooth and confident regardless of whether it’s correct. Fluency reflects how well text fits learned patterns; truth is a separate property those patterns don’t guarantee. When a model produces something that sounds right but isn’t, it’s often called a <em>hallucination</em> — and it’s a feature of the mechanism, not a bug waiting to be patched. The tone of an answer tells you nothing about its accuracy.</p><h3>Thinking is just more tokens</h3><p>A model can only generate tokens, so giving it room to generate intermediate working-out before the final answer measurably improves results on hard, multi-step problems. Those reasoning tokens become part of what the model reads as it continues, letting it build toward an answer instead of committing to one immediately. This helps on genuinely structured problems — complex logic, tricky debugging, careful analysis — and adds little to simple, single-step tasks.</p><h3>Extending what the model can do</h3><p>A bare model only reads a window and emits tokens. Everything beyond that — reaching live data, following your team’s process, taking real actions — comes from the harness around it. Skills and MCPs are the next thing you need to know about.</p><p><strong>MCP (Model Context Protocol)</strong> is about <em>access</em>. It’s an open standard for connecting a model to external systems — files, databases, APIs, a code host, a chat tool. An MCP server exposes a set of tools the model can call, and the harness handles the calls and feeds results back into the window. If a task needs a live connection to something outside the model, MCP is the layer that provides it.</p><p><strong>Skills</strong> are about <em>knowledge</em> — specifically, procedural know-how. A skill is a small folder containing a set of instructions that teaches the model how to do a particular task well: your code-review standards, a document-formatting routine, a deployment checklist. The useful design detail is how they load. Only a short description sits in the window by default; the full instructions are pulled in only when the task actually calls for them. This <em>progressive disclosure</em> keeps the window focused — which, given everything above about attention, is exactly the point. A skill is best thought of as the onboarding guide you’d hand a new hire, written once and reused.</p><h3>Guidelines</h3><p>Everything above reduces to one idea: you are working with a pattern-completer that has a finite, attention-limited working memory and no guarantee of truth. These guidelines all follow from that.</p><p><strong>Put what matters into the window.</strong> Don’t rely on the model to remember or infer context it can’t see. State your constraints, paste the relevant material, and point the model at the right files. Anything important should be present and easy to find.</p><p><strong>Keep the window focused.</strong> On the other hand, only include what is relevant. Irrelevant material dilutes attention and accelerates the drop in quality. When you start a genuinely new task, start a fresh session or chat so the model gets a clean, well-weighted space to work in.</p><p><strong>Verify the important parts.</strong> Treat confident output as a strong draft, not a final answer. Leverage tests, checkpoints, known correct examples as a way to tell the model if the output is correct or not. Especially anything that requires arithmetic calculations — check the transcript to see that it didn’t just <strong>guess </strong>the answer, it actually called a tool / command / script to do the calculation.</p><p><strong>Ask the model to look things up when recency matters.</strong> For current events, the latest versions, or anything time-sensitive, prompt the model to search or use a tool. Given real sources, it answers from solid ground instead of reconstructing from frozen memory.</p><p><strong>Plan before building on anything large.</strong> For multi-file or unfamiliar work, having the model map its approach first costs a few minutes and saves the much larger cost of confidently building the wrong thing. (Many coding assistants offer a dedicated plan mode for exactly this.) Work you can describe in a single sentence is fine to do directly.</p><p><strong>Match effort to the task.</strong> Let the model reason at length on hard, multi-step problems where the working-out earns its keep. Keep things light and fast for trivial requests, where extra deliberation adds nothing.</p><p><strong>Course-correct early.</strong> Because each turn builds on the window, catching a wrong direction quickly keeps the context clean and the reasoning on track. When a path has truly gone bad, a clean reset with a sharper prompt — one that folds in what you just learned — beats piling correction on top of correction.</p><h3>Give the model something to check itself against</h3><p>The deepest version of verification isn’t something you do after the fact — it’s something you hand the model up front, so it can correct itself.</p><p>Recall the core problem: the model produces fluent output with no built-in sense of whether it’s right. Left on its own, it has nothing to push against; one plausible-but-wrong step just leads to the next. What changes everything is giving it an <em>external oracle</em> — an objective check it can run and read the result of. Because that result lands back in the window, the model can see its own failure and revise, turning a one-shot guess into a loop that converges on something correct.</p><p>The two most useful oracles are tests and known-good examples.</p><p><strong>Tests.</strong> A failing test is unambiguous in a way prose never is. When the model can run a test suite, it gets a hard signal — pass or fail, with the exact error — that it can iterate against without you in the loop. This is why describing the desired behavior as tests, or asking the model to write tests before the implementation, is so effective: you’ve handed it a ground truth to aim at and a way to know when it’s hit it. The same logic extends to anything with a checkable result — a script that must run, output that must match a schema, a build that must succeed.</p><p><strong>Known-good examples.</strong> When there’s no test to run, a worked example does similar work. A sample input paired with its correct output, a reference implementation, or a “here’s what good looks like” snippet gives the model a concrete target to match rather than a vague instruction to interpret. Examples pin down intent far more reliably than description alone, and they let the model compare its work against a standard instead of inventing one.</p><p>The shared principle: don’t rely on the model to judge its own correctness from the inside. Give it an outside reference — a test that fails loudly, an example it can measure against — and you convert a confident guesser into a system that can find and fix its own mistakes.</p><h3>Choice of model</h3><p>Before starting some new work, do some research via Google or even ask a model itself about what model is best suited to your particular task.</p><p>Each model will have a suite of benchmarks available to show where it excels and where it lacks compared to other models.</p><p>The most powerful “frontier” models from Claude and OpenAI are fairly well rounded, but depending on your budget they can quickly use up their quotas / limits.</p><h3>Further learning</h3><p>I would actually recommend to just ask your LLM further questions for anything that you don’t understand or that you want to dive deeper into. That’s mostly how I wrote this post in the first place. Open to feedback on this one! Thanks for reading.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=398ebe04f2a1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[One Optimizer Is Better Than Two: Choosing an Image Optimization Pipeline for Your Headless Site]]></title>
            <link>https://markgibbons25.medium.com/one-optimizer-is-better-than-two-choosing-an-image-optimization-pipeline-for-your-headless-site-2a348346f6f9?source=rss-9359dffbca97------2</link>
            <guid isPermaLink="false">https://medium.com/p/2a348346f6f9</guid>
            <category><![CDATA[sitecore]]></category>
            <dc:creator><![CDATA[Mark Gibbons]]></dc:creator>
            <pubDate>Wed, 10 Jun 2026 03:29:08 GMT</pubDate>
            <atom:updated>2026-08-18T09:21:48.052Z</atom:updated>
            <content:encoded><![CDATA[<p>Images are usually the heaviest raw data on any page, so optimising image size, delivery and caching is very important. In a headless setup built on Sitecore and Next.js, you have two capable image optimizers sitting right next to each other. Sitecore can resize, crop, and compress media on its own delivery endpoint, and Next.js has its own next/image pipeline that does much the same thing closer to the visitor. Each can work on its own, but don’t use both at once.</p><h3>Why two optimizers fight each other</h3><p>The problem is subtle because nothing throws an error or looks particularly off. Look closer, though, and the details are soft, edges are mushy, and fine text inside a graphic loses its crispness.</p><p>What is happening is a double optimization. When a Sitecore media URL already carries its own sizing instructions, it serves an image that has been resized and recompressed once. Next.js then receives that already-shrunken, already-lossy image, treats it as the original source, and resizes and compresses again — sometimes scaling the smaller image back up to fill a layout slot. The artifacts from the first pass become the raw material for the second, and there is no recovering the detail the first pass already threw away. It is the imaging equivalent of photocopying a photocopy.</p><h3>The fix is to pick one</h3><p>The cleanest mental model is this: one source of truth for the original image, and exactly one optimizer that resizes it.</p><p>You have two options. <strong>Let Sitecore optimize:</strong> its media handler produces the right dimensions and format, and you hand those finished URLs straight to the browser while deliberately bypassing the framework’s optimizer so it never re-touches the bytes. The only catch here is that if you’re using Experience Edge you do have significantly different behaviour if you’re serving from Experience Edge or from Preview (the CM server itself).</p><p>Or <strong>let the framework optimize:</strong> strip the platform’s sizing instructions from the media URL so it serves the full-resolution original, and let next/image do all the resizing and compression from a pristine source.</p><p>Both are valid. What matters is that you choose, and that the layer you did not choose gets out of the way entirely.</p><h3>The benefits of Next.js</h3><p>I recommend letting Next.js’s <a href="https://nextjs.org/docs/pages/api-reference/components/image">Next Image</a> do the heavy lifting here.</p><p>next/image is designed around responsive delivery. Give it the original image and a description of how big it will actually appear, and it generates a full srcset for you — a ladder of widths so a phone downloads a small variant and a large display downloads a larger one. You stop shipping one compromise size to everyone.</p><p>The power here is the sizes prop. The srcset tells the browser which widths exist; sizes tells it how much space the image will occupy at each breakpoint. Without an accurate sizes value, the browser assumes the image spans the entire viewport and reaches for the largest variant it can find — which is exactly how a small icon ends up downloading a several-thousand-pixel-wide file and being squeezed back down into a tiny box. Describe the real layout, and the browser requests a variant that matches the space, saving bytes and staying sharp. This is where most of the practical wins live.</p><p>And when you deploy to Vercel, the same code you write locally is automatically enhanced in production: optimized variants are generated on demand and cached at the edge, close to your visitors, with no separate image service to stand up.</p><p>But, it’s not a free option on Vercel.</p><p>Vercel charges you three times for this model, image optimisation requests, cache writes, and orgin data transfer. If you have plenty of head room on your Vercel billing, no worries, but this can be a significant cost issue for some.</p><p>Also a mention - complexity around cache invalidation if an author ever decides to directly update an asset with no url change, so you can’t cache assets for too long to try and improve cache hits that way without a good cache invalidation process, something I haven’t been able to figure out yet.</p><h3>What it looks like in practice</h3><p>First, s<strong>erve the original</strong> — remove any width, height, or sizing tokens the platform appended to the media URL, since this is what prevents the double pass. <strong>Describe the layout</strong> — always provide a sizes value that reflects how wide the image really renders; treat a missing sizes as a bug, not a default. <strong>Tune quality where it counts</strong> — sit a little above the framework&#39;s default, and push flat graphics and line art higher still, since artifacts show up far more readily on solid colors and sharp edges than on photographs.</p><p>I’d recommend creating a base SitecoreImageWrapper.tsx component that all image rendering uses which implements the above logic.</p><h4>Caveats on the Sitecore approach</h4><p>Experience Edge supports resizing and some basic optimisation parameters, but it naively ignores your browsers Accept header so it won’t return avif or webp if your browser supports it. It also has no quality parameter, all requests are the same quality. For me those are deal breakers, but you get caught between a rock and a hard place if you are having issues with Vercel billing.</p><h3>The takeaway</h3><p>Two image optimizers in one pipeline is not twice as good; it is half as sharp. Decide which layer owns optimization, make the other pass the image through untouched, and you get back both quality and predictability. For most headless builds, the framework is the better owner — responsive srcset, the precision of sizes, and, on Vercel, edge-cached optimization you get simply by writing ordinary image code. One optimizer, one source of truth, one sharp result.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2a348346f6f9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Sitecore Serialization CLI — improving performance via smarter configuration structure]]></title>
            <link>https://markgibbons25.medium.com/sitecore-serialization-cli-improving-performance-via-smarter-configuration-structure-cf20711c5dbc?source=rss-9359dffbca97------2</link>
            <guid isPermaLink="false">https://medium.com/p/cf20711c5dbc</guid>
            <category><![CDATA[sitecore]]></category>
            <dc:creator><![CDATA[Mark Gibbons]]></dc:creator>
            <pubDate>Wed, 03 Jun 2026 01:57:31 GMT</pubDate>
            <atom:updated>2026-06-03T02:17:30.634Z</atom:updated>
            <content:encoded><![CDATA[<h3>The module split that barely moved the needle (and the one-line trace flag that explained why)</h3><p>I have been building a SitecoreAI solution that serves five sites (and counting) out of one content tree, plus a shared content branch the sites all draw from. For a long time I serialized the whole thing through a <strong>single</strong> Sitecore Content Serialization (SCS) module — one *.module.json with about 18 includes covering templates, renderings, settings, and site configuration items.</p><p>dotnet sitecore ser pull took around 30 seconds. push around the same. Every time, for any change, no matter how small. Too slow! Time to investigate!</p><h3>Step 1: Split the module</h3><p>After stewing on it for some time, I asked Claude to break the single module into one module per site, plus a common module for the shared project items (templates, layouts, renderings, workflows, the collection root, roles):</p><pre>src/serialization/<br>  common/    common.module.json     (Common)<br>  shared/    shared.module.json      (Shared-site)<br>  site-a/    site-a.module.json      (SiteA-site)<br>  site-b/    site-b.module.json      (SiteB-site)<br>  site-c/    site-c.module.json      (SiteC-site)<br>  site-d/    site-d.module.json      (SiteD-site)<br>  site-e/    site-e.module.json      (SiteE-site)<br>  global/    global.module.json      (Global)</pre><p>Claude then benchmarked it properly, rather than trusting a gut feel — five pulls and five pushes, averaged, against the old single-module layout checked out from git, hitting the same database both times:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/582/1*NjqmoUaNOyM7LvmWuFVucQ.png" /></figure><p>So pulls came down about <strong>17%</strong> — a real, repeatable improvement, and not nothing. But push actually drifted the wrong way, and the run-to-run variance inside a single five-run set (pulls ranged 18.9–23.4 s) was nearly as wide as the gap between the two layouts. I’d gone in expecting the split to be transformative, and what I got was a modest trim on one half of the operation.</p><p>That mismatch is the interesting bit. If carving the tree into eight modules only buys 17% on pull and a slight regression on push, then the cost of these operations clearly isn’t dominated by how the items are <em>grouped</em>. So what is it dominated by?</p><h3>Step 2: Turn on the trace flag</h3><p>dotnet sitecore ser pull has a -t / --trace flag that prints &quot;more additional diagnostic and performance data.&quot; Sounds good, so I let Claude at it. It&#39;s noisy — over 300 lines for my tree — but it breaks the operation into phases with timings, and that&#39;s exactly what I needed. Here&#39;s the whole pull, boiled down:</p><pre>FSIndex:   Loaded filesystem indices in 1,980ms (4,517 metadatas)<br>SCIndex:   Loaded Sitecore subtrees in 20,587ms (34,100 metadatas)<br>Prefetched 38,617 nodes.<br>Discovered 0 changes after evaluating 4,517 total items.   (346ms)<br>Synced 1 trees in 21,109ms</pre><p>Two numbers jumped out.</p><p>The first is where the time actually goes. Reading 4,517 files off disk (FSIndex) takes 2 seconds, and computing the diff takes a third of a second. Everything else — <strong>97.5% of the wall clock</strong> — is SCIndex, fetching item metadata from the CM over GraphQL. The client and the filesystem aren&#39;t the bottleneck; the server round-trip is, by a mile.</p><p>The second number is the one that actually explained everything: <strong>34,100 metadatas loaded, 38,617 nodes prefetched — to keep 4,517.</strong> I was pulling metadata for roughly <strong>8.5× more items than I serialize</strong>, then throwing about 88% of it away. The per-request timings made it concrete — the slowest single GraphQL request took <strong>18.4 seconds</strong>, and a handful of 17–18s requests gated the whole run.</p><p>And there’s the answer to why the split underwhelmed. Splitting items into modules doesn’t change how many nodes the server has to enumerate — it’s the same tree whichever way you slice the config. The 17% I got on pull was real, but it was a rounding error next to the thing I should have been attacking.</p><h3>Step 3: Find the over-fetch</h3><p>Where do 34,000 phantom nodes come from when you only serialize 4,500? A scoped pull made it obvious. Tracing a single site:</p><pre>pull -i SiteA-site<br>  SCIndex:   3,730ms (8,336 metadatas)<br>  Prefetched 8,747 nodes.<br>  Discovered 0 changes after evaluating 411 total items.</pre><p>That site serializes <strong>411</strong> items, and SCS enumerated <strong>8,747</strong> to find them — a 21× over-fetch on one site alone. What makes it especially galling is that the site serializes <em>zero</em> author pages: its Home is a SingleItem, and all the actual website content lives underneath Home.</p><p>The culprit was the predicate shape. Every site looked like this, and the shape isn’t something I invented — it comes straight from Sitecore’s own <a href="https://developers.sitecore.com/learn/accelerate/xm-cloud/appendix-ii/example-code/template-module-json">Accelerate Cookbook “template module.json” example</a>, which is the de facto starting point for XM Cloud site serialization:</p><pre>{<br>  &quot;name&quot;: &quot;SiteA&quot;,<br>  &quot;path&quot;: &quot;/sitecore/content/&lt;tenant&gt;/SiteA&quot;,<br>  &quot;scope&quot;: &quot;ItemAndDescendants&quot;,<br>  &quot;rules&quot;: [<br>    { &quot;path&quot;: &quot;/Home&quot;,         &quot;scope&quot;: &quot;SingleItem&quot; },<br>    { &quot;path&quot;: &quot;/Data&quot;,         &quot;scope&quot;: &quot;ItemAndChildren&quot; },<br>    { &quot;path&quot;: &quot;/Presentation&quot;, &quot;scope&quot;: &quot;ItemAndDescendants&quot; },<br>    { &quot;path&quot;: &quot;/Settings&quot;,     &quot;scope&quot;: &quot;ItemAndChildren&quot; },<br>    { &quot;path&quot;: &quot;*&quot;,             &quot;scope&quot;: &quot;Ignored&quot; }     // &lt;-- the trap<br>  ]<br>}</pre><p>The intent reads perfectly: take the whole subtree, but ignore everything except these named branches. The catch is <em>when</em> that *: Ignored rule gets applied. Because the root scope is ItemAndDescendants, SCS asks the server for the <strong>entire subtree</strong> — including every author-created page under /Home — and only <em>then</em> runs the rules client-side to decide what to keep. The ignore rule trims the output; it does nothing to trim the query. So on every single pull I was hauling each site&#39;s full page tree across the wire just to discard it on arrival.</p><p>I want to be fair to the Accelerate template here: it’s a sensible, readable default, and on a young site with a dozen pages this over-fetch is completely invisible. It only starts to hurt once /Home has quietly grown into thousands of author pages — which is exactly what happens to a site that&#39;s been live for a while.</p><h3>Step 4: Root the includes below /Home</h3><p>The fix is to stop rooting at the site node. Instead of one ItemAndDescendants include with a catch-all ignore, I use <strong>one include per first-level branch I actually serialize</strong>, and the branches I don&#39;t want simply never appear as includes:</p><pre>&quot;includes&quot;: [<br>  { &quot;name&quot;: &quot;SiteA&quot;,        &quot;path&quot;: &quot;.../SiteA&quot;,              &quot;scope&quot;: &quot;SingleItem&quot; },<br>  { &quot;name&quot;: &quot;Home&quot;,         &quot;path&quot;: &quot;.../SiteA/Home&quot;,         &quot;scope&quot;: &quot;SingleItem&quot; },<br>  { &quot;name&quot;: &quot;Media&quot;,        &quot;path&quot;: &quot;.../SiteA/Media&quot;,        &quot;scope&quot;: &quot;SingleItem&quot; },<br>  { &quot;name&quot;: &quot;Data&quot;,         &quot;path&quot;: &quot;.../SiteA/Data&quot;,         &quot;scope&quot;: &quot;ItemAndChildren&quot; },<br>  { &quot;name&quot;: &quot;Dictionary&quot;,   &quot;path&quot;: &quot;.../SiteA/Dictionary&quot;,   &quot;scope&quot;: &quot;ItemAndDescendants&quot; },<br>  { &quot;name&quot;: &quot;Presentation&quot;, &quot;path&quot;: &quot;.../SiteA/Presentation&quot;, &quot;scope&quot;: &quot;ItemAndDescendants&quot;, &quot;rules&quot;: [ ... ] },<br>  { &quot;name&quot;: &quot;Settings&quot;,     &quot;path&quot;: &quot;.../SiteA/Settings&quot;,     &quot;scope&quot;: &quot;ItemAndChildren&quot;,<br>      &quot;rules&quot;: [ { &quot;path&quot;: &quot;/Site Grouping&quot;, &quot;scope&quot;: &quot;Ignored&quot; },<br>                 { &quot;path&quot;: &quot;/Standard Values&quot;, &quot;scope&quot;: &quot;Ignored&quot; } ] },<br>  { &quot;name&quot;: &quot;Settings-Site-Grouping&quot;,   &quot;path&quot;: &quot;.../Settings/Site Grouping&quot;,   &quot;scope&quot;: &quot;ItemAndDescendants&quot; },<br>  { &quot;name&quot;: &quot;Settings-Standard-Values&quot;, &quot;path&quot;: &quot;.../Settings/Standard Values&quot;, &quot;scope&quot;: &quot;ItemAndDescendants&quot; }<br>]</pre><p>Now Home is a SingleItem include, so the server is never asked for its descendants. The page tree is never enumerated, because nothing roots above it with descendant scope.</p><p>Two things tripped me up along the way, worth passing on:</p><ul><li><strong>A rule’s scope can’t exceed its include’s root scope.</strong> SCS rejects a config where, say, a Settings include scoped ItemAndChildren has a Standard Values rule scoped ItemAndDescendants. That&#39;s why Site Grouping and Standard Values ended up as their own includes, with Ignored rules in the parent so they aren&#39;t double-counted — and so the deep Settings descendants I never wanted (like Form Submission Settings/*) stay excluded, exactly as before.</li><li><strong>Include names map to folders on disk.</strong> Splitting one include into nine relocates the serialized .yml files into per-branch folders. It&#39;s a one-time churn in the repo, and it&#39;s unavoidable if you want the speedup — the rules run <em>after</em> the query, so there&#39;s no server-side &quot;exclude this subtree&quot; you can bolt onto the old shape.</li></ul><h3>The results</h3><p>Here’s the same trace after the change:</p><pre>pull -i SiteA-site<br>  SCIndex:   839ms<br>  Prefetched 411 nodes.          (was 8,747)<br>  Discovered 0 changes after evaluating 411 total items.</pre><p>Exactly 411 nodes fetched for 411 items kept — zero over-fetch. And crucially, the serialized output is the same set down to the item: Claude verified every module by diffing the item paths before and after the change.</p><pre>site-a:  IDENTICAL ✓ (411 items)<br>site-b:  IDENTICAL ✓ (314 items)<br>site-c:  IDENTICAL ✓ (270 items)<br>site-d:  IDENTICAL ✓ (427 items)<br>site-e:  IDENTICAL ✓ (428 items)<br>shared:  IDENTICAL ✓ (709 items)</pre><p>Across the whole tree, SCIndex dropped from <strong>34,100 metadatas to 4,517</strong> — a 7.5× reduction in server work. The full pull came down from ~21 s to ~12 s (still bouncy, because the CM/SQL container&#39;s GraphQL latency is the floor now). And additionally, a real day-to-day payoff for scoped operations:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/838/1*5SUiRDnLtS36O4xSumsp9Q.png" /></figure><h3>Lessons</h3><p>A few things I took away from this one:</p><ol><li><strong>The module split wasn’t wrong, just not enough.</strong> It bought a modest 17% on pull and, more importantly, it’s what makes scoped operations possible — and that’s where the real savings turned out to live. But grouping alone can’t fix a predicate that over-queries, because it doesn’t change what the server has to enumerate.</li><li><strong>-t to validate.</strong> I wasted time on a benchmark cycle proving a hypothesis the trace would have settled in a single run.</li><li><strong>ItemAndDescendants + </strong><strong>*: Ignored is a quiet performance trap.</strong> It&#39;s a lovely way to express <em>what to keep</em> and a terrible way to express <em>what to fetch</em>. If the branch you&#39;re ignoring is a big author content tree, you pay full freight for it on every sync. Root your includes at the branches you actually serialize.</li><li><strong>Optimise the layer that’s actually slow.</strong> 97.5% of my time was one GraphQL phase. The filesystem, the diff, the number of modules — none of it mattered, and the trace told me so before I’d written a line of new config.</li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cf20711c5dbc" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[SitecoreAI Forms — What I learned on a real-world implementation]]></title>
            <link>https://markgibbons25.medium.com/sitecoreai-forms-what-i-learned-on-a-real-world-implementation-23f89a9199a7?source=rss-9359dffbca97------2</link>
            <guid isPermaLink="false">https://medium.com/p/23f89a9199a7</guid>
            <category><![CDATA[sitecore]]></category>
            <dc:creator><![CDATA[Mark Gibbons]]></dc:creator>
            <pubDate>Thu, 21 May 2026 03:05:41 GMT</pubDate>
            <atom:updated>2026-05-21T03:05:41.331Z</atom:updated>
            <content:encoded><![CDATA[<p>In a recent Sitecore XP to SitecoreAI rebuild for a large client, we chose to use SitecoreAI Forms as a replacement for their existing Sitecore XP Forms solution.</p><p>The client had hundreds of forms, mostly fairly simple “enquiry” style marketer forms across their 8 websites. These types of marketing forms are usually ideal for off-the-shelf form builder products as they are usually fairly simple, can be templatized, and just need minor variations and configuration of submission handling.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wHQwvF9mO8iNgK_gK9Xshw.png" /><figcaption>SitecoreAI Design Library</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UdCbKBzRMDt07UDZbZM9sw.png" /><figcaption>SitecoreAI Form Builder</figcaption></figure><h4>Features of SitecoreAI Forms</h4><ul><li>The brand-new Form Builder makes creating forms fast and easy, with instant preview across mobile and desktop breakpoints. Fully WYSIWYG.</li><li>It’s backed by Sitecore’s <a href="https://doc.sitecore.com/sai/en/developers/sitecoreai/bring-your-own-components.html">BYOC</a> / Design Library technology which means it feels like a native component on your site (once you’ve applied your brand styling). No iFrames which is a key differentiator from most other form products out there.</li><li>Has a pretty comprehensive suite of form field components — everything you could want for simple and medium complexity forms.</li><li>There is no form submission saving mechanism out of the box — you have to configure form submissions to go somewhere, and that somewhere is fully composable. You can build your own API endpoint that processes the form submissions or use a 3rd party SaaS service.</li><li>Native Sitecore Page Builder support in terms of seeing your form library and adding a form to a page.</li><li>Reliability looks good — I’ve not noticed any outages on the front-end and SitecoreAI Forms are backed by the standard SitecoreAI Cloud SLAs. The Form Builder app did go down for a few hours briefly earlier in the year but that was part of a major migration Sitecore’s side so we’ve put that down to a one-off.</li></ul><h4>Pain Points</h4><p>Of course, no product is perfect, especially a relatively new one. Here’s some issues we have encountered.</p><ul><li>Conditional rendering seems to be full featured on the surface but a key use case that is not supported currently is being able to show/hide standard Rich Text fields and the form Submit Button itself. The use case is that depending on options selected in an Enquiry Type dropdown, we wanted to show a content block to direct users to another page and prevent them from submitting the current form. I have requested this as a feature via Sitecore Support — ref DESIGNLIB-4116.</li><li>File Uploads are decent; files are uploaded to a Sitecore Azure Blob Storage container. However, they only stay there for 60 minutes so if you need the file for longer than that, you have to copy the file to your own storage.</li><li>Copying forms between environments and restricting them to be able to be added to certain sites on an environment is easy. However, there is nothing preventing forms being packaged up as part of a Sitecore content package and installed on other environments. What I would like to see here is configurability of Webhooks</li><li>There’s no easy way to see what forms are using which Webhooks. You have to go form by form and see what Webhook is configured. I’d love to see a report on each Webhook of which forms are using it. Our client has hundreds of forms so manually going form by form is very painful.</li><li>There’s no easy way to see what pages are using which forms. This is sort of doable via a custom SPE script, but I’d expect it to be part of the product.</li><li>There’s no way to hide the form totally on completion and just show a CTA block. Your options are to show a success message (which just resets the form) or redirect to a new page.</li></ul><h4>Official extension points</h4><p>It would be nice to have more docs on official extension points. We were able to add custom hidden fields as we needed for business logic by adding window.addEventListener(‘form:engage’, ...) logic as documented <a href="https://doc.sitecore.com/sai/en/users/sitecoreai/create-custom-events-for-webhooks.html">here</a>, also things like swapping out icons on the File Upload field.</p><p>Theoretically I’d say we could use this to add custom validators or customise fields, but I’ve not done that yet, a little worried that over time such changes would break if things change on Sitecore’s side.</p><p>It would also be good for guidance on what css classes can be overridden. We wanted to style forms via our Tailwind based design system, so have targeted classes like .form-input-element , but there is a risk these could change in the future.</p><h4>Form Submission Handling</h4><p>Our client had fairly complex requirements about form submissions, requiring submissions to go to different CRMs or inboxes depending on the site and page, and even down to Enquiry Type selection on specific forms.</p><p>To handle this, we built a custom API endpoint and made the configuration available in Sitecore. Without going too much into detail, an author could set a Form ID and configure what actions to take for that form’s submissions.</p><h4>Conclusion</h4><p>Overall, I am fairly happy with the product, and so is the client, it is production ready, but by addressing some of the above friction points and improving extensibility I’m sure it could become truly outstanding.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=23f89a9199a7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building Content Approval Workflows in Sitecore AI]]></title>
            <link>https://markgibbons25.medium.com/building-content-approval-workflows-in-sitecore-ai-6247c1076baf?source=rss-9359dffbca97------2</link>
            <guid isPermaLink="false">https://medium.com/p/6247c1076baf</guid>
            <category><![CDATA[sitecore]]></category>
            <dc:creator><![CDATA[Mark Gibbons]]></dc:creator>
            <pubDate>Sat, 09 May 2026 03:02:27 GMT</pubDate>
            <atom:updated>2026-05-09T03:02:27.870Z</atom:updated>
            <content:encoded><![CDATA[<p>Content governance is easy to ignore until it bites you: a wrong product name in a hero banner, a half-finished landing page going live, a legally-reviewed disclaimer quietly overwritten. Workflows exist to prevent these moments, and Sitecore AI gives you the tools to enforce a clear path from draft to published.</p><p>A workflow is a series of states that reflect how content gets made — typically creation, review, and approval. Sitecore’s <a href="https://doc.sitecore.com/sai/en/users/sitecoreai/workflows-and-the-workbox.html">Workflows and the Workbox</a> docs cover the fundamentals. What follows is a pattern that works well for small-to-medium teams. Larger teams will need extra steps, which we’ll touch on at the end.</p><h3>Pages vs. Datasources</h3><p>The first decision is whether to apply workflow to Page items only, or to both Pages and Datasource items. Page-only is simpler, but it leaves a gap: editors can change a component’s content without the page transitioning state, so changes can slip past review. Covering both closes that gap, but you’ll need a second, lightweight Draft → Approved workflow for datasources — you don’t want validation and notification emails firing on every component edit.</p><h3>Admin vs User accounts</h3><p>Worth remembering: administrators are effectively exempt from workflows. They can move items through any state and overwrite content regardless of where it sits. Drafts don’t get auto created.</p><p>So for that reason I actually recommend considering that users on the content team might need <strong>TWO SitecoreAI accounts</strong>! Their User account for day to day editing, and an Admin account which lets them do power-user tasks as required.</p><h3>A simple but effective setup</h3><p><strong>Page Workflow</strong> — assigned to all Page items across all sites.</p><ul><li><em>Draft</em> (initial): Submit → Awaiting Approval</li><li><em>Awaiting Approval</em>: Approve → datasource workflow action → Approved. Reject → Draft.</li><li><em>Approved</em> (final): triggers Auto Publish if enabled.</li></ul><p><strong>Datasource Workflow</strong> — assigned to all Datasource items across all sites.</p><ul><li><em>Draft</em> (initial)</li><li><em>Approved</em> (final)</li></ul><p>A note: don’t enable the Validation step as it can be a severe friction point, and workflow in general doesn’t need more friction.</p><h3><strong>Note about the Datasource Workflow item references</strong></h3><p>When editing a Page, the datasource workflow logic is that it will scan direct item references only. It will not dig for further references at the next level deep. For example, if a datasource has a Multi List field, the items referenced by the Multi List field will not move automatically through the workflow on approval.</p><h3>Scaling Up: Workflows for Large Teams</h3><p>Once you move past a handful of editors, the simple flow strains. Enterprise marketing teams, regulated industries, and global brands typically need multiple reviewers and work routed to specific people rather than a shared queue.</p><p>A large-team workflow might look something like Draft → Editorial Review → Brand/Legal Review → Approved, with distinct rejection paths between states — Legal might bounce back to Editorial rather than all the way to Draft. Role-based assignment is the other key piece: regional approvers for regional content, brand approvers for corporate identity, legal approvers for regulated claims. Map your editorial org chart to your content tree before you build.</p><h3>Other Use Cases</h3><p>A few adjacent scenarios use the same primitives. <strong>Scheduled campaign content</strong> benefits from a “Ready for Launch” state that holds approved pages until a publish date. <strong>Multilingual sites</strong> often run a parallel translation workflow per language, kicked off when the source page is approved. <strong>Compliance-sensitive content</strong> in finance, healthcare, or pharma may need an audit trail layered on top, capturing reviewer and timestamp data for regulators.</p><h3>Where to Go From Here</h3><p>Start simple. A working Draft → Awaiting Approval → Approved flow that everyone actually uses is worth far more than an elaborate one editors route around. Build the minimum, watch where it breaks down, and add states only when you have evidence they’re needed.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6247c1076baf" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Sitecore AI Search preview suggestion modes — where technical challenges and good UX meet]]></title>
            <link>https://markgibbons25.medium.com/sitecore-ai-search-preview-suggestion-modes-where-technical-challenges-and-good-ux-meet-30bda9014cc0?source=rss-9359dffbca97------2</link>
            <guid isPermaLink="false">https://medium.com/p/30bda9014cc0</guid>
            <category><![CDATA[sitecore]]></category>
            <category><![CDATA[sitecore-search]]></category>
            <dc:creator><![CDATA[Mark Gibbons]]></dc:creator>
            <pubDate>Mon, 17 Nov 2025 00:50:28 GMT</pubDate>
            <atom:updated>2025-11-17T00:50:28.527Z</atom:updated>
            <content:encoded><![CDATA[<h3>Sitecore AI Search preview suggestion modes — where technical challenges and good UX meet</h3><p>If you’re building with Sitecore AI Search, you might not realise that there are a lot of configuration modes available when it comes to preview suggestions.</p><p>This is outlined roughly in the documentation <a href="https://doc.sitecore.com/search/en/users/search-user-guide/understand-suggestions-blocks.html">here</a>, but I think it’s missing some further callouts.</p><p>There are two main modes for preview search results, <strong>Suggestion </strong>mode and <strong>Content </strong>mode.</p><h4><strong>Suggestion Mode Options</strong></h4><p>Suggestion mode has multiple options that can also be enabled, either individually or a combination of any of these.</p><ol><li>Sort by attribute — if a visitor clicks in the search bar but hasn’t yet typed anything, a Sort by attribute suggestions block can show top content items by the <strong>number of clicks</strong> over the last week. This is likely a good user experience for a global search bar where you don’t really want to take the current page context into account.</li><li>Context aware — create personalized auto-completion of search queries. What does this look like in practice? Say you have pages tagged as “Dinosaur Article”, if the user starts typing “din” then the autocomplete suggestion would be “Dinosaur Article”.</li><li>Edit distance — provide a <em>Did you mean…</em> typo correction experience. I don’t really see the UX value in this one especially when you have the Context aware option available.</li><li>Recent history — displays keywords previously searched for by the user. Self explanatory, but not sure exactly the use cases for this, perhaps could be used in conjunction with some of the other methods here.</li><li>keyphrase_fallback — Each of the above supports the keyphrase_fallback boolean parameter. When set to true, Search uses the first suggestion from the first suggestion block as an alternate keyword when there are no results for a search.</li></ol><h4><strong>Content Mode</strong></h4><ul><li>Content mode is the same as normal search results; these are actual results based on the search entered. This is useful if you want to simply list the actual results in-situ instead of any kind of suggestion.</li></ul><p>You can then further enable <a href="https://doc.sitecore.com/search/en/users/search-user-guide/understand-personalization.html">Personalisation</a>, or any custom Blacklist, Boost, Pin, or Bury rules via the <a href="https://doc.sitecore.com/search/en/users/search-user-guide/add-or-edit-widget-variations.html">Widget settings</a>.</p><h4>The Challenge</h4><p>Sitecore AI Search is a complex product, but when you take the time to understand all the options available, you can see how it will possibly be difficult to drive these features into your solution. This is because there is usually a disconnect in teams between the UX team and the development team.</p><p>Bridging the UX and development team during the design phase when it comes to implementing search is critical to ensure the best UX outcome.</p><p>So I’d recommend for your organisation if you are just starting out with Sitecore Search:</p><ol><li>A technical person such as an Architect or Senior Developer should go through the Sitecore Search for Business Users course on <a href="https://learning.sitecore.com/">https://learning.sitecore.com/</a></li><li>They should set up a POC website / area with all the OOTB basic Sitecore Search functionality that can then be used for future demo’s and POCs.</li><li>When it comes to implementing Sitecore Search, they need to work closely with the UX Design team and / or site Product Owner, ensuring they have a rough understanding on all the functionality available, and incorporate those into designs and user journeys. Plan to be iterative on this as there is a bit of trial and error involved.</li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=30bda9014cc0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Sitecore Datasource Item And Children Resolver]]></title>
            <link>https://markgibbons25.medium.com/sitecore-datasource-item-and-children-resolver-61d205224970?source=rss-9359dffbca97------2</link>
            <guid isPermaLink="false">https://medium.com/p/61d205224970</guid>
            <category><![CDATA[sitecore]]></category>
            <dc:creator><![CDATA[Mark Gibbons]]></dc:creator>
            <pubDate>Fri, 05 Sep 2025 00:17:13 GMT</pubDate>
            <atom:updated>2025-09-09T22:55:34.092Z</atom:updated>
            <content:encoded><![CDATA[<p>The XM Cloud compatible ways to retrieve the datasource item fields + child datasource item fields</p><p>The XM Cloud product team has made it very clear.</p><ul><li>DO NOT MODIFY THE LAYOUT SERVICE</li><li>DO NOT WRITE CUSTOM LAYOUT SERVICE PIPELINE PROCESSORS</li></ul><p>Stick to the above and future you will thank you.</p><p>So, a common requirement is to have a rendering, let’s say for example a Footer component, where you want to retrieve the datasource item, as well as any children of it.</p><p>Unfortunately, Sitecore haven’t ever added a rendering contents resolver OOTB for this. But we do have 4 good options.</p><h4>Option 1 — Sitecore Datasource Item And Children Resolver</h4><ol><li>Navigate to /sitecore/system/Modules/Layout Service/Rendering Contents Resolvers and find the Datasource Item Children Resolver.</li><li>Duplicate it and give it a name Datasource Item And Children Resolver.</li><li>Change the Item Selector Query to the following: ./descendant-or-self::*</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SaFgBs9gOv3Sebt_oTN_Tw.png" /></figure><p>4. Update your rendering to use this field</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/874/1*mDXsoRhgMuoh0iZqYQE9UA.png" /></figure><p>Your new GraphQL layout response will now have the data in the format:</p><p>fields: { items: [ Datasource Item, Child Item 1, Child Item 2, ... ] }</p><p>The down side of this method is the unusual structure, but once that is handled in a robust way it works well enough.</p><h4>Option 2 — Integrated GraphQL</h4><p><a href="https://doc.sitecore.com/xmc/en/developers/jss/latest/jss-xmc/integrated-graphql-in-jss-apps.html">https://doc.sitecore.com/xmc/en/developers/jss/latest/jss-xmc/integrated-graphql-in-jss-apps.html</a></p><p>This option is fine for simple queries like this. I have confirmed with the Sitecore product team that this technique is here to stay.</p><pre>    query ($datasource: String!, $language: String!) {<br>      datasource: item(path: $datasource, language: $language) {<br>        children(first: 90) {<br>          results {<br>            field(name: &quot;Link&quot;) {<br>              link: jsonValue<br>            }<br>          }<br>        }<br>        field(name: &quot;LogoImage&quot;) {<br>          logoImage: jsonValue<br>        }<br>        field(name: &quot;LogoLink&quot;) {<br>          logoLink: jsonValue<br>        }<br>      }<br>    }</pre><p>It is NOT good for things like site navigations. For that I’d recommend Option 3 below.</p><p>Another down side with this option is that it decouples your GraphQL code from your component which isn’t ideal from a code maintenance and reuse point of view.</p><h4>Option 3 —Custom GraphQL from getComponentServerProps/getStaticProps</h4><p><a href="https://doc.sitecore.com/xmc/en/developers/content-sdk/component-level-data-fetching-in-next-js-apps.html">https://doc.sitecore.com/xmc/en/developers/content-sdk/component-level-data-fetching-in-next-js-apps.html</a></p><p>This is the option I’d recommend for complex components such as Navigations. It keeps the data out of the layout service altogether, and for Navigations that can be a LOT of data, which really slows down publishing.</p><h4>Option 4 — Add child items via Placeholders</h4><p>But wait! There’s more!</p><p>This is one pointed out by Bas Lijten once he read this article. He says that if you add all the datasource items to the page, one by one, via <a href="https://doc.sitecore.com/xmc/en/developers/content-sdk/placeholders-in-content-sdk-apps.html">placeholders</a>, then this offers a lot more flexibility when it comes to Personalisation and A/B testing.</p><p>This makes a lot of sense — authors can quickly apply <a href="https://doc.sitecore.com/xmc/en/users/xm-cloud/create-a-page-variant.html">personalisation</a> or <a href="https://doc.sitecore.com/xmc/en/users/xm-cloud/create-an-a-b-n-test.html">A/B testing</a> rules to particular items instead of needing to duplicate whole trees of datasources which leads to a content maintenance issue.</p><p>The down side from a code point of view is the additional development effort of configuring the placeholders, setting restrictions on what can be added to those placeholders, and then writing tests that utilise the placeholders is an additonal layer of abstraction. So as with any of these options, it would be a case by case basis.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=61d205224970" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Sitecore XDB reindex not progressing past 95%]]></title>
            <link>https://markgibbons25.medium.com/sitecore-xdb-reindex-not-progressing-past-95-6e74ad542006?source=rss-9359dffbca97------2</link>
            <guid isPermaLink="false">https://medium.com/p/6e74ad542006</guid>
            <category><![CDATA[sitecore]]></category>
            <dc:creator><![CDATA[Mark Gibbons]]></dc:creator>
            <pubDate>Mon, 18 Aug 2025 00:10:17 GMT</pubDate>
            <atom:updated>2025-08-18T00:10:17.760Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/838/1*ujFdlaATg9ISWEGLokgd4A.png" /></figure><p>My team got this problem on a 10.2 XP production instance, after Sitecore Managed Cloud changed us over to their new Solr cluster.</p><pre>Stage: Finishing; Stage progress: 0.00%; Total progress: 95.00%<br>Stage: RebuildingIncomingChanges; Stage progress: 0.00%; Total progress: 85.00%.<br><br>It then stays like this indefinitely.<br>Logs are showing:<br><br>2025-07-18 05:40:47.361 +00:00 [Error] Failed indexing next set of changes. There will be an attempt to recover from the failure.<br>Sitecore.Xdb.Collection.Data.SqlServer.Exceptions.SqlDataProviderException: *** [xdb_collection.GetContactsChanges], Line 27. Errno 50000: Sync token is no longer valid for [Contacts] table. ---&gt; System.Data.SqlClient.SqlException: *** [xdb_collection.GetContactsChanges], Line 27. Errno 50000: Sync token is no longer valid for [Contacts] table.<br>at System.Data.SqlClient.SqlCommand.&lt;&gt;c.&lt;ExecuteDbDataReaderAsync&gt;b__180_0(Task`1 result)<br>at System.Threading.Tasks.ContinuationResultTaskFromResultTask`2.InnerInvoke()<br>at System.Threading.Tasks.Task.Execute()</pre><p>We tried to rebuild multiple times but always it would say at 95%.</p><p>After back and forth with Sitecore support for 3 months, they finally figured out the fix: change MaximumCommitMilliseconds setting to 1000 in the <em>\App_data\jobs\continuous\IndexWorker\App_data\Config\Sitecore\SearchIndexer\sc.Xdb.Collection.IndexWriter.SOLR.xml </em>file<em>.</em></p><p>Happy Sitecoreing!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6e74ad542006" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Setting up a custom grid definition in XM Cloud — making it easier]]></title>
            <link>https://markgibbons25.medium.com/setting-up-a-custom-grid-definition-in-xm-cloud-making-it-easier-c72b0e4285ab?source=rss-9359dffbca97------2</link>
            <guid isPermaLink="false">https://medium.com/p/c72b0e4285ab</guid>
            <category><![CDATA[sitecore]]></category>
            <dc:creator><![CDATA[Mark Gibbons]]></dc:creator>
            <pubDate>Wed, 16 Jul 2025 07:25:25 GMT</pubDate>
            <atom:updated>2025-07-16T07:25:25.356Z</atom:updated>
            <content:encoded><![CDATA[<h3>Setting up a custom grid definition in XM Cloud — making it easier</h3><p>Customizing the out of the box Grid Definitions is a common and fairly tedious step when building a new website.</p><p><a href="https://doc.sitecore.com/xmc/en/developers/xm-cloud/the-grid-settings.html">The out of the box definitions</a> are a good starting point but more than likely will be missing some configurability such as parameters for spacing, and you also might want to change the approach slightly.</p><p>So instead of going through dozens and dozens of individual settings for each breakpoint you want (and usually you’d have 6 breakpoints), here’s a script where you set up the base Mobile breakpoint as you want it, and then run the script which will copy it out for all the breakpoints you want.</p><pre># Run in Sitecore PowerShell ISE<br><br>$rootPath = &quot;master:/sitecore/system/Settings/Project/aceik-accelerator/Aceik Tailwind Grid Definition&quot;<br>$breakpoints = @(<br>    @{ Name = &quot;Small&quot;; Prefix = &quot;sm:&quot;; Min = &quot;640&quot;; Max = &quot;767.98&quot;; Tooltip = &quot;Small breakpoint&quot; },<br>    @{ Name = &quot;Medium&quot;; Prefix = &quot;md:&quot;; Min = &quot;768&quot;; Max = &quot;1023.98&quot;; Tooltip = &quot;Medium breakpoint&quot; },<br>    @{ Name = &quot;Large&quot;; Prefix = &quot;lg:&quot;; Min = &quot;1024&quot;; Max = &quot;1279.98&quot;; Tooltip = &quot;Large breakpoint&quot; },<br>    @{ Name = &quot;XL&quot;; Prefix = &quot;xl:&quot;; Min = &quot;1280&quot;; Max = &quot;1535.98&quot;; Tooltip = &quot;XL breakpoint&quot; },<br>    @{ Name = &quot;XXL&quot;; Prefix = &quot;xxl:&quot;; Min = &quot;1536&quot;; Max = &quot;&quot;; Tooltip = &quot;XXL breakpoint&quot; }<br>)<br><br>$extraSmallItem = Get-Item &quot;$rootPath/Extra Small&quot;<br><br>if ($null -eq $extraSmallItem) {<br>    Write-Host &quot;Extra Small breakpoint not found.&quot;<br>    return<br>}<br><br>$Sortorder = 0<br>foreach ($bp in $breakpoints) {<br>    $Sortorder = $Sortorder + 1<br>    $targetPath = &quot;$rootPath/$($bp.Name)&quot;<br>    if (Test-Path $targetPath) {<br>        #Write-Host &quot;Item $($bp.Name) already exists, skipping.&quot;<br>        #continue<br>        Remove-Item -Path $targetPath -Recurse -Permanently<br>    }<br><br>    # Copy Extra Small to new breakpoint<br>    Copy-Item -Path $extraSmallItem.ItemPath -Destination $targetPath -Recurse<br>    <br>    $item = Get-Item -Path $targetPath<br>    $item.Editing.BeginEdit()<br>    $item.Fields[&quot;BreakpointMin&quot;].Value = &quot;$($bp.Min)&quot;<br>    $item.Fields[&quot;BreakpointMax&quot;].Value = &quot;$($bp.Max)&quot;<br>    $item.Fields[&quot;Tooltip&quot;].Value = &quot;$($bp.Tooltip)&quot;<br>    $item.Fields[&quot;__Sortorder&quot;].Value = $Sortorder<br>    $item.Editing.EndEdit()<br><br>    Get-ChildItem -Recurse $targetPath -WithParent |<br>      Where-Object { $_.Fields[&quot;Class&quot;] -ne $null } |<br>      ForEach-Object {<br>        $_.Editing.BeginEdit()<br>        $oldVal = $_.Fields[&quot;Class&quot;].Value<br>        $_.Fields[&quot;Class&quot;].Value = &quot;$($bp.Prefix)$oldVal&quot;<br>        $_.Editing.EndEdit()<br>      }<br><br>    Write-Host &quot;Created breakpoint: $($bp.Name) with prefix $($bp.Prefix)&quot;<br>}</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c72b0e4285ab" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>