<?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:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:googleplay="http://www.google.com/schemas/play-podcasts/1.0"><channel><title><![CDATA[The Neural Blueprint: Builder's Playbook]]></title><description><![CDATA[Step-by-step builds for production grade AI agents. Real code, real architecture, real output - no demos, no fluff.]]></description><link>https://qubytes.substack.com/s/builders-playbook</link><image><url>https://substackcdn.com/image/fetch/$s_!RDwE!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F27c86b89-264d-4402-8dc4-ce2619924be6_1024x1024.png</url><title>The Neural Blueprint: Builder&apos;s Playbook</title><link>https://qubytes.substack.com/s/builders-playbook</link></image><generator>Substack</generator><lastBuildDate>Fri, 08 May 2026 19:47:31 GMT</lastBuildDate><atom:link href="https://qubytes.substack.com/feed" rel="self" type="application/rss+xml"/><copyright><![CDATA[The Neural Blueprint]]></copyright><language><![CDATA[en]]></language><webMaster><![CDATA[qubytes@substack.com]]></webMaster><itunes:owner><itunes:email><![CDATA[qubytes@substack.com]]></itunes:email><itunes:name><![CDATA[Vijendra]]></itunes:name></itunes:owner><itunes:author><![CDATA[Vijendra]]></itunes:author><googleplay:owner><![CDATA[qubytes@substack.com]]></googleplay:owner><googleplay:email><![CDATA[qubytes@substack.com]]></googleplay:email><googleplay:author><![CDATA[Vijendra]]></googleplay:author><itunes:block><![CDATA[Yes]]></itunes:block><item><title><![CDATA[Every CLAUDE.md Has This Flaw. Mine Did Too.]]></title><description><![CDATA[Most people don't realize their CLAUDE.md is broken until they watch Claude confidently make the same mistake for the third time in a week.]]></description><link>https://qubytes.substack.com/p/claude-md-failure-modes-fix</link><guid isPermaLink="false">https://qubytes.substack.com/p/claude-md-failure-modes-fix</guid><dc:creator><![CDATA[Vijendra]]></dc:creator><pubDate>Mon, 04 May 2026 22:01:33 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!dSj-!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4d511815-d88c-465d-9291-853088c17b75_2008x1343.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>The one file that decides every Claude Code session.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!3l4m!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F04644fa6-5c1d-4137-af57-e72a9b7e66b1_1424x520.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!3l4m!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F04644fa6-5c1d-4137-af57-e72a9b7e66b1_1424x520.png 424w, https://substackcdn.com/image/fetch/$s_!3l4m!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F04644fa6-5c1d-4137-af57-e72a9b7e66b1_1424x520.png 848w, https://substackcdn.com/image/fetch/$s_!3l4m!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F04644fa6-5c1d-4137-af57-e72a9b7e66b1_1424x520.png 1272w, https://substackcdn.com/image/fetch/$s_!3l4m!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F04644fa6-5c1d-4137-af57-e72a9b7e66b1_1424x520.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!3l4m!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F04644fa6-5c1d-4137-af57-e72a9b7e66b1_1424x520.png" width="1424" height="520" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/04644fa6-5c1d-4137-af57-e72a9b7e66b1_1424x520.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:520,&quot;width&quot;:1424,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:343881,&quot;alt&quot;:&quot;CLAUDE.md Substack cover &#8212; ignored vs. structured file, two-column engineering diagram style&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="CLAUDE.md Substack cover &#8212; ignored vs. structured file, two-column engineering diagram style" title="CLAUDE.md Substack cover &#8212; ignored vs. structured file, two-column engineering diagram style" srcset="https://substackcdn.com/image/fetch/$s_!3l4m!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F04644fa6-5c1d-4137-af57-e72a9b7e66b1_1424x520.png 424w, https://substackcdn.com/image/fetch/$s_!3l4m!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F04644fa6-5c1d-4137-af57-e72a9b7e66b1_1424x520.png 848w, https://substackcdn.com/image/fetch/$s_!3l4m!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F04644fa6-5c1d-4137-af57-e72a9b7e66b1_1424x520.png 1272w, https://substackcdn.com/image/fetch/$s_!3l4m!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F04644fa6-5c1d-4137-af57-e72a9b7e66b1_1424x520.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Most people don&#8217;t realize their <code>CLAUDE.md </code>is broken until they watch Claude confidently make the same mistake for the third time in a week.</p><p>Here&#8217;s what&#8217;s happening: Claude reads <code>CLAUDE.md</code> before it reads anything you type. It&#8217;s the operating brief for the entire session. If it&#8217;s weak, every session starts from behind. The gap between a good one and a bad one isn&#8217;t about effort or length, it&#8217;s whether the file reads like a crisp handoff to a senior engineer, or like dropping someone into a codebase with no README and a vague good luck.</p><div><hr></div><h2>Why most <code>CLAUDE.md</code> files fail quietly</h2><p>The failure modes are almost always the same three.</p><p><strong>Too long.</strong> Claude can only reliably follow a limited number of instructions per session, and its internal system prompt already eats into that budget. If your file hits 200+ lines, you haven&#8217;t been thorough, you&#8217;ve been counterproductive. Important rules get deprioritized, not because Claude is ignoring them, but because instruction overload is a real constraint in long-context models. A 200-line <code>CLAUDE.md</code> isn&#8217;t comprehensive. It&#8217;s diluted.</p><p><strong>Wrong content.</strong> Most files are full of things Claude already knows. Act like a senior engineer. Write clean, readable code. These lines don&#8217;t change behavior, they just burn rule space. The only test for whether a line belongs: does removing it cause a specific, real mistake? If not, cut it.</p><p><strong>No layering.</strong> There isn&#8217;t one <code>CLAUDE.md</code>. There are three:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!E8GJ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5529b2d8-faf3-45bf-9c0d-fba0b3cd1fdb_1150x559.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!E8GJ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5529b2d8-faf3-45bf-9c0d-fba0b3cd1fdb_1150x559.png 424w, https://substackcdn.com/image/fetch/$s_!E8GJ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5529b2d8-faf3-45bf-9c0d-fba0b3cd1fdb_1150x559.png 848w, https://substackcdn.com/image/fetch/$s_!E8GJ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5529b2d8-faf3-45bf-9c0d-fba0b3cd1fdb_1150x559.png 1272w, https://substackcdn.com/image/fetch/$s_!E8GJ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5529b2d8-faf3-45bf-9c0d-fba0b3cd1fdb_1150x559.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!E8GJ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5529b2d8-faf3-45bf-9c0d-fba0b3cd1fdb_1150x559.png" width="1150" height="559" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/5529b2d8-faf3-45bf-9c0d-fba0b3cd1fdb_1150x559.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:559,&quot;width&quot;:1150,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:234967,&quot;alt&quot;:&quot;Three-layer CLAUDE.md system diagram &#8212; Global, Project, Local stack infographic&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Three-layer CLAUDE.md system diagram &#8212; Global, Project, Local stack infographic" title="Three-layer CLAUDE.md system diagram &#8212; Global, Project, Local stack infographic" srcset="https://substackcdn.com/image/fetch/$s_!E8GJ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5529b2d8-faf3-45bf-9c0d-fba0b3cd1fdb_1150x559.png 424w, https://substackcdn.com/image/fetch/$s_!E8GJ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5529b2d8-faf3-45bf-9c0d-fba0b3cd1fdb_1150x559.png 848w, https://substackcdn.com/image/fetch/$s_!E8GJ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5529b2d8-faf3-45bf-9c0d-fba0b3cd1fdb_1150x559.png 1272w, https://substackcdn.com/image/fetch/$s_!E8GJ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5529b2d8-faf3-45bf-9c0d-fba0b3cd1fdb_1150x559.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">The 3-Layers System: Claude reads all three on every session start</figcaption></figure></div><p>When everything is in one file, clarity disappears. Split correctly, each file stays short and actually followed.</p><div><hr></div><h2>What a real improvement looks like</h2><p>Here&#8217;s an anonymized example &#8212; the same project&#8217;s <code>CLAUDE.md</code> before and after a proper audit.</p><p><strong>Before (bloated, 180 lines &#8212; excerpted)</strong></p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;markdown&quot;,&quot;nodeId&quot;:&quot;01d9e792-877b-4ab2-846a-add4b5639e76&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-markdown"># CLAUDE.md
You are an expert senior software engineer with 10+ years of experience.
Always write clean, readable, well-documented code.
Think step by step before writing any code.
Follow best practices for React development.
Use TypeScript wherever possible.
Always add comments to complex logic.
Make sure to handle errors properly.
When writing tests, think about edge cases.
Never break existing functionality...
[continues for 160 more lines]</code></pre></div><p>After (tight, 62 lines)</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;markdown&quot;,&quot;nodeId&quot;:&quot;8d7ec364-1116-41a3-a910-f9b4c72b5c25&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-markdown"># CLAUDE.md

## Project
B2B SaaS dashboard &#8212; real-time infrastructure observability for enterprise teams.

## Stack
Next.js 14, TypeScript, PostgreSQL, Tailwind CSS

## Commands
- Dev: npm run dev
- Build: npm run build
- Test: npm test -- path/to/file
- Lint: npm run lint
- Type check: npx tsc --noEmit

## Architecture
- src/components/ &#8594; UI only, no business logic
- src/lib/services/ &#8594; all business logic
- src/lib/store/ &#8594; global state (Zustand)
- src/app/api/ &#8594; API routes only
- DB access via server actions only &#8212; never client-side

## Rules
- NEVER commit .env or secrets
- All async calls must use try/catch with typed errors
- Functional components only &#8212; no class components
- IMPORTANT: run type check after every change
- Do not modify /src/lib/core without explicit approval

## Workflow
- Ask before starting any task estimated &gt;30 mins
- Make minimal changes only
- Separate commits per logical change
- Run tests before marking any task complete
- If unsure, present options &#8212; do not act unilaterally

## Out of scope
- Do not touch /legacy folder
- Do not introduce new dependencies without asking</code></pre></div><p>One file tells Claude what the project does, where things live, what it must never do, and how to behave while working. The other is a vague wishlist. That's the whole difference.</p><div><hr></div><h2>The 5 sections worth having</h2><p>Every high-performing <code>CLAUDE.md</code> I&#8217;ve looked at has the same structure. Here&#8217;s what each section actually does and why it matters.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!dSj-!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4d511815-d88c-465d-9291-853088c17b75_2008x1343.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!dSj-!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4d511815-d88c-465d-9291-853088c17b75_2008x1343.png 424w, https://substackcdn.com/image/fetch/$s_!dSj-!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4d511815-d88c-465d-9291-853088c17b75_2008x1343.png 848w, https://substackcdn.com/image/fetch/$s_!dSj-!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4d511815-d88c-465d-9291-853088c17b75_2008x1343.png 1272w, https://substackcdn.com/image/fetch/$s_!dSj-!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4d511815-d88c-465d-9291-853088c17b75_2008x1343.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!dSj-!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4d511815-d88c-465d-9291-853088c17b75_2008x1343.png" width="2008" height="1343" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/4d511815-d88c-465d-9291-853088c17b75_2008x1343.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1343,&quot;width&quot;:2008,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:221948,&quot;alt&quot;:&quot;Anatomy Diagram&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Anatomy Diagram" title="Anatomy Diagram" srcset="https://substackcdn.com/image/fetch/$s_!dSj-!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4d511815-d88c-465d-9291-853088c17b75_2008x1343.png 424w, https://substackcdn.com/image/fetch/$s_!dSj-!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4d511815-d88c-465d-9291-853088c17b75_2008x1343.png 848w, https://substackcdn.com/image/fetch/$s_!dSj-!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4d511815-d88c-465d-9291-853088c17b75_2008x1343.png 1272w, https://substackcdn.com/image/fetch/$s_!dSj-!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4d511815-d88c-465d-9291-853088c17b75_2008x1343.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Anatomy of a strong CLAUDE.md</figcaption></figure></div><p><strong>Commands.</strong> Claude cannot reliably guess how your project runs. Without this section, it wastes time trying wrong commands. With it, it executes immediately. This is the lowest-effort, highest-return addition you can make today.</p><p><strong>Architecture.</strong> Claude starts every session with no knowledge of how your codebase is organized. A minimal folder map not full documentation, just where things belong cuts the most common misplacement mistakes. You&#8217;re not documenting the whole project. You&#8217;re giving Claude enough orientation to stop guessing.</p><p><strong>Rules.</strong> This is where most people go wrong in both directions too few rules means repeated mistakes, too many means nothing gets followed. Keep it under 15 lines. The filter is strict: if removing a rule wouldn&#8217;t cause a specific mistake you&#8217;ve actually seen, it doesn&#8217;t belong. One practical note: <code>IMPORTANT:</code> capitalization on critical lines genuinely improves compliance. It&#8217;s not just styling, it changes how instructions are weighted during processing.</p><p><strong>Workflow.</strong> Without this section, Claude defaults to maximally thorough behavior. It touches things it shouldn&#8217;t, restructures code you didn&#8217;t ask it to refactor, and produces diffs that take 20 minutes to review. Four or five lines here prevents most of that behavior.</p><p><strong>Out of scope.</strong> Tell Claude explicitly what it should never touch legacy folders, infrastructure configs, core authentication logic. If it isn&#8217;t written here, Claude may reasonably assume it&#8217;s fair game.</p><div><hr></div><h2><code>CLAUDE.md</code> vs. Claude memory: know where one ends and the other begins</h2><p>This is the most commonly confused topic among Claude users, and it matters because confusing the two wastes your entire instruction budget.</p><p><code>CLAUDE.md</code> is for rules and structure. Things that must be true every session regardless of history, your commands, your folder map, your hard constraints.</p><p>Claude&#8217;s memory is for learned context. Over time, Claude builds its own project memory: which files you&#8217;ve worked on, decisions you&#8217;ve made, preferences you&#8217;ve expressed. That lives in Claude&#8217;s memory system, not your file. If Claude already learned via session memory that you prefer Zustand over Redux, or Rust over Python writing it again in <code>CLAUDE.md</code> wastes a rule slot on something Claude already knows. Let memory handle what it&#8217;s built for.</p><p>For engineers running Claude inside agentic pipelines, this boundary matters more than anywhere else. Sub-agents spawned programmatically don&#8217;t always inherit session memory. They do reliably read CLAUDE.md. For anything pipeline-critical &#8212; error handling patterns, output format requirements, API call constraints <code>CLAUDE.md</code> is your only enforcement layer you can actually count on. Memory across spawned agents is not guaranteed.</p><div class="pullquote"><div class="preformatted-block" data-component-name="PreformattedTextBlockToDOM"><label class="hide-text" contenteditable="false">Text within this block will maintain its original spacing when published</label><pre class="text"><strong>Subscribe to The Neural Blueprint</strong>
By Vijendra
Deconstructing the architecture of modern AI systems</pre></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://qubytes.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://qubytes.substack.com/subscribe?"><span>Subscribe now</span></a></p></div><div><hr></div><h2>What should never go in your <code>CLAUDE.md</code></h2><p>Most guides skip this section entirely. For anyone working on an enterprise codebase, that&#8217;s the most dangerous omission.</p><p>Never include API keys, tokens, or credentials &#8212; even as examples or placeholders. In most setups, <code>CLAUDE.md</code> is committed to version control. Never include internal service names or hostnames &#8212; production database URLs, microservice endpoints, VPN-gated resources. That&#8217;s attack surface documentation. Never describe your infrastructure topology, auth logic, or session handling specifics in plain text. Describing how your auth system works in <code>CLAUDE.md</code> is effectively a security brief for anyone with repo access. And never include PII patterns or data schemas with sensitive field names.</p><p>The boundary that works in practice: <code>CLAUDE.md</code> should give Claude enough context to navigate your project, not enough for someone to exploit it. Reference patterns by name without specifying values. When in doubt, leave it out.</p><p>For teams: add a <code>.claude/CLAUDE.md</code> review step to your PR checklist specifically to catch these categories before they reach main. One review step is cheaper than one incident.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!4SEk!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F19650639-06d6-4f96-8979-385b5a8888e7_1763x1032.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!4SEk!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F19650639-06d6-4f96-8979-385b5a8888e7_1763x1032.png 424w, https://substackcdn.com/image/fetch/$s_!4SEk!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F19650639-06d6-4f96-8979-385b5a8888e7_1763x1032.png 848w, https://substackcdn.com/image/fetch/$s_!4SEk!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F19650639-06d6-4f96-8979-385b5a8888e7_1763x1032.png 1272w, https://substackcdn.com/image/fetch/$s_!4SEk!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F19650639-06d6-4f96-8979-385b5a8888e7_1763x1032.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!4SEk!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F19650639-06d6-4f96-8979-385b5a8888e7_1763x1032.png" width="1763" height="1032" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/19650639-06d6-4f96-8979-385b5a8888e7_1763x1032.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1032,&quot;width&quot;:1763,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:158351,&quot;alt&quot;:&quot;Advisory Card&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Advisory Card" title="Advisory Card" srcset="https://substackcdn.com/image/fetch/$s_!4SEk!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F19650639-06d6-4f96-8979-385b5a8888e7_1763x1032.png 424w, https://substackcdn.com/image/fetch/$s_!4SEk!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F19650639-06d6-4f96-8979-385b5a8888e7_1763x1032.png 848w, https://substackcdn.com/image/fetch/$s_!4SEk!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F19650639-06d6-4f96-8979-385b5a8888e7_1763x1032.png 1272w, https://substackcdn.com/image/fetch/$s_!4SEk!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F19650639-06d6-4f96-8979-385b5a8888e7_1763x1032.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div><hr></div><h2>How to keep it from going stale</h2><p>A <code>CLAUDE.md</code> that doesn&#8217;t evolve slowly becomes useless. The maintenance doesn&#8217;t need to be complicated.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!_UYm!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F867e2373-a61e-4aac-8e18-89b419d11876_1200x686.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!_UYm!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F867e2373-a61e-4aac-8e18-89b419d11876_1200x686.png 424w, https://substackcdn.com/image/fetch/$s_!_UYm!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F867e2373-a61e-4aac-8e18-89b419d11876_1200x686.png 848w, https://substackcdn.com/image/fetch/$s_!_UYm!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F867e2373-a61e-4aac-8e18-89b419d11876_1200x686.png 1272w, https://substackcdn.com/image/fetch/$s_!_UYm!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F867e2373-a61e-4aac-8e18-89b419d11876_1200x686.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!_UYm!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F867e2373-a61e-4aac-8e18-89b419d11876_1200x686.png" width="1200" height="686" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/867e2373-a61e-4aac-8e18-89b419d11876_1200x686.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:686,&quot;width&quot;:1200,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:339545,&quot;alt&quot;:&quot;CLAUDE.md maintenance flywheel &#8212; four-node clockwise cycle with Solo, Team, Enterprise concentric rings&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="CLAUDE.md maintenance flywheel &#8212; four-node clockwise cycle with Solo, Team, Enterprise concentric rings" title="CLAUDE.md maintenance flywheel &#8212; four-node clockwise cycle with Solo, Team, Enterprise concentric rings" srcset="https://substackcdn.com/image/fetch/$s_!_UYm!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F867e2373-a61e-4aac-8e18-89b419d11876_1200x686.png 424w, https://substackcdn.com/image/fetch/$s_!_UYm!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F867e2373-a61e-4aac-8e18-89b419d11876_1200x686.png 848w, https://substackcdn.com/image/fetch/$s_!_UYm!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F867e2373-a61e-4aac-8e18-89b419d11876_1200x686.png 1272w, https://substackcdn.com/image/fetch/$s_!_UYm!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F867e2373-a61e-4aac-8e18-89b419d11876_1200x686.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">The Cadence Scales: The mechanic doesn&#8217;t change</figcaption></figure></div><p>After any session where you had to correct Claude, write down what went wrong immediately before you forget the specific failure mode. That correction is a rule candidate. Five minutes now saves the same correction across every future session.</p><p>For teams, a short async rule review once a week works better than trying to do it synchronously. Each person flags Claude behavior that broke their workflow. Proposed additions go into a shared doc. One person owns the merge decision.</p><p>For enterprise teams, any PR that modifies <code>.claude/CLAUDE.md</code> should go through a second reviewer not for code quality, but to check that each rule is specific, prevents a real failure, and doesn&#8217;t duplicate what your linter already handles. Also worth doing: treat it like a config file in your commit history. A message like <code>chore(claude): add rule for server-action-only DB access after incident #42</code> creates institutional memory around why each rule exists. Six months later, when someone asks why that line is there, you&#8217;ll have an answer.</p><p>Here&#8217;s why this compounds over time. Every mistake Claude makes is information. When you capture it as a rule once, Claude doesn&#8217;t make it again not in your next session, not in your teammate&#8217;s session next week. The file gets shorter and more precise at the same time. Sessions get quieter. You repeat yourself less. That&#8217;s the actual return on investment here, and it accumulates in a way that prompting improvements never quite do.</p><div><hr></div><h2>A production-ready template (under 80 lines)</h2><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;markdown&quot;,&quot;nodeId&quot;:&quot;2a88ed78-bc4e-4005-b7de-cf0cd8ab4770&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-markdown"># CLAUDE.md

## Project
[What this project does &#8212; 1&#8211;2 sentences]

## Stack
[Framework / language / database]

## Commands
- Dev:
- Build:
- Test:
- Lint:
- Type check:

## Architecture
- [folder] &#8594; purpose
- [folder] &#8594; purpose

## Rules
- [prevent a real mistake]
- IMPORTANT: [critical rule]

## Workflow
- [how Claude should work]
- [testing expectations]
- [commit style]

## Out of scope
- [things Claude should not touch]</code></pre></div><p>Under 80 lines. That&#8217;s the ceiling, not the goal.</p><div><hr></div><h2>Where to start</h2><p>If you don&#8217;t have a <code>CLAUDE.md</code> yet, start with just Commands and Architecture. Two sections. That alone will change your next session.</p><p>If yours is already 150+ lines, audit it before adding anything. For every rule, ask the one question: does removing this cause a specific mistake? Cut everything that doesn&#8217;t pass. Then split it into the three layers so each file has a clear job.</p><p>If you&#8217;re building agentic pipelines, treat the project <code>CLAUDE.md</code> as the pipeline contract. Whatever session memory can&#8217;t guarantee across spawned agents, write it here.</p><p>If you&#8217;re a team lead, add <code>CLAUDE.md</code> to your PR review checklist &#8212; &#8212; once for effectiveness, and once as a security check. The combination of both catches most of what goes wrong before it becomes a problem.</p><div><hr></div><div class="preformatted-block" data-component-name="PreformattedTextBlockToDOM"><label class="hide-text" contenteditable="false">Text within this block will maintain its original spacing when published</label><pre class="text"><em>See you next...

~Vijendra | The Neural Blueprint
Agentic systems. Enterprise AI. The architecture of what&#8217;s next.</em></pre></div><div><hr></div><blockquote><p><strong>Next issue:</strong><br>Sub-agents, parallel tasks, and MCP architecture. How to design multi-agent Claude pipelines that actually hold together in production.</p><p><strong>Subscribe if you don&#8217;t want to miss it.</strong></p></blockquote>]]></content:encoded></item><item><title><![CDATA[Inside Claude Code: The Architecture That Makes AI Actually Do the Work]]></title><description><![CDATA[Most coverage of Claude Code tells you what it does. This piece maps every layer of how it actually works from the agent loop and permission classifier to the compaction pipeline and subagent spawning. Read it before you build your next agentic system.]]></description><link>https://qubytes.substack.com/p/claude-code-architecture-explained</link><guid isPermaLink="false">https://qubytes.substack.com/p/claude-code-architecture-explained</guid><dc:creator><![CDATA[Vijendra]]></dc:creator><pubDate>Thu, 30 Apr 2026 03:30:48 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!5YU6!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F307c7588-dd31-428b-8985-a9f25d62a91a_1098x399.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!OXAD!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faea16eb7-699c-49a3-91bb-e8efd18c848b_2790x900.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!OXAD!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faea16eb7-699c-49a3-91bb-e8efd18c848b_2790x900.png 424w, https://substackcdn.com/image/fetch/$s_!OXAD!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faea16eb7-699c-49a3-91bb-e8efd18c848b_2790x900.png 848w, https://substackcdn.com/image/fetch/$s_!OXAD!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faea16eb7-699c-49a3-91bb-e8efd18c848b_2790x900.png 1272w, https://substackcdn.com/image/fetch/$s_!OXAD!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faea16eb7-699c-49a3-91bb-e8efd18c848b_2790x900.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!OXAD!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faea16eb7-699c-49a3-91bb-e8efd18c848b_2790x900.png" width="2790" height="900" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/aea16eb7-699c-49a3-91bb-e8efd18c848b_2790x900.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:900,&quot;width&quot;:2790,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1014806,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://qubytes.substack.com/i/195495045?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fabb7b70f-d4c3-4c90-92e2-9e9e4dca64f9_2840x942.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!OXAD!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faea16eb7-699c-49a3-91bb-e8efd18c848b_2790x900.png 424w, https://substackcdn.com/image/fetch/$s_!OXAD!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faea16eb7-699c-49a3-91bb-e8efd18c848b_2790x900.png 848w, https://substackcdn.com/image/fetch/$s_!OXAD!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faea16eb7-699c-49a3-91bb-e8efd18c848b_2790x900.png 1272w, https://substackcdn.com/image/fetch/$s_!OXAD!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faea16eb7-699c-49a3-91bb-e8efd18c848b_2790x900.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Claude Code architecture is more sophisticated than almost anyone is discussing. You&#8217;ve probably heard it called an <em>autonomous developer</em> but most commentary stops at the surface: it writes code for you! That&#8217;s like saying a jet engine makes planes go fast. True. Also, wildly underselling the engineering.</p><p>Today, I&#8217;m pulling apart the full Claude Code architecture layer by layer so you understand not just <em>what</em> it does, but <em>why it&#8217;s built the way it is</em>, and what it means for how we build agentic systems going forward.</p><div><hr></div><h2>The 30-Second Mental Model</h2><p>Before we go deep, here&#8217;s the intuition: </p><div class="callout-block" data-callout="true"><p style="text-align: center;"><strong>Claude Code is a while-loop surrounded by serious infrastructure.</strong></p></div><p>The core agent loop assemble context, call the model, receive a tool request, execute it, repeat is conceptually simple. The real engineering genius lives in everything <em>around</em> that loop: the permission system, the compaction pipeline, the hook architecture, and the subagent spawning mechanism. This is a pattern every agentic system builder needs to internalize.</p><div><hr></div><h2>Layer 1: Instruction Flow &#8594; The Iterative Engine</h2><p>The top-level flow is elegantly simple:</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!6RRH!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0378d890-7f5e-4e66-84af-44d5c3bf629b_1106x197.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!6RRH!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0378d890-7f5e-4e66-84af-44d5c3bf629b_1106x197.png 424w, https://substackcdn.com/image/fetch/$s_!6RRH!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0378d890-7f5e-4e66-84af-44d5c3bf629b_1106x197.png 848w, https://substackcdn.com/image/fetch/$s_!6RRH!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0378d890-7f5e-4e66-84af-44d5c3bf629b_1106x197.png 1272w, https://substackcdn.com/image/fetch/$s_!6RRH!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0378d890-7f5e-4e66-84af-44d5c3bf629b_1106x197.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!6RRH!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0378d890-7f5e-4e66-84af-44d5c3bf629b_1106x197.png" width="1106" height="197" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/0378d890-7f5e-4e66-84af-44d5c3bf629b_1106x197.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:197,&quot;width&quot;:1106,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:113836,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://qubytes.substack.com/i/195495045?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7faad7c7-b551-434c-91d1-2edbe3dc46bc_1140x227.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!6RRH!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0378d890-7f5e-4e66-84af-44d5c3bf629b_1106x197.png 424w, https://substackcdn.com/image/fetch/$s_!6RRH!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0378d890-7f5e-4e66-84af-44d5c3bf629b_1106x197.png 848w, https://substackcdn.com/image/fetch/$s_!6RRH!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0378d890-7f5e-4e66-84af-44d5c3bf629b_1106x197.png 1272w, https://substackcdn.com/image/fetch/$s_!6RRH!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0378d890-7f5e-4e66-84af-44d5c3bf629b_1106x197.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>Each iteration is a <strong>turn</strong>. Within a turn, Claude may request a tool call. That request flows through permission checking, then execution, then feeds back into the loop&#8212;with feedback continuously bubbling back to the user as progress. This isn&#8217;t a one-shot request/response model. It&#8217;s a sustained reasoning loop where each tool execution enriches the context for the next step.</p><p><strong>What this means for builders:</strong> If you&#8217;re designing agentic workflows, your mental model should shift from <em>prompt &#8594; answer</em> to <em>prompt &#8594; iterative execution graph. </em>The number of iterations is non-deterministic and driven by task complexity, not hardcoded logic.</p><div><hr></div><h2>Layer 2: The High-Level Architecture &#8594; Five Core Subsystems</h2><p>Zooming in reveals five critical subsystems that every serious agentic system needs:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!5YU6!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F307c7588-dd31-428b-8985-a9f25d62a91a_1098x399.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!5YU6!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F307c7588-dd31-428b-8985-a9f25d62a91a_1098x399.png 424w, https://substackcdn.com/image/fetch/$s_!5YU6!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F307c7588-dd31-428b-8985-a9f25d62a91a_1098x399.png 848w, https://substackcdn.com/image/fetch/$s_!5YU6!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F307c7588-dd31-428b-8985-a9f25d62a91a_1098x399.png 1272w, https://substackcdn.com/image/fetch/$s_!5YU6!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F307c7588-dd31-428b-8985-a9f25d62a91a_1098x399.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!5YU6!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F307c7588-dd31-428b-8985-a9f25d62a91a_1098x399.png" width="1098" height="399" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/307c7588-dd31-428b-8985-a9f25d62a91a_1098x399.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:399,&quot;width&quot;:1098,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:200220,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://qubytes.substack.com/i/195495045?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f581339-aa20-4a58-a38e-e0e516c3f13f_1141x426.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!5YU6!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F307c7588-dd31-428b-8985-a9f25d62a91a_1098x399.png 424w, https://substackcdn.com/image/fetch/$s_!5YU6!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F307c7588-dd31-428b-8985-a9f25d62a91a_1098x399.png 848w, https://substackcdn.com/image/fetch/$s_!5YU6!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F307c7588-dd31-428b-8985-a9f25d62a91a_1098x399.png 1272w, https://substackcdn.com/image/fetch/$s_!5YU6!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F307c7588-dd31-428b-8985-a9f25d62a91a_1098x399.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><ol><li><p><strong>The Agent Loop &#8594;</strong> The heart of the system. It orchestrates everything: assembles the context window, dispatches requests to the model, routes tool-use responses back to the appropriate executor, and commits state at the end of each turn. It&#8217;s a feedback controller, not a pipeline.</p></li><li><p><strong>The Permission System &#8594;</strong> This is where Claude Code does something most agentic frameworks skip: <strong>it makes safety a first-class architectural concern.</strong> The permission system sits <em>between</em> the agent loop and tool execution. Every tool request goes through an approval gate. The system uses an ML-based auto-classifier with seven distinct permission modes to determine what requires human confirmation vs. what can be auto-approved. The diamond-shaped <strong>Decision node</strong> in the diagram isn&#8217;t decorative&#8212;it represents a hard fork: <em>deny</em> sends feedback back to the agent loop; <em>accept</em> lets execution proceed. This is how you build autonomous systems that remain trustworthy.</p></li><li><p><strong>Tools &amp; Execution Environment &#8594;</strong> Tools are the actuators&#8212;the hands of the agent. Claude Code ships with built-in tools (file read/write, bash execution, grep, glob) and extends via <strong>MCP (Model Context Protocol)</strong> for external service integrations. Crucially, all tool execution runs through a <strong>Shell Sandbox</strong>, isolating side effects and limiting blast radius. Remote execution backends (local/cloud/remote) let the system scale beyond the developer&#8217;s machine.</p></li><li><p><strong>State &amp; Persistence &#8594;</strong> State is managed as an append-oriented session transcript. This isn&#8217;t just logging&#8212;it&#8217;s the substrate for <strong>resume, fork, and rewind operations</strong>. Claude.md files and memory inject persistent project context across sessions. Sidechain transcripts capture subagent interactions separately, preventing context pollution of the main thread.</p></li><li><p><strong>The Compaction Pipeline &#8594;</strong> This is the most underappreciated component. As conversations grow, context windows fill. Rather than naively truncating, Claude Code employs a <strong>five-layer compaction pipeline</strong>: it spawns a forked subagent whose sole job is to produce a structured summary of the conversation, then re-injects only what matters&#8212;the last 5 file attachments, active skills, plan state, and tool deltas.</p></li></ol><p>The compaction prompt is ~6,500 tokens, tuned specifically for software engineering tasks: file paths, code snippets, error histories. This is structured extraction followed by selective reconstruction not summarization. The architecture treats context as a managed resource, not an infinite buffer.</p><div><hr></div><h2>Layer 3: The Detailed Breakdown &#8594; Where the Magic Lives</h2><p>The bottom layer of the diagram reveals the full component map across four vertical zones:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!TH-4!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b6b60e6-0c3b-43eb-8d73-7217dd5650d1_1108x572.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!TH-4!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b6b60e6-0c3b-43eb-8d73-7217dd5650d1_1108x572.png 424w, https://substackcdn.com/image/fetch/$s_!TH-4!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b6b60e6-0c3b-43eb-8d73-7217dd5650d1_1108x572.png 848w, https://substackcdn.com/image/fetch/$s_!TH-4!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b6b60e6-0c3b-43eb-8d73-7217dd5650d1_1108x572.png 1272w, https://substackcdn.com/image/fetch/$s_!TH-4!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b6b60e6-0c3b-43eb-8d73-7217dd5650d1_1108x572.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!TH-4!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b6b60e6-0c3b-43eb-8d73-7217dd5650d1_1108x572.png" width="1108" height="572" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/7b6b60e6-0c3b-43eb-8d73-7217dd5650d1_1108x572.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:572,&quot;width&quot;:1108,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:672524,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://qubytes.substack.com/i/195495045?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F004c4547-e98f-4bc3-8a15-1656d86518df_1142x601.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!TH-4!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b6b60e6-0c3b-43eb-8d73-7217dd5650d1_1108x572.png 424w, https://substackcdn.com/image/fetch/$s_!TH-4!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b6b60e6-0c3b-43eb-8d73-7217dd5650d1_1108x572.png 848w, https://substackcdn.com/image/fetch/$s_!TH-4!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b6b60e6-0c3b-43eb-8d73-7217dd5650d1_1108x572.png 1272w, https://substackcdn.com/image/fetch/$s_!TH-4!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b6b60e6-0c3b-43eb-8d73-7217dd5650d1_1108x572.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p><strong>User Interface Layer &#8594; </strong>Four entry points: <strong>Interactive CLI</strong> (the developer experience), <strong>Browser/Desktop</strong> (GUI surface), <strong>Headless CLI</strong> (CI/CD pipelines), and <strong>Agent SDK</strong> (programmatic embedding). This multi-modal interface strategy is intentional&#8212;it means Claude Code can operate as a human-facing tool <em>or</em> as a component inside a larger automated system. The same agent loop powers all four surfaces.</p><p><strong>Agent Layer &#8594; </strong>The Agent Loop + Compaction Pipeline live here. The loop handles input/interrupt signals from the UI layer and emits output back. The compaction pipeline runs asynchronously, triggered by context thresholds invisible to the user, essential to reliability.</p><p><strong>Access/Action Layer (The Most Complex Zone) &#8594; </strong>This is where extensibility meets safety. Four mechanisms compose here:</p><ul><li><p>Permission System + Auto Classifier: ML-powered intent classification before any action fires</p></li><li><p>Hook Pipeline: lifecycle event hooks (<code>PreToolUse</code>, <code>UserPromptSubmit</code>, <code>PermissionRequest</code>) that let you intercept, modify, or block tool calls programmatically. This is where enterprise policy enforcement lives</p></li><li><p>Built-in Tools + MCP Tools: native capabilities plus the extensible protocol layer for third-party integrations</p></li><li><p>Subagent Spawning: the orchestrator-worker pattern in action. The main agent can spawn specialized subagents, pass them restricted tool sets, and receive only a summary return. Parallel subagent execution enables tasks that would be too large for a single context window</p></li></ul><p><strong>State Layer &#8594; </strong>Context Assembly builds the system prompt from <code>Claude.md</code>, memories, and runtime state. Runtime State mutates per turn. <code>Claude.md + memory</code> provides the persistent knowledge layer. Sidechain Transcripts capture subagent interactions, keeping the main thread clean.</p><div><hr></div><h2>The Architecture Patterns Worth Stealing</h2><p>If you&#8217;re building agentic systems for enterprise, for internal tooling, for SaaS, here are the transferable insights:</p><ol><li><p><strong>Safety as a subsystem, not an afterthought:</strong> The permission system is architecturally separate from tool execution. Design yours the same way</p></li><li><p><strong>Context is a managed resource:</strong> Build compaction into your system from day one, not as a patch when things break</p></li><li><p><strong>Hooks are your enterprise integration surface:</strong> Lifecycle hooks let you plug in policy, logging, compliance, and custom routing without touching core agent logic</p></li><li><p><strong>Subagents enable horizontal scaling of reasoning:</strong> Don&#8217;t try to solve everything in one context window. Delegate, summarize, and return</p></li><li><p><strong>Multi-surface interface from the start:</strong> The same agent logic should power CLI, GUI, headless, and SDK surfaces design for all four even if you ship one</p></li></ol><div class="pullquote"><div class="preformatted-block" data-component-name="PreformattedTextBlockToDOM"><label class="hide-text" contenteditable="false">Text within this block will maintain its original spacing when published</label><pre class="text"><strong>Subscribe to The Neural Blueprint</strong>
By Vijendra
Deconstructing the architecture of modern AI systems</pre></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://qubytes.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://qubytes.substack.com/subscribe?"><span>Subscribe now</span></a></p></div><h2>Why This Matters Right Now</h2><p>Claude Code&#8217;s architecture was effectively reverse-engineered from an unintentional source code leak in March 2026 and what the community found was a system far more sophisticated than anyone expected. This isn&#8217;t a chatbot with file access bolted on. It&#8217;s a production-grade autonomous execution system with carefully considered tradeoffs at every layer.</p><p>When you working with enterprise teams evaluating agentic AI adoption, this architecture is the benchmark. You should provide your answer before your customer ask: <em>How does your permission system work? What&#8217;s your compaction strategy? Can I hook into the lifecycle? How does subagent delegation handle context isolation?</em></p><p>If you can&#8217;t answer those questions, you&#8217;re not looking at a production-ready agentic system. You&#8217;re looking at a demo.</p><div><hr></div><h2>What&#8217;s Next</h2><p>In the next issue of <strong>The Neural Blueprint</strong>, I&#8217;ll be breaking down the <strong>Hook Pipeline</strong> in depth how to use <code>PreToolUse</code> and <code>PermissionRequest</code> hooks to build enterprise-grade governance layers on top of Claude Code, including policy enforcement, audit logging, and custom approval workflows.</p><p>If you&#8217;re building agentic systems in an enterprise context, you won&#8217;t want to miss it.</p><div><hr></div><div class="preformatted-block" data-component-name="PreformattedTextBlockToDOM"><label class="hide-text" contenteditable="false">Text within this block will maintain its original spacing when published</label><pre class="text">See you till next&#8230;<em>
Vijendra | <strong>The Neural Blueprint</strong>
</em>Building the architecture of the agentic era, one system at a time</pre></div><p></p>]]></content:encoded></item><item><title><![CDATA[Zero: The AI Agent That Manages Your Delivery Pipeline]]></title><description><![CDATA[Most AI coding tools assist engineers. Zero orchestrates them across roles, across sessions, with gates that block bad work from advancing.]]></description><link>https://qubytes.substack.com/p/zero-supervisor-agent-sdlc-pipeline-claude-code</link><guid isPermaLink="false">https://qubytes.substack.com/p/zero-supervisor-agent-sdlc-pipeline-claude-code</guid><dc:creator><![CDATA[Vijendra]]></dc:creator><pubDate>Mon, 13 Apr 2026 22:00:17 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!XmcS!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe46f5c83-4aa5-483e-9acd-52ba56d75a2b_2807x611.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!XmcS!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe46f5c83-4aa5-483e-9acd-52ba56d75a2b_2807x611.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!XmcS!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe46f5c83-4aa5-483e-9acd-52ba56d75a2b_2807x611.png 424w, https://substackcdn.com/image/fetch/$s_!XmcS!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe46f5c83-4aa5-483e-9acd-52ba56d75a2b_2807x611.png 848w, https://substackcdn.com/image/fetch/$s_!XmcS!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe46f5c83-4aa5-483e-9acd-52ba56d75a2b_2807x611.png 1272w, https://substackcdn.com/image/fetch/$s_!XmcS!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe46f5c83-4aa5-483e-9acd-52ba56d75a2b_2807x611.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!XmcS!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe46f5c83-4aa5-483e-9acd-52ba56d75a2b_2807x611.png" width="2807" height="611" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e46f5c83-4aa5-483e-9acd-52ba56d75a2b_2807x611.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:611,&quot;width&quot;:2807,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1141582,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://qubytes.substack.com/i/193707629?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7a4e6ae3-3c96-4066-b21e-2019d015be60_2840x644.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!XmcS!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe46f5c83-4aa5-483e-9acd-52ba56d75a2b_2807x611.png 424w, https://substackcdn.com/image/fetch/$s_!XmcS!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe46f5c83-4aa5-483e-9acd-52ba56d75a2b_2807x611.png 848w, https://substackcdn.com/image/fetch/$s_!XmcS!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe46f5c83-4aa5-483e-9acd-52ba56d75a2b_2807x611.png 1272w, https://substackcdn.com/image/fetch/$s_!XmcS!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe46f5c83-4aa5-483e-9acd-52ba56d75a2b_2807x611.png 1456w" sizes="100vw" fetchpriority="high"></picture><div></div></div></a></figure></div><div class="callout-block" data-callout="true"><p>This newsletter examines Zero, an agent built on Claude Code that orchestrates a full software delivery lifecycle through seven specialist subagents. Each subagent owns exactly one SDLC stage from business requirement analysis through deployment operations. Zero manages context across session boundaries, enforces quality gates between stages, and routes work back when gates fail, all without human coordination. The article presents a concrete, end-to-end walkthrough using an expense approval system as the worked example, then explains the underlying implementation: subagent definitions in markdown, minimal status return formats, skills as reusable prompt extensions, and MCP servers for external integrations.</p></div><p>ChatGPT writes the function. Copilot completes the loop. Claude explains the bug. None of them walk the work across the room.</p><p>In a typical delivery cycle, a business requirement passes through a business analyst, an architect, a security reviewer, a developer, a QA engineer, and an ops team before anything ships. Each of those transitions is a handoff. Each handoff loses context. Each lost context creates rework. The AI tools available today are excellent within a single role context and almost useless at the boundary between roles.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!B7ZD!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F315ce8c8-18e0-4d68-9e6b-efb73c92838f_1746x817.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!B7ZD!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F315ce8c8-18e0-4d68-9e6b-efb73c92838f_1746x817.png 424w, https://substackcdn.com/image/fetch/$s_!B7ZD!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F315ce8c8-18e0-4d68-9e6b-efb73c92838f_1746x817.png 848w, https://substackcdn.com/image/fetch/$s_!B7ZD!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F315ce8c8-18e0-4d68-9e6b-efb73c92838f_1746x817.png 1272w, https://substackcdn.com/image/fetch/$s_!B7ZD!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F315ce8c8-18e0-4d68-9e6b-efb73c92838f_1746x817.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!B7ZD!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F315ce8c8-18e0-4d68-9e6b-efb73c92838f_1746x817.png" width="1746" height="817" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/315ce8c8-18e0-4d68-9e6b-efb73c92838f_1746x817.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:817,&quot;width&quot;:1746,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:420338,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://qubytes.substack.com/i/193707629?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F626c29a7-62ca-4ad2-8a21-503482a037ea_1774x887.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!B7ZD!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F315ce8c8-18e0-4d68-9e6b-efb73c92838f_1746x817.png 424w, https://substackcdn.com/image/fetch/$s_!B7ZD!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F315ce8c8-18e0-4d68-9e6b-efb73c92838f_1746x817.png 848w, https://substackcdn.com/image/fetch/$s_!B7ZD!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F315ce8c8-18e0-4d68-9e6b-efb73c92838f_1746x817.png 1272w, https://substackcdn.com/image/fetch/$s_!B7ZD!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F315ce8c8-18e0-4d68-9e6b-efb73c92838f_1746x817.png 1456w" sizes="100vw"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>That is not a model quality problem. It is an orchestration problem. The right question is: what if an AI managed the handoffs?</p><p>That is the question Zero was built to answer.</p><div><hr></div><h2>Why One Agent Can&#8217;t Do Everything</h2><p>The first instinct when building an AI-powered delivery workflow is to construct one very capable agent and load it with everything. One system prompt. All the tools. Every stage of the SDLC as a single context window.</p><p>This approach fails at scale. And it fails predictably.</p><p>A single agent covering all of these stages carries a bloated system prompt. That pollution corrupts its context. It confuses its current role with previous stages. It hallucinates details from three steps back. And it cannot specialize, the same model configuration optimized for writing user stories performs poorly at threat modelling.</p><p>The pattern that actually scales is one every engineering organization already understands: separation of concerns with enforced handoffs. [3][4]</p><p>Each role gets its own agent. Each agent reads only what it needs from the previous stage. Each stage produces one artifact and returns a minimal status signal. The supervisor &#8594; <strong>Zero</strong> &#8592; manages routing, gate enforcement, and persistent pipeline state.</p><p>This is not a novel architectural idea. It is how functional human organizations work, expressed as software.</p><div><hr></div><h2>Meet Zero: Supervisor and Seven Specialists</h2><p>Zero does not write a line of production code. It does not produce documentation or run tests. Its entire function is pipeline management: decomposing a business request into SDLC stages, delegating each stage to the right subagent, enforcing gates between stages, and maintaining persistent state so any new session can resume exactly where the last one ended.</p><p>Seven specialists report to Zero, each scoped to a single role:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!ebGN!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1a3d561a-3df2-438a-b590-016d48b09d93_2189x978.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!ebGN!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1a3d561a-3df2-438a-b590-016d48b09d93_2189x978.png 424w, https://substackcdn.com/image/fetch/$s_!ebGN!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1a3d561a-3df2-438a-b590-016d48b09d93_2189x978.png 848w, https://substackcdn.com/image/fetch/$s_!ebGN!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1a3d561a-3df2-438a-b590-016d48b09d93_2189x978.png 1272w, https://substackcdn.com/image/fetch/$s_!ebGN!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1a3d561a-3df2-438a-b590-016d48b09d93_2189x978.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!ebGN!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1a3d561a-3df2-438a-b590-016d48b09d93_2189x978.png" width="2189" height="978" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/1a3d561a-3df2-438a-b590-016d48b09d93_2189x978.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:978,&quot;width&quot;:2189,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:2670162,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://qubytes.substack.com/i/193707629?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4c83157d-be54-48d5-a8cd-93040a01fb85_2250x1162.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!ebGN!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1a3d561a-3df2-438a-b590-016d48b09d93_2189x978.png 424w, https://substackcdn.com/image/fetch/$s_!ebGN!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1a3d561a-3df2-438a-b590-016d48b09d93_2189x978.png 848w, https://substackcdn.com/image/fetch/$s_!ebGN!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1a3d561a-3df2-438a-b590-016d48b09d93_2189x978.png 1272w, https://substackcdn.com/image/fetch/$s_!ebGN!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1a3d561a-3df2-438a-b590-016d48b09d93_2189x978.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption"><em>Note: Subagent names (jack, pascal, niel, mark, smith, nirmala, savi) are internal codenames used in the implementation, not references to individuals.</em></figcaption></figure></div><p>Each subagent is blind to the others&#8217; conversations. It reads the relevant artifacts from prior stages, produces exactly one output, and returns a five-line status block to Zero. That is the entire interface.</p><p>The scoping is deliberate. Niel, the architect, gets Read and Write tools. Smith, the developer, gets Read, Edit, Write, and Bash, he needs to run migrations and verify builds. The principle is minimal tool surface: each agent gets exactly what its role requires and nothing more.</p><div class="callout-block" data-callout="true"><div class="preformatted-block" data-component-name="PreformattedTextBlockToDOM"><label class="hide-text" contenteditable="false">Text within this block will maintain its original spacing when published</label><pre class="text">The next issue is the technical teardown: full subagent definitions, CLAUDE.md operating rules, and the patterns that broke in early builds. Subscribe, so you don&#8217;t miss it.</pre></div></div><div><hr></div><h2>A Business Request, End-to-End</h2><p>Let&#8217;s make this concrete. Imagine you&#8217;re building an <strong>expense approval workflow</strong> for a mid-size company. Managers submit expenses; finance approves or rejects them; employees get notified. A real, boring, critical piece of internal software that every company needs and most build badly.</p><p>You open Claude Code in the Zero project and type:</p><blockquote><p><em>Build an internal expense approval system. Employees submit expenses with category, amount, and a receipt. Their manager gets notified and can approve or reject. Finance sees all pending items. Employees get email confirmation either way. We use Node.js, PostgreSQL, and SendGrid.</em></p></blockquote><p>That&#8217;s it. Zero takes it from there.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!g-6G!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F138fe0dc-55d0-43d0-9cbd-66149629d477_1536x323.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!g-6G!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F138fe0dc-55d0-43d0-9cbd-66149629d477_1536x323.png 424w, https://substackcdn.com/image/fetch/$s_!g-6G!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F138fe0dc-55d0-43d0-9cbd-66149629d477_1536x323.png 848w, https://substackcdn.com/image/fetch/$s_!g-6G!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F138fe0dc-55d0-43d0-9cbd-66149629d477_1536x323.png 1272w, https://substackcdn.com/image/fetch/$s_!g-6G!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F138fe0dc-55d0-43d0-9cbd-66149629d477_1536x323.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!g-6G!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F138fe0dc-55d0-43d0-9cbd-66149629d477_1536x323.png" width="1536" height="323" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/138fe0dc-55d0-43d0-9cbd-66149629d477_1536x323.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:323,&quot;width&quot;:1536,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:811196,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://qubytes.substack.com/i/193707629?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fedc84ccc-d3c1-4d57-a2bc-c023971481c2_1536x1024.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!g-6G!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F138fe0dc-55d0-43d0-9cbd-66149629d477_1536x323.png 424w, https://substackcdn.com/image/fetch/$s_!g-6G!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F138fe0dc-55d0-43d0-9cbd-66149629d477_1536x323.png 848w, https://substackcdn.com/image/fetch/$s_!g-6G!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F138fe0dc-55d0-43d0-9cbd-66149629d477_1536x323.png 1272w, https://substackcdn.com/image/fetch/$s_!g-6G!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F138fe0dc-55d0-43d0-9cbd-66149629d477_1536x323.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><h3>Stage 1 &#8594; Jack (BA): What Are We Actually Building?</h3><p>Zero invokes Jack with the business request appended to a focused BA prompt. Jack&#8217;s job is not to design anything, it is to structure the request into verifiable requirements.</p><p>The output is <code>requirements.md</code>: four user stories, each with acceptance criteria. Jack also surfaces ambiguities the original request left unspecified. Does the receipt upload require virus scanning? What happens when a manager submits an expense to themselves? These become documented assumptions not silently resolved, not ignored, but captured.</p><p>Jack returns to Zero:</p><pre><code><code>STAGE: 1-Understand
STATUS: COMPLETE
GATE: N/A
ARTIFACT: docs/requirements.md</code></code></pre><p>Zero reads the gate verdict (N/A - no gate for Stage 1), updates <code>docs/pipeline-state.md</code>, and ends the session.</p><div><hr></div><h3>Stage 2 &#8594; Niel (Architect): How Do We Build It?</h3><p>New session. Zero reads <code>pipeline-state.md</code>, finds the next action, loads niel&#8217;s prompt, and invokes him.</p><p>Niel reads <code>requirements.md</code> and produces <code>architecture.md</code>. He designs:</p><ul><li><p>A REST API in Express.js with four route groups: <code>/expenses</code>, <code>/approvals</code>, <code>/notifications</code>, <code>/admin</code></p></li><li><p>A PostgreSQL schema: <code>expenses</code>, <code>users</code>, <code>approvals</code>, <code>audit_log</code></p></li><li><p>An async notification queue (Bull + Redis) for email delivery via SendGrid</p></li><li><p>An S3-compatible store for receipt uploads</p></li><li><p>JWT auth with role scopes: <code>employee</code>, <code>manager</code>, <code>finance</code></p></li></ul><p>The architecture doc includes an API contract table, database ERD description, and a call-flow diagram. It flags one security concern for mark: <em>Receipt uploads are user-controlled filenames path traversal risk.</em></p><div><hr></div><h3>Stage 3 &#8594; Mark (Security, Architecture Review)</h3><p>Mark reads <code>requirements.md</code> and <code>architecture.md</code>. He produces a threat model covering:</p><ul><li><p><strong>Authentication</strong>: JWT expiry and refresh token rotation &#8594; PASS</p></li><li><p><strong>Authorization</strong>: Role scope enforcement on each endpoint &#8594; PASS with recommendation (add middleware test)</p></li><li><p><strong>File Upload</strong>: User-controlled filenames &#8594; <strong>FAIL</strong> - requires server-side filename sanitization and MIME-type validation before S3 write</p></li><li><p><strong>SQL Injection</strong>: Parameterized queries in ORM &#8594; PASS</p></li><li><p><strong>Data Exposure</strong>: Finance endpoint returns all expense data including personal details &#8594; <strong>FLAG</strong> - recommend field-level access control</p></li></ul><blockquote><div class="preformatted-block" data-component-name="PreformattedTextBlockToDOM"><label class="hide-text" contenteditable="false">Text within this block will maintain its original spacing when published</label><pre class="text"><strong>Gate FAIL: Path Traversal

</strong>Mark returns GATE: FAIL. Zero logs the blocking issue in <code>pipeline-state.md</code> and routes back to Niel. Niel revises <code>architecture.md</code> filename sanitization middleware added, field-level projections added to the finance endpoint schema. Mark re-reviews. GATE: PASS. </pre></div></blockquote><p>The pipeline advances.</p><div><hr></div><h3>Stage 4 &#8594; Smith (Developer): Build It</h3><p>Smith reads requirements, architecture, and the threat model. He builds:</p><ul><li><p><code>Express.js</code> API with all routes</p></li><li><p>Sequelize models and migrations for <code>PostgreSQL</code></p></li><li><p><code>Multer</code> + <code>sanitize-filename</code> middleware for receipt upload</p></li><li><p><code>Bull</code> queue workers for <code>SendGrid</code> email dispatch</p></li><li><p>Role-based middleware enforcing JWT scopes</p></li><li><p>Docker Compose for local development (app + Postgres + Redis)</p></li><li><p><code>.env.example</code> with all required environment variables</p></li></ul><p>Smith returns a file list. Zero updates pipeline state.</p><div><hr></div><h3>Stage 5 &#8594; Mark (Security, Code Review)</h3><p>Mark now reads the actual implementation not the design. He checks that the threat model remediations landed in code:</p><ul><li><p>Filename sanitization: present in <code>middleware/upload.js</code> &#8594; PASS</p></li><li><p>MIME type validation: present &#8594; PASS</p></li><li><p>Finance endpoint field projection: present in <code>controllers/admin.js</code> &#8594; PASS</p></li><li><p>JWT middleware on all protected routes: present &#8594; PASS</p></li></ul><p><code>GATE: PASS</code>. Pipeline advances.</p><div><hr></div><h3>Stage 6 &#8594; Nirmala (QA): Does It Work?</h3><p>Nirmala reads requirements and architecture, then runs the test suite against the built code. She writes and executes:</p><ul><li><p>Unit tests for each controller and middleware</p></li><li><p>Integration tests against a test Postgres instance</p></li><li><p>E2E tests via Puppeteer simulating the full employee &#8594; manager &#8594; finance flow</p></li><li><p>Security tests confirming the file upload rejects malicious filenames and wrong MIME types</p></li></ul><p>One bug surfaces: the manager notification email fires even when the submitting employee is also the approving manager a self-approval path that should not trigger a notification.</p><blockquote><div class="preformatted-block" data-component-name="PreformattedTextBlockToDOM"><label class="hide-text" contenteditable="false">Text within this block will maintain its original spacing when published</label><pre class="text"><strong>Gate FAIL: Self-Approval Path</strong>
Nirmala returns GATE: FAIL. Zero routes back to Smith. Smith patches the self-approval guard. Nirmala re-runs the full suite. GATE: PASS.</pre></div></blockquote><p>Zero loops back to smith. Smith patches the self-approval guard. Nirmala re-runs. <code>GATE: PASS</code>.</p><div><hr></div><h3>Stage 7 &#8594; Savi (Ops): Ship It</h3><p>Zero tells the user: <em>All gates passed. Run </em><code>touch docs/deploy-approved</code><em> to approve deployment.</em></p><p>The human reviews the pipeline state every gate result, every finding, every fix. They run the command. New session. Savi produces a deployment runbook:</p><ul><li><p>AWS ECS task definition with environment injection from Secrets Manager</p></li><li><p>RDS PostgreSQL provisioning checklist</p></li><li><p>ElastiCache Redis setup</p></li><li><p>S3 bucket with server-side encryption and public access blocked</p></li><li><p>CloudWatch alarms for error rates and queue depth</p></li><li><p>Rollback procedure: previous ECS task revision + database migration rollback script</p></li></ul><p>The software ships.</p><div><hr></div><h2>Under the Hood: How Zero Is Actually Built</h2><blockquote><p><em>This sounds like a complex orchestration system. How hard is it to set up?</em></p></blockquote><p>Harder than a single prompt. Simpler than you&#8217;d expect.</p><p>Zero runs entirely inside Claude Code. Each subagent is a markdown file in <code>.claude/agents/</code>. The frontmatter tells Claude Code what tools and model the agent gets:</p><pre><code><code>---
name: niel
description: &gt;
  Solution Architect subagent. Designs system architecture, API contracts,
  database schemas, and infrastructure layout.
tools:
  - Read
  - Write
model: sonnet
---
You are Zero's Architecture specialist.

## Your Role
- Read docs/requirements.md and docs/ux-design.md
- Produce docs/architecture.md covering API contracts, data models,
  and infrastructure layout
- Flag security concerns for mark in the architecture doc

## Return Format
When done, return ONLY this to Zero:
STAGE: 2-Design
STATUS: COMPLETE
GATE: N/A
ARTIFACT: docs/architecture.md</code></code></pre><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!1SM_!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd8070985-51f8-481e-bc63-6f99e64b233a_1480x903.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!1SM_!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd8070985-51f8-481e-bc63-6f99e64b233a_1480x903.png 424w, https://substackcdn.com/image/fetch/$s_!1SM_!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd8070985-51f8-481e-bc63-6f99e64b233a_1480x903.png 848w, https://substackcdn.com/image/fetch/$s_!1SM_!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd8070985-51f8-481e-bc63-6f99e64b233a_1480x903.png 1272w, https://substackcdn.com/image/fetch/$s_!1SM_!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd8070985-51f8-481e-bc63-6f99e64b233a_1480x903.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!1SM_!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd8070985-51f8-481e-bc63-6f99e64b233a_1480x903.png" width="1480" height="903" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/d8070985-51f8-481e-bc63-6f99e64b233a_1480x903.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:903,&quot;width&quot;:1480,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1491085,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://qubytes.substack.com/i/193707629?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0ff5aae8-b724-43cc-8beb-9d7bb40b46c0_1536x1024.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!1SM_!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd8070985-51f8-481e-bc63-6f99e64b233a_1480x903.png 424w, https://substackcdn.com/image/fetch/$s_!1SM_!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd8070985-51f8-481e-bc63-6f99e64b233a_1480x903.png 848w, https://substackcdn.com/image/fetch/$s_!1SM_!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd8070985-51f8-481e-bc63-6f99e64b233a_1480x903.png 1272w, https://substackcdn.com/image/fetch/$s_!1SM_!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd8070985-51f8-481e-bc63-6f99e64b233a_1480x903.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Each subagent gets exactly the tools it needs and nothing more. Niel gets Read and Write, he has no business running Bash commands or browsing the web. Smith gets Read, Edit, Write, and Bash, he needs to run migrations and test commands. Nirmala gets Read, Write, Edit, and Bash, she runs the test suite.</p><p>The return format is deliberately minimal. A five-line status block. Zero parses GATE, updates <code>pipeline-state.md</code>, and stops. No multi-page summaries. No re-explaining the context. The artifact is the truth; the status block is the signal.</p><p><strong>Skills</strong> are reusable, invocable prompts that extend what an agent can do without expanding its core system prompt. A skill is a markdown file with a structured template:</p><pre><code><code>---
name: sre-runbooks
description: Generate deployment runbooks following SRE best practices
trigger: /sre-runbook
---

When invoked, produce a deployment runbook with:
- Pre-deployment checklist
- Deployment steps with exact commands
- Health check verification
- Rollback procedure
- Monitoring and alerting setup</code></code></pre><p>Savi loads the <code>sre-runbooks</code> skill. It gives her a repeatable pattern for producing consistent runbooks without bloating her core agent definition.</p><p><strong>MCP servers</strong> (Model Context Protocol) extend what agents can do beyond the local filesystem. Puppeteer for browser automation in E2E tests, GitHub for PR creation, Jira for ticket management. Nirmala uses Puppeteer. Savi could use a Terraform MCP server. The protocol is standardized; the integrations are modular.</p><div><hr></div><h2>What This Means for How We Build Software</h2><p>The conventional model is: AI assists humans. Humans make every decision, manage every handoff, maintain all context.</p><p>The emerging model is: AI manages the pipeline. Humans set requirements, review gates, and approve deployment. AI handles everything in between.</p><p>This matters in three ways:</p><p><strong>For product teams:</strong> A product manager with a well-written business request can initiate a full delivery cycle without a single engineering meeting. The requirements doc <strong>jack</strong> produces is the alignment artifact. The security review <strong>mark</strong> produces is the risk register. The handoffs that normally require calendar coordination happen automatically.</p><p><strong>For developers:</strong> The shift is from implementation labor to architectural judgment. Smith still writes the code but the code smith writes is constrained by niel&#8217;s architecture, reviewed by mark, and validated by nirmala. The developer&#8217;s leverage is in the quality of the architecture, not the speed of the typing.</p><p><strong>For the AI field:</strong> We are in the early innings of multi-agent systems that can hold organizational context across sessions, enforce process gates, and maintain audit trails of every decision. The next iteration isn&#8217;t a smarter single model &#8212; it&#8217;s better orchestration of specialized models working within defined boundaries.</p><p>Zero is not a finished product. It&#8217;s a proof of concept that the architecture works. The pipeline runs. The gates hold. The context survives session boundaries. The artifacts accumulate into a coherent, auditable record of a software delivery.</p><p>That&#8217;s the blueprint.</p><div><hr></div><h2>Build It Yourself</h2><p>Zero is built entirely with Claude Code&#8217;s native agent features no custom SDKs, no third-party orchestration frameworks. Everything described here is available today.</p><p>If you want to see the full implementation, the CLAUDE.md operating rules, all seven subagent definitions, the prompt files, the pipeline-state schema. I&#8217;m writing up the technical teardown in the next issue.</p><div class="pullquote"><div class="preformatted-block" data-component-name="PreformattedTextBlockToDOM"><label class="hide-text" contenteditable="false">Text within this block will maintain its original spacing when published</label><pre class="text"><strong>Subscribe to The Neural Blueprint</strong>
By Vijendra
Deconstructing the architecture of modern AI systems</pre></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://qubytes.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://qubytes.substack.com/subscribe?"><span>Subscribe now</span></a></p></div><p>The future of software delivery isn&#8217;t one AI that does everything. It&#8217;s a team of AIs, each excellent at one thing, coordinated by a system that knows when to hand off, when to loop back, and when to ask a human.</p><p>We&#8217;re just getting started.</p><p><code>PS: If you want access to the agent, reach out. I&#8217;ll share it directly.</code></p><p>See you on next Tuesday!</p><p>~Vijendra</p><div class="embedded-publication-wrap" data-attrs="{&quot;id&quot;:3954964,&quot;name&quot;:&quot;The Neural Blueprint&quot;,&quot;logo_url&quot;:&quot;https://substackcdn.com/image/fetch/$s_!RDwE!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F27c86b89-264d-4402-8dc4-ce2619924be6_1024x1024.png&quot;,&quot;base_url&quot;:&quot;https://qubytes.substack.com&quot;,&quot;hero_text&quot;:&quot;Built for engineers designing real AI systems. Not theory. Not demos. The architecture that survives production.&quot;,&quot;author_name&quot;:&quot;Vijendra Rajput&quot;,&quot;show_subscribe&quot;:true,&quot;logo_bg_color&quot;:&quot;#FAFAF7&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="EmbeddedPublicationToDOMWithSubscribe"><div class="embedded-publication show-subscribe"><a class="embedded-publication-link-part" native="true" href="https://qubytes.substack.com?utm_source=substack&amp;utm_campaign=publication_embed&amp;utm_medium=web"><img class="embedded-publication-logo" src="https://substackcdn.com/image/fetch/$s_!RDwE!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F27c86b89-264d-4402-8dc4-ce2619924be6_1024x1024.png" width="56" height="56" style="background-color: rgb(250, 250, 247);"><span class="embedded-publication-name">The Neural Blueprint</span><div class="embedded-publication-hero-text">Built for engineers designing real AI systems. Not theory. Not demos. The architecture that survives production.</div><div class="embedded-publication-author-name">By Vijendra Rajput</div></a><form class="embedded-publication-subscribe" method="GET" action="https://qubytes.substack.com/subscribe?"><input type="hidden" name="source" value="publication-embed"><input type="hidden" name="autoSubmit" value="true"><input type="email" class="email-input" name="email" placeholder="Type your email..."><input type="submit" class="button primary" value="Subscribe"></form></div></div>]]></content:encoded></item><item><title><![CDATA[Claude Code Agent That Analyzes My Newsletter While I Sleep]]></title><description><![CDATA[I stopped analyzing my newsletter manually. Here's the Claude Code agent I built; CLAUDE.md, Firecrawl MCP, DOCX output. Full code included.]]></description><link>https://qubytes.substack.com/p/claude-code-agent-that-analyzes-my</link><guid isPermaLink="false">https://qubytes.substack.com/p/claude-code-agent-that-analyzes-my</guid><dc:creator><![CDATA[Vijendra]]></dc:creator><pubDate>Mon, 30 Mar 2026 13:42:13 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!8Lbh!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa1d53bea-4afa-4e36-ab8b-252f94e84cb9_1402x457.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!8Lbh!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa1d53bea-4afa-4e36-ab8b-252f94e84cb9_1402x457.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!8Lbh!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa1d53bea-4afa-4e36-ab8b-252f94e84cb9_1402x457.png 424w, https://substackcdn.com/image/fetch/$s_!8Lbh!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa1d53bea-4afa-4e36-ab8b-252f94e84cb9_1402x457.png 848w, https://substackcdn.com/image/fetch/$s_!8Lbh!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa1d53bea-4afa-4e36-ab8b-252f94e84cb9_1402x457.png 1272w, https://substackcdn.com/image/fetch/$s_!8Lbh!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa1d53bea-4afa-4e36-ab8b-252f94e84cb9_1402x457.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!8Lbh!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa1d53bea-4afa-4e36-ab8b-252f94e84cb9_1402x457.png" width="1402" height="457" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/a1d53bea-4afa-4e36-ab8b-252f94e84cb9_1402x457.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:457,&quot;width&quot;:1402,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:327702,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://qubytes.substack.com/i/192577103?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa1a8e4ae-9e0c-4405-835d-b0f67a9f8778_1418x469.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!8Lbh!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa1d53bea-4afa-4e36-ab8b-252f94e84cb9_1402x457.png 424w, https://substackcdn.com/image/fetch/$s_!8Lbh!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa1d53bea-4afa-4e36-ab8b-252f94e84cb9_1402x457.png 848w, https://substackcdn.com/image/fetch/$s_!8Lbh!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa1d53bea-4afa-4e36-ab8b-252f94e84cb9_1402x457.png 1272w, https://substackcdn.com/image/fetch/$s_!8Lbh!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa1d53bea-4afa-4e36-ab8b-252f94e84cb9_1402x457.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>I spent 3 hours manually analyzing my own newsletter last month.</p><p>Opened 10 posts. Took notes in a doc. Tried to find patterns across titles, hooks, engagement. At the end I had a messy Google Doc, a cold cup of coffee, and mild existential dread about whether any of it was actually useful.</p><p>That was the last time I did it manually.</p><p>This week I want to show you what I built instead: a <strong>Claude Code agent</strong> that navigates my Substack, extracts top post content, identifies growth patterns, and outputs a fully formatted Word document from a single terminal command, with no babysitting required.</p><p>Here&#8217;s the real output it produced for The Neural Blueprint:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!uSBh!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8225a3b2-8cb8-4ef0-b5a4-d8094ace2900_1536x985.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!uSBh!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8225a3b2-8cb8-4ef0-b5a4-d8094ace2900_1536x985.png 424w, https://substackcdn.com/image/fetch/$s_!uSBh!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8225a3b2-8cb8-4ef0-b5a4-d8094ace2900_1536x985.png 848w, https://substackcdn.com/image/fetch/$s_!uSBh!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8225a3b2-8cb8-4ef0-b5a4-d8094ace2900_1536x985.png 1272w, https://substackcdn.com/image/fetch/$s_!uSBh!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8225a3b2-8cb8-4ef0-b5a4-d8094ace2900_1536x985.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!uSBh!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8225a3b2-8cb8-4ef0-b5a4-d8094ace2900_1536x985.png" width="1456" height="934" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/8225a3b2-8cb8-4ef0-b5a4-d8094ace2900_1536x985.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:934,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:770439,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://qubytes.substack.com/i/192577103?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F15b98004-1c5c-4761-976c-921f4b3c6cd5_1536x1024.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!uSBh!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8225a3b2-8cb8-4ef0-b5a4-d8094ace2900_1536x985.png 424w, https://substackcdn.com/image/fetch/$s_!uSBh!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8225a3b2-8cb8-4ef0-b5a4-d8094ace2900_1536x985.png 848w, https://substackcdn.com/image/fetch/$s_!uSBh!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8225a3b2-8cb8-4ef0-b5a4-d8094ace2900_1536x985.png 1272w, https://substackcdn.com/image/fetch/$s_!uSBh!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8225a3b2-8cb8-4ef0-b5a4-d8094ace2900_1536x985.png 1456w" sizes="100vw"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>That document is what we&#8217;re building toward. Let me show you exactly how.</p><div class="pullquote"><div class="preformatted-block" data-component-name="PreformattedTextBlockToDOM"><label class="hide-text" contenteditable="false">Text within this block will maintain its original spacing when published</label><pre class="text">Subscribe to The Neural Blueprint
By Vijendra
Deconstructing the architecture of modern AI systems</pre></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://qubytes.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://qubytes.substack.com/subscribe?"><span>Subscribe now</span></a></p></div><h2>First &#8212; Why Claude Code, Not Claude.ai?</h2><p>There&#8217;s one mental model shift that unlocks everything here.</p><p><strong>Claude.ai</strong> is a conversational interface. You talk to it, it responds, you move on. Great for exploration.</p><p><strong>Claude Code</strong> is an <em>agent runtime</em>. It has tools, persistent memory, file access, and the ability to execute multi-step plans without coming back to ask you what to do next.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!nXnk!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcc386bd7-5ebe-4f4f-809f-947de7ebf292_1396x633.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!nXnk!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcc386bd7-5ebe-4f4f-809f-947de7ebf292_1396x633.png 424w, https://substackcdn.com/image/fetch/$s_!nXnk!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcc386bd7-5ebe-4f4f-809f-947de7ebf292_1396x633.png 848w, https://substackcdn.com/image/fetch/$s_!nXnk!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcc386bd7-5ebe-4f4f-809f-947de7ebf292_1396x633.png 1272w, https://substackcdn.com/image/fetch/$s_!nXnk!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcc386bd7-5ebe-4f4f-809f-947de7ebf292_1396x633.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!nXnk!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcc386bd7-5ebe-4f4f-809f-947de7ebf292_1396x633.png" width="1396" height="633" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/cc386bd7-5ebe-4f4f-809f-947de7ebf292_1396x633.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:633,&quot;width&quot;:1396,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:627917,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://qubytes.substack.com/i/192577103?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa183bd94-340d-4194-a67d-2e9cbf6c7b4d_1536x1024.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!nXnk!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcc386bd7-5ebe-4f4f-809f-947de7ebf292_1396x633.png 424w, https://substackcdn.com/image/fetch/$s_!nXnk!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcc386bd7-5ebe-4f4f-809f-947de7ebf292_1396x633.png 848w, https://substackcdn.com/image/fetch/$s_!nXnk!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcc386bd7-5ebe-4f4f-809f-947de7ebf292_1396x633.png 1272w, https://substackcdn.com/image/fetch/$s_!nXnk!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcc386bd7-5ebe-4f4f-809f-947de7ebf292_1396x633.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Claude.ai v/s Claude Code</figcaption></figure></div><p>That last row matters. I&#8217;ll come back to it in the limitations section.</p><blockquote><p><strong>Before we build &#8594; 30 second primer for Claude Code beginners:<br></strong>Claude Code is a terminal-based agent from Anthropic. Install it with <code>npm install -g @anthropic-ai/claude-code</code><strong>, </strong>point it at a project folder, and it reads your files, runs commands, and calls tools autonomously. A Pro or Max plan is required, the free tier doesn&#8217;t include it. If you&#8217;re already using it daily, skip ahead to the architecture.</p></blockquote><div><hr></div><h2>The 3-File Agent Stack</h2><p>Here&#8217;s the key insight I want you to take from this post:</p><p><strong>A production Claude Code agent has exactly three moving parts.</strong></p><p>I call it the <strong>3-File Agent Stack</strong>:</p><blockquote><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;plaintext&quot;,&quot;nodeId&quot;:&quot;87c358d9-af93-4c37-be33-efe3dbe67672&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-plaintext">mcp.json       &#8592; what tools the agent can use
CLAUDE.md      &#8592; how the agent thinks and behaves
write_docx.py  &#8592; a custom tool you build once, reuse forever</code></pre></div></blockquote><p>That&#8217;s the full surface area. Everything else the orchestration loop, the browser control, the tool calling, Claude Code handles natively.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!VHV6!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6028e12e-39aa-4781-a09d-c7715ba8fc04_1536x880.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!VHV6!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6028e12e-39aa-4781-a09d-c7715ba8fc04_1536x880.png 424w, https://substackcdn.com/image/fetch/$s_!VHV6!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6028e12e-39aa-4781-a09d-c7715ba8fc04_1536x880.png 848w, https://substackcdn.com/image/fetch/$s_!VHV6!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6028e12e-39aa-4781-a09d-c7715ba8fc04_1536x880.png 1272w, https://substackcdn.com/image/fetch/$s_!VHV6!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6028e12e-39aa-4781-a09d-c7715ba8fc04_1536x880.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!VHV6!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6028e12e-39aa-4781-a09d-c7715ba8fc04_1536x880.png" width="1536" height="880" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/6028e12e-39aa-4781-a09d-c7715ba8fc04_1536x880.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:880,&quot;width&quot;:1536,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:314913,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://qubytes.substack.com/i/192577103?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe3dd610b-5cb6-40a6-808a-7eb2817d8ac2_1536x1024.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!VHV6!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6028e12e-39aa-4781-a09d-c7715ba8fc04_1536x880.png 424w, https://substackcdn.com/image/fetch/$s_!VHV6!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6028e12e-39aa-4781-a09d-c7715ba8fc04_1536x880.png 848w, https://substackcdn.com/image/fetch/$s_!VHV6!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6028e12e-39aa-4781-a09d-c7715ba8fc04_1536x880.png 1272w, https://substackcdn.com/image/fetch/$s_!VHV6!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6028e12e-39aa-4781-a09d-c7715ba8fc04_1536x880.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Three files. One command. One output</figcaption></figure></div><div><hr></div><h2>The 3 Tools You Need to Wire Up</h2><p><strong>Tool 1: Browser (Already Built Into Claude Code)</strong></p><p>Claude Code has Computer Use natively, it navigates URLs, takes screenshots, clicks elements, and reads the address bar. Zero setup required for this one.</p><p>This handles: loading the homepage, navigating the archive, clicking into each post to capture its real URL.</p><p><strong>Tool 2: Firecrawl MCP</strong></p><p>Firecrawl is a web scraping service with an official MCP server on <code>npm</code>. One config entry and Claude can call it as a native tool.</p><p>Create <code>.claude/mcp.json</code>:</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;json&quot;,&quot;nodeId&quot;:&quot;a38e9683-f17e-4dd1-a075-ba33b5ccbcf6&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-json">{
  "mcpServers": {
    "firecrawl": {
      "command": "npx",
      "args": ["-y", "firecrawl-mcp"],
      "env": {
        "FIRECRAWL_API_KEY": "your_key_here"
      }
    },
    "docx-writer": {
      "command": "python",
      "args": ["tools/write_docx.py"]
    }
  }
}</code></pre></div><p>This handles: extracting full post content from each confirmed URL not previews, not summaries, actual full markdown text.</p><p><strong>Tool 3: DOCX Writer (The Only Thing You Build)</strong></p><p>A small Python MCP server (~60 lines) that accepts structured content and writes a formatted <code>.docx</code> using <code>python-docx</code>.</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;python&quot;,&quot;nodeId&quot;:&quot;cc158a3d-cc2c-44ae-9ed7-93188b05ec91&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-python">@app.call_tool()
async def call_tool(name: str, arguments: dict):
    if name == "write_docx":
        doc = Document()
        for section in arguments["sections"]:
            doc.add_heading(section["heading"], level=1)
            doc.add_paragraph(section["content"])
            for sub in section.get("subheadings", []):
                doc.add_heading(sub["title"], level=2)
                doc.add_paragraph(sub["content"])
        doc.save(f"output/{arguments['filename']}")</code></pre></div><p>Install dependencies once:</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;bash&quot;,&quot;nodeId&quot;:&quot;8f998b19-cd45-43ad-a842-d58bb60b0946&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-bash">pip install mcp python-docx</code></pre></div><div><hr></div><h2>The Secret Weapon: <code>CLAUDE.md</code></h2><p>This is what most people don&#8217;t know about Claude Code.</p><p><code>CLAUDE.md</code> is a markdown file Claude reads at the start of every session. It&#8217;s not a prompt you type, it&#8217;s <em>permanent context</em> that shapes how the agent thinks across every single run.</p><p>Think of it less like a system prompt and more like an employee handbook. Write it once. The agent internalizes it permanently.</p><p>For this agent, <code>CLAUDE.md</code> defines:</p><ul><li><p>The agent&#8217;s role and objective</p></li><li><p>Which tools to use and when</p></li><li><p>The exact 5-phase execution sequence (don&#8217;t skip, don&#8217;t reorder)</p></li><li><p>Hard rules that cannot be violated</p></li><li><p>The newsletter&#8217;s details pre-filled, not passed at runtime</p></li></ul><p>That last point is important. By hardcoding the newsletter details directly into <code>CLAUDE.md</code>, the agent doesn&#8217;t hedge. It doesn&#8217;t write generic analysis that could apply to any Substack. It writes analysis <em>for this specific newsletter, in this specific niche, for this specific audience.</em></p><p>Here&#8217;s the skeleton:</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;markdown&quot;,&quot;nodeId&quot;:&quot;38b74e62-d592-49fc-90fc-1fbd8c358852&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-markdown"># Newsletter Growth Analyst Agent

## Your Role
You are a newsletter growth analyst. When triggered, perform a full
analysis of qubytes.substack.com and output a Word document with
actionable growth recommendations.

## Tools Available
- Browser (Computer Use) &#8212; navigation + screenshots
- mcp__firecrawl__scrape &#8212; full content extraction
- mcp__docx-writer__write_docx &#8212; document generation

## Hard Rules
- Every post URL must come from the browser address bar &#8212; never constructed
- Gated posts = skip entirely, do not summarize from preview
- Content ideas without cited evidence = discard
- Do not reorder phases

## Execution Phases
[Phase 0 through Phase 4 &#8212; see full file in repo]</code></pre></div><p>The full <code>CLAUDE.md</code> (150+ lines) is in the GitHub repo linked at the end.</p><div><hr></div><h2>The 5-Phase Execution Flow</h2><p>The agent follows a strict sequence. Each phase feeds context into the next, reordering breaks the analysis.</p><p><strong>Phase 0 &#8594; Homepage Overview</strong><br>Navigate, screenshot, extract: content categories, post titles, branding, tagline, navigation. This establishes positioning context for everything downstream.</p><p><strong>Phase 1 &#8594; Archive Deep Dive</strong><br>Navigate to <code>/archive?sort=top</code>. Identify top 7&#8211;10 posts. For each: click in, capture the exact URL from the address bar, navigate back. Pass each confirmed URL to Firecrawl. Skip gated posts. Stop at 5 fully readable posts minimum.</p><blockquote><p><strong>The hard rule:</strong> Never construct, guess, or infer a URL from a post title. Only use URLs directly observed in the browser address bar. This single constraint prevents an entire class of hallucination errors &#8212; and it&#8217;s the thing I got wrong in my first version.</p></blockquote><p><strong>Phase 2 &#8594; Pattern Recognition</strong><br>Pure reasoning, zero tool calls. Synthesize across all scraped posts: audience profile, pain points, content themes, writing style DNA, competitive differentiation.</p><p><strong>Phase 3 &#8594; Opportunity Mapping</strong><br>Generate 10 specific content ideas. Every single one must pass two tests before inclusion:</p><ol><li><p>Pattern test &#8594; maps to something observed in the top posts (cite the specific post)</p></li><li><p>Audience test &#8594; directly addresses a frustration from Phase 2</p></li></ol><p>Any idea that could apply to <em>any</em> newsletter gets discarded. Specificity is the filter.</p><p><strong>Phase 4 &#8594; Growth Strategy</strong><br>Newsletter-level SEO (not per-post), content repurposing by platform, audience segmentation, top 5 prioritized next steps.</p><p><strong>Final step:</strong> Call the DOCX writer. Formatted Word document lands in <code>/output</code>.</p><h2><strong>Running the Agent</strong></h2><p><strong>Option A &#8212; Interactive</strong> (good for your first run &#8212; watch what it does):</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;bash&quot;,&quot;nodeId&quot;:&quot;6eb5363b-1153-49f9-884e-69edaf567119&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-bash">cd newsletter-analyst
claude
# then type: Run the full newsletter growth analysis per CLAUDE.md</code></pre></div><p><strong>Option B &#8212; Headless</strong> (fully autonomous, single command):</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;bash&quot;,&quot;nodeId&quot;:&quot;9a05bb1b-d62e-4c83-9e2c-86c599a162b8&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-bash">claude --headless \
  --mcp-config .claude/mcp.json \
  --allowedTools "computer,mcp__firecrawl__scrape,mcp__docx-writer__write_docx" \
  -p "Run the full newsletter growth analysis per CLAUDE.md instructions"</code></pre></div><p><strong>Option C &#8212; Scheduled</strong> (add to cron, runs monthly with zero effort):</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;bash&quot;,&quot;nodeId&quot;:&quot;4cff2bd5-b881-49ea-b136-d7b2c23ff56f&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-bash"># crontab -e
0 9 1 * * /path/to/newsletter-analyst/run_analysis.sh</code></pre></div><p>More than 60% of enterprise teams using Claude Code now use headless mode for at least one automated workflow. The same pattern works here just for content instead of code.</p><h2><strong>What This Doesn&#8217;t Handle (Yet)</strong></h2><p>No production system earns trust by only showing the happy path. Here&#8217;s what breaks or has limits:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!ENKk!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff862ee2a-8c1f-4b0a-8f24-42fdf4c06914_1384x623.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!ENKk!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff862ee2a-8c1f-4b0a-8f24-42fdf4c06914_1384x623.png 424w, https://substackcdn.com/image/fetch/$s_!ENKk!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff862ee2a-8c1f-4b0a-8f24-42fdf4c06914_1384x623.png 848w, https://substackcdn.com/image/fetch/$s_!ENKk!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff862ee2a-8c1f-4b0a-8f24-42fdf4c06914_1384x623.png 1272w, https://substackcdn.com/image/fetch/$s_!ENKk!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff862ee2a-8c1f-4b0a-8f24-42fdf4c06914_1384x623.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!ENKk!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff862ee2a-8c1f-4b0a-8f24-42fdf4c06914_1384x623.png" width="1384" height="623" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/f862ee2a-8c1f-4b0a-8f24-42fdf4c06914_1384x623.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:623,&quot;width&quot;:1384,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1149865,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://qubytes.substack.com/i/192577103?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd9a5134c-8bb5-4ecd-8e1d-f80fcfeb7119_1536x1024.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!ENKk!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff862ee2a-8c1f-4b0a-8f24-42fdf4c06914_1384x623.png 424w, https://substackcdn.com/image/fetch/$s_!ENKk!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff862ee2a-8c1f-4b0a-8f24-42fdf4c06914_1384x623.png 848w, https://substackcdn.com/image/fetch/$s_!ENKk!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff862ee2a-8c1f-4b0a-8f24-42fdf4c06914_1384x623.png 1272w, https://substackcdn.com/image/fetch/$s_!ENKk!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff862ee2a-8c1f-4b0a-8f24-42fdf4c06914_1384x623.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div><hr></div><h2>What This Pattern Unlocks Beyond Newsletter Analysis</h2><p>The <strong>3-File Agent Stack</strong> is a reusable template for any multi-step research or content workflow. You&#8217;re just changing what&#8217;s in <code>CLAUDE.md</code> and which MCP tools you wire up.</p><p>Same architecture, different missions:</p><ul><li><p><strong>Competitor monitoring</strong> &#8594; scrape a competitor&#8217;s new posts weekly, flag positioning overlaps with your content</p></li><li><p><strong>Content repurposing</strong> &#8594; feed top posts in, get platform-optimized LinkedIn/Twitter/Shorts versions out</p></li><li><p><strong>Audience research</strong> &#8594; scrape comments across platforms, synthesize into rolling audience profiles</p></li><li><p><strong>SEO gap analysis</strong> &#8594; cross-reference your top posts with keyword data, output a prioritized missing-content list</p></li></ul><p>The pieces transfer. The compounding starts immediately.</p><div><hr></div><h2>The Mental Model Shift</h2><p>A prompt is something you write once and execute manually. An agent is a system you design once and run indefinitely.</p><p>The effort moves from <em>execution</em> to <em>architecture</em>. You stop being the person who runs the workflow and start being the person who designs it.</p><p><code>CLAUDE.md</code> is your agent&#8217;s belief system.<br>MCP tools are its hands.<br>Headless mode is its independence.</p><p>Once you&#8217;ve built one agent that works, the second one takes a fraction of the time. The patterns transfer. The infrastructure reuses. The 3-File Agent Stack becomes your default starting point for every new automation.</p><div><hr></div><h2>Try It Yourself</h2><p><strong>What you need:</strong></p><ul><li><p>Claude Code (Pro/Max/Teams plan)</p></li><li><p>Firecrawl API key (free tier works for testing)</p></li><li><p>Python + <code>pip install mcp python-docx</code></p></li></ul><p><strong>&#8594; </strong>Full repo with all 3 files (CLAUDE.md, mcp.json, write_docx.py):<strong> </strong><a href="https://github.com/virajput/newsletter-analyst.git">newsletter-analyst</a></p><p>Fork it. Swap in your newsletter URL in <code>CLAUDE.md</code>. Run it. See what comes out.</p><p>If you&#8217;ve already built something with this pattern or if it breaks in an interesting way reply and tell me. The failure modes are always more useful than the happy path.</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;plaintext&quot;,&quot;nodeId&quot;:&quot;9159ebb1-f67b-4c83-a841-e2f372d5ff99&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-plaintext">Same problem. Different layer.  
&#8212; The Neural Blueprint</code></pre></div><div class="pullquote"><div class="preformatted-block" data-component-name="PreformattedTextBlockToDOM"><label class="hide-text" contenteditable="false">Text within this block will maintain its original spacing when published</label><pre class="text">The Neural Blueprint goes deep on production AI architecture every week the kind that survives real load, real failures, and real constraints. If this was useful, subscribe below and forward it to one engineer who's still running these workflows manually.
</pre></div><div class="embedded-publication-wrap" data-attrs="{&quot;id&quot;:3954964,&quot;name&quot;:&quot;The Neural Blueprint&quot;,&quot;logo_url&quot;:&quot;https://substackcdn.com/image/fetch/$s_!RDwE!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F27c86b89-264d-4402-8dc4-ce2619924be6_1024x1024.png&quot;,&quot;base_url&quot;:&quot;https://qubytes.substack.com&quot;,&quot;hero_text&quot;:&quot;Built for engineers designing real AI systems. Not theory. Not demos. The architecture that survives production.&quot;,&quot;author_name&quot;:&quot;Vijendra Rajput&quot;,&quot;show_subscribe&quot;:true,&quot;logo_bg_color&quot;:&quot;#FAFAF7&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="EmbeddedPublicationToDOMWithSubscribe"><div class="embedded-publication show-subscribe"><a class="embedded-publication-link-part" native="true" href="https://qubytes.substack.com?utm_source=substack&amp;utm_campaign=publication_embed&amp;utm_medium=web"><img class="embedded-publication-logo" src="https://substackcdn.com/image/fetch/$s_!RDwE!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F27c86b89-264d-4402-8dc4-ce2619924be6_1024x1024.png" width="56" height="56" style="background-color: rgb(250, 250, 247);"><span class="embedded-publication-name">The Neural Blueprint</span><div class="embedded-publication-hero-text">Built for engineers designing real AI systems. Not theory. Not demos. The architecture that survives production.</div><div class="embedded-publication-author-name">By Vijendra Rajput</div></a><form class="embedded-publication-subscribe" method="GET" action="https://qubytes.substack.com/subscribe?"><input type="hidden" name="source" value="publication-embed"><input type="hidden" name="autoSubmit" value="true"><input type="email" class="email-input" name="email" placeholder="Type your email..."><input type="submit" class="button primary" value="Subscribe"></form></div></div></div><p><strong>&#128295; Next issue of Builder's Playbook:</strong><br><em>Sub-agents inside Claude Code how to delegate tasks to parallel workers without blowing your context window.</em></p><p></p>]]></content:encoded></item></channel></rss>