<?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 Nick Porter on Medium]]></title>
        <description><![CDATA[Stories by Nick Porter on Medium]]></description>
        <link>https://medium.com/@porter.nicholas?source=rss-6b18eabac222------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*rZ7mPK45Co0PX60-</url>
            <title>Stories by Nick Porter on Medium</title>
            <link>https://medium.com/@porter.nicholas?source=rss-6b18eabac222------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 03 Dec 2026 09:47:35 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@porter.nicholas/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[Go Pure: Locking In Quality Using Native Claude Code Features]]></title>
            <link>https://pub.towardsai.net/go-pure-locking-in-quality-using-native-claude-code-features-879cdf8edaf9?source=rss-6b18eabac222------2</link>
            <guid isPermaLink="false">https://medium.com/p/879cdf8edaf9</guid>
            <category><![CDATA[claude-code]]></category>
            <category><![CDATA[anthropic-claude]]></category>
            <dc:creator><![CDATA[Nick Porter]]></dc:creator>
            <pubDate>Thu, 30 Jul 2026 20:01:01 GMT</pubDate>
            <atom:updated>2026-07-30T20:01:01.766Z</atom:updated>
            <content:encoded><![CDATA[<h4>Fewer Tokens, Zero Thrash, Bulletproof Code Quality</h4><p>Heya! My name is Nick and I love writing Web apps! With the advent of AI tooling in late 2025 hinting at greater things to come. I wanted to realize the benefits AI could offer but deep down I wanted to begin to understand it.</p><p>In 2026 it feels like there is a rapidly evolving tech space around context engineering. When Anthropic releases more powerful models they usually release new tooling that can improve the software development workflow experience.</p><p>Looking back on the articles I have written here on Medium I see where I needed to work around the limitations that existed at the time. Working with a 200kb context level is not a constraint I operate on daily now and some of the tooling I built around that limit no longer needs to exist.</p><p>The feature capabilities that Anthropic built into the Memory system are fantastic! I have moved virtually all of the prose based coding standards that lived in markdown and converted them to lint and file type based rules.</p><p>The goal was to utilize AI only where it’s needed but default to deterministic tools and improve cost efficiency. By using less AI for code quality the whole development cycle has less friction not to mention greater speed with faster lint tools.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3L7o2DCrVKl3hgZXzaDveg.png" /><figcaption>Image created with Gemini by author</figcaption></figure><h4>The Scaffolding Era</h4><p>The sole motivation and goal while reworking my Claude Code infrastructure was as follows.</p><blockquote>Every rule lives at the lowest layer that can catch it deterministically. Prose is the layer of last resort.</blockquote><p>Everything I had built at the time was a rational patch for a real 2025 weakness. We were coding with lossy compaction, no persistent memory, no path-scoped rule loading and prose as the only enforcement mechanism.</p><p>This is what the extra layers looked like before the refactor.</p><p>— 17 Session Files: markdown dumps for stringing multi-day sessions together<br> — Coding Standards: every rule, pattern and testing recipe, in prose, that every new session read. This fired as a hook and would thrash other Claude sessions.<br> — Post-compaction Hook: re-inject “context essentials” file every time compact fired. Because compaction used to eat the rules.<br> — A SPARC config, pattern templates, a VIOLATIONS.md ledger and a 400 line hand maintained skills index.</p><p>Every piece made sense at the time but every piece also paid a tax on every session.</p><blockquote>Prose are anything Claude has to read and remember</blockquote><p>A lint error is not probabilistic. It fires the same way every time, for every bot or human at zero context cost.</p><h4>Bucket 1: Prose -&gt; lint errors</h4><p>We took all of the mechanical coding-standards direction out of markdown and made it ESLint errors that we possibly could. For most things this is a straightforward swap but for more complex issues you will have to get more creative.</p><p>That’s no problem though because Claude Code provides file/folder aware rules that only apply while editing those files. If you want your AI to not get lazy and skip important steps you need this system. We found history in the session files of many production bugs in a timezone sensitive app. We turned these into rules and it became a custom plugin (shown below).</p><pre>```js<br>// eslint.config.mjs<br>{<br>  files: [&#39;src/**/*.{ts,tsx}&#39;],<br>  plugins: { &#39;clear-mornings&#39;: customRulesPlugin },<br>  rules: {<br>    &#39;clear-mornings/prefer-datecore-over-new-date&#39;: &#39;error&#39;,<br>    &#39;clear-mornings/require-timezone-in-date-operations&#39;: &#39;error&#39;,<br>    &#39;clear-mornings/no-manual-date-concatenation&#39;: &#39;error&#39;,<br>  },<br>}<br>```</pre><p>Now when Claude writes any new Date() in a component the result isn’t a “please remember not to do this”. It’s a red squiggle in the IDE and a blocked commit.</p><p>Same treatment for useEffect in client side components. We also prevented Claude from working around the system with ignore statements.</p><p>The removed session files were a great source of defects we encounter repeatedly and their remediation. These were converted straight into lint rules where possible. If you have been recording these in the memory system instead those can be a good pool to pull from.</p><p>Simply ask Claude “hey what are the commonly encountered bugs in this system and can they be converted to a deterministic system like lint”. Claude can pull from memory or if you have git CLI your repo history holds the sordid details.</p><h4>Bucket 2: What ESLint Can’t See Cover With Diff Aware Hook</h4><p>We kept exactly one edit time hook, its header shows you the lesson that shaped it.</p><pre>```bash<br># History: this hook used to whole-file-grep every edit for ~15 patterns<br># and &quot;block&quot; with exit 1. Two problems:<br>#   1. exit 1 is NON-BLOCKING for PostToolUse — it never actually blocked.<br>#      Proof: 48 data-testid, 5 @ts-*, and other &quot;blocked&quot; patterns<br>#      accumulated anyway.<br>#   2. Whole-file grep fired on legacy code elsewhere in a file you barely<br>#      touched → false blocks + token thrash across parallel sessions.<br>```</pre><p>Two hard learned specifics there.</p><p>First, hook exit codes matter. For postToolUse exit 1 is advisory where as exit 2 is blocking. We had months of imaginary enforcement before noticing violations piling up.</p><p>Second, be diff aware. The hook now inspects only the content the current edit introduced (&#39;new_string&#39; / &#39;content&#39;) — never the file on disk. So legacy code and parallel sessions can’t trip it (full hook below).</p><pre>#!/bin/bash<br># Edit-time standards hook — NARROW + DIFF-AWARE<br>#<br># Covers ONLY what your linter structurally cannot:<br>#   - If ESLint ignores test files, suppressions and testid queries in tests<br>#     are invisible to lint — this hook is their only gate.<br>#   - Rules with legacy violations (where a lint `error` would block CI on<br>#     old code) get a DIFF-AWARE check that blocks only NEW additions.<br>#<br># DIFF-AWARE: inspect ONLY the content this edit introduced (Edit.new_string /<br># Write.content), never the file on disk — legacy code and parallel-session<br># edits elsewhere in the file can&#39;t trip it.<br>#<br># EXIT CODES (PostToolUse contract):<br>#   2 = block + feed message back to Claude (real enforcement)<br>#   0 = allow (optional advisory on stderr)<br>#   NOTE: exit 1 is NON-BLOCKING for PostToolUse. Enforcement via exit 1<br>#   is imaginary.<br><br>set -o pipefail<br><br>INPUT=$(cat)<br>TOOL_NAME=$(echo &quot;$INPUT&quot; | jq -r &#39;.tool_name // empty&#39;)<br>FILE_PATH=$(echo &quot;$INPUT&quot; | jq -r &#39;.tool_input.file_path // empty&#39;)<br><br># Only Write/Edit with a file path.<br>if [[ &quot;$TOOL_NAME&quot; != &quot;Write&quot; &amp;&amp; &quot;$TOOL_NAME&quot; != &quot;Edit&quot; ]]; then exit 0; fi<br>if [[ -z &quot;$FILE_PATH&quot; ]]; then exit 0; fi<br><br># Only code files.<br>case &quot;$FILE_PATH&quot; in<br>  *.ts|*.tsx|*.js|*.jsx) ;;<br>  *) exit 0 ;;<br>esac<br><br># ---- Diff-aware content: ONLY what this edit introduced ----<br>NEW_CONTENT=$(echo &quot;$INPUT&quot; | jq -r &#39;.tool_input.new_string // .tool_input.content // empty&#39;)<br>if [[ -z &quot;$NEW_CONTENT&quot; ]]; then exit 0; fi<br><br>is_test_file=false<br>case &quot;$FILE_PATH&quot; in<br>  *test*|*spec*|*__tests__*) is_test_file=true ;;<br>esac<br><br>BLOCKS=()<br>WARNINGS=()<br><br># BLOCK: data-testid and *ByTestId queries — NEW additions only.<br># Accessible queries (getByRole/getByText/getByLabelText) required instead.<br>if printf &#39;%s&#39; &quot;$NEW_CONTENT&quot; | grep -qE &#39;data-testid|(get|query|find)(All)?ByTestId&#39;; then<br>  BLOCKS+=(&quot;data-testid / *ByTestId is banned — use semantic HTML + accessible queries (getByRole, getByText, getByLabelText).&quot;)<br>fi<br><br># BLOCK: type suppressions inside TEST files (non-test src is covered by<br># ESLint&#39;s ban-ts-comment; tests are lint-ignored, so this is their gate).<br>if $is_test_file &amp;&amp; printf &#39;%s&#39; &quot;$NEW_CONTENT&quot; | grep -qE &#39;@ts-ignore|@ts-expect-error|@ts-nocheck&#39;; then<br>  BLOCKS+=(&quot;@ts-ignore / @ts-expect-error / @ts-nocheck — fix the underlying type, never suppress it.&quot;)<br>fi<br><br># WARN: newly-skipped tests. Advisory — fix or remove, don&#39;t leave disabled.<br>if $is_test_file &amp;&amp; printf &#39;%s&#39; &quot;$NEW_CONTENT&quot; | grep -qE &#39;\b(describe|it|test)\.skip\b|\bx(describe|it|test)\b&#39;; then<br>  WARNINGS+=(&quot;Skipped test added — fix or remove it rather than leaving it disabled.&quot;)<br>fi<br><br>if [[ ${#BLOCKS[@]} -gt 0 ]]; then<br>  {<br>    echo &quot;&quot;<br>    echo &quot;STANDARDS VIOLATION (new code): $FILE_PATH&quot;<br>    echo &quot;========================================&quot;<br>    for b in &quot;${BLOCKS[@]}&quot;; do echo &quot;  [BLOCK] $b&quot;; done<br>    for w in &quot;${WARNINGS[@]}&quot;; do echo &quot;  [WARN]  $w&quot;; done<br>    echo &quot;&quot;<br>  } &gt;&amp;2<br>  exit 2<br>fi<br><br>if [[ ${#WARNINGS[@]} -gt 0 ]]; then<br>  {<br>    echo &quot;&quot;<br>    echo &quot;Standards check: $FILE_PATH&quot;<br>    echo &quot;----------------------------------------&quot;<br>    for w in &quot;${WARNINGS[@]}&quot;; do echo &quot;  - $w&quot;; done<br>    echo &quot;&quot;<br>  } &gt;&amp;2<br>fi<br><br>exit 0</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2qNdBUMzxRNvewOiUw5XCw.png" /><figcaption>Image created with Gemini by author</figcaption></figure><h4>Bucket 3: The Commit Ladder</h4><p>Once the code is complete and it’s time to push there is a more strict set of code quality checks. These all run on pre-commit. All of these are commit checks and are nice to have done for you when wrapping up a long-running session.</p><ol><li>lint-staged — prettier + eslint --fix blocks on unfixable errors</li><li>type-check — project wide tsc --noEmit (per-file tsc breaks imports)</li><li>affected tests — jest --onlyChanged</li><li>no-dead-tRPC — no registered procedure ships without a live caller. AI tooling wants to create everything from scratch instead of re-using what was already built. This prevents dead-end tRPCs.</li><li>translation auto-fill — we hand edit en.json only, a cheap model fills the other locales and stages them into the same commit.</li></ol><h4>Bucket 4: What’s Left For Prose And Where It Loads</h4><p>Our final CLAUDE.md shrank to 81 lines and holds what prose is actually for: judgment calls no linter can express.</p><p>Of those things that remained in CLAUDE.md we questioned does this apply on every turn or only when specific files are open?</p><p>CLAUDE.md contains topics that apply in every session. Ours contains constraints like: <br> — Load the domain skill before grepping<br> — database writes and commit’s need human approval<br> — no use of memoization since we use React compiler<br> — a handful of architectural invariants and pointers</p><p>For constraints that apply only to specific files (or directories) we can use rules. A rules file is plain markdown with one frontmatter field.</p><pre>```yaml<br>---<br>paths:<br>  - &#39;src/server/trpc/**/*.ts&#39;<br>---<br>```</pre><p>We applied rules covering the following topics:<br> — SSR Authentication<br> — async server component stacking<br> — tRPC security and procedure lifecycle<br> — i18n policy</p><blockquote>and it means I can push far more code more quickly</blockquote><h4>Back To Basics</h4><p>The old system was built to protect the output quality and did that but also ended up causing real friction when I had multiple Claude sessions running. When any of the secondary sessions made a change on disk that caused a hook to run and check all of the uncommitted code, Claude would often git stash code from another session then have to stitch it all back together after realizing its mistake.</p><p>The new system offers the flexibility to weave in other sessions while a long-running task finishes in the main thread. I can finally do this without stomping on any of the other work and it means I can push far more code more quickly.</p><h4>Start With A Plan</h4><p>All coding and research sessions start with a plan. For one thing, it makes sense to start Claude off in a read-only state. When you start in/plan Claude will never write to files until after gaining approval.</p><p>One of the biggest changes to our system was to remove session files. The replacement is Claude plans. These documents had the same purpose: to document decisions and the current state of a feature.</p><p>By writing a plan document into the native directory ./claude/plans (or as you see here the docs directory) Claude will know to reference this doc on a new session if it comes up in conversation.</p><p>Take a look at the start of this session after exiting plan mode. Claude is poised and ready to take off! Using plan mode is a great way to have Claude researching and getting prepped up for a project while another Claude session(s) is running. Just let Claude sit after the plan is written, then even if the power goes out you still have that plan file, the result of all the research and planning. Once the other session(s) completes commit/push and let your new plan rip!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bs79dqzCNnq-lmUlZmsosQ.png" /></figure><h4>Dropping A Session</h4><p>Now after Claude gets to around 55% context and is at a stopping point I can straight up drop the session, start a new one and simply say “pick up phase 3 of …” and Claude knows exactly what to do!</p><p>Even with the 1m context I often still run over the 75% mark where Claude needs a renewal or complete abandonment in favor of a new session.</p><p>The now native built in memory and plans features allow for a consistent and reliable source of truth when it comes to state of a project, the decisions made while working on it and the original vision it started from.</p><h4>Compaction Uses Tokens</h4><p>I researched compaction and found that the process actually uses tokens. It’s packaging up the accumulated context and sending it off to the server for summarization. Instead I have been using the /clear command near the end of my usable context.</p><p>Because we start with a plan and can easily pickup from the plan. Holding around a bunch of superfluous context isn’t advantageous and costs more tokens over the life of your task.</p><h4>Summary</h4><p>My workflow in 2026 has gone entirely native. I always start with a plan using the /plan command or the Shift + Tab mode toggle. That will write a plan to session and you can extend this to write to disk.</p><p>Ensuring code quality with deterministic tools is faster, cheaper and doesn’t make a mistake. Speeding up the development cycle and resulting in less thrash while running multiple sessions.</p><h4>How Do You Handle A Multi-Session Workflow?</h4><p>Thanks for reading and please indulge me! How do you facilitate multi-session workflows? I mean both multiple Claude sessions to work on a single task as well as multiple simultaneous sessions? How have you kept your code clean using hooks or other native features? Please tell me in the comments!</p><h4>Resources:</h4><p><a href="https://code.claude.com/docs/en/common-workflows">https://code.claude.com/docs/en/common-workflows</a><br><a href="https://code.claude.com/docs/en/memory">https://code.claude.com/docs/en/memory</a><br><a href="https://code.claude.com/docs/en/agent-sdk/hooks">https://code.claude.com/docs/en/agent-sdk/hooks</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=879cdf8edaf9" width="1" height="1" alt=""><hr><p><a href="https://pub.towardsai.net/go-pure-locking-in-quality-using-native-claude-code-features-879cdf8edaf9">Go Pure: Locking In Quality Using Native Claude Code Features</a> was originally published in <a href="https://pub.towardsai.net/">Towards AI</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Using Claude Design With An Existing NextJS App]]></title>
            <link>https://medium.com/@porter.nicholas/using-claude-design-with-an-existing-nextjs-app-f2a708e4b3ba?source=rss-6b18eabac222------2</link>
            <guid isPermaLink="false">https://medium.com/p/f2a708e4b3ba</guid>
            <category><![CDATA[nextjs]]></category>
            <category><![CDATA[claude-code]]></category>
            <category><![CDATA[claude-design]]></category>
            <category><![CDATA[anthropic-ai]]></category>
            <dc:creator><![CDATA[Nick Porter]]></dc:creator>
            <pubDate>Wed, 03 Jun 2026 11:41:43 GMT</pubDate>
            <atom:updated>2026-06-03T11:41:43.743Z</atom:updated>
            <content:encoded><![CDATA[<h4>How to integrate Anthropic’s new design tool into an existing Mantine Web app</h4><p>Heya! My name is Nick and I love building Web apps! I have been building them since ’98 and over the last 8 months or so using the latest AI tools like Claude Code. I am not a designer by nature or profession so when rethinking the look and feel of an application in the past I have struggled. That was before Claude Design.</p><p><strong>What this article covers:</strong> Transitioning from a modern but basic Mantine system to a high-fidelity redesign.<br> — Nuances and prompt strategies when using Claude Design<br> — Teaching your local AI development agents to inherit and evolve your newly established design system</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*x04i8u00zipYiHzn6UiE5Q.png" /><figcaption>An architectural fusion of a rugged Western frontier outpost and modern digital user interface components. Image safely generated by the author using Gemini.</figcaption></figure><h4>Before The Redesign</h4><p>Here is how our Client Home page looked before the redesign. Very simple Mantine components with little or no specialized styling. That’s ok, this kind of blank slate is easy to weave the Claude Design output into!</p><p>This image is actually one of the things I provided during the initial prompt. With it I pointed out some basic needs such as a need for a calendar view. From there the tool asked a series of very insightful questions. Some of which I had not considered at all and caused me to think more deeply about the feature.</p><p>Because I had chosen to not connect my repo to Claude Design I did feel a challenge when explaining some basic needs that working in the app would just intuitively know. Such as the need for a responsive design.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/532/1*rEZn0p3WN0WJ_tHHGhpWvA.png" /><figcaption>The original Client Home page interface prior to the redesign, showcasing standard, lightly styled Mantine components.</figcaption></figure><h4>Amazed By The Options</h4><p>This thing is FANTASTIC! I was blown away by the ingenuity and depth of options without feeling overwhelmed. I caught myself wondering if the options were provided using agentic AI or developed directly into the application.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2bBAaltQNqlPaE5ckrlq6w.png" /><figcaption>Claude Design environment showing a simple easy to understand interface.</figcaption></figure><h4>Easy To Add To An Existing System</h4><p>Check out the options you have available to you once the design document is done! With what I was given here I started a new session and got to work adding the new design to my app! You can tell that Anthropic has planned around the direct integration from one app to another.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/704/1*NZl999lnnw-e5WJusRAX5w.png" /><figcaption>The developer workspace interface, illustrating the structured handoff to my Mantine environment.</figcaption></figure><h4>Augmenting Our System With What We Learn</h4><p>I felt like the experience of using Claude Design could continue to enrich my system into the future by instructing Claude to learn from what we saw Claude Design do with the styling. Check out the final option where I ask Claude to evolve OUR styling system!</p><p>These suggestions are great! Check them out.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kvuxD4rMR9v8tyjSlMb3NQ.png" /><figcaption>Teaching Claude to repeat what we learned during this first experience with Claude Design.</figcaption></figure><h4>Progressing The First Vision</h4><p>You can even continue refining the design after the first draft. In this conversations I ask Claude to expand on aspects and include some aspects it missed in its initial cut.</p><p>Working with a design tool this way felt just like working with Claude CLI when I’m developing code for my NextJS app. Working with the two apps together during the development lifecycle felt natural, educational and fun!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7zF3B10VqyGcuAALtBhbXA.png" /><figcaption>The final, high-fidelity interface iteration tracking weekly user metrics, featuring cohesive dark-mode styling and polished component hierarchies.</figcaption></figure><h4>Surprises Along The Way</h4><p>There were some unexpected nuances to the first experience using Claude Design. First of all Claude Design had a lot of questions! Some I had never considered before. I was happy to see this and it provided a chance to rethink the redesign further but while pondering one of the questions it seemed like the app just kicked in and started working. I was left feeling unsure if I had done something wrong or hit a button by accident.</p><p>This pain was not re-experienced though. When I started a new redesign project this time it waited until I had answered all of the questions.</p><h4>Overall Experience</h4><p>This has been one of the rare experiences where right out of the gate I had a fun and rewarding experience in a new UI. Wonderful surprises waited for me around key corners where it was easy to weave the new design into my existing system.</p><p>I have continued to use Claude Design and plan to do even more with it. I am most excited about the prospect of starting a brand new project where I can brainstorm with this new powerful tool.</p><h4>Tell Me What You Think!?</h4><p>So what have you been using for your design tool? Do you have much experience with design previously? How has the emergence of new tools like this affected you? Tell me in the comments!?!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f2a708e4b3ba" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Controlling Completion Bias When Using Plan Mode]]></title>
            <link>https://pub.towardsai.net/controlling-completion-bias-when-using-plan-mode-bac945a16cb3?source=rss-6b18eabac222------2</link>
            <guid isPermaLink="false">https://medium.com/p/bac945a16cb3</guid>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[anthropic-claude]]></category>
            <category><![CDATA[claude-code]]></category>
            <dc:creator><![CDATA[Nick Porter]]></dc:creator>
            <pubDate>Sat, 09 May 2026 17:31:00 GMT</pubDate>
            <atom:updated>2026-05-09T17:31:00.753Z</atom:updated>
            <content:encoded><![CDATA[<p>Have you ever gone through a long coding session complete with testing all of the new features you built, rolled a new version and pushed. Then when requesting a slight adjustment post-commit watched Claude go to town with a full adjustment, release increment and then rolled the code to production?!?!</p><p>This is an example of how Claude has adjusted its view on completion during a single session. The potentially destructive action happened despite explicit instructions in the CLAUDE.md disallowing commit/push actions without human consent.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LiwT81Pyy85YdoxXUqE0LQ.jpeg" /><figcaption>Finding the ‘Scope Approved’ path: Navigating agentic completion bias in a sea of architectural possibilities. (Image generated by Gemini)</figcaption></figure><h4>Completion Bias</h4><p>Let’s back up a little and talk about what completion bias is. I wrote about this topic almost 6 months ago and even today Claude has a problem with overriding explicit instructions when determining its vision of success.</p><p>Completion bias is Claude’s pre-determined vision of what a completed project looks like. The more you push Claude to go faster the more corners might be cut along the way.</p><p>I’ll be straight up with you when this has happened I fought a brief internal battle about why Claude was allowed to do this. I rationalized that because those short term fixes did fit the mission I was willing to roll with it.</p><h4>There Were Signs</h4><p>Have there been times when Claude is like <em>“alright I think we are good!”</em> and you ask <em>“how many failing tests do we have” </em>and Claude is like <em>“oh there are only 3 but that is from a previous session”. You</em> <strong>know</strong> that isn’t true.</p><p>We have a strict no lint, TS or test failures allowed before push. How could this still be happening within the same session? Is it possible that Claude comes up with what completion looks like during the planning phase but adjusts that while iterating with the engineer?</p><h4>Where This Becomes Problematic</h4><p>As more potent tools such as MCP’s and autonomous agents come online, the unfettered ability to push to production should be closely guarded.</p><p>The stories of entire databases being wiped out by AI tools are still hitting the headlines. Strict adherence to release and migration strategy is vital for a healthy development environment. Using Claude’s native features to enforce these policies makes the most sense.</p><p><a href="https://code.claude.com/docs/en/permission-modes">Choose a permission mode - Claude Code Docs</a></p><h4>What Is Plan Mode</h4><p>Plan mode is a read-only research and discovery mode that can be enabled by using the /plan command or asking Claude directly. Not only is write access to files disallowed but also any bash command. This mode will prevent any access before first presenting a full plan, being granted permission then executing the agreed on plan.</p><p>When I first learned about plan mode it seemed natural to use it at the beginning of the software development lifecycle. One of the things I liked most was being given a full plan, changing the plan then having the option to clear context and start working. This is a built in guard against the code first behavior we have all seen so often and a great way to narrow the periphery of completion bias.</p><p>For a couple months now I have been using plan mode more often and even multiple times in a single session. Let’s say I am building a new feature or writing a refactor. Starting in plan mode then moving into the coding session is a great way to start.</p><p>If Claude starts to work in areas of the code that don’t align with the task or building a feature that no longer makes sense, I stop Claude and go back into plan mode. The action of going back into plan mode is a demarcation point for Claude to understand it is no longer writing code and may need to pivot from the original plan before starting back at the code.</p><p>Going back into plan mode is also a great way to divert Claude’s focus from producing code to planning around the product.</p><p>Architecting a refactor of existing code is the perfect case for plan mode and Claude excels at the task during execution. I say this because the guardrails around what Claude will need to do from the beginning to end are clearly definable in a brownfield system.</p><h4>A Contextual Pause</h4><p>Plan mode forces Claude to output its logic in natural language before it touches the filesystem. This is almost like a more free form of TDD but instead of thinking about tests first we are asking Claude to think about the architecture and the product as if it were a user not a code smith.</p><p>There can be token efficacy gains by first using plan mode too. Planning in a read-only state often leads to shorter, more concise execution phases, which can save on token usage.</p><h4>How Are Context Sources Consumed?</h4><p>Context sources such as CLAUDE.md and Memory are consumed during the start of a session but are they re-read when using the /plan command in the middle of a long-running session? I asked Claude and the answer is no. So it is possible over the course of a long-running task to continue polluting context and deranging completion bias.</p><blockquote>Memories seem to have a higher attention weight in the current architecture.</blockquote><h4>Does Plan Mode Always Do The Trick?</h4><p>Even during my most recent major refactor I witnessed Claude pushing code to production despite instructions in CLAUDE.md to require human consent. Going into plan mode does not reset Claude’s expectations for a successfully completed project and does not re-read context resources.</p><p>Plan mode did not prevent pushing code to production without human consent.</p><p>I felt very hypocritical because I was writing this article at the time! So Claude needed to have better realtime understanding of the sensitive nature of releasing to production and I fixed that by adding a memory.</p><pre>  ---                                                                                              <br>  name: Plan approval ≠ approval for downstream state-changing actions<br>  description: After a plan is approved and implementation completes, <br>  each push/commit/deploy is a SEPARATE decision needing its own gate — <br>  completion momentum tries to chain them                 <br>  type: feedback                                                                                                                             <br>  ---                                                                                              <br>  After a plan-mode plan is approved and I finish implementing it, <br>  I tend to drift into the next &quot;obvious&quot; step (push, commit, deploy) <br>  as if it were part of the same approved task. It isn&#39;t. The plan covers <br>  the work the plan describes; <br>  everything downstream is a separate decision tree.  </pre><p>We already had instructions in CLAUDE.md but adding a specific memory about pushing without human approval has safeguarded long-running sessions from pushing without consent.</p><p>Memories seem to have a higher attention weight in the current architecture. Use of memories seems much stickier for long-running sessions or tasks involving multiple Claude sessions and I often see Claude recalling memories.</p><p>Often the instructions in CLAUDE.md can be sort of given less importance or weight as the conversation length increases. However a specific memory about the push operation can be referenced and loaded mid-session.</p><h4>Onward And Upward!</h4><p>How have you been tailoring your use of the modes offered in Claude to change your workflow? Have you had good experiences with plan mode or other techniques? Tell me what you do 🙏. Let’s go build some cool stuff!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bac945a16cb3" width="1" height="1" alt=""><hr><p><a href="https://pub.towardsai.net/controlling-completion-bias-when-using-plan-mode-bac945a16cb3">Controlling Completion Bias When Using Plan Mode</a> was originally published in <a href="https://pub.towardsai.net/">Towards AI</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Claude Code: Long-Running Sessions With Trello Tracking]]></title>
            <link>https://medium.com/@porter.nicholas/claude-code-long-running-sessions-with-trello-tracking-ce5b4ca80c7a?source=rss-6b18eabac222------2</link>
            <guid isPermaLink="false">https://medium.com/p/ce5b4ca80c7a</guid>
            <category><![CDATA[claude-code]]></category>
            <category><![CDATA[claude]]></category>
            <category><![CDATA[anthropic-claude]]></category>
            <dc:creator><![CDATA[Nick Porter]]></dc:creator>
            <pubDate>Mon, 30 Mar 2026 18:48:55 GMT</pubDate>
            <atom:updated>2026-03-30T18:48:55.133Z</atom:updated>
            <content:encoded><![CDATA[<p>Hiya! My name is Nick and I love building Web apps! I have been working with AI tools while building a NextJS app for 8 months now. As Claude has evolved so has my workflow.</p><p>With the recent enhancements to Claude, including a much larger context size, some of the older (a few months ago) techniques I used to manage a long-running coding session have become obsolete. One thing has not changed and that is the need to string together a conversation between multiple Claude instances.</p><p>I have recently integrated with the Trello MCP in order to improve team collaboration and to clarify the vision of a feature enhancement or addition. I added this to the beginning of my workflow when I was starting a planning session around a large feature or product enhancement. Straight up it is soooo easy!</p><blockquote>Wouldn’t it be great if during the planning process you could chat with Claude and be like “Hey Claude let’s build a Trello list…”</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9Hj_Oyh4G6_lr5BsgBuUGA.jpeg" /><figcaption>Source: Image by <a href="https://unsplash.com/@matreding">Mathias Reding</a> on <a href="https://unsplash.com/">unsplash</a></figcaption></figure><h4>The Old System</h4><p>With the smaller 200k context size that was available only about a month ago managing the process of building a new feature or completely redesigning your authenticated Home experience would require a system that outlived a single or even a dozen Claude sessions.</p><p>Session files managed not just the overarching technical decisions that are long living in the system but also the transient checklist of where we were in the overall development process.</p><p>With a much larger context size and an expectation that Anthropic will add better context management tools, a transient checklist is no longer needed. But when working with a team having a collaboration tool is critical. We still need to see that list of things that are yet to be done and those that are marked as complete.</p><h4>Enter Trello</h4><p>Wouldn’t it be great if during the planning process you could chat with Claude and be like “<em>Hey Claude let’s build a Trello list of all the phases that go into this feature or product and document the technical decisions made along the way for posterity later?”</em>.</p><p>This is a great way to share ideas and responsibilities with a team, allow junior team members to learn from the change process. These Trello items can be loaded up with instructions and requirements that act as a teaching tool.</p><h4>Trello MCP Integration</h4><p>There are not many options when integrating with Trello and your AI coding tools. There is a REST api but I decided to go with the MCP integration. Adjust your .mcp.json for the new MCP addition.</p><pre>{<br>  &quot;mcpServers&quot;: {<br>    &quot;trello&quot;: {<br>      &quot;type&quot;: &quot;stdio&quot;,<br>      &quot;command&quot;: &quot;bash&quot;,<br>      &quot;args&quot;: [&quot;/.scripts/trello-mcp.sh&quot;],<br>      &quot;comment&quot;: &quot;Trello Board Management&quot;<br>    }<br>  }<br>}</pre><p>Now in order to keep the Trello keys out of the repo I added them to .env so they can be added to gitignore and left out of the repo. This script will pull the values out of .env and push them into the MCP environment when you’re ready to use Trello in Claude Code.</p><pre>#!/bin/bash<br>export TRELLO_API_KEY=&lt;your-api-key&gt;<br>export TRELLO_TOKEN=&lt;your-token&gt;<br>exec npx -y mcp-server-trello</pre><h4>Trello Credentials</h4><p>Get your API key from trello.com/power-ups/admin. Then generate your token by hitting the ‘New’ button in the Apps section.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*J12XhjsBe9Om3KFJ2q4BtA.png" /><figcaption>Example of Trello Admin Board</figcaption></figure><h4>A Community View Of Project Progress</h4><p>When developing an application all alone you can do a lot of things but what you usually end up doing is documenting for future you. Not for other team members.</p><p><a href="https://medium.com/@porter.nicholas/teaching-claude-to-remember-part-3-sessions-and-resumable-workflow-1c356d9e442f">Teaching Claude To Remember: Part 3 — Sessions And Resumable Workflow</a></p><p>Using the session file approach I have talked about in previous articles is still a vital part of maintaining a long-running session. The part that has come out and moved into Trello is the checklist part.</p><h4>Using Trello To Educate</h4><p>Claude and I will jump into plan mode and discuss at great detail the feature we want to add or adjust then agree on our detailed plan. Then I have Claude create Trello cards with in-depth technical how/what/why sections to educating junior team members when they pull the cards off the board.</p><p>Now my team can view current and previous feature changes on their phone or while discussing how we plan on implementing that feature.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Esl_bd4HQ22fv3p88d0ifw.png" /><figcaption>Trello Board Example</figcaption></figure><h4>Session Files Compliment Trello</h4><p>Session files are local markdown files that describe the technical approach and decisions made along the way impacting functionality. In the session file header is a pointer to the Trello board. In the Trello Card description is a line like docs/session/2026-03-28-ui-modes.md so the two stay in sync and make it easy to get up to speed or resume an incomplete project.</p><h4>Trello Workflow Skill</h4><p>Splicing the Trello list and card creation process into your workflow is glued together using a skill. This is a specialized set of instructions on how to interact with Trello and the expected commands.</p><pre>---<br>name: trello-workflow<br>description: Trello board integration to be used for project management. <br>Use when breaking down features into cards, syncing board state, <br>checking what to work on, or updating card status after completing work.<br><br>## Board Structure<br><br>### Lists (Workflow Stages)<br>| List    | Purpose                        |<br>| ------- | -------------------------------|<br>| Backlog | Ideas for future work          |<br>| Ready   | Scoped with checklists, ready  |<br>|         | to pickup                      |<br>| In      | Actively being worked on       |<br>| Progress|                                |<br>| Review  | Code complete, needs review    |<br>| Done    | Shipped to prod                |<br><br>### Labels<br>etc.<br><br>## Card Template<br><br>### Title<br>Short, action oriented<br><br>### Description<br>etc.<br><br>## What<br>[1-2 sentences for what this feature does]<br><br>## Why<br>[user value]<br><br>## Acceptance Criteria<br>etc.<br><br>## Key Decisions<br>[any decisions made]</pre><h4>Wire It All Together</h4><p>Now with all of these parts in place you can simply start up a new planning session with Claude. This is still executed well when starting in or switching to the plan mode but it is not necessary.</p><p>Ask Claude when starting your next feature. <em>“Hey Claude let’s start up a new Trello list with cards for these phases!”</em>. Then sit back and watch Claude fill out all the details in Trello for you!</p><h4>What Are You Using?</h4><p>So tell me what are you using in your long-running task process to memorialize the decisions you made and maintain a picture of all the phases in the whole project and what state each of those items are in? This is working for small teams but how about big teams? I know Jira integration can be similarly implemented but how has that worked for you? Have you added parts I missed?</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ce5b4ca80c7a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Claude Code: Git Worktree Isolated Workflow]]></title>
            <link>https://medium.com/@porter.nicholas/claude-code-git-worktree-isolated-workflow-555f0121ff73?source=rss-6b18eabac222------2</link>
            <guid isPermaLink="false">https://medium.com/p/555f0121ff73</guid>
            <category><![CDATA[anthropic-claude]]></category>
            <category><![CDATA[claude-code]]></category>
            <dc:creator><![CDATA[Nick Porter]]></dc:creator>
            <pubDate>Wed, 11 Mar 2026 17:35:18 GMT</pubDate>
            <atom:updated>2026-03-11T17:35:18.501Z</atom:updated>
            <content:encoded><![CDATA[<p>Hey there! My name is Nick and I love developing Web apps! I have been using Claude Code for 7 months now and have developed several best practices but have also come across some challenges.</p><p>If you have been working with Claude Code you have probably heard of Boris Cherny. His workflow uses this approach and it makes dealing with the challenges of working with multiple Claude sessions much more friction-free.</p><p><a href="https://www.threads.com/@boris_cherny/post/DVAAnexgRUj/">Boris Cherny (@boris_cherny) on Threads</a></p><p>One of those challenges is waiting for Claude to finish before starting a new task that is outside of its current working context. In fact I seldom want to lose a thought, bug screen shot or refactor idea and start a new Claude session to type it out before I lose it. I then have to leave the new Claude in purgatory state after the planning session is complete.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ciXarhu43wzvZr7OpRWzKA.png" /><figcaption>Created by Author. Generated by Gemini.</figcaption></figure><blockquote>So you recover the stash and cross your fingers</blockquote><h4>The Problem I Didn’t Know I Had</h4><p>You’re halfway through a new feature when you identify (or have identified for you) a bug in production. You stash your work switch branches, get a fix in place and roll a PR. After that you’re ready to go back to your work. So you recover the stash and cross your fingers that nothing conflicts and potentially loses all of your work.</p><p>As of February 2026, Claude Code has built in support for git Worktrees and it makes multi-agent AI development not just possible, but trivially easy.</p><p><a href="https://git-scm.com/docs/git-worktree">Git - git-worktree Documentation</a></p><h4>What Are Git Worktrees?</h4><p>A git worktree is a separate checkout of your repository with its own working directory, branch, and index — but sharing the same .git history. Think of this as having multiple copies of your repo that stay in sync without git clone.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GNWAZDaea1N5GJNTgBMSPA.png" /><figcaption>Created by Author. Generated by Gemini.</figcaption></figure><pre>```bash<br># Traditional: one checkout, constant branch switching<br>git stash &amp;&amp; git checkout bugfix &amp;&amp; ... &amp;&amp; git checkout feature &amp;&amp; git stash pop<br><br># Worktrees: multiple checkouts, no switching needed<br>git worktree add ../bugfix-checkout bugfix<br># Both directories exist simultaneously, sharing history<br>```</pre><h4>Why This Matters for AI-Assisted Development</h4><p>When you run multiple Claude Code sessions (or Agent Teams), each session needs to read/write files independently. If you don’t have isolation you can have the following scenario.</p><p>— Agent A edits api.ts line 50<br> — Agent B edits api.ts line 75<br> — Both try to save or run the quality gates and get stuck without a clear resolution</p><h4>How Claude Code Implements Git Worktrees</h4><p>Option 1 — CLI Flag</p><pre><br>```bash<br>claude --worktree [name]<br># Creates a new worktree in .claude/worktrees/ with a fresh branch based on HEAD<br>```</pre><p>Option 2 — Custom Agent Frontmatter</p><pre>```yaml<br>---<br>name: tdd-runner<br>description: TDD development agent<br>model: sonnet<br>isolation: worktree # Each invocation gets its own checkout<br>---<br>```</pre><p>Option 3 — Sub-Agent Spawning</p><pre>```<br>When spawning a subagent, add isolation: &quot;worktree&quot; to give it<br>an isolated copy of the repository. The worktree is automatically<br>cleaned up if the agent makes no changes.<br>```</pre><h4>The Boris Cherny Approach</h4><p>Claude Code’s creator runs several local sessions simultaneously each in its own checkout. Before built-in Worktree support Boris would use separate git clone directories. Now the --worktree flag and agent isolation: worktree make this a first-class feature.</p><blockquote>Each agent gets its own worktree and can work independently<br> — Boris Cherny, February 2026</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fjfs78a8m4uEZWgURhW9tQ.png" /><figcaption>Created by Author. Generated by Gemini.</figcaption></figure><h4>Summary</h4><p>Sometimes the a treasure you discover in software development isn’t the thing you set out to find. Sometime you find a new skill or system during your adventures that removes such a big point of friction that you NEVER go back. This system is one of those treasures.</p><p>What have you been doing to isolate context and keep it pristine? What workflow are you using that you may have learned from Boris or someone else? Tell me in the comments!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=555f0121ff73" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Claude Code: Post-Compaction Hooks for Context Renewal]]></title>
            <link>https://medium.com/@porter.nicholas/claude-code-post-compaction-hooks-for-context-renewal-7b616dcaa204?source=rss-6b18eabac222------2</link>
            <guid isPermaLink="false">https://medium.com/p/7b616dcaa204</guid>
            <category><![CDATA[anthropic-claude]]></category>
            <category><![CDATA[claude-code]]></category>
            <dc:creator><![CDATA[Nick Porter]]></dc:creator>
            <pubDate>Wed, 04 Mar 2026 10:34:38 GMT</pubDate>
            <atom:updated>2026-03-04T10:34:38.065Z</atom:updated>
            <content:encoded><![CDATA[<p>Hiya! My name is Nick and I have been writing Web apps since ’98. I love the ability to share what I wrote with anyone in the world anytime. I have been using Claude for writing my code for the last 7 months and have become an expert at manipulating context over the course of long-running tasks. By automating my system around preserving a healthy context I found the best way to achieve the highest quality code possible.</p><p>How do I measure high quality? <br> — React 19 standards (no useEffect)<br> — Components and DB written for scalability<br> — Test Driven Development (TDD)<br> — Always sticking to workflow rules: Explore, Plan then Execute</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JEDXdewyKs-6_XuoZF3p_Q.png" /><figcaption>Image Credit Gemini</figcaption></figure><blockquote>The compaction preserved the code but lost the rules.</blockquote><h4>Where Things Can Go Wrong</h4><p>You have been coding for about 8–12 hours across sleep boundaries. Fortunately you named the sessions for each Claude so you know you have used up a handful of different sessions and or compactions. At each stage interval you made sure to test what Claude had produced and so far so good. Then all the sudden after a compaction Claude thinks the files and in-flight and failing tests are from another session and not Claude’s responsibility.</p><p>The compaction preserved the code but lost the rules and even the scope of the full effort. This is often why I fire up a new Claude sessions to begin with and pass it a session file. This is also violating exactly the thing I hoped the CLAUDE.md would prevent!</p><p><a href="https://medium.com/@porter.nicholas/teaching-claude-to-remember-part-3-sessions-and-resumable-workflow-1c356d9e442f">Teaching Claude To Remember: Part 3 — Sessions And Resumable Workflow</a></p><blockquote>Claude determines what should survive compaction based on recency, relevance, and frequency.</blockquote><h4>How Auto-Compaction Works (And Why It Drops Things)</h4><p>When you context fills up Claude Code automatically summarizes the conversation to free up space. A typical compaction frees up 60–70% of your context. The coding community as a whole is reporting that working past 70% context can reduce code quality and lead to errors.</p><p><a href="https://platform.claude.com/docs/en/build-with-claude/compaction">Compaction</a></p><p>Compaction is a lossy summarization process. Claude determines what should survive compaction based on recency, relevance, and frequency. The result is the Claude’s knowledge of the code and its immediate task is preserved but what is lost project conventions — the things that prevent bugs — are mentioned once at the beginning of each conversation. They are prime candidates for compression.</p><p>CLAUDE.md can help mitigate the problem but it is also part of the conversation context. After compaction it is summarized alongside everything else you discussed during that session.</p><p>I would need to often remind Claude to double check things post-compaction like was TDD followed? What I needed was a reliable way to inject project specific critical context without thinking about it.</p><p><a href="https://code.claude.com/docs/en/hooks">Hooks reference - Claude Code Docs</a></p><h4>The Pattern: PostToolUse Hook + Context Essentials</h4><p>Using Claude Code’s hook system we fire shell commands at specific lifecycle events. For our post-compaction hook we want to use the PostToolUse lifecycle event with the compact matcher. When compaction happens, this hook fires and its stdout gets injected as a system message, and Claude immediately has your rules back!!</p><p>That’s what I’m talkin about my friends! Even as Claude Code has improvements like Auto-Memory and Agent Teams (still in beta) added that help make context preservation possible post-compaction rule injection is STILL important.</p><h4>Step 1: Create Your Context Essentials File</h4><p>You should get Claude to read this article then tailor your context essentials based on your project type but to give you an idea of what I have in mine running a NextJS app with TanStack, Zustand, React 19 and Mantine.</p><p>Keep this under 50 lines. Every line costs tokens and this will be loaded on every single compaction so be frugal. Think of this as a sticky note on your monitor, no not the horoscope you cut out from the coffee shop, the one that reminds you of the things you often forget.</p><pre>&lt;!-- .claude/context-essentials.md --&gt;<br># Context Essentials (Re-injected After Compaction)<br><br>## Critical Rules<br>- Use dateCore with timezone for ALL date operations — NEVER new Date() or direct Luxon<br>- Use protectedProcedure + ctx.userId — NEVER accept userId from client input<br>- Supabase: execute_sql for reads only. NEVER apply_migration without human approval<br>- Quality gates: npm test &amp;&amp; npm run type-check &amp;&amp; npm run lint before commit<br>- SSR auth: &#39;use client&#39; uses getSupabaseClient(); server components use createClient from server<br><br>## Banned Patterns<br>- No @ts-ignore, @ts-expect-error, eslint-disable<br>- No new Date(), Date.now(), direct Luxon DateTime import<br>- No dateCore without explicit timezone parameter<br>- No SELECT * — always specify columns<br>- No --no-verify on git operations</pre><h4>Step 2: Configure The Hook</h4><p>Now with this configured the hook will fire every time compaction occurs. In .claude/settings.json make this addition.</p><pre>{<br>  &quot;hooks&quot;: {<br>    &quot;PostToolUse&quot;: [<br>      {<br>        &quot;matcher&quot;: &quot;compact&quot;,<br>        &quot;command&quot;: &quot;cat .claude/context-essentials.md&quot;<br>      }<br>    ]<br>  }<br>}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IUZxHZfRAkcNwKQPUreWfg.png" /><figcaption>Image Credit Gemini</figcaption></figure><h4>Why This Does More Than Just CLAUDE.md</h4><p>You may wonder <em>“my rules are already in (or referenced in) CLAUDE.md, why do I need another file?”</em>.</p><blockquote>Context Essentials = this ‘Before You Ship’</blockquote><p>CLAUDE.md is meant to be a comprehensive guide. Architecture decisions, workflow instructions, coding standard, available commands. It is (or should be) around 200 lines and is loaded at session start and lives in context permanently.</p><p>Context essentials is 10–50 lines surgically injection post-compaction. Think of it like this.</p><p>— CLAUDE.md = the employee handbook<br> — Context Essentials = this ‘Before You Ship’ checklist</p><p><a href="https://code.claude.com/docs/en/best-practices">Best practices for Claude Code - Claude Code Docs</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UgKrA7sBcBB2eutPJORU1A.png" /><figcaption>Image Credit Gemini</figcaption></figure><h4>What To Include</h4><p>— Project enforced rules like the aforementioned date library<br> — Authentication Patterns<br> — Database access rules<br> — Import path rules (client vs server)<br> — Banned anti-patterns</p><h4>What To Leave Out</h4><p>— Full CLAUDE.md content (already loaded)<br> — Architecture documentation (use skills/docs)<br> — Code examples (these should be available in app)<br> — Style preferences <br> — Historical decisions</p><h4>Summary</h4><p>I hope this pattern helps you with your Claude use and when determining what workflow is most optimal for you! So tell me what are you using in your workflow? Please tell me what you’re doing to preserve context?</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7b616dcaa204" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Anthropic Skills Marketplace: The Anti AI-Slop UI Design Skill]]></title>
            <link>https://medium.com/@porter.nicholas/anthropic-skills-marketplace-the-anti-ai-slop-ui-design-skill-a572d0cfef4f?source=rss-6b18eabac222------2</link>
            <guid isPermaLink="false">https://medium.com/p/a572d0cfef4f</guid>
            <category><![CDATA[anthropic-claude]]></category>
            <category><![CDATA[claude-code]]></category>
            <dc:creator><![CDATA[Nick Porter]]></dc:creator>
            <pubDate>Tue, 17 Feb 2026 17:24:48 GMT</pubDate>
            <atom:updated>2026-02-17T17:24:48.546Z</atom:updated>
            <content:encoded><![CDATA[<p>Hiya! My name is Nick and I love Web apps! I have been writing them professionally since ’98. One of the parts I love the most about it is the UI design and mastering the coding implementation behind that.</p><p>For a little perspective when I started coding CSS wasn’t fully adopted so for styling we just had JavaScript and HTML. Styling was still done in-line or with dedicated HTM tags like the &lt;font&gt; tag . Organizing your Web app into a cohesive easy to reason about system wasn’t easy. It became messy and inconsistent.</p><p>Today with the power of extremely sophisticated coding tools like Claude Code, coalescing with years of experience in the field, we now have some help to show us what to avoid.</p><p>Now Anthropic has released their skills marketplace. Opening up a fascinating window into the minds that are behind Claude Code and offering new guidance for topics that are on the minds of engineers who use Claude daily.</p><blockquote>helping Claude produce visually distinctive UI that avoids the <em>“AI slop”</em> aesthetic</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*p0MHlweDvJGs-KF4RcO06g.png" /><figcaption>Image Credit Gemini</figcaption></figure><p><a href="https://github.com/anthropics/skills?tab=readme-ov-file#try-in-claude-code-claudeai-and-the-api">GitHub - anthropics/skills: Public repository for Agent Skills</a></p><h4>Skills Marketplace</h4><p>When Anthropic launched their skills marketplace we were already running 36 skills in Production and a few around the subject of UI development. But one of their skills caught my eye frontend-design.</p><p>This skill is aimed at helping Claude produce visually distinctive UI that avoids the <em>“AI slop”</em> aesthetic. It has a great philosophy but we needed it to be usable beyond greenfield and also have our own flavor to it that fit our application.</p><p>I thought it would be fun to not just explain the aspects of the skill that I think are important but also show examples of what AI tools will default generate vs. how the same UI looks with the skill in use. Please keep in mind this is a NextJS application with Mantine as the UI component library.</p><blockquote><em>“What will make this stand out to a user?”</em></blockquote><h4>What’s In The Skill</h4><p>So let’s talk about some of the fundamental tenets of the skill.</p><ol><li>Design Thinking Before Code</li></ol><p>The skill forces a strategic pause before implementation to establish:<br> — Purpose and Audience. What problem does this solve? Who is using this?<br> — Tone. Commit to a bold direction (organic/natural, luxury/refined, etc.)<br> — Technical Constraints. Framework, performance requirements<br> — The Memorability Question. <em>“What will make this stand out to a user?”</em></p><p>2. The Anti-Slop Philosophy</p><blockquote>This is a critical part of the skill because it makes Claude self-aware</blockquote><p>The core conviction of the skill from Anthropic is stated plainly: avoid <em>“generic AI slop aesthetics”</em>. They call out specific offenders:<br> — Overused font families<br> — Cliched color schemes (they specifically call out purple gradients 😆)<br> — Predictable layouts <br> — Cookie-cutter design that lacks context specific character</p><p>This is a critical part of the skill because it makes Claude self-aware of the problem by naming it directly.</p><p>3. Typography as Identity</p><p>The advice in the skill: “Choose fonts that are beautiful, unique and interesting.” Avoid generic fonts like Arial and Inter. Instead use distinctive choices that elevate the front-end’s aesthetic. Unexpected, characterful font choices.</p><p>4. Cohesive Color with Conviction</p><p>“Commit to cohesive aesthetic using CSS variables. Favoring dominant colors with sharp accents”. The guidance is directional, be bold. Don’t hedge with safe grays and subtle blues. But it doesn’t prescribe which colors or provide a system.</p><p>5. Motion as High-Impact Moments</p><p>Prioritize “one well-orchestrated page load with staggered reveals.” over scattered micro-interactions across the page. Quality over quantity. Make the moments that matter feel intentional.</p><p>6. Atmospheric Over Solid Colors</p><p>Create visual atmosphere through visual gradients, textures and patterns. Don’t settle for flat background colors.</p><p>7. Match Complexity to Vision</p><p>The implementation should match the aesthetic ambition. Maximalist designs require elaborate code with extensive animations. Minimalist designs demand restraint and precision in spacing and typography.</p><h4>Let’s See it In Action!</h4><p>Now I wanted to see what Claude Code would produce by default and compare that to an after version when each of the core design principles of the skill were applied.</p><p>The theme was a simple ToDo app. As mentioned earlier I use NextJS and a Mantine UI layer. Here is what Claude Code will likely produce given those constraints and basic prompting.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/442/1*nhj-yKKsuEYMS3LzXT7TjQ.png" /><figcaption>AI Slop Example</figcaption></figure><p>Now let’s start layering in core tenets of the skill and see how they impact the design with each step! The next example is when applying a color system.</p><h4>Use a Color System</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/442/1*n4560iamBoT-Tn-jdzrP4w.png" /></figure><p>We are already starting to see some important differences that make the component easier to reason about and a little easier on the eyes. So now let’s see what happens when we add depth and glass.</p><h4>Depth and Glass</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/438/1*a-xhjjWh5JfI-wU3koVgxg.png" /></figure><p>Check out how the bottom of the component is much more anchored and the dividing lines between sections are not just solid flat lines but instead offer a tapering effect. Your eyes can scan over this more easily and find distinct points of interest without feeling hitched or stalled. Stuck.</p><h4>Shadow Hierarchy</h4><p>What is shadow hierarchy? The idea that shadows aren’t just decoration — they communicate where an element sits in 3D space relative to everything around it.</p><p>In AI slop every element gets the same shadow. A card, a button, maybe a badge? All get the same shadow element applied. Dead giveaway. The whole page will end up flat looking this way. Your brain can’t easily process what is “above” what. Nothing feels interactive, nothing stands out as important.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/438/1*38zsoMpfV8-MwcSZUdM4Cg.png" /></figure><h4>Add Topography Craft</h4><p>Topography craft is how you make system fonts (the ones already on every device) feel like deliberate design choices instead of a lazy default. Admittedly the difference here is subtle. Once you start noticing differences though you can see how they make sense in the overall context.</p><p>As an example let’s look at letter spacing as a signal. Different spacing tells you what kind of text you’re looking at without reading it.</p><p>— -0.01em (tight) on the hero heading — pulls letters together, feels confident and dense<br> — 0.01em (barely open) on todo item text — just enough air to feel comfortable reading<br> — 0.04em (open) on badge text — “RECOVERY” breathes, reads as a label<br> — 0.08em (wide) on the small uppercase label — “DAILY RITUAL” stretches out, reads as a category tag above the heading</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/434/1*H-8tGXGh4jrgdRcwWLGdvA.png" /></figure><h4>Add Motion</h4><p>Motion is good, until it’s not. Proper use of motion can really drive your users eye to the right place or it can drive them right out the door.</p><blockquote>animation must justify its existence</blockquote><p>This is where an AI tool can really make things chaotic. Ask a LLM to <em>“add animation”</em> and you’ll get a bouncing, spinning, easing-in-out circus!</p><p>The core tenet of this rule is that animation must justify its existence. If you can’t articulate WHY something moves, it shouldn’t. How about some examples of where animation CAN be instructive?<br> — Card entrance. Orients the user <em>“this content just arrived”</em><br> — Staggered item reveal. Without it, 5 items showing simultaneously creates a “wall of content” effect<br> — Hover lift. Confirms interactivity<br> — Button press. Tactile feedback</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/410/1*jEaF0NMszRifMQemOSxmiA.gif" /></figure><h4>Full Skill Applied</h4><p>And here we are at the final product when the skill runs before you plan, and most importantly before you implement the UI work. Avoiding AI-Slop in your app SHOULD be automated.</p><p>Take a second (as I have been doing 😆) and scroll back up to the initial Mantine version of the component. It seemed pretty easy to smack a checkmark on that thing if this was a PR and send it to prod. However after applying each of these valuable skill tenets you can see a dramatic difference with a real personality forming there.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/362/1*Su4yIw5pXvV0dCMUKH4mWA.png" /></figure><h4>Summary</h4><p>Assembling the correct set of skills for you application is critical to achieving what I prize as the most important goal for every Claude session. Quality &gt; Speed. Your Claude system should slow down, plan for every part of a feature with the right set of guidelines and rules in place.</p><p>Automating your workflow with a clear checklist of responsibilities for each and every work session has a compounding effect. The more intentionally you layer the gates Claude must pass through in order to even bring something to you for consideration. The better the quality of code you will see every time.</p><p>For a production system these layers are mission critical. For a very personal reason they are also very rewarding to build up, understand and make specific to the app it’s living in.</p><p>I encourage you to grab the Anthropic Skills Marketplace and see what they have! I will promise you there is something there suprising that will help you every day!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0i7v0TKPWTQqK7oE2ocn8A.png" /><figcaption>Image Credit Gemini</figcaption></figure><h4>Tell Me What Works!</h4><p>So have you been using this skill? How have you felt about the quality that you are seeing? Have you modified the original much, leave it as is or wholely replace most of it?</p><p>I would LOVE to hear from you in the comments!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a572d0cfef4f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Anthropic’s Improved Workflow: When Your Hacks Ship as Features]]></title>
            <link>https://pub.towardsai.net/anthropics-improved-workflow-when-your-hacks-ship-as-features-62e9cb79c856?source=rss-6b18eabac222------2</link>
            <guid isPermaLink="false">https://medium.com/p/62e9cb79c856</guid>
            <category><![CDATA[claude-code]]></category>
            <category><![CDATA[anthropic-claude]]></category>
            <dc:creator><![CDATA[Nick Porter]]></dc:creator>
            <pubDate>Tue, 10 Feb 2026 23:01:02 GMT</pubDate>
            <atom:updated>2026-02-10T23:01:02.381Z</atom:updated>
            <content:encoded><![CDATA[<p>Hiya! My name is Nick and I love writing Web apps! I have been writing in various languages both front-end and back-end professionally since ’98. My workflow, needless to say, has evolved considerably over that time.</p><p>There are incredible workflow improvement announcements coming out of Anthropic. Initially I was excited about the 1m context window but after digging deeper there are more meaningful impacts from other recent improvements to Claude Code.</p><blockquote>we were months ahead</blockquote><p>Anthropic continues to roll improvements to their product which is incredible and sometimes a little overwhelming. Don’t worry I stay on top of this and look for the latest workflow improvements coming out. In fact we were months ahead of these recent announcements with our own system which gracefully transitioned to the version in this article that is using more native features of Claude Code.</p><p>Anthropic announcing a larger Claude context seemed inevitable but it will not solve all the issues with long-running coding session and (for now) will not replace the importance of session files. It does however make redundant one part of that old system and that is the gotcha’s.</p><p>With our adjustments we also went from 4 commands to 1 in each coding session. This process makes the long-running coding session feel more refined, a little less bloated by commands and smoother from start to end. One of the greatest parts is that it kinda removed some of the manual steps I had to take care of or do a little reasoning about.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rUWBkE56p7-GoOa28cCzQA.png" /><figcaption>Image Credit Gemini</figcaption></figure><h4>Why Recent Changes Impact My Workflow</h4><p>Shipping alongside Opus 4.6 were features in Claude Code that changed my workflow pretty significantly. If you have read my previous articles (thank you) you know that I would prepare Claude for certain phases of the workflow with commands. Many of them have been replaced by Anthropic making these workflow features native to Claude Code.</p><blockquote>Well have you had times coding in Claude where an autonomous process takes over and it just feels … disjointed.</blockquote><p>Over the last few months my workflow has looked something like this.</p><ol><li>Discuss feature with Claude &amp; start a session file use the/orchestrate command for agents</li><li>continue to update session files by calling /update-session</li><li>call /wrap-up to run quality standards and write a commit message</li><li>call /push to run the quality gates, make fixes, and push the code</li></ol><p>What my workflow looks like after the latest Claude Code V2.1.37 improvements.</p><ol><li>Discuss feature and session file with Claude</li><li>do work</li><li>call /build-pipeline</li></ol><h4>Did We Lose Anything?</h4><p>No! Because Anthropic has made native the very features that engineers in and outside their ecosystem pushed for. I will show you how adopting these native features changed my workflow and how you can use them in yours to improve the quality of code as well as how the experience feels.</p><blockquote>Or ideally I didn’t want to even have to think about it.</blockquote><p>What do I mean by <em>‘how the experience feels’</em>? Well have you had times coding in Claude where an autonomous process takes over and it just feels … disjointed. You don’t really know the results of that agent taking over checking your code. Much of the previous process still relied on prompting too. This meant me manually reminding Claude to do something like stay in Orchestrator mode.</p><p>I know the frustration you may be feeling. I wanted the feeling of building a new feature or running through the code quality gates while still in the middle of a long-running task to feel more natural. Or ideally I didn’t want to even have to think about it.</p><p>1) <strong>Auto-memory</strong> (V2.1.32) — Replaced /update-session<br>2) <strong>Agent Teams</strong> (V2.1.32, research preview) — Replaced manual fan-out fan-in orchestration templates<br>3) <strong>Delegate Mode</strong> (V2.1.32 ships as part of Agent Teams) — Replace ~100 lines of CLAUDE.md Orchestrator scaffolding<br>4) <strong>Project-level Hooks</strong> in settings.json — Moved hooks from command-scope YAML to always-on JSON</p><h4>What is Auto-memory</h4><p>So something called Auto-memory sounds like a super good idea but what exactly is going on under the hood?</p><blockquote>Claude reads these files on startup now</blockquote><p>As Claude works with you it identifies patterns, gotchas, and constraints that would be useful to remember across sessions. Claude then automatically writes these to persistent memory files — specifically MEMORY.md and topic specific files in your .claude/ directory. Claude reads these files on startup now and has immediate access to those memories and context.</p><p>What does Claude collect organically (no prompting needed)?<br> — Codebase specific constraints — banned coding practices<br> — Architecture patterns — jest.setup.js has 3 tRPC mock locations update ALL 3<br> — Key identifiers — MCP tool connection IDs<br> — File-level knowledge — NutritionCard.tsx is 1200 lines use custom hooks for new logic</p><p>These are real examples that are in my system already!</p><h4>What is Agent Teams</h4><p>Agent Teams is a native multi-agent coordination system where the lead agent delegates work to teammate agents that work in parallel, coordinating through a shared task list. This is currently a research preview (V2.1.32). Sound familiar?</p><p><a href="https://ai.plainenglish.io/tdd-kills-claude-context-using-orchestrator-pattern-with-strict-tdd-adherence-56e04111ae25">TDD Kills Claude Context: Using Orchestrator Pattern With Strict TDD Adherence</a></p><p>Agent Teams formalized what we had hand built way back in 2025. This is a really huge improvement and gives incredible power to any first time user right out of the box.</p><h4>What is Delegate Mode</h4><p>At the beginning of each session I would still need to remind Claude to always be in Orchestrator mode. Even within a single session Claude will still tend to jump straight into code. I would have to stop Claude and make sure they stayed in their lane.</p><p>When you have ~100 lines of CLAUDE.md instruction telling Claude how to behave and it still doesn’t stick, that’s a sign that you need something stronger than prompting.</p><p>Delegate Mode (Shift+Tab in Claude Code) solves this natively. It tells Claude to delegate it’s work to sub-agents instead of writing code directly. The lead agent stays focused on the big picture while teammate agents handle the implementation in parallel.</p><p>By enabling Delegate mode as the default we removed ~100 lines from CLAUDE.md that were trying to describe the exact behavior through instruction. That’s been a consistent theme for this article, enforce through platform not prompting.</p><pre>// To enable Agent Teams by default<br>// add this to your .claude/settings.json file<br>&quot;env&quot;: {<br> &quot;CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS&quot;: &quot;1&quot;<br>},</pre><blockquote>Auto-memory can remind Claude about coding patterns but it can’t run your test suite for you.</blockquote><h4>How Do Project Level Hooks Help</h4><p>Project level hooks have been around a while but they help wire together the remaining pieces into the consolidated single command that I use with every Claude session.</p><p>The big one is quality-gates.sh. Before this change our quality gates only ran when I called /push. Now they fire as a PreToolUse hook on every git push attempt. If tests fail, type-check fails, or lint fails the push is blocked. Auto-memory can remind Claude about coding patterns but it can’t run your test suite for you. Hooks can.</p><pre>  // .claude/settings.json<br>  {<br>    &quot;hooks&quot;: {<br>      &quot;PreToolUse&quot;: [<br>        {<br>          &quot;matcher&quot;: &quot;Bash&quot;,<br>          &quot;hooks&quot;: [{<br>            &quot;type&quot;: &quot;command&quot;,<br>            &quot;command&quot;: &quot;\&quot;$CLAUDE_PROJECT_DIR\&quot;/.claude/hooks/quality-gates.sh&quot;<br>          }]<br>        }<br>      ],<br>      &quot;PostToolUse&quot;: [<br>        {<br>          &quot;matcher&quot;: &quot;Edit|Write&quot;,<br>          &quot;hooks&quot;: [{<br>            &quot;type&quot;: &quot;command&quot;,<br>            &quot;command&quot;: &quot;\&quot;$CLAUDE_PROJECT_DIR\&quot;/.claude/hooks/coding-standards.sh&quot;<br>          }]<br>        }<br>      ]<br>    }<br>  }</pre><p>We also kept a lighter coding-standards.sh hook on PostToolUse as a safety net. Auto-memory handles most of what it checks but Claude can still slip up after compaction. This is low cost insurance.</p><h4>The Build Pipeline Consolidation</h4><p>This is where it all starts to get wired in together. We had 4 commands that each did a part of the end-session work.<br> —/orchestrator — manage multi-agent coding and research <br> — /update-session — save what we learned and how far we got<br> — /wrap-up — coding standards check, create commit message<br> — /push — run quality gates then push</p><p>Because of recent advancements some of the instruction provided by these commands became native to Claude Code and came out of my workflow entirely! We moved the rest to one command. The /build-pipeline command looks like this.<br>ANALYZE →CHECK →GATE →SESSION →STAGE →COMMIT →PUSH →REPORT</p><p>Much of the ceremony that was in my workflow, a good chunk being the management of session files, became redundant by the recent releases from Anthropic. Workflow managed tools were replaced by tools such as:<br> — Delegate Mode<br> — Agent Teams<br> — Auto-memory</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dLQvXl_xGcp_JkwQ36-Y-w.png" /><figcaption>Image Credit Gemini</figcaption></figure><h4>We Must Adapt To Survive</h4><p>The ever changing landscape of using AI tools in your engineering workflow has been given a couple turbo chargers. I’m sure you’re like me and expect more changes on the horizon.</p><p>Anthropic has shown us that the feedback loop reward early adopters. We built patterns and hammered them out over time, over the last few months. Anthropic just made those into standards and shipped them as native features.</p><p>It has been fantastic learning and putting the findings down here on Medium. I hope you will continue to learn and build new things with me!</p><h3>Footnotes</h3><h4>Where 1m Context Is Available Now</h4><p>Opus 4.6 launched Feb 5, 2026 with a 1m context window. Anthropic’s first Opus-class model with this capability. It’s described as <em>“in beta”</em> in the official announcement. <br> — Claude.ai (web/app) — Yes, available now<br> — Anthropic API — Yes, with the model ID claude-opus-4–6 <br> — Cloud platforms — Yes (AWS, Bedrock, Azure Foundry, Google Vertex)<br> — Claude Code CLI — No, still 200k</p><h4>Sometimes The Hare Wins</h4><p>In software engineering while using AI tools being ahead can help you prepare for when your early thinking becomes standard. Anthropic has recently codified concepts, patterns and architectures we built together MONTHS ago. As a reminder here are some of the things we built ahead of the curve that are now codified by Anthropic.</p><pre>  ┌───────────────────────────────────────────────────┬───────────────────────────────────────────────────────────┐<br>  │               What We Built (2025)                │           What Anthropic Shipped (Feb 5, 2026)            │<br>  ├───────────────────────────────────────────────────┼───────────────────────────────────────────────────────────┤<br>  │ CLAUDE.md &quot;You are the ORCHESTRATOR&quot; (~100 lines) │ Delegate Mode (Shift+Tab)                                 │<br>  ├───────────────────────────────────────────────────┼───────────────────────────────────────────────────────────┤<br>  │ /orchestrate fan-out/fan-in templates             │ Agent Teams with shared task list                         │<br>  ├───────────────────────────────────────────────────┼───────────────────────────────────────────────────────────┤<br>  │ /hand-off session transfer protocol               │ 1M context window (fewer handoffs needed)                 │<br>  ├───────────────────────────────────────────────────┼───────────────────────────────────────────────────────────┤<br>  │ /update-session manual learning capture           │ Auto-Memory                                               │<br>  ├───────────────────────────────────────────────────┼───────────────────────────────────────────────────────────┤<br>  │ quality-gates.sh as PreToolUse hook               │ Hooks in settings.json (same concept, better integration) │<br>  ├───────────────────────────────────────────────────┼───────────────────────────────────────────────────────────┤<br>  │ coding-standards.sh only during /wrap-up          │ Always-on PostToolUse hooks                               │<br>  └───────────────────────────────────────────────────┴───────────────────────────────────────────────────────────┘</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=62e9cb79c856" width="1" height="1" alt=""><hr><p><a href="https://pub.towardsai.net/anthropics-improved-workflow-when-your-hacks-ship-as-features-62e9cb79c856">Anthropic’s Improved Workflow: When Your Hacks Ship as Features</a> was originally published in <a href="https://pub.towardsai.net/">Towards AI</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[That 900ms Lag Is Killing Your UX — Here’s How We Fixed It]]></title>
            <link>https://javascript.plainenglish.io/that-900ms-lag-is-killing-your-ux-heres-how-we-fixed-it-9be938963d0b?source=rss-6b18eabac222------2</link>
            <guid isPermaLink="false">https://medium.com/p/9be938963d0b</guid>
            <category><![CDATA[tanstack-query]]></category>
            <category><![CDATA[claude-code]]></category>
            <category><![CDATA[nextjs]]></category>
            <dc:creator><![CDATA[Nick Porter]]></dc:creator>
            <pubDate>Sun, 01 Feb 2026 08:04:01 GMT</pubDate>
            <atom:updated>2026-02-01T08:04:01.475Z</atom:updated>
            <content:encoded><![CDATA[<h3>That 900ms Lag Is Killing Your UX — Here’s How We Fixed It</h3><p>Hiya! My name is Nick and I am a software engineer with a love for Web apps! I have been writing them professionally since ‘98 so crafting beautiful code in the pursuit of delivering feature rich apps is just kinda what I do for kicks. I do this using Claude Code and have been actively finding new ways to make Claude more effective for about 7 months.</p><p>I am currently using Claude in a couple different types of apps but my favorite (and has been for a few years now) is to run a NextJS app on Vercel with a Supabase back-end (postgres) TanStack, Redis and a few other tools and libraries that produce the fastest mobile first Web apps you can run.</p><p>I recently put in a new feature where we store nutrition data for the current day and allow the user to navigate to other days to see the data they have stored there BUT it was slow clicking through the days and felt sluggish.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vY9gz4_mOpy6myghkvAFvA.png" /><figcaption>Image Credit Gemini</figcaption></figure><h4>The Problem</h4><p>So when the page first loaded we would fetch today’s data as sort of expected. When a user would select a different day though it took almost a second for the data to load and the component to render.</p><p>This can be a pretty common problem with Web apps. Many of the first things I think about first are index tuning and or component refactoring to be more React 19. However the indexes were tuned and we needed to look at alternative solutions.</p><h4>Adjacent Day Background Fetching</h4><p>So Claude and I decided to implement an architecture that would still allow the page to load as normal but then fetch the data for the days adjacent to today in the background.</p><p>The thinking in implementing the adjacent day strategy was when you land on the page and you’re looking at today’s nutrition data your more likely than not to look at yesterday or maybe the day before that one. We can avoid loading all of the data and also make the user experience really rewarding.</p><h4>The Three-Part Solution</h4><p>We ended up with three complementary optimizations that work together.</p><h4>1. Dynamic Stale Times</h4><p>Not all data has the same freshness requirements. Today’s nutrition data is still in flux as the user is still adding or adjusting entries. Yesterday’s data is set in stone.</p><pre>  // Cache timing constants                                                                                                         <br>  const STALE_TIME_TODAY = 60 * 1000;      // 1 minute - today changes frequently                                                   <br>  const STALE_TIME_HISTORICAL = 5 * 60 * 1000; // 5 minutes - past days rarely change                                               <br>  const GC_TIME = 10 * 60 * 1000;          // 10 minutes - keep in cache for quick switching  </pre><p>We use these in our query hook to tell TanStack how long to trust the cached data.</p><blockquote>Prefetching can handle most cases but what about edge cases?</blockquote><pre>  export function useDailyMeals(habitId: string | undefined, date: string) {                                                        <br>    const today = dateCore.getToday();                                                                                              <br>    const isToday = date === today;                                                                                                 <br>    const staleTime = isToday ? STALE_TIME_TODAY : STALE_TIME_HISTORICAL;                                                           <br>                                                                                                                                    <br>    const query = trpc.nutrition.getMealsByDate.useQuery(                                                                           <br>      { habitId: habitId ?? &#39;&#39;, date },                                                                                             <br>      {                                                                                                                             <br>        enabled: !!habitId &amp;&amp; !!date,                                                                                               <br>        staleTime,                                                                                                                  <br>        gcTime: GC_TIME,                                                                                                            <br>      }                                                                                                                             <br>    );                                                                                                                              <br>                                                                                                                                    <br>    return { meals: query.data, isLoading: query.isLoading };                                                                       <br>  } </pre><h4>2. Graceful Fallback With keepPreviousData</h4><p>Prefetching can handle most cases but what about edge cases? Say when a user clicks quickly before the page load is complete or in a way that doesn’t match how you imagined it when you wrote it?</p><p>Our safety net is keepPreviousData. It tells TanStack Query <em>“Hey if you don’t have data for this query yet, just use what you had previously”</em>.</p><pre>  import { keepPreviousData } from &#39;@tanstack/react-query&#39;;                                                                         <br>                                                                                                                                    <br>  const query = trpc.nutrition.getMealsByDate.useQuery(                                                                             <br>    { habitId, date },                                                                                                              <br>    {                                                                                                                               <br>      staleTime,                                                                                                                    <br>      gcTime: GC_TIME,                                                                                                              <br>      // Safety net: avoid loading spinner if prefetch hasn&#39;t landed                                                                <br>      placeholderData: keepPreviousData,                                                                                            <br>      refetchOnWindowFocus: false,                                                                                                  <br>    }                                                                                                                               <br>  );                                                                                                                                </pre><p>The data still takes the same time to arrive from the server, but the user never sees the loading spinner. The old data stays visible until the new data seamlessly replaces it.</p><h4>3. The Prefetch Hook</h4><p>This is where all the parts come together. When a user selects a day we fire off background requests for the adjacent days.</p><pre>  export function usePrefetchAdjacentDays(recordId: string | undefined) {                                                           <br>    const queryClient = useQueryClient();                                                                                           <br>                                                                                                                                    <br>    const prefetchDate = useCallback(                                                                                               <br>      (date: string) =&gt; {                                                                                                           <br>        if (!recordId || !date) return;                                                                                             <br>                                                                                                                                    <br>        const isToday = date === getToday();                                                                                        <br>        const staleTime = isToday ? STALE_TIME_TODAY : STALE_TIME_HISTORICAL;                                                       <br>                                                                                                                                    <br>        // Prefetch in background - won&#39;t refetch if data is fresh                                                                  <br>        queryClient.prefetchQuery({                                                                                                 <br>          queryKey: [&#39;meals&#39;, recordId, date],                                                                                      <br>          queryFn: () =&gt; fetchMealsByDate(recordId, date),                                                                          <br>          staleTime,                                                                                                                <br>          gcTime: GC_TIME,                                                                                                          <br>        });                                                                                                                         <br>      },                                                                                                                            <br>      [recordId, queryClient]                                                                                                       <br>    );                                                                                                                              <br>                                                                                                                                    <br>    const prefetchAdjacentDays = useCallback(                                                                                       <br>      (selectedDate: string) =&gt; {                                                                                                   <br>        if (!recordId || !selectedDate) return;                                                                                     <br>                                                                                                                                    <br>        const yesterday = subtractDays(selectedDate, 1);                                                                            <br>        const tomorrow = addDays(selectedDate, 1);                                                                                  <br>                                                                                                                                    <br>        // Fire-and-forget - doesn&#39;t block UI                                                                                       <br>        prefetchDate(yesterday);                                                                                                    <br>        prefetchDate(tomorrow);                                                                                                     <br>      },                                                                                                                            <br>      [recordId, prefetchDate]                                                                                                      <br>    );                                                                                                                              <br>                                                                                                                                    <br>    return { prefetchAdjacentDays, prefetchDate };                                                                                  <br>  }  </pre><p>The key is the useQueryClient() which gives you access to the query client. The prefetch method populates the cache without triggering a re-render! This is a fire-and-forget action.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZtWArKoO8nwxXkqzR7MuaA.png" /><figcaption>Image Credit Gemini</figcaption></figure><h4>Wiring It Up</h4><p>In our component we just wrap the day selection handler.</p><pre>  const { prefetchAdjacentDays } = usePrefetchAdjacentDays(habit.id);                                                               <br>                                                                                                                                    <br>  const handleDaySelect = useCallback(                                                                                              <br>    (date: string) =&gt; {                                                                                                             <br>      setSelectedDate(date);                                                                                                        <br>      // Prefetch adjacent days in background for instant switching                                                                 <br>      prefetchAdjacentDays(date);                                                                                                   <br>    },                                                                                                                              <br>    [prefetchAdjacentDays]                                                                                                          <br>  );                                                                                                                                <br>                                                                                                                                    <br>  return (                                                                                                                          <br>    &lt;DaySelector                                                                                                                    <br>      selectedDate={selectedDate}                                                                                                   <br>      onDaySelect={handleDaySelect}                                                                                                 <br>    /&gt;                                                                                                                              <br>  );</pre><h4>Why Not Redis?</h4><p>We considered caching this in Redis at the edge. We use Redis extensively for saved and/or static data. Data that doesn’t need to change often or ever.</p><p>When considering Redis as a performance option it’s important to consider the following:<br> — Is it user specific —Can’t be shared<br> — Date keyed — Unique per day<br> — Frequently Updated — The data changes each day</p><blockquote>perceived performance matters more than actual performance.</blockquote><h4>The Results</h4><p>The UX difference was not just massive it made the experience feel natural and even fun.</p><pre>  ┌─────────────────────────────────────┬─────────────────────────┐                                                                 <br>  │               Before                │          After          │                                                                 <br>  ├─────────────────────────────────────┼─────────────────────────┤                                                                 <br>  │ ~900ms perceived load on day switch │ Instant (0ms perceived) │                                                                 <br>  ├─────────────────────────────────────┼─────────────────────────┤                                                                 <br>  │ Loading spinner on every navigation │ Seamless data swap      │                                                                 <br>  ├─────────────────────────────────────┼─────────────────────────┤                                                                 <br>  │ Each click felt like a page load    │ Feels like local data   │                                                                 <br>  └─────────────────────────────────────┴─────────────────────────┘ </pre><p>The actual network request still takes the same time, but the user never waits for it. Really if you boil it down perceived performance matters more than actual performance.</p><h4>Summary</h4><p>If you have a UI where users are navigating between related records (days, pages, items in their list) consider this pattern.</p><ol><li>Dynamic stale times — Fresh data needs short cache times, historical data can be cached longer</li><li>Graceful Fallback — Show something immediately</li><li>Speculative prefetching — Predict where users will go next and fetch it before they click to retrieve it</li></ol><p>TanStack Query makes all of this straightforward with staleTime, keepPreviousData, and prefetch(). One of the coolest parts of this? Clicking on different days respects the cache! If you have already fetched tomorrow’s data , the pre-fetch becomes a no-op.</p><h4>Please Contribute!</h4><p>So please tell me what you’re doing to improve performance and optimization! I am eager to hear new ideas and see if we can build the fastest apps out there on the web!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9be938963d0b" width="1" height="1" alt=""><hr><p><a href="https://javascript.plainenglish.io/that-900ms-lag-is-killing-your-ux-heres-how-we-fixed-it-9be938963d0b">That 900ms Lag Is Killing Your UX — Here’s How We Fixed It</a> was originally published in <a href="https://javascript.plainenglish.io/">JavaScript in Plain English</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Teaching Claude to Remember Part 5: Trust But Verify]]></title>
            <link>https://pub.towardsai.net/teaching-claude-to-remember-part-5-trust-but-verify-d39a2b47c0a0?source=rss-6b18eabac222------2</link>
            <guid isPermaLink="false">https://medium.com/p/d39a2b47c0a0</guid>
            <category><![CDATA[claude-code]]></category>
            <category><![CDATA[anthropic-claude]]></category>
            <category><![CDATA[claude-ai]]></category>
            <dc:creator><![CDATA[Nick Porter]]></dc:creator>
            <pubDate>Thu, 22 Jan 2026 12:32:59 GMT</pubDate>
            <atom:updated>2026-01-22T12:32:59.590Z</atom:updated>
            <content:encoded><![CDATA[<p>Two weeks ago Claude Code 2.1.0 shipped 1,096 commits. Buried in the change log is a feature that changes everything about workflow task management and I don’t hear anyone talking about it.</p><p>Hi my name is Nick and I am a software engineer with a focus for Web apps. I have been building Web apps since 98. Obtaining a workflow that doesn’t just manage the tasks I need accomplished but one that can also delight me is something I have worked hard to realize.</p><blockquote>the basis of Claude’s instructions in your system are suggestions NOT enforced rules</blockquote><p>The previous parts of this series focused first on the fundamentals needed to put this working Claude system into an existing (or greenfield) application of ANY kind. My friend has already used it in TWO different types of apps and both are NOT Web apps!</p><p>I follow the guidelines set out by Anthropic and will provide links to their docs. These are established patterns to not only produce the highest quality code but also manage the entire production release pipeline.</p><blockquote>it blocks the call entirely. The push never happens. The file never writes. It’s NOT a suggestion.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4VC_0yrQ4FMWRKsjectf_Q.png" /><figcaption>Image credit Gemini</figcaption></figure><h4>Claude Code 2.1.0</h4><p>So what’s this big deal feature that shipped a couple weeks ago from Anthropic!?!? Frontmatter hooks in skills/agents (PreToolUse, PostToolUse, Stop). Exit codes (0 = allow, 2 = block).</p><h4>How This Ties In</h4><p>The reason this feature is so important is that by now you know (having read my previous articles <em>*wink* *wink*</em>) that the basis of Claude’s instructions in your system (the CLAUDE.md’s) are suggestions NOT enforced rules. Frontmatter hooks change that by enforcing your rules at specific intervals in the workflow lifecycle.</p><p>Three lifecycle events — PreToolUse, PostToolUse and Stop — let you intercept Claude’s actions. And crucially, exit code 2 doesn’t just warn Claude; it blocks the call entirely. The push never happens. The file never writes. It’s NOT a suggestion.</p><p><a href="https://code.claude.com/docs/en/skills">Extend Claude with skills - Claude Code Docs</a></p><p>Frontmatter Lifecycle Events:<br> — PreToolUse — Before any tool executes<br> — PostToolUse — After a tool executes <br> — Stop — When the skill/agent finishes</p><h4>Diving Right In</h4><p>Ok I feel like we dove hard in real fast! I hope I didn’t lose you so let’s discuss why this is important in the scope of the overall system then I will show you the actual code to make it work with YOUR system!</p><h4>Stepping Back a Little</h4><p>Let’s take a second to consider what we covered in the previous articles. We setup the fundamentals in CLAUDE.md. Then we added Memory, and followed that with Session (still one of my all time favs). Our last article was around Skills and now we are ready to tie all the parts together for the final release pipeline.</p><p><a href="https://pub.towardsai.net/teaching-claude-to-remember-part-4-skills-your-ais-tribal-knowledge-36d710e305e3">Teaching Claude To Remember: Part 4 — Skills (Your AI’s Tribal Knowledge)</a></p><h4>Closing The Loop: Session Updates and /wrap-up</h4><p>My /wrap-up command uses PostToolUse hooks and is advisory that warns but doesn’t block.</p><pre>  ---                                                                                                                               <br>  description: Prepare work for commit with automatic checks                                                                        <br>  hooks:                                                                                                                            <br>    PostToolUse:                                                                                                                    <br>      - matcher: &#39;Write|Edit&#39;                                                                                                       <br>        hooks:                                                                                                                      <br>          - type: command                                                                                                           <br>            command: &#39;bash $CLAUDE_PROJECT_DIR/.claude/hooks/coding-standards.sh&#39;                                                   <br>            timeout: 10                                                                                                             <br>  --- </pre><p>Every time Claude edits a file, the hook auto-checks for:<br> — console.log left in production code<br> — new Date() without proper library use and timezone handling<br> — Client components importing server-side code (a prod killer in NextJS)</p><p>These are warnings not blockers — exit code 0, not 2. Claude sees the feedback and can fix the code before a commit.</p><p>That’s all super cool but here is the real payoff. The /wrap-up command makes sure to update the Session file. That hand-off document from part 3? It’s not optional anymore. I cannot tell you how valuable Session has become over the course of several months and iterations on the code base.</p><p>At the start of virtually all projects I ask Claude to create two session files:<br> — a transient checklist<br> — a long term session file that lives indefinitely</p><p>The Session file system along with Memory make picking up a long-running task over the course of several days and using a handful or more of new Claude’s a realistic endeavor where I don’t throw code away anymore.</p><blockquote>The larger the project, the more valuable that pause becomes.</blockquote><h4>Scale Matters: Large Projects Need More Gates</h4><p>The approval patterns scales with risk. Small bug fix? Claude proposes a quick plan, you nod, it executes. Large new feature spanning 15 files, 3 services and a DB migration? Claude presents a full breakdown — phases, affected files, architectural decisions. You start asking questions.</p><p><em>“Why are you touching the auth module?”<br>“What about the edge case when the user isn’t subscribed?”<br>“Remove the refactor — just fix the bug”</em></p><p>Claude adjusts and presents a new proposal. Only after your approval does implementation begin. The same gate exists at commit time. And push time. The larger the project, the more valuable that pause becomes. That moment of <em>“wait why are changing the payment service”</em> happens before the commit, not after you have to untangle the mess from prod.</p><h4>Trust But Verify</h4><p>How do we really enforce a system where Claude avoids pitfalls, remembers your previous conversations then actually makes it all production ready code with the Orchestrator pattern and strict TDD Agent enforcement? Follow the previous guides then use this system for your Quality Gates.</p><p>I have wired the Quality Gate system into the /push command I use at the end of a development cycle.</p><pre>  ┌─────────────────────────────────────────────────────────────┐                                                                   <br>  │  .claude/commands/push.md                                   │                                                                   <br>  │  ┌───────────────────────────────────────────────────────┐  │                                                                   <br>  │  │  ---                                                   │  │                                                                  <br>  │  │  hooks:                                                │  │                                                                  <br>  │  │    PreToolUse:                                         │  │                                                                  <br>  │  │      - matcher: &#39;Bash&#39;                                 │  │                                                                  <br>  │  │        hooks:                                          │  │                                                                  <br>  │  │          - type: command                               │  │                                                                  <br>  │  │            command: &#39;bash $CLAUDE_PROJECT_DIR/         │  │                                                                  <br>  │  │              .claude/hooks/quality-gates.sh&#39;  ─────────────┐                                                                 <br>  │  │            timeout: 180                                │  ││                                                                 <br>  │  │  ---                                                   │  ││                                                                 <br>  │  └───────────────────────────────────────────────────────┘  ││                                                                  <br>  └─────────────────────────────────────────────────────────────┘│                                                                  <br>                                                                 │                                                                  <br>  ┌─────────────────────────────────────────────────────────────┐│                                                                  <br>  │  .claude/hooks/quality-gates.sh          ◄───────────────────┘                                                                  <br>  │  ┌───────────────────────────────────────────────────────┐  │                                                                   <br>  │  │  if [[ &quot;$COMMAND&quot; == *&quot;git push&quot;* ]]; then            │  │                                                                   <br>  │  │      npm test || exit 2        ← BLOCKS the push      │  │                                                                   <br>  │  │      npm run type-check || exit 2                     │  │                                                                   <br>  │  │      npm run lint || exit 2                           │  │                                                                   <br>  │  │  fi                                                   │  │                                                                   <br>  │  │  exit 0                        ← ALLOWS the push      │  │                                                                   <br>  │  └───────────────────────────────────────────────────────┘  │                                                                   <br>  └─────────────────────────────────────────────────────────────┘ </pre><p>What This Does:<br> — PreToolUse — runs before any Bash command executes<br> — matcher: ‘Bash’ — only triggers on Bash tool calls<br> — timeout: 180–3 minutes for test suite to complete<br> — $CLAUDE_PROJECT_DIR — environment variable for project root</p><h4>The Quality Gates Hook Script</h4><pre>  #!/bin/bash                                                                                                                       <br>  # Exit codes:                                                                                                                     <br>  #   0 = Allow the command                                                                                                         <br>  #   2 = Block the command (quality gate failed)                                                                                   <br>                                                                                                                                    <br>  set -o pipefail                                                                                                                   <br>                                                                                                                                    <br>  # Parse the command from stdin JSON                                                                                               <br>  INPUT=$(cat)                                                                                                                      <br>  TOOL_NAME=$(echo &quot;$INPUT&quot; | jq -r &#39;.tool_name // empty&#39;)                                                                          <br>  COMMAND=$(echo &quot;$INPUT&quot; | jq -r &#39;.tool_input.command // empty&#39;)                                                                   <br>                                                                                                                                    <br>  # Only intercept git push commands                                                                                                <br>  if [[ &quot;$TOOL_NAME&quot; != &quot;Bash&quot; ]] || [[ &quot;$COMMAND&quot; != *&quot;git push&quot;* ]]; then                                                         <br>      exit 0  # Not a push, allow it                                                                                                <br>  fi                                                                                                                                <br>                                                                                                                                    <br>  echo &quot;Quality Gates Hook Triggered&quot; &gt;&amp;2                                                                                           <br>                                                                                                                                    <br>  # Gate 1: Tests                                                                                                                   <br>  echo &quot;[1/3] Running tests...&quot; &gt;&amp;2                                                                                                 <br>  if ! npm test 2&gt;&amp;1; then                                                                                                          <br>      echo &quot;BLOCKED: Tests failed.&quot; &gt;&amp;2                                                                                             <br>      exit 2  # ← EXIT CODE 2 = BLOCK THE PUSH                                                                                      <br>  fi                                                                                                                                <br>                                                                                                                                    <br>  # Gate 2: Type check                                                                                                              <br>  echo &quot;[2/3] Running type-check...&quot; &gt;&amp;2                                                                                            <br>  if ! npm run type-check 2&gt;&amp;1; then                                                                                                <br>      echo &quot;BLOCKED: Type errors found.&quot; &gt;&amp;2                                                                                        <br>      exit 2                                                                                                                        <br>  fi                                                                                                                                <br>                                                                                                                                    <br>  # Gate 3: Lint (only changed files)                                                                                               <br>  echo &quot;[3/3] Running lint...&quot; &gt;&amp;2                                                                                                  <br>  BRANCH=$(git branch --show-current)                                                                                               <br>  CHANGED_FILES=$(git diff --name-only origin/&quot;$BRANCH&quot;..HEAD | grep -E &#39;\.(ts|tsx)$&#39; || true)                                           <br>  if [[ -n &quot;$CHANGED_FILES&quot; ]]; then                                                                                                <br>      if ! npx eslint $CHANGED_FILES 2&gt;&amp;1; then                                                                                     <br>          echo &quot;BLOCKED: Lint errors found.&quot; &gt;&amp;2                                                                                    <br>          exit 2                                                                                                                    <br>      fi                                                                                                                            <br>  fi                                                                                                                                <br>                                                                                                                                    <br>  echo &quot;All quality gates passed!&quot; &gt;&amp;2                                                                                              <br>  exit 0  # ← EXIT CODE 0 = ALLOW THE PUSH  </pre><h4>The JSON Input Contract</h4><p>This is what your script receives via stdin:. Establishing a rigid contract with request and response messages is important to keep multiple agents all working side by side without losing their place, forgetting things or leaving them outright incomplete. This is also really vital to keep your Agent responses valuable and not overwhelm the origin Agent with too much detail (potentially overloading context).</p><pre>  {                                                                                                                                 <br>    &quot;tool_name&quot;: &quot;Bash&quot;,                                                                                                            <br>    &quot;tool_input&quot;: {                                                                                                                 <br>      &quot;command&quot;: &quot;git push -u origin main&quot;                                                                                          <br>    },                                                                                                                              <br>    &quot;hook_event_name&quot;: &quot;PreToolUse&quot;,                                                                                                <br>    &quot;session_id&quot;: &quot;abc123&quot;,                                                                                                         <br>    &quot;cwd&quot;: &quot;/Users/you/project&quot;                                                                                                     <br>  } </pre><h4>Pushing To Production With The Commit Approval Pattern</h4><p>When Claude wants to launch straight into coding without getting approval bad things can happen. When Claude has access to MCP and your DB schema is wide open, bad things will eventually happen. How do we as humans stay intimately familiar with the code and its current state in an AI infused workflow world? We force Claude to gain approval before moving forward with critical decisions or changes.</p><blockquote>AI Drafts but human approves</blockquote><p>From bugs and small feature enhancements all the way to full fledge features or refactors, when Claude goes off the rails damage can be introduced without proper oversight particularly when compaction occurs.</p><p>The gating system is not just beneficial and intuitive for Quality Gates but also for your development cycle.</p><p><a href="https://code.claude.com/docs/en/hooks">Hooks reference - Claude Code Docs</a></p><h4>Plan -&gt; Approve -&gt; Implement</h4><p>Claude often seems super eager to get started implementing as if it’s worried about running out of tokens. I have often felt like I was holding Claude at a starter gate that’s primed and ready to burst open. It’s important to remain patient and remember to request ALL of the mechanisms and functionality you want at this early phase. This is particularly important with DB Schema changes. Claude many times likes to look for the path of least resistance instead of the path for higher code quality.</p><blockquote>the engineer risks AI’ing themselves straight out of being a SME</blockquote><h4>Keeping Humans In The Loop</h4><p>AI Drafts but human approves. We never auto-commit or auto-push. This is a philosophical shift. These boundaries are important but there are some things we trust Claude to take care of on their own. For the rest of the stuff though, we humans should stay in the loop. Without a direct connection to the domain and HOW the app works, the engineer risks AI’ing themselves straight out of being a SME (Subject Matter Expert).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*U-Q8bUWWm-aT2iLeL8JB4g.png" /><figcaption>Image credit Gemini</figcaption></figure><p>Claude CAN Do Autonomously:<br> — Read files<br> — Run tests<br> — Edit code (within the task)<br> — Search the codebase<br> — Draft commit messages</p><p>Claude CANNOT Do Without Proper Approval:<br> — Commit Code<br> — Push to remote<br> — Delete files<br> — Modify database schema<br> — Actually execute the commit</p><p>The Commit Approval Pattern is simple: Claude proposes solution(s) but you make the final call and Claude HAS to wait until you have given approval.</p><h4>Full Circle</h4><p>We started this article series asking: how do we make Claude remember? <br>We end with a better question: how do we make Claude reliable?</p><p>This has been about building a workflow you can depend on. One that survives compaction. A system that sticks to the rules when you’re tired or Claude is tired, and want to be done. One that protects you from yourself as much as from Claude.</p><p>If you have followed along through all 5 parts you now have something most developers don’t: an AI workflow that actually works in production.</p><p>Now let’s go build something!</p><p>Note To Readers: If you would like a bootstrap version of this system, put a message in chat and I will connect with you to send it over! Thanks for reading!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d39a2b47c0a0" width="1" height="1" alt=""><hr><p><a href="https://pub.towardsai.net/teaching-claude-to-remember-part-5-trust-but-verify-d39a2b47c0a0">Teaching Claude to Remember Part 5: Trust But Verify</a> was originally published in <a href="https://pub.towardsai.net/">Towards AI</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>