<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Claude-Code on</title><link>https://augmentedresilience.com/tags/claude-code/</link><description>Recent content in Claude-Code on</description><generator>Hugo -- gohugo.io</generator><language>en</language><lastBuildDate>Sun, 31 May 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://augmentedresilience.com/tags/claude-code/index.xml" rel="self" type="application/rss+xml"/><item><title>Your AI Isn't Going Off the Rails. It Never Had Any.</title><link>https://augmentedresilience.com/posts/augmented-resilience-posts/your-ai-isnt-going-off-the-rails.-it-never-had-any/</link><pubDate>Sun, 31 May 2026 00:00:00 +0000</pubDate><guid>https://augmentedresilience.com/posts/augmented-resilience-posts/your-ai-isnt-going-off-the-rails.-it-never-had-any/</guid><description>&lt;h1 id="your-ai-isnt-going-off-the-rails-it-never-had-any">Your AI Isn&amp;rsquo;t Going Off the Rails. It Never Had Any.&lt;/h1>
&lt;p>&lt;img src="https://augmentedresilience.com/images/ar-cover-off-the-rails-v2.png" alt="Image Description">&lt;/p>
&lt;p>The most common complaint I hear from people using AI is some version of the same sentence: &amp;ldquo;It goes off the rails.&amp;rdquo; It drifts. It forgets what I told it. It invents things. It has no direction.&lt;/p>
&lt;p>I understand the frustration, but the phrasing hides the actual problem. Going off the rails implies there were rails to begin with. There weren&amp;rsquo;t. A model in a blank chat window has no memory of who you are, no rules about how it should behave, and no defined process for doing the work. It is not drifting away from a plan. There was never a plan for it to drift from.&lt;/p></description><content>&lt;h1 id="your-ai-isnt-going-off-the-rails-it-never-had-any">Your AI Isn&amp;rsquo;t Going Off the Rails. It Never Had Any.&lt;/h1>
&lt;p>&lt;img src="https://augmentedresilience.com/images/ar-cover-off-the-rails-v2.png" alt="Image Description">&lt;/p>
&lt;p>The most common complaint I hear from people using AI is some version of the same sentence: &amp;ldquo;It goes off the rails.&amp;rdquo; It drifts. It forgets what I told it. It invents things. It has no direction.&lt;/p>
&lt;p>I understand the frustration, but the phrasing hides the actual problem. Going off the rails implies there were rails to begin with. There weren&amp;rsquo;t. A model in a blank chat window has no memory of who you are, no rules about how it should behave, and no defined process for doing the work. It is not drifting away from a plan. There was never a plan for it to drift from.&lt;/p>
&lt;p>So when people tell me their AI lacks direction, what they are really describing is a missing system. The fix is almost never a better prompt. It is more structure. And the amount of structure you give the AI is the single biggest variable in whether it behaves like a reliable partner or a clever stranger who resets every morning.&lt;/p>
&lt;p>The clearest way I have found to explain this is as three tiers. Each one solves a bigger slice of the &amp;ldquo;no direction&amp;rdquo; problem than the last.&lt;/p>
&lt;hr>
&lt;h2 id="tier-1-claude-chat--the-conversation">Tier 1: Claude Chat — The Conversation&lt;/h2>
&lt;p>This is where almost everyone starts, and where most people stay. You open a chat window, you type, it responds. Each conversation is mostly a blank slate.&lt;/p>
&lt;p>The defining trait of this tier is amnesia. A new chat forgets everything. Whatever context you want the model to have, you provide manually, in the prompt, every single time. The direction comes entirely from you. The model cannot touch your files, run anything, or reach your systems. It talks, and that is all it does.&lt;/p>
&lt;p>This is genuinely useful. For a quick question, a brainstorm, a first draft, or thinking out loud, a chat window is fast and frictionless. But it is also exactly why it feels directionless on anything bigger. Nothing constrains it. There are no rules, no persistent goal beyond your last message. If your prompt is vague, the output is vague. It is a brilliant intern with total amnesia, and you are re-explaining the entire job every morning.&lt;/p>
&lt;p>People at this tier blame the model. The model is rarely the issue. The issue is that nothing is holding it on a track, because there is no track.&lt;/p>
&lt;hr>
&lt;h2 id="tier-2-claude-code--the-operator">Tier 2: Claude Code — The Operator&lt;/h2>
&lt;p>The second tier is a different kind of tool entirely. Claude Code is an agent that lives in your terminal. It does not just talk about work — it does the work. It reads and writes real files, runs commands, searches the web, and operates on your actual environment instead of an imagined one.&lt;/p>
&lt;p>Two things change the moment you move here.&lt;/p>
&lt;p>First, it gets a working memory of your project. A &lt;code>CLAUDE.md&lt;/code> file holds persistent instructions for that codebase or project, so the model arrives already knowing the conventions, the goals, and the rules you have written down. You stop re-explaining the project on every session.&lt;/p>
&lt;p>Second, and more importantly, it works in a loop: act, observe the result, correct. It writes a file and sees whether the change worked. It runs a command and reads the actual output. That feedback loop is what kills the drift. The model is not imagining what might happen — it is looking at what did happen and adjusting. Operating on real artifacts instead of guesses is most of the discipline.&lt;/p>
&lt;p>The honest limitation: this discipline is per-project and largely manual. You set up each project&amp;rsquo;s instructions yourself. The memory does not follow you from one project to the next, and there is no consistent persona or process spanning everything you do. It is a sharp, capable operator — but one you have to brief fresh for every new job.&lt;/p>
&lt;hr>
&lt;h2 id="tier-3-ai-infrastructure">Tier 3: AI Infrastructure&lt;/h2>
&lt;p>The third tier is the one that actually fixes &amp;ldquo;no direction&amp;rdquo; at the root, because it stops treating each session as a fresh start.&lt;/p>
&lt;p>AI Infrastructure is a system that wraps Claude Code and gives it a permanent identity, a rule set, a knowledge base, and a defined process. The jump from Tier 2 to Tier 3 is the difference between hiring a contractor and building an operations department. This post itself is a small example: it was written inside an AI Infrastructure that already knew my blog&amp;rsquo;s voice, my formatting conventions, and where the file should be saved, without my having to say any of it.&lt;/p>
&lt;p>Three things work together here, and they are what make drift structurally hard.&lt;/p>
&lt;p>The first is persistent identity and memory. The infrastructure does not forget who I am, what I work on, or how I want things done. When I correct it, the correction sticks across every future session, not just the current chat. The knowledge lives in files I own, not inside a conversation that disappears when I close the tab.&lt;/p>
&lt;p>The second is a defined process. Every non-trivial request gets classified and routed through a structured sequence: understand the request, plan the approach, do the work, verify it against explicit criteria. The model cannot freewheel, because a process governs the response before it starts. That is the literal opposite of going off the rails — the rails are built in.&lt;/p>
&lt;p>The third is context routing. Instead of me pasting the right background into every prompt, the system pulls the relevant knowledge automatically based on what I am doing. The model arrives oriented, every time.&lt;/p>
&lt;p>None of this makes the underlying model smarter. It makes the environment around the model disciplined. That is the whole trick.&lt;/p>
&lt;hr>
&lt;h2 id="the-same-symptom-mapped-to-the-fix">The Same Symptom, Mapped to the Fix&lt;/h2>
&lt;p>When someone describes their AI as directionless, the specific complaint usually tells you exactly which tier they are stuck on and what would move them up.&lt;/p>
&lt;p>If it forgets what you told it, you are in a chat window and you need persistent instructions — that is the move to Claude Code.&lt;/p>
&lt;p>If it hallucinates instead of using your real data, you need to let it read your actual files — again, the move to an operator that touches your environment.&lt;/p>
&lt;p>If you keep re-explaining your preferences across projects, you have outgrown per-project memory and need persistent identity — the move to infrastructure.&lt;/p>
&lt;p>And if it has no consistent process from one task to the next, you need a defined algorithm governing how every request gets handled — the same move.&lt;/p>
&lt;p>Notice the pattern. Every one of these is solved by adding structure, not by writing a cleverer sentence into the prompt box.&lt;/p>
&lt;hr>
&lt;h2 id="the-real-shift">The Real Shift&lt;/h2>
&lt;p>Direction is not something you nag the AI for inside each prompt. It is something you build into the system once.&lt;/p>
&lt;p>That reframing is the entire jump from chatting to infrastructure. A chat window is equally capable on day one and day three hundred, because nothing accumulates. An operator gets more useful per project, as long as you keep briefing it. An infrastructure compounds — every rule you add, every preference it learns, every process you refine makes the next session start further ahead than the last.&lt;/p>
&lt;p>If your AI feels like it has no direction, it is not malfunctioning. It is doing exactly what an unstructured system does. The rails were never the model&amp;rsquo;s job to build. They are yours.&lt;/p></content></item><item><title>If a Script Can Do It, Don't Ask the LLM</title><link>https://augmentedresilience.com/posts/augmented-resilience-posts/if-a-script-can-do-it-dont-ask-the-llm/</link><pubDate>Mon, 20 Apr 2026 00:00:00 +0000</pubDate><guid>https://augmentedresilience.com/posts/augmented-resilience-posts/if-a-script-can-do-it-dont-ask-the-llm/</guid><description>&lt;h1 id="if-a-script-can-do-it-dont-ask-the-llm">If a Script Can Do It, Don&amp;rsquo;t Ask the LLM&lt;/h1>
&lt;p>When your AI system is spending inference tokens to parse date fields, strip PDF formatting artifacts, or convert file syntax — that is not an AI problem. That is an architecture problem. Code can handle all of those tasks deterministically, faster, cheaper, and more accurately than any language model. If your token bill is high and your outputs are inconsistent, the problem is usually not the model. It is what you are handing the model.&lt;/p></description><content>&lt;h1 id="if-a-script-can-do-it-dont-ask-the-llm">If a Script Can Do It, Don&amp;rsquo;t Ask the LLM&lt;/h1>
&lt;p>When your AI system is spending inference tokens to parse date fields, strip PDF formatting artifacts, or convert file syntax — that is not an AI problem. That is an architecture problem. Code can handle all of those tasks deterministically, faster, cheaper, and more accurately than any language model. If your token bill is high and your outputs are inconsistent, the problem is usually not the model. It is what you are handing the model.&lt;/p>
&lt;p>PAI treats every token as a resource allocation decision. If a script can do it, a script does it. The model gets the part that actually requires reasoning.&lt;/p>
&lt;hr>
&lt;p>&lt;img src="https://augmentedresilience.com/images/ar-post-structural-tax.png" alt="Image Description">&lt;/p>
&lt;h2 id="the-structural-tax">The Structural Tax&lt;/h2>
&lt;p>Most AI workflows are built around convenience. You have a PDF — you upload it. You have a session log — you paste it in. You have a directory of files — you point the model at the folder. The model figures it out.&lt;/p>
&lt;p>That approach works well enough for one-off tasks. It breaks down at scale, in recurring workflows, and anywhere precision matters.&lt;/p>
&lt;p>Raw PDFs carry structural overhead that has nothing to do with the content you care about: page headers, footers, column artifacts, encoding noise, redundant whitespace, and metadata that made sense in the original layout but becomes garbage in a text stream. A language model consuming that document is spending a meaningful portion of its context window on formatting debris. That cost compounds across every document in every workflow.&lt;/p>
&lt;p>The same pattern shows up everywhere. Raw session transcripts contain tool call metadata, timestamps, and infrastructure details that are irrelevant to extracting what was learned. Full database contents are too large to fit in context, so the model guesses at relevance instead of reasoning over curated results. Obsidian-flavored Markdown with custom image syntax breaks rendering in any system that was not built for it.&lt;/p>
&lt;p>Every one of these is a structural problem. None of them require intelligence to solve. They require code.&lt;/p>
&lt;hr>
&lt;p>&lt;img src="https://augmentedresilience.com/images/ar-post-preparation-layer.png" alt="Image Description">&lt;/p>
&lt;h2 id="what-pai-does-instead">What PAI Does Instead&lt;/h2>
&lt;p>PAI operates on a two-phase model: scripts handle structure, the LLM handles reasoning. The handoff only happens after the mechanical work is done.&lt;/p>
&lt;p>A few examples of how this plays out in practice.&lt;/p>
&lt;p>&lt;strong>PDF to Markdown conversion.&lt;/strong> When I ingest Oracle HCM documentation — dense, multi-column PDFs that can run hundreds of pages — nothing goes to the LLM in PDF form. A Python script converts the document to clean Markdown first, stripping formatting artifacts and preserving the content hierarchy. The model sees structured text, not a scanned layout. The difference in token consumption is substantial, and the difference in output quality is larger still.&lt;/p>
&lt;p>&lt;strong>Session harvesting.&lt;/strong> Claude Code sessions produce raw JSON transcripts containing every tool call, every response, and a lot of infrastructure noise. &lt;code>SessionHarvester.ts&lt;/code> parses those transcripts before any analysis happens. It extracts structured learning signals — what worked, what failed, what decisions were made — and writes them to a clean format. The LLM receives a curated summary, not a raw dump.&lt;/p>
&lt;p>&lt;strong>Activity parsing.&lt;/strong> &lt;code>ActivityParser.ts&lt;/code> does the same for daily activity logs: reads session files, extracts structured change records, and produces a clean representation of what changed in the PAI system. No model inference required until there is something worth reasoning about.&lt;/p>
&lt;p>&lt;strong>Knowledge base search.&lt;/strong> The cybersecurity knowledge base holds over fifty books worth of content in a local PostgreSQL vector store. When a query comes in, &lt;code>CyberSecKB.ts&lt;/code> runs a similarity search and returns the most relevant passages. The LLM reasons over that curated result set — not the entire library. Retrieval is deterministic. Reasoning is probabilistic. They are separate steps by design.&lt;/p>
&lt;p>&lt;strong>Image pipeline.&lt;/strong> Obsidian uses &lt;code>![Image Description](/images/filename.png)&lt;/code> syntax for embedded images. Hugo uses standard Markdown. &lt;code>images.py&lt;/code> handles the conversion and copies files to the correct static directory at publish time. No LLM is involved at any point in that pipeline. It is a string transformation and a file copy — exactly the kind of task code should own.&lt;/p>
&lt;hr>
&lt;h2 id="the-boundary-is-the-design">The Boundary Is the Design&lt;/h2>
&lt;p>&lt;img src="https://augmentedresilience.com/images/ar-post-two-phase-architecture-oracle.png" alt="Image Description">&lt;/p>
&lt;p>The two-phase pattern is not a workaround. It is the architecture.&lt;/p>
&lt;p>Every AI workflow has a boundary between deterministic computation and probabilistic reasoning. The question is where you draw it. Drawing it too early means the model is doing structural work it is not suited for: burning tokens on format conversion, wasting context on irrelevant metadata, producing inconsistent output because the input was inconsistent. Drawing it correctly means the model receives exactly what it needs to do the work only it can do.&lt;/p>
&lt;p>This is a different problem than the one prompt engineering was designed to solve. Prompt engineering is about communicating intent clearly to a model. The code-first pattern is about not asking the model to earn the right to see your data by first organizing it. That work should already be done.&lt;/p>
&lt;p>The scripts in PAI are not wrappers around LLM calls. They are the preparation layer — the part of the system that exists specifically so the model does not have to deal with structure. Once that layer is in place, the model&amp;rsquo;s job gets narrower and cleaner. It reasons. It synthesizes. It makes judgment calls. It does not convert file formats.&lt;/p>
&lt;hr>
&lt;h2 id="the-result">The Result&lt;/h2>
&lt;p>When the pipeline is built correctly, token consumption goes down and output quality goes up — not because the model improved, but because the input did. The model is working with clean data in a consistent format, scoped to exactly what is relevant. The structural variables are removed before inference begins.&lt;/p>
&lt;p>That is the return on building the prep layer. Less waste. More signal. A model that can focus on the part of the problem that actually requires a model.&lt;/p></content></item><item><title>AI Writes Code Fast. Here's Why Security-First Thinking Matters More Than Ever.</title><link>https://augmentedresilience.com/posts/augmented-resilience-posts/ai-writes-code-fast.-here-is-why-security-first-thinking-matters-more-than-ever/</link><pubDate>Sun, 19 Apr 2026 00:00:00 +0000</pubDate><guid>https://augmentedresilience.com/posts/augmented-resilience-posts/ai-writes-code-fast.-here-is-why-security-first-thinking-matters-more-than-ever/</guid><description>&lt;h2 id="speed-is-the-feature-unexamined-speed-is-the-liability">Speed Is the Feature. Unexamined Speed Is the Liability.&lt;/h2>
&lt;p>One of the most impressive things about using AI to write code is how fast it moves. You describe an endpoint, a data model, a feature — and within seconds you have working code. Not a sketch. Not pseudocode. Actual, runnable implementation.&lt;/p>
&lt;p>That speed is real, and it is genuinely useful. I use it every day.&lt;/p>
&lt;p>But here is something I noticed the longer I worked with AI-generated code: it writes to the happy path. AI is extraordinarily good at making code that works when everything goes as expected. It is considerably less reliable at writing code that stays safe when things go wrong — when someone sends unexpected input, when a dependency is compromised, when a secret accidentally surfaces in a log, when a logged-in user tries to access someone else&amp;rsquo;s data.&lt;/p></description><content>&lt;h2 id="speed-is-the-feature-unexamined-speed-is-the-liability">Speed Is the Feature. Unexamined Speed Is the Liability.&lt;/h2>
&lt;p>One of the most impressive things about using AI to write code is how fast it moves. You describe an endpoint, a data model, a feature — and within seconds you have working code. Not a sketch. Not pseudocode. Actual, runnable implementation.&lt;/p>
&lt;p>That speed is real, and it is genuinely useful. I use it every day.&lt;/p>
&lt;p>But here is something I noticed the longer I worked with AI-generated code: it writes to the happy path. AI is extraordinarily good at making code that works when everything goes as expected. It is considerably less reliable at writing code that stays safe when things go wrong — when someone sends unexpected input, when a dependency is compromised, when a secret accidentally surfaces in a log, when a logged-in user tries to access someone else&amp;rsquo;s data.&lt;/p>
&lt;p>This is not a criticism of AI models. It is a structural observation about how code generation works. AI learns from what code looks like, not from what happens to systems that run it. The attack surface is invisible at generation time.&lt;/p>
&lt;p>Security-first thinking is the discipline that fills that gap. And building it into how you work with AI is one of the highest-leverage things you can do as a developer.&lt;/p>
&lt;hr>
&lt;h2 id="what-ai-gets-wrong-by-default">What AI Gets Wrong By Default&lt;/h2>
&lt;p>Before we get to principles, it helps to see the failure modes concretely. These are patterns I started noticing after reviewing AI-generated code more carefully.&lt;/p>
&lt;p>&lt;strong>Hardcoded secrets.&lt;/strong> Ask AI to write a function that connects to a database or calls an external API, and it will often produce something like this:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-python" data-lang="python">&lt;span style="display:flex;">&lt;span>db &lt;span style="color:#f92672">=&lt;/span> connect(host&lt;span style="color:#f92672">=&lt;/span>&lt;span style="color:#e6db74">&amp;#34;prod-db.company.com&amp;#34;&lt;/span>, user&lt;span style="color:#f92672">=&lt;/span>&lt;span style="color:#e6db74">&amp;#34;admin&amp;#34;&lt;/span>, password&lt;span style="color:#f92672">=&lt;/span>&lt;span style="color:#e6db74">&amp;#34;Sup3rS3cr3t!&amp;#34;&lt;/span>)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>client &lt;span style="color:#f92672">=&lt;/span> OpenAI(api_key&lt;span style="color:#f92672">=&lt;/span>&lt;span style="color:#e6db74">&amp;#34;sk-proj-abc123...&amp;#34;&lt;/span>)
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>The code works. It will also put your credentials in git history forever. A secret committed to a repository — even briefly, even to a private repo — must be treated as compromised. Git history is permanent. The only remediation is rotation.&lt;/p>
&lt;p>&lt;strong>Missing input validation.&lt;/strong> AI tends to write code that trusts request data. An endpoint that receives &lt;code>req.body.quantity&lt;/code> will often use it directly, skipping the check for whether it is a positive integer, whether it is within expected bounds, whether it contains what the code assumes it contains.&lt;/p>
&lt;p>&lt;strong>Fetch-then-check authorization.&lt;/strong> This one is subtle. AI commonly writes authorization logic like this:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-js" data-lang="js">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#66d9ef">const&lt;/span> &lt;span style="color:#a6e22e">order&lt;/span> &lt;span style="color:#f92672">=&lt;/span> &lt;span style="color:#66d9ef">await&lt;/span> &lt;span style="color:#a6e22e">db&lt;/span>.&lt;span style="color:#a6e22e">orders&lt;/span>.&lt;span style="color:#a6e22e">findById&lt;/span>(&lt;span style="color:#a6e22e">req&lt;/span>.&lt;span style="color:#a6e22e">params&lt;/span>.&lt;span style="color:#a6e22e">id&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#66d9ef">if&lt;/span> (&lt;span style="color:#a6e22e">order&lt;/span>.&lt;span style="color:#a6e22e">userId&lt;/span> &lt;span style="color:#f92672">!==&lt;/span> &lt;span style="color:#a6e22e">req&lt;/span>.&lt;span style="color:#a6e22e">user&lt;/span>.&lt;span style="color:#a6e22e">id&lt;/span>) &lt;span style="color:#66d9ef">return&lt;/span> &lt;span style="color:#a6e22e">res&lt;/span>.&lt;span style="color:#a6e22e">status&lt;/span>(&lt;span style="color:#ae81ff">403&lt;/span>).&lt;span style="color:#a6e22e">send&lt;/span>();
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#66d9ef">return&lt;/span> &lt;span style="color:#a6e22e">res&lt;/span>.&lt;span style="color:#a6e22e">json&lt;/span>(&lt;span style="color:#a6e22e">order&lt;/span>);
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>That looks right. But it fetches the record first and checks ownership second. A slightly better pattern is to include the user ID in the query itself, so that non-owned records simply return null — and you return a 404, not a 403. Returning 403 confirms to an attacker that the resource exists. It is a small thing that compounds at scale.&lt;/p>
&lt;p>&lt;strong>Weak cryptography by familiarity.&lt;/strong> Ask AI to hash a password and it might reach for SHA-256. SHA-256 is a solid hash function — for data integrity. It is the wrong tool for passwords because it is fast. Fast means a GPU can test billions of candidate passwords per second against a leaked hash. bcrypt and Argon2 are deliberately slow. That slowness is the security property.&lt;/p>
&lt;p>&lt;strong>No rate limiting on authentication.&lt;/strong> AI generates login endpoints without the defensive scaffolding that should always accompany them: rate limiting per IP, account lockout after repeated failures, uniform response times to prevent user enumeration.&lt;/p>
&lt;p>None of these are exotic edge cases. They are the everyday failure modes that show up in security audits and breach post-mortems, again and again.&lt;/p>
&lt;hr>
&lt;h2 id="the-mindset-shift-from-checklist-to-first-principles">The Mindset Shift: From Checklist to First Principles&lt;/h2>
&lt;p>Here is where I want to push back against the usual framing. Security is often presented as a checklist — OWASP Top 10, compliance requirements, &amp;ldquo;use HTTPS.&amp;rdquo; Checklists have their place, but they do not produce secure code. They produce code that passes the checklist.&lt;/p>
&lt;p>Security-first thinking is different. It is a way of looking at code that asks one question at every boundary: &lt;em>who or what is being trusted here, and has that trust been earned?&lt;/em>&lt;/p>
&lt;p>Every class of vulnerability — SQL injection, XSS, CSRF, IDOR, broken authentication, insecure deserialization — reduces to a single failure: &lt;strong>untrusted data crossing a trust boundary with the authority of trusted data.&lt;/strong>&lt;/p>
&lt;p>SQL injection happens when user input is trusted to be SQL-safe before it reaches the database. XSS happens when user-generated content is trusted to be display-safe before it enters the DOM. IDOR happens when a request parameter is trusted to represent a resource the current user is allowed to access.&lt;/p>
&lt;p>Once you see security through this lens — trust boundaries and their enforcement — you stop asking &amp;ldquo;did I remember the checklist item?&amp;rdquo; and start asking &amp;ldquo;where are the trust boundaries in this code, and what enforces them?&amp;rdquo; That question applies to every system, every language, every framework. It does not go stale.&lt;/p>
&lt;p>This is what I mean by security-first thinking as a mindset rather than a procedure. It is not about knowing rules. It is about developing the habit of seeing trust assumptions in code.&lt;/p>
&lt;hr>
&lt;h2 id="the-eight-principles">The Eight Principles&lt;/h2>
&lt;p>When I worked through this with Luna recently — building a security knowledge base from 50 cybersecurity books — we distilled the trust boundary framework down to eight irreducible properties that AI-generated code must satisfy.&lt;/p>
&lt;p>I want to walk through each one because they are not independent rules. They are facets of the same underlying principle.&lt;/p>
&lt;p>&lt;strong>1. Input is untrusted by default.&lt;/strong> Every value arriving from outside your process — HTTP body, query parameters, headers, cookies, file uploads — is hostile until validated. Client-side validation is UX. Server-side validation is security. They cannot substitute for each other.&lt;/p>
&lt;p>&lt;strong>2. Output is encoded for its context.&lt;/strong> A string displayed in HTML needs HTML encoding. A value interpolated into SQL needs parameterization. A value passed to a shell command needs to go through an argument array, not string concatenation. The encoding is not about the string itself — it is about the context it will be interpreted in.&lt;/p>
&lt;p>&lt;strong>3. Secrets never live in code.&lt;/strong> Passwords, API keys, tokens, certificates — these belong in environment variables or a secrets manager, never in source files. This is absolute. Git history is permanent.&lt;/p>
&lt;p>&lt;strong>4. Authentication is verified, not assumed.&lt;/strong> Every protected route, every protected function, checks identity on that request. Being logged in at some prior point does not carry forward.&lt;/p>
&lt;p>&lt;strong>5. Authorization is checked at the data layer.&lt;/strong> Being authenticated is not the same as being authorized to access a specific resource. Ownership checks belong in the query itself, not as a post-fetch condition.&lt;/p>
&lt;p>&lt;strong>6. Least privilege is the default.&lt;/strong> Database connections, service accounts, IAM roles, file operations — each gets only the access its specific function requires. Nothing more. A compromised least-privilege component fails safely. A compromised over-privileged one does not.&lt;/p>
&lt;p>&lt;strong>7. Cryptography is never homegrown.&lt;/strong> Cipher and hash choices go to battle-tested libraries: bcrypt or Argon2 for passwords, AES-GCM for encryption, HMAC-SHA256 for message authentication. The failure modes of hand-rolled crypto are subtle and catastrophic.&lt;/p>
&lt;p>&lt;strong>8. Dependencies are trust extensions.&lt;/strong> Every package you add is code you are trusting. Its transitive dependencies are code you are trusting. Supply chain attacks are real. Lock files, audits, and version pinning are not paranoia — they are basic hygiene.&lt;/p>
&lt;p>These eight properties are not a checklist to run through at the end. They are filters to apply while generating code. The question during every code-writing session is: which of these are relevant to what I am building right now?&lt;/p>
&lt;hr>
&lt;h2 id="baking-it-into-your-ai-workflow">Baking It Into Your AI Workflow&lt;/h2>
&lt;p>Knowing principles is not the same as applying them consistently. The reason I started building infrastructure around this is that consistency requires more than intention — it requires systems.&lt;/p>
&lt;p>Here is what I built, and it came directly from the work of turning 50 cybersecurity books into a searchable knowledge base.&lt;/p>
&lt;p>&lt;strong>Tier 1 topic files.&lt;/strong> Each of the eight principles above now lives in a concise reference file — 8 to 12KB each — distilled from the source material. &lt;code>input-validation.md&lt;/code>, &lt;code>secrets-management.md&lt;/code>, &lt;code>authentication.md&lt;/code>, &lt;code>authorization.md&lt;/code>, &lt;code>cryptography.md&lt;/code>, and the others. Each file is dense but scannable: concrete patterns, code examples, anti-patterns, quick checklists.&lt;/p>
&lt;p>&lt;strong>Engineer PREFERENCES.&lt;/strong> I wired those topic files into the Engineer agent through a PREFERENCES file. The trigger table maps code categories to topic files: anything involving SQL gets &lt;code>xss-injection-prevention.md&lt;/code> loaded. Anything involving authentication loads &lt;code>authentication.md&lt;/code>. Anything involving secrets loads &lt;code>secrets-management.md&lt;/code>. The agent loads the relevant files silently before writing code and runs the associated checklist before declaring work done.&lt;/p>
&lt;p>The result is that security context is present in every relevant code-generation session without me having to ask for it. The principles are not something I have to remember to invoke. They are part of the workflow infrastructure.&lt;/p>
&lt;p>This is what I keep coming back to with PAI: the value is not in any single AI interaction. It is in building infrastructure that makes the right thing the default thing. Security-first code used to require conscious effort and specialized knowledge in the moment. Now it is loaded context — always present, reliably applied.&lt;/p>
&lt;hr>
&lt;h2 id="security-and-ai-are-not-in-tension">Security and AI Are Not in Tension&lt;/h2>
&lt;p>I want to end on this because it is easy to come away from a security conversation feeling like the message is &amp;ldquo;AI is dangerous, slow down, be careful.&amp;rdquo; That is not the message.&lt;/p>
&lt;p>AI writing code fast is a genuine capability improvement. Being able to go from specification to working implementation in minutes changes what is possible for a small team or a solo developer. That is real.&lt;/p>
&lt;p>Security-first thinking is not a constraint on that capability. It is the thing that makes the output of that capability trustworthy. Code that moves fast and ships vulnerable systems is not actually faster in any meaningful sense — it is accumulating debt that will be paid with interest.&lt;/p>
&lt;p>The combination is the point. AI that knows how to think about trust boundaries, that loads security context automatically, that applies principles rather than just patterns — that is a force multiplier, not a liability. You get the speed and you get the rigor.&lt;/p>
&lt;p>Building toward that combination is one of the more interesting engineering problems I have worked on. The knowledge base, the topic files, the wiring into the workflow — it is all aimed at the same thing: making security-first thinking something that happens automatically, not something that requires a specialist in the room.&lt;/p>
&lt;p>The specialist knowledge exists. We built it into 77KB of reference material drawn from 50 books. Now it is always in the room.&lt;/p>
&lt;hr>
&lt;p>&lt;em>Part of the PAI series on building infrastructure that makes AI more useful, more reliable, and more trustworthy. The security knowledge base and topic files referenced in this post were built using Claude Code, PostgreSQL, pgvector, and source material from O&amp;rsquo;Reilly&amp;rsquo;s security catalog.&lt;/em>&lt;/p></content></item><item><title>Stop Prompt Engineering. Start Building Infrastructure.</title><link>https://augmentedresilience.com/posts/augmented-resilience-posts/stop-prompt-engineering.-start-building-infrastructure/</link><pubDate>Sun, 19 Apr 2026 00:00:00 +0000</pubDate><guid>https://augmentedresilience.com/posts/augmented-resilience-posts/stop-prompt-engineering.-start-building-infrastructure/</guid><description>&lt;h1 id="stop-prompt-engineering-start-building-infrastructure">Stop Prompt Engineering. Start Building Infrastructure.&lt;/h1>
&lt;p>Last week I opened a terminal, typed six words, and watched PAI spend the next three minutes processing a set of handwritten study notes exported from my reMarkable tablet. It converted the file format, extracted key concepts, generated structured review questions, cross-referenced my existing knowledge base, and saved everything to the correct directories in Obsidian — organized by module, tagged correctly, ready to use. I did not write a prompt. I did not explain what certification I was studying. I did not describe the output structure I wanted. I just named the module.&lt;/p></description><content>&lt;h1 id="stop-prompt-engineering-start-building-infrastructure">Stop Prompt Engineering. Start Building Infrastructure.&lt;/h1>
&lt;p>Last week I opened a terminal, typed six words, and watched PAI spend the next three minutes processing a set of handwritten study notes exported from my reMarkable tablet. It converted the file format, extracted key concepts, generated structured review questions, cross-referenced my existing knowledge base, and saved everything to the correct directories in Obsidian — organized by module, tagged correctly, ready to use. I did not write a prompt. I did not explain what certification I was studying. I did not describe the output structure I wanted. I just named the module.&lt;/p>
&lt;p>Eighteen months ago, that same task would have started with a paragraph explaining what the reMarkable export format was, what the certification covered, how I organized notes in Obsidian, what level of detail I wanted in the summary, and what format the quiz questions should follow — and another paragraph if I wanted the output saved to a specific location. Every single session. From scratch.&lt;/p>
&lt;p>That gap is the entire argument for building an AI harness instead of staying in a chat window.&lt;/p>
&lt;hr>
&lt;p>&lt;img src="https://augmentedresilience.com/images/spe-chat-window-tax.png" alt="Image Description">&lt;/p>
&lt;h2 id="the-chat-window-tax">The Chat Window Tax&lt;/h2>
&lt;p>Prompt engineering emerged as a discipline because LLMs are stateless by default. Every conversation starts with a blank model. If you want the model to know who you are, what you work on, how you like your outputs formatted, and which approach you prefer for recurring problems — you have to tell it. Every time.&lt;/p>
&lt;p>That is a tax. Not a feature. A tax.&lt;/p>
&lt;p>The people who got good at prompt engineering got skilled at paying that tax efficiently — writing shorter context dumps, using system prompts in API playgrounds, building prompt libraries they paste from. It helped. But it never made the tax go away. It just made each payment slightly cheaper.&lt;/p>
&lt;p>In 2026, paying that tax is a choice. The tools exist to stop paying it entirely.&lt;/p>
&lt;hr>
&lt;p>&lt;img src="https://augmentedresilience.com/images/spe-three-layer-harness.png" alt="Image Description">&lt;/p>
&lt;h2 id="what-a-harness-actually-does">What a Harness Actually Does&lt;/h2>
&lt;p>A harness is infrastructure wrapped around your AI runtime. In my case, that is PAI — Personal AI Infrastructure — running on top of Claude Code in the terminal. The architecture has three layers.&lt;/p>
&lt;p>&lt;strong>Memory&lt;/strong> is persistent context that survives across sessions. PAI knows my role (HRIS analyst), my platform (Oracle HCM Cloud), my Oracle triage methodology, my blog&amp;rsquo;s writing conventions, my active projects, and my preferences for output formats. None of that gets re-entered. It gets loaded automatically at session start.&lt;/p>
&lt;p>&lt;strong>Skills&lt;/strong> are pre-built, parameterized workflows. When I say &amp;ldquo;process my study notes,&amp;rdquo; a skill handles that — reading from the right directory, converting the format, saving to the right Obsidian path, cross-referencing the knowledge base. The skill is the prompt, written once, tested, improved over time. I do not craft it fresh every time.&lt;/p>
&lt;p>&lt;strong>The Algorithm&lt;/strong> is a structured execution framework. When the work is complex — multi-step, multi-file, non-trivial — PAI runs through a defined process: observe, think, plan, build, execute, verify, learn. The output is consistent because the process is consistent.&lt;/p>
&lt;p>Taken together, these three things mean the model is never starting from zero. It arrives at each session already oriented.&lt;/p>
&lt;hr>
&lt;p>&lt;img src="https://augmentedresilience.com/images/spe-token-economy.png" alt="Image Description">&lt;/p>
&lt;h2 id="the-token-economy-hidden-inside-the-infrastructure">The Token Economy Hidden Inside the Infrastructure&lt;/h2>
&lt;p>There is a practical angle to this that does not get talked about enough: token consumption.&lt;/p>
&lt;p>Every message in a chat session burns tokens — your context, the model&amp;rsquo;s reasoning, the output, and whatever you paste in to re-establish state. The longer and more complex the session, the faster you burn toward usage limits. When you are re-explaining your role, your project, and your preferences at the start of each conversation, you are spending tokens on re-orientation, not on actual work.&lt;/p>
&lt;p>A harness changes the math.&lt;/p>
&lt;p>PAI loads persistent context at session start through hooks — but those are structured files read by the runtime, not large prompt blocks the model has to reason through. The model arrives oriented. The working token budget goes toward the task.&lt;/p>
&lt;p>More importantly, PAI externalizes logic that would otherwise live inside the conversation. The skills are pre-written workflows. The Algorithm is a structured execution framework. The session hooks handle routing and context injection. A significant portion of what would normally require the model to think its way through — &amp;ldquo;what directory does this go in?&amp;rdquo;, &amp;ldquo;what format does this certification use?&amp;rdquo;, &amp;ldquo;what&amp;rsquo;s the right next step in this process?&amp;rdquo; — is already answered in scripts and configuration files that run before the model responds.&lt;/p>
&lt;p>That is not just more efficient. It changes your usage ceiling. When the model is not spending context budget on re-orientation or derivable decisions, more of each session goes toward meaningful work. You hit limits later, do more per session, and run longer chains of complex tasks without interruption.&lt;/p>
&lt;p>Prompt engineering optimizes the prompt. Infrastructure optimizes the budget.&lt;/p>
&lt;hr>
&lt;p>&lt;img src="https://augmentedresilience.com/images/spe-cli-vs-chat.png" alt="Image Description">&lt;/p>
&lt;h2 id="cli-vs-chat-it-is-architecture-not-preference">CLI vs. Chat: It Is Architecture, Not Preference&lt;/h2>
&lt;p>This is the part that took me a while to articulate. The preference for CLI over chat window is not aesthetic — it is structural.&lt;/p>
&lt;p>A chat window is a conversation interface. Conversations are ephemeral. They have no persistent state, no programmable hooks, no way to inject context at session start, no way to trigger workflows, no way to store outputs in structured memory. The UX is polished. The architecture is a dead end for anything requiring continuity.&lt;/p>
&lt;p>A CLI is a programmable runtime. Session start hooks can load context files. Commands can trigger skills. Outputs can write back to memory. Different agents can be spawned with different contexts and run in parallel. The AI operates inside an environment you built, not inside a box you are renting.&lt;/p>
&lt;p>That difference compounds. A chat window is equally capable on day one and day three hundred. A harness gets more capable every time you add a skill, improve the memory, or refine the algorithm.&lt;/p>
&lt;hr>
&lt;p>&lt;img src="https://augmentedresilience.com/images/spe-before-after.png" alt="Image Description">&lt;/p>
&lt;h2 id="before-and-after-the-same-problem-two-environments">Before and After: The Same Problem, Two Environments&lt;/h2>
&lt;p>&lt;strong>Chat window, eight months ago:&lt;/strong>&lt;/p>
&lt;p>&amp;ldquo;I have study notes from a certification I&amp;rsquo;m working through, exported as a Word document from my tablet. I organize my notes in Obsidian under a folder structure by certification and module number. I need you to convert the content to clean markdown, extract the key concepts as a structured summary, generate quiz questions with answers, and format everything to match my existing note structure. The certification is [name], this is module [N], and here&amp;rsquo;s an example of how my other notes look: [paste example]&amp;hellip;&amp;rdquo;&lt;/p>
&lt;p>Then the session ended. Next time I had notes to process — same context dump, from scratch.&lt;/p>
&lt;p>&lt;strong>With PAI, today:&lt;/strong>&lt;/p>
&lt;p>&amp;ldquo;Process my study notes for module 4.&amp;rdquo;&lt;/p>
&lt;p>PAI already knows the certification, the Obsidian directory structure, the naming conventions, the quiz format, and which knowledge base to cross-reference. Processing starts immediately. The notes land in the right place in the right format.&lt;/p>
&lt;p>The eight-month gap between those two experiences is not better prompting. It is infrastructure.&lt;/p>
&lt;hr>
&lt;p>&lt;img src="https://augmentedresilience.com/images/spe-power-users-2026.png" alt="Image Description">&lt;/p>
&lt;h2 id="2026-where-the-power-users-went">2026: Where the Power Users Went&lt;/h2>
&lt;p>The practitioners who were deep into prompt engineering two years ago have largely moved on — not to better prompts, but to better systems. They are building skills, writing memory schemas, wiring session hooks, running structured execution algorithms on complex work. The prompt engineer persona is being quietly replaced by the AI infrastructure builder.&lt;/p>
&lt;p>This is not about being technical. It is about thinking one level up. Instead of asking how to get a better response to this prompt, you ask what a system would need to know to handle this reliably, every time.&lt;/p>
&lt;hr>
&lt;p>&lt;img src="https://augmentedresilience.com/images/spe-knowledge-portability.png" alt="Image Description">&lt;/p>
&lt;h2 id="your-knowledge-doesnt-live-in-the-model">Your Knowledge Doesn&amp;rsquo;t Live in the Model&lt;/h2>
&lt;p>One of the less obvious benefits of building infrastructure rather than relying on chat conversations: your knowledge is not locked to any LLM.&lt;/p>
&lt;p>When everything lives in a chat window, switching models means starting over. Your context, your conversation history, your accumulated session knowledge — gone. The model you were using knew who you were because you kept telling it. A different model knows nothing.&lt;/p>
&lt;p>With PAI, the knowledge lives in files you own. The memory is markdown on your machine. The skills are scripts in a directory. The algorithm is a structured process your runtime executes. None of it is stored inside Claude, or any other model. The AI is the engine, not the warehouse.&lt;/p>
&lt;p>That distinction matters more than it sounds. LLMs are evolving fast. A model that is the best choice today may not be the best choice in six months. If your entire working context is entangled with one provider&amp;rsquo;s chat history, migration is painful. If your context lives in a portable, file-based system, switching the underlying model is a configuration change — not a rebuild.&lt;/p>
&lt;p>I run PAI on Claude today because it is the best fit for how I work right now. But the memory schema, the skill library, the algorithm — all of it would transfer to a different model without losing a session&amp;rsquo;s worth of context. That portability is a deliberate design choice, and it is one of the most underappreciated properties of building on open infrastructure rather than inside a walled chat product.&lt;/p>
&lt;hr>
&lt;h2 id="credit-where-its-due">Credit Where It&amp;rsquo;s Due&lt;/h2>
&lt;p>PAI did not emerge from a vacuum. A significant part of the thinking behind it — the idea that AI should be augmenting structured, intentional human systems rather than replacing ad-hoc conversations — traces directly to the work of &lt;a href="https://danielmiessler.com/" target="_blank" rel="noopener noreferrer">Daniel Miessler&lt;/a>
.&lt;/p>
&lt;p>Daniel has been articulating the case for AI infrastructure thinking longer than most. His Fabric project, his writing on augmented intelligence, and his broader framing of what it means to build systems that extend human capability rather than just answer questions — all of it shaped how PAI was conceived and how it continues to evolve.&lt;/p>
&lt;p>The shift from &amp;ldquo;better prompts&amp;rdquo; to &amp;ldquo;better systems&amp;rdquo; is not a new idea. It just needed enough tooling to become practical. Daniel saw that early.&lt;/p>
&lt;hr>
&lt;h2 id="where-to-start">Where to Start&lt;/h2>
&lt;p>PAI is open-source. Claude Code is free to start — it is Anthropic&amp;rsquo;s official CLI, available to any Claude user. The distance between using AI in a chat window and running it inside a harness is smaller than it looks, and the compounding return starts from the first session where PAI remembers something you did not have to re-enter.&lt;/p>
&lt;p>If you are still re-explaining yourself every time you open a new tab, that is the problem worth solving.&lt;/p></content></item><item><title>Adding a Web UI to My PDF to Markdown Converter</title><link>https://augmentedresilience.com/posts/augmented-resilience-posts/adding-a-web-ui-to-my-pdf-to-markdown-converter/</link><pubDate>Sat, 28 Mar 2026 00:00:00 +0000</pubDate><guid>https://augmentedresilience.com/posts/augmented-resilience-posts/adding-a-web-ui-to-my-pdf-to-markdown-converter/</guid><description>&lt;h2 id="the-promise-i-made-to-myself">The Promise I Made to Myself&lt;/h2>
&lt;p>In my last post about &lt;a href="https://augmentedresilience.com/posts/when-your-pdf-workflow-breaks-building-a-markdown-converter-with-claude-code/" target="_blank" rel="noopener noreferrer">building the PDF to Markdown converter&lt;/a>
, I listed some &amp;ldquo;what&amp;rsquo;s next&amp;rdquo; ideas at the end. One of them was:&lt;/p>
&lt;blockquote>
&lt;p>FastAPI wrapper: Create an HTTP API for web apps to use&lt;/p>&lt;/blockquote>
&lt;p>Well, I did it. And I went a step further — I built a full drag-and-drop web UI on top of it.&lt;/p>
&lt;p>The CLI still works exactly as before. This is an addition, not a replacement. But now when I want to convert a batch of PDFs without thinking about terminal commands, I just open a browser tab.&lt;/p></description><content>&lt;h2 id="the-promise-i-made-to-myself">The Promise I Made to Myself&lt;/h2>
&lt;p>In my last post about &lt;a href="https://augmentedresilience.com/posts/when-your-pdf-workflow-breaks-building-a-markdown-converter-with-claude-code/" target="_blank" rel="noopener noreferrer">building the PDF to Markdown converter&lt;/a>
, I listed some &amp;ldquo;what&amp;rsquo;s next&amp;rdquo; ideas at the end. One of them was:&lt;/p>
&lt;blockquote>
&lt;p>FastAPI wrapper: Create an HTTP API for web apps to use&lt;/p>&lt;/blockquote>
&lt;p>Well, I did it. And I went a step further — I built a full drag-and-drop web UI on top of it.&lt;/p>
&lt;p>The CLI still works exactly as before. This is an addition, not a replacement. But now when I want to convert a batch of PDFs without thinking about terminal commands, I just open a browser tab.&lt;/p>
&lt;p>&lt;img src="https://augmentedresilience.com/images/pdf-to-markdown-web-ui.png" alt="Image Description">&lt;/p>
&lt;hr>
&lt;h2 id="what-the-ui-does">What the UI Does&lt;/h2>
&lt;p>The interface is intentionally minimal:&lt;/p>
&lt;ul>
&lt;li>&lt;strong>Drag-and-drop zone&lt;/strong> — drop one PDF or fifty onto it&lt;/li>
&lt;li>&lt;strong>Browse button&lt;/strong> — if you prefer clicking&lt;/li>
&lt;li>&lt;strong>Convert button&lt;/strong> — kicks off the conversion&lt;/li>
&lt;li>&lt;strong>Per-file progress bars&lt;/strong> — live updates as each file converts&lt;/li>
&lt;li>&lt;strong>Individual download&lt;/strong> — each completed file gets its own Download button&lt;/li>
&lt;li>&lt;strong>Download all as ZIP&lt;/strong> — one click to grab everything&lt;/li>
&lt;li>&lt;strong>Clear&lt;/strong> — resets the session and cleans up temp files server-side&lt;/li>
&lt;/ul>
&lt;p>Everything runs locally. Files go to a temp directory on your machine, get converted, and are served back to you. Nothing hits an external API.&lt;/p>
&lt;hr>
&lt;h2 id="the-stack">The Stack&lt;/h2>
&lt;p>I kept it as simple as possible:&lt;/p>
&lt;p>&lt;strong>Backend:&lt;/strong> FastAPI + uvicorn&lt;/p>
&lt;p>FastAPI was the obvious choice — it handles file uploads cleanly, has first-class async support, and the &lt;code>python-multipart&lt;/code> library makes multi-file form handling trivial. The conversion logic is unchanged from the CLI: &lt;code>pymupdf4llm.to_markdown()&lt;/code> doing the heavy lifting.&lt;/p>
&lt;p>&lt;strong>Progress updates:&lt;/strong> Server-Sent Events (SSE)&lt;/p>
&lt;p>This is the part I found most interesting. When you hit Convert, the browser opens a persistent connection to &lt;code>/progress/{job_id}&lt;/code> and receives a stream of JSON events — one every 400ms — until the job finishes. No polling loop, no WebSocket complexity. SSE is perfect for this: unidirectional, simple, and built into every modern browser.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-python" data-lang="python">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#66d9ef">async&lt;/span> &lt;span style="color:#66d9ef">def&lt;/span> &lt;span style="color:#a6e22e">event_stream&lt;/span>():
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">while&lt;/span> &lt;span style="color:#66d9ef">True&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> data &lt;span style="color:#f92672">=&lt;/span> json&lt;span style="color:#f92672">.&lt;/span>dumps({&lt;span style="color:#e6db74">&amp;#34;progress&amp;#34;&lt;/span>: job[&lt;span style="color:#e6db74">&amp;#34;progress&amp;#34;&lt;/span>], &lt;span style="color:#e6db74">&amp;#34;done&amp;#34;&lt;/span>: job[&lt;span style="color:#e6db74">&amp;#34;done&amp;#34;&lt;/span>]})
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">yield&lt;/span> &lt;span style="color:#e6db74">f&lt;/span>&lt;span style="color:#e6db74">&amp;#34;data: &lt;/span>&lt;span style="color:#e6db74">{&lt;/span>data&lt;span style="color:#e6db74">}&lt;/span>&lt;span style="color:#ae81ff">\n\n&lt;/span>&lt;span style="color:#e6db74">&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">if&lt;/span> job[&lt;span style="color:#e6db74">&amp;#34;done&amp;#34;&lt;/span>]:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">break&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">await&lt;/span> asyncio&lt;span style="color:#f92672">.&lt;/span>sleep(&lt;span style="color:#ae81ff">0.4&lt;/span>)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#66d9ef">return&lt;/span> StreamingResponse(event_stream(), media_type&lt;span style="color:#f92672">=&lt;/span>&lt;span style="color:#e6db74">&amp;#34;text/event-stream&amp;#34;&lt;/span>)
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>On the frontend, consuming it is three lines:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-javascript" data-lang="javascript">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#66d9ef">const&lt;/span> &lt;span style="color:#a6e22e">eventSource&lt;/span> &lt;span style="color:#f92672">=&lt;/span> &lt;span style="color:#66d9ef">new&lt;/span> &lt;span style="color:#a6e22e">EventSource&lt;/span>(&lt;span style="color:#e6db74">`/progress/&lt;/span>&lt;span style="color:#e6db74">${&lt;/span>&lt;span style="color:#a6e22e">jobId&lt;/span>&lt;span style="color:#e6db74">}&lt;/span>&lt;span style="color:#e6db74">`&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#a6e22e">eventSource&lt;/span>.&lt;span style="color:#a6e22e">onmessage&lt;/span> &lt;span style="color:#f92672">=&lt;/span> &lt;span style="color:#a6e22e">e&lt;/span> =&amp;gt; {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">const&lt;/span> { &lt;span style="color:#a6e22e">progress&lt;/span>, &lt;span style="color:#a6e22e">done&lt;/span> } &lt;span style="color:#f92672">=&lt;/span> &lt;span style="color:#a6e22e">JSON&lt;/span>.&lt;span style="color:#a6e22e">parse&lt;/span>(&lt;span style="color:#a6e22e">e&lt;/span>.&lt;span style="color:#a6e22e">data&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#75715e">// update the UI...
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">&lt;/span>};
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>&lt;strong>Threading:&lt;/strong> The conversion itself is synchronous (PyMuPDF4LLM blocks while it processes pages). To keep the FastAPI event loop from freezing during conversion, each job runs in a &lt;code>ThreadPoolExecutor&lt;/code>:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-python" data-lang="python">&lt;span style="display:flex;">&lt;span>asyncio&lt;span style="color:#f92672">.&lt;/span>get_event_loop()&lt;span style="color:#f92672">.&lt;/span>run_in_executor(executor, _convert_job, job_id, job_dir)
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Four workers by default — enough to handle several simultaneous conversions without overloading the machine.&lt;/p>
&lt;p>&lt;strong>Frontend:&lt;/strong> Vanilla JS, no build step&lt;/p>
&lt;p>I deliberately avoided React, Vue, or any framework. The whole UI is a single &lt;code>static/index.html&lt;/code> file. It loads instantly, has no dependencies to install, and is easy to read and modify. For a local tool that one person uses, this is the right call.&lt;/p>
&lt;hr>
&lt;h2 id="project-structure">Project Structure&lt;/h2>
&lt;p>Here&amp;rsquo;s what changed from the original CLI project:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-text" data-lang="text">&lt;span style="display:flex;">&lt;span>pdf-to-markdown/
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> pdf2md — original CLI (unchanged)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> app.py — FastAPI server (new)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> static/
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> index.html — drag-drop UI (new)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> serve — start script (new)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> requirements.txt — updated with FastAPI deps
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> venv/ — existing venv, three new packages added
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>The &lt;code>serve&lt;/code> script is just:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">#!/usr/bin/env bash
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">&lt;/span>cd &lt;span style="color:#e6db74">&amp;#34;&lt;/span>&lt;span style="color:#66d9ef">$(&lt;/span>dirname &lt;span style="color:#e6db74">&amp;#34;&lt;/span>$0&lt;span style="color:#e6db74">&amp;#34;&lt;/span>&lt;span style="color:#66d9ef">)&lt;/span>&lt;span style="color:#e6db74">&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>source venv/bin/activate
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>uvicorn app:app --host 0.0.0.0 --port &lt;span style="color:#ae81ff">8765&lt;/span> --reload
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Run it once, open &lt;code>http://localhost:8765&lt;/code>, and you have a working converter in your browser.&lt;/p>
&lt;hr>
&lt;h2 id="one-gotcha-pymupdf4llm-is-synchronous">One Gotcha: PyMuPDF4LLM is Synchronous&lt;/h2>
&lt;p>This tripped me up briefly. &lt;code>pymupdf4llm.to_markdown()&lt;/code> does not return a coroutine — it&amp;rsquo;s a blocking call that can take 10–30 seconds on a large document. If you call it directly in an async FastAPI route handler, you freeze the entire event loop while it runs. No other requests get handled. The SSE stream stops updating.&lt;/p>
&lt;p>The fix is the &lt;code>ThreadPoolExecutor&lt;/code> pattern above — push the blocking work off the event loop entirely. The async route returns immediately, the SSE stream keeps ticking, and the conversion runs in a thread pool where it belongs.&lt;/p>
&lt;hr>
&lt;h2 id="the-download-endpoints">The Download Endpoints&lt;/h2>
&lt;p>Three endpoints handle output:&lt;/p>
&lt;pre tabindex="0">&lt;code>GET /download/{job_id}/{filename} — single .md file
GET /download-all/{job_id} — all .md files as a ZIP
DELETE /job/{job_id} — clean up temp files
&lt;/code>&lt;/pre>&lt;p>The ZIP is built in memory using Python&amp;rsquo;s &lt;code>zipfile&lt;/code> module and streamed directly to the browser — no intermediate file on disk:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-python" data-lang="python">&lt;span style="display:flex;">&lt;span>buf &lt;span style="color:#f92672">=&lt;/span> io&lt;span style="color:#f92672">.&lt;/span>BytesIO()
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#66d9ef">with&lt;/span> zipfile&lt;span style="color:#f92672">.&lt;/span>ZipFile(buf, &lt;span style="color:#e6db74">&amp;#34;w&amp;#34;&lt;/span>, zipfile&lt;span style="color:#f92672">.&lt;/span>ZIP_DEFLATED) &lt;span style="color:#66d9ef">as&lt;/span> zf:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">for&lt;/span> f &lt;span style="color:#f92672">in&lt;/span> md_files:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> zf&lt;span style="color:#f92672">.&lt;/span>write(f, f&lt;span style="color:#f92672">.&lt;/span>name)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>buf&lt;span style="color:#f92672">.&lt;/span>seek(&lt;span style="color:#ae81ff">0&lt;/span>)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#66d9ef">return&lt;/span> StreamingResponse(buf, media_type&lt;span style="color:#f92672">=&lt;/span>&lt;span style="color:#e6db74">&amp;#34;application/zip&amp;#34;&lt;/span>, &lt;span style="color:#f92672">...&lt;/span>)
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;hr>
&lt;h2 id="what-this-unlocks">What This Unlocks&lt;/h2>
&lt;p>The CLI was already useful. The web UI adds a few things the CLI cannot easily do:&lt;/p>
&lt;p>&lt;strong>Non-terminal users.&lt;/strong> Anyone on my network can now use this converter by visiting &lt;code>http://my-machine:8765&lt;/code>. No Python knowledge required.&lt;/p>
&lt;p>&lt;strong>Bulk drop workflows.&lt;/strong> Dragging 20 PDFs from Finder into a browser window and clicking Convert is significantly faster than constructing a &lt;code>--batch&lt;/code> command with the right paths.&lt;/p>
&lt;p>&lt;strong>Visual feedback.&lt;/strong> The progress bars are not just cosmetic. For large PDFs that take 20–30 seconds, knowing the conversion is running (and roughly how far along it is) removes the anxiety of staring at a terminal cursor.&lt;/p>
&lt;hr>
&lt;h2 id="whats-next">What&amp;rsquo;s Next&lt;/h2>
&lt;p>The original roadmap item was &amp;ldquo;FastAPI wrapper.&amp;rdquo; That&amp;rsquo;s done. The next one I&amp;rsquo;m eyeing:&lt;/p>
&lt;p>&lt;strong>Auto-feed to Obsidian inbox.&lt;/strong> Right now the flow is: convert in the web UI, download the ZIP, unzip, move to Obsidian. I&amp;rsquo;d like to add a toggle: &amp;ldquo;Send output directly to &lt;code>~/projects/obsidian-vault/00-inbox/&lt;/code>&amp;rdquo; — one less manual step.&lt;/p>
&lt;p>That&amp;rsquo;s a small addition to the backend. Coming soon.&lt;/p>
&lt;hr>
&lt;h2 id="running-it">Running It&lt;/h2>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span>cd ~/projects/pdf-to-markdown
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>./serve
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e"># Open http://localhost:8765&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>The first run installs nothing new — the three new packages (fastapi, uvicorn, python-multipart) are already in the venv. It just works.&lt;/p></content></item><item><title>I Turned 50 Cybersecurity Books Into a Searchable Brain</title><link>https://augmentedresilience.com/posts/augmented-resilience-posts/i-turned-50-cybersecurity-books-into-a-searchable-brain/</link><pubDate>Sat, 21 Mar 2026 00:00:00 +0000</pubDate><guid>https://augmentedresilience.com/posts/augmented-resilience-posts/i-turned-50-cybersecurity-books-into-a-searchable-brain/</guid><description>&lt;h2 id="the-problem-with-security-books">The Problem With Security Books&lt;/h2>
&lt;p>I have a lot of cybersecurity books. PDFs from Humble Bundles, O&amp;rsquo;Reilly downloads, books I&amp;rsquo;ve bought and never finished, reference material I collected &amp;ldquo;just in case.&amp;rdquo; Like most people, they lived in a folder I rarely opened.&lt;/p>
&lt;p>The reason is friction. When I needed to look something up — say, how SQL injection payloads work, or the steps for privilege escalation on Linux — I&amp;rsquo;d have to remember which book covered it, open it, and search inside. Or just Google it and hope Stack Overflow had something decent.&lt;/p></description><content>&lt;h2 id="the-problem-with-security-books">The Problem With Security Books&lt;/h2>
&lt;p>I have a lot of cybersecurity books. PDFs from Humble Bundles, O&amp;rsquo;Reilly downloads, books I&amp;rsquo;ve bought and never finished, reference material I collected &amp;ldquo;just in case.&amp;rdquo; Like most people, they lived in a folder I rarely opened.&lt;/p>
&lt;p>The reason is friction. When I needed to look something up — say, how SQL injection payloads work, or the steps for privilege escalation on Linux — I&amp;rsquo;d have to remember which book covered it, open it, and search inside. Or just Google it and hope Stack Overflow had something decent.&lt;/p>
&lt;p>That&amp;rsquo;s not a knowledge base. That&amp;rsquo;s a graveyard.&lt;/p>
&lt;p>So I built something better: a local semantic search engine over all of them, powered by PostgreSQL, pgvector, and OpenAI embeddings. Now I ask questions in plain English and get back the exact passages — with the book and chapter — that answer them. The whole thing runs locally on my machine.&lt;/p>
&lt;p>Here&amp;rsquo;s how I built it, and why it&amp;rsquo;s become one of the most useful tools in my PAI (Personal AI Infrastructure) stack.&lt;/p>
&lt;hr>
&lt;h2 id="what-semantic-search-actually-means">What Semantic Search Actually Means&lt;/h2>
&lt;p>Traditional search is keyword matching. You type &amp;ldquo;SQL injection&amp;rdquo; and it finds documents containing those exact words.&lt;/p>
&lt;p>Semantic search is different. It converts your query and your documents into vectors — lists of numbers that represent &lt;em>meaning&lt;/em> in high-dimensional space. Similar concepts cluster together regardless of exact wording. Ask &amp;ldquo;how to bypass database input validation&amp;rdquo; and you&amp;rsquo;ll surface the same SQL injection content, even though you never typed &amp;ldquo;SQL injection.&amp;rdquo;&lt;/p>
&lt;p>This matters enormously for a security knowledge base. Security concepts have dozens of names. &amp;ldquo;Privilege escalation,&amp;rdquo; &amp;ldquo;privesc,&amp;rdquo; &amp;ldquo;root access,&amp;rdquo; &amp;ldquo;vertical privilege abuse&amp;rdquo; — these all mean the same thing. Semantic search finds all of them.&lt;/p>
&lt;hr>
&lt;h2 id="the-stack">The Stack&lt;/h2>
&lt;ul>
&lt;li>&lt;strong>PostgreSQL 17&lt;/strong> — the database&lt;/li>
&lt;li>&lt;strong>pgvector 0.8.2&lt;/strong> — vector similarity search extension for Postgres&lt;/li>
&lt;li>&lt;strong>OpenAI text-embedding-3-small&lt;/strong> — converts text chunks to 1536-dimensional vectors&lt;/li>
&lt;li>&lt;strong>CyberSecKB.ts&lt;/strong> — a custom Bun/TypeScript CLI I built to tie it all together&lt;/li>
&lt;/ul>
&lt;p>Everything runs locally. The only external call is to OpenAI&amp;rsquo;s embedding API (which runs once at ingest time, not at query time).&lt;/p>
&lt;hr>
&lt;h2 id="the-pipeline-from-pdf-to-searchable-knowledge">The Pipeline: From PDF to Searchable Knowledge&lt;/h2>
&lt;h3 id="step-1-convert-pdfs-to-markdown">Step 1: Convert PDFs to Markdown&lt;/h3>
&lt;p>Raw PDFs are terrible for text processing. I convert everything to Markdown first using a &lt;code>pdf2md&lt;/code> Python tool:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span>cd ~/projects/pdf-to-markdown
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>source venv/bin/activate
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e"># Text-based PDFs (most books):&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>python pdf2md input/mybook.pdf
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e"># Image-based or scanned PDFs (use OCR first):&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>ocrmypdf --force-ocr input/mybook.pdf /tmp/ocr.pdf
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>python pdf2md /tmp/ocr.pdf output/mybook.md
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e"># Move to library:&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>mv output/mybook.md ~/projects/cybersecurity-library/books/
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h3 id="step-2-ingest-into-the-database">Step 2: Ingest into the Database&lt;/h3>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span>TOOL&lt;span style="color:#f92672">=&lt;/span>~/.claude/skills/PAI/USER/KNOWLEDGE/CYBERSECURITY/Tools/CyberSecKB.ts
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e"># Single book with topics tagged:&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>bun $TOOL ingest &lt;span style="color:#ae81ff">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#ae81ff">&lt;/span> --file ~/projects/cybersecurity-library/books/mybook.md &lt;span style="color:#ae81ff">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#ae81ff">&lt;/span> --title &lt;span style="color:#e6db74">&amp;#34;My Book Title&amp;#34;&lt;/span> &lt;span style="color:#ae81ff">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#ae81ff">&lt;/span> --topics web,network,linux
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e"># Or load everything at once:&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>bun $TOOL ingest --batch ~/projects/cybersecurity-library/books/
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>The ingest process:&lt;/p>
&lt;ol>
&lt;li>Reads the Markdown file&lt;/li>
&lt;li>Splits it into ~800-token chunks, preserving chapter headings&lt;/li>
&lt;li>Sends chunks to OpenAI&amp;rsquo;s embedding API in batches&lt;/li>
&lt;li>Stores chunks + their vector embeddings in PostgreSQL&lt;/li>
&lt;/ol>
&lt;h3 id="step-3-search">Step 3: Search&lt;/h3>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e"># Plain English query:&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>bun $TOOL search &lt;span style="color:#e6db74">&amp;#34;how do attackers bypass WAF rules for SQL injection&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e"># Filter by topic:&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>bun $TOOL search &lt;span style="color:#e6db74">&amp;#34;privilege escalation&amp;#34;&lt;/span> --topics linux --limit &lt;span style="color:#ae81ff">5&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e"># Check what&amp;#39;s in the KB:&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>bun $TOOL list
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>bun $TOOL stats
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;hr>
&lt;h2 id="what-it-looks-like-in-practice">What It Looks Like in Practice&lt;/h2>
&lt;p>Here&amp;rsquo;s a real query. I asked:&lt;/p>
&lt;pre tabindex="0">&lt;code>bun $TOOL search &amp;#34;SQL injection bypass techniques&amp;#34; --limit 3
&lt;/code>&lt;/pre>&lt;p>Result:&lt;/p>
&lt;pre tabindex="0">&lt;code>━━━ [63.3%] Web Penetration Testing With Kali Linux → Detecting and Exploiting Injection-Based Flaws
The `;` metacharacter in a SQL statement is used similarly to how it&amp;#39;s used
in command injection to combine multiple queries on the same line...
━━━ [62.5%] Web Penetration Testing With Kali Linux → Detecting and Exploiting Injection-Based Flaws
If user input is used without prior validation, and it is concatenated
directly into a SQL query, a user can inject different data...
━━━ [60.4%] Web Penetration Testing With Kali Linux → Detecting and Exploiting Injection-Based Flaws
Input taken from cookies, input forms, and URL variables is used to build
SQL statements that are passed back to the database...
&lt;/code>&lt;/pre>&lt;p>Each result shows the similarity score, book title, chapter, and a preview. I can immediately tell which book to go deeper in.&lt;/p>
&lt;p>Another query — privilege escalation:&lt;/p>
&lt;pre tabindex="0">&lt;code>bun $TOOL search &amp;#34;privilege escalation linux&amp;#34; --limit 3
&lt;/code>&lt;/pre>&lt;pre tabindex="0">&lt;code>━━━ [66.1%] Cybersecurity Attack And Defense Strategies → Privilege Escalation
Most systems are built using the least privilege concept — users are
purposefully given the least privileges they need to perform their work...
━━━ [65.9%] Kali Linux Cookbook → Privilege Escalation
CVE-2015-1328: overlayfs vulnerability affecting Ubuntu where it does not
do proper checking of file creation in the upper filesystem area...
━━━ [65.8%] Cybersecurity Attack And Defense Strategies → Privilege Escalation
On Linux, vertical escalation allows attackers to have root privileges
that enable them to modify systems and programs...
&lt;/code>&lt;/pre>&lt;p>This is the power of the system: I asked about a concept, not a keyword, and got specific, sourced, actionable results from three different books.&lt;/p>
&lt;hr>
&lt;h2 id="the-current-state-of-the-kb">The Current State of the KB&lt;/h2>
&lt;p>After the initial batch ingest:&lt;/p>
&lt;ul>
&lt;li>&lt;strong>50 books&lt;/strong> indexed&lt;/li>
&lt;li>&lt;strong>11,757 chunks&lt;/strong> stored and embedded&lt;/li>
&lt;li>Coverage spans: penetration testing, malware analysis, forensics, identity and access, cloud security, social engineering, cryptography, threat modeling, and more&lt;/li>
&lt;/ul>
&lt;p>Some of what&amp;rsquo;s in there:&lt;/p>
&lt;ul>
&lt;li>&lt;em>Practical Malware Analysis&lt;/em> (620 chunks)&lt;/li>
&lt;li>&lt;em>Cybersecurity Threats, Malware Trends and Strategies&lt;/em> (552 chunks)&lt;/li>
&lt;li>&lt;em>Cybersecurity Attack and Defense Strategies&lt;/em> (460 chunks)&lt;/li>
&lt;li>&lt;em>Security Chaos Engineering&lt;/em> (387 chunks)&lt;/li>
&lt;li>&lt;em>Hardware Hacking Handbook&lt;/em> (378 chunks)&lt;/li>
&lt;li>&lt;em>Modern Data Protection&lt;/em> (338 chunks)&lt;/li>
&lt;/ul>
&lt;hr>
&lt;h2 id="why-this-fits-into-pai">Why This Fits Into PAI&lt;/h2>
&lt;p>This knowledge base is part of my PAI system — Personal AI Infrastructure. The idea behind PAI is to build infrastructure that &lt;em>amplifies&lt;/em> what I can do with AI, rather than using AI one prompt at a time.&lt;/p>
&lt;p>The Security KB is a perfect example. It&amp;rsquo;s not about asking ChatGPT &amp;ldquo;explain SQL injection.&amp;rdquo; It&amp;rsquo;s about having my own curated library, chunked, embedded, and ready to surface exactly the passage I need — from books I trust, with sources I can trace back.&lt;/p>
&lt;p>When I&amp;rsquo;m working through a security challenge or studying for a certification, I can query the KB directly. Luna (my PAI assistant) can also query it as part of a larger workflow — search the KB, pull context into the prompt, and answer questions grounded in my actual library rather than generic training data.&lt;/p>
&lt;hr>
&lt;h2 id="building-it-with-claude-code">Building It With Claude Code&lt;/h2>
&lt;p>The entire CyberSecKB tool was built using Claude Code through PAI. The process:&lt;/p>
&lt;ol>
&lt;li>Described what I wanted: ingest markdown books, chunk by section, embed with OpenAI, store in pgvector&lt;/li>
&lt;li>Claude Code scaffolded the TypeScript CLI&lt;/li>
&lt;li>We hit a few real-world issues along the way:
&lt;ul>
&lt;li>The OpenAI project key needed embedding model access enabled separately&lt;/li>
&lt;li>Batch size of 2048 hit the 300k token/request limit — tuned down to 200&lt;/li>
&lt;li>The 1M tokens/minute rate limit required adding a 15-second delay between batches&lt;/li>
&lt;li>A SQL type error in the search function when no topics filter was passed&lt;/li>
&lt;/ul>
&lt;/li>
&lt;/ol>
&lt;p>Each issue was diagnosed and fixed in the same conversation. The tool went from concept to 50 books indexed in a single session.&lt;/p>
&lt;hr>
&lt;h2 id="whats-next">What&amp;rsquo;s Next&lt;/h2>
&lt;p>A few things I want to add:&lt;/p>
&lt;ul>
&lt;li>&lt;strong>Tag all books with proper topics&lt;/strong> — the batch ingest skipped topic assignment; I&amp;rsquo;ll tag each book so &lt;code>--topics web&lt;/code> or &lt;code>--topics linux&lt;/code> filters actually work&lt;/li>
&lt;li>&lt;strong>Tier 1 topic files&lt;/strong> — condensed 5-15KB reference files for the most-used topics (SQLi, XSS, privilege escalation, etc.) that load directly into context&lt;/li>
&lt;li>&lt;strong>AI Security KB integration&lt;/strong> — the AI Security research KB shares the same database; queries cross both domains automatically&lt;/li>
&lt;/ul>
&lt;p>The knowledge base is live. The friction is gone. Now the books actually get used.&lt;/p>
&lt;hr>
&lt;p>&lt;em>Built with PAI, Claude Code, PostgreSQL, pgvector, and OpenAI embeddings. All processing runs locally except the embedding API calls at ingest time.&lt;/em>&lt;/p></content></item><item><title>Claude Code Has Skills. PAI Has a Skill System. Here's the Difference.</title><link>https://augmentedresilience.com/posts/augmented-resilience-posts/claude-code-has-skills.-pai-has-a-skill-system.-heres-the-difference/</link><pubDate>Sun, 15 Mar 2026 00:00:00 +0000</pubDate><guid>https://augmentedresilience.com/posts/augmented-resilience-posts/claude-code-has-skills.-pai-has-a-skill-system.-heres-the-difference/</guid><description>&lt;h1 id="claude-code-has-skills-pai-has-a-skill-system-heres-the-difference">Claude Code Has Skills. PAI Has a Skill System. Here&amp;rsquo;s the Difference.&lt;/h1>
&lt;p>There&amp;rsquo;s a word that shows up in both Claude Code&amp;rsquo;s documentation and in PAI&amp;rsquo;s architecture: &lt;strong>skills&lt;/strong>. And because they share the same word — and even the same file conventions — it&amp;rsquo;s easy to assume they&amp;rsquo;re roughly equivalent. One is just a slightly fancier version of the other.&lt;/p>
&lt;p>They&amp;rsquo;re not. The relationship is closer to HTTP and a web framework. Claude Code&amp;rsquo;s skill mechanism is the protocol. PAI is the framework built on top of it.&lt;/p></description><content>&lt;h1 id="claude-code-has-skills-pai-has-a-skill-system-heres-the-difference">Claude Code Has Skills. PAI Has a Skill System. Here&amp;rsquo;s the Difference.&lt;/h1>
&lt;p>There&amp;rsquo;s a word that shows up in both Claude Code&amp;rsquo;s documentation and in PAI&amp;rsquo;s architecture: &lt;strong>skills&lt;/strong>. And because they share the same word — and even the same file conventions — it&amp;rsquo;s easy to assume they&amp;rsquo;re roughly equivalent. One is just a slightly fancier version of the other.&lt;/p>
&lt;p>They&amp;rsquo;re not. The relationship is closer to HTTP and a web framework. Claude Code&amp;rsquo;s skill mechanism is the protocol. PAI is the framework built on top of it.&lt;/p>
&lt;p>Understanding that distinction changed how I think about what I&amp;rsquo;ve actually built on my machine.&lt;/p>
&lt;hr>
&lt;h2 id="start-here-what-claude-codes-skill-mechanism-actually-is">Start Here: What Claude Code&amp;rsquo;s Skill Mechanism Actually Is&lt;/h2>
&lt;p>Before explaining what PAI adds, it&amp;rsquo;s worth being precise about what Claude Code provides natively — because it&amp;rsquo;s both more minimal and more elegant than most people realize.&lt;/p>
&lt;p>Claude Code&amp;rsquo;s skill system works like this:&lt;/p>
&lt;ol>
&lt;li>&lt;strong>At startup&lt;/strong>, Claude reads every &lt;code>SKILL.md&lt;/code> file it finds under &lt;code>~/.claude/skills/&lt;/code>&lt;/li>
&lt;li>&lt;strong>The &lt;code>description&lt;/code> field&lt;/strong> in each skill&amp;rsquo;s YAML frontmatter determines when that skill activates — it&amp;rsquo;s pure intent matching. Anthropic caps this at 1024 characters.&lt;/li>
&lt;li>&lt;strong>When a skill matches your request&lt;/strong>, the &lt;code>Skill&lt;/code> tool injects the full SKILL.md content into Claude&amp;rsquo;s context window&lt;/li>
&lt;li>&lt;strong>Claude follows the instructions&lt;/strong> in that file&lt;/li>
&lt;/ol>
&lt;p>That&amp;rsquo;s the entire mechanism. It&amp;rsquo;s a &lt;em>context injection system with a routing layer&lt;/em>.&lt;/p>
&lt;p>The &lt;code>USE WHEN&lt;/code> clause in a skill description is the key piece. Here&amp;rsquo;s a simplified example from my OracleHCM skill:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-yaml" data-lang="yaml">&lt;span style="display:flex;">&lt;span>---
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f92672">name&lt;/span>: &lt;span style="color:#ae81ff">OracleHCM&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f92672">description&lt;/span>: &lt;span style="color:#ae81ff">Expert Oracle HCM Cloud troubleshooting. USE WHEN user mentions&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ae81ff">Oracle HCM, HCM Cloud, HDL, HCM Data Loader, Journey, Checklist, workflow&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ae81ff">approvals, autocomplete rules, fast formulas, security profiles...&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>---
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>When I describe an Oracle HCM problem in natural language, Claude Code matches my intent against that description and loads the skill. I never have to say &amp;ldquo;use the Oracle HCM skill.&amp;rdquo; The intent matching handles it.&lt;/p>
&lt;p>Elegant. Minimal. And — on its own — surprisingly limited.&lt;/p>
&lt;hr>
&lt;h2 id="the-gap-between-context-injection-and-operational-capability">The Gap Between &amp;ldquo;Context Injection&amp;rdquo; and &amp;ldquo;Operational Capability&amp;rdquo;&lt;/h2>
&lt;p>Imagine a skill that&amp;rsquo;s just a long markdown file. When it loads, Claude reads the instructions and tries to follow them. If the instructions are clear and the task is simple, that works fine. But for anything complex — something that involves multiple steps, personalized behavior, CLI tooling, external APIs, or parallel agents — a single markdown file loaded into context starts to break down.&lt;/p>
&lt;p>The instructions get long. They can&amp;rsquo;t be personalized without making the skill personal (and therefore un-shareable). There&amp;rsquo;s no way to dispatch to a sub-procedure. There&amp;rsquo;s no tooling layer. There&amp;rsquo;s no way to say &amp;ldquo;if the user wants to &lt;em>create&lt;/em> a blog post, follow &lt;em>this&lt;/em> procedure; if they want to &lt;em>publish&lt;/em>, follow &lt;em>that&lt;/em> one.&amp;rdquo;&lt;/p>
&lt;p>This is the gap PAI fills.&lt;/p>
&lt;hr>
&lt;h2 id="what-pai-builds-on-top-nine-layers">What PAI Builds on Top: Nine Layers&lt;/h2>
&lt;p>PAI&amp;rsquo;s &lt;a href="https://github.com/danielmiessler/PAI" target="_blank" rel="noopener noreferrer">&lt;code>SKILLSYSTEM.md&lt;/code>&lt;/a>
defines a canonical structure that every skill must follow. It&amp;rsquo;s not a suggestion — it&amp;rsquo;s enforced by convention and by the &lt;code>CreateSkill&lt;/code> skill that scaffolds new ones. Here&amp;rsquo;s what each layer adds.&lt;/p>
&lt;h3 id="layer-1--canonical-structure">Layer 1 — Canonical Structure&lt;/h3>
&lt;p>Claude Code just needs a &lt;code>SKILL.md&lt;/code>. PAI requires a specific directory layout:&lt;/p>
&lt;pre tabindex="0">&lt;code>SkillName/
├── SKILL.md ← minimal routing only (40-50 lines)
├── Workflows/ ← execution procedures, one per task
│ ├── Create.md
│ └── Update.md
├── Tools/ ← TypeScript CLI tools (always present)
│ └── Generate.ts
└── ApiReference.md ← context files loaded on demand
&lt;/code>&lt;/pre>&lt;p>SKILL.md stays minimal. Complexity lives in workflows and context files that load when actually needed.&lt;/p>
&lt;h3 id="layer-2--workflow-routing">Layer 2 — Workflow Routing&lt;/h3>
&lt;p>This is the most immediately useful layer. Claude Code routes &lt;em>to&lt;/em> a skill. PAI routes &lt;em>within&lt;/em> a skill.&lt;/p>
&lt;p>The routing table in every SKILL.md dispatches sub-tasks to specific workflow files:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-markdown" data-lang="markdown">&lt;span style="display:flex;">&lt;span>| Workflow | Trigger | File |
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>|-------------|----------------------------|---------------------------|
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>| &lt;span style="font-weight:bold">**Create**&lt;/span> | &amp;#34;write a post&amp;#34; | &lt;span style="color:#e6db74">`Workflows/Create.md`&lt;/span> |
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>| &lt;span style="font-weight:bold">**Publish**&lt;/span> | &amp;#34;publish&amp;#34;, &amp;#34;deploy&amp;#34; | &lt;span style="color:#e6db74">`Workflows/Publish.md`&lt;/span> |
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>| &lt;span style="font-weight:bold">**Header**&lt;/span> | &amp;#34;create header image&amp;#34; | &lt;span style="color:#e6db74">`Workflows/Header.md`&lt;/span> |
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>&amp;ldquo;Write a post&amp;rdquo; and &amp;ldquo;publish the site&amp;rdquo; both activate the same skill, but they route to completely different procedures. Without this, a skill that handles multiple operations becomes one giant file Claude has to navigate by itself.&lt;/p>
&lt;h3 id="layer-3--the-personalization-layer">Layer 3 — The Personalization Layer&lt;/h3>
&lt;p>Every system skill in PAI checks for user overrides before executing:&lt;/p>
&lt;pre tabindex="0">&lt;code>~/.claude/skills/PAI/USER/SKILLCUSTOMIZATIONS/{SkillName}/
├── EXTEND.yaml ← merge strategy (append | override | deep_merge)
└── PREFERENCES.md ← user-specific behavior
&lt;/code>&lt;/pre>&lt;p>The system skill stays generic and shareable. My preferences — color palettes for the Art skill, voice configurations for the Agents skill, output format defaults for Research — live separately and merge in at runtime. The skill author never needs to know about my preferences. I never need to fork the skill to add my own.&lt;/p>
&lt;h3 id="layer-4--system-vs-personal-skill-separation">Layer 4 — System vs Personal Skill Separation&lt;/h3>
&lt;p>PAI enforces a hard naming convention that determines portability:&lt;/p>
&lt;ul>
&lt;li>&lt;strong>TitleCase&lt;/strong> (&lt;code>Research&lt;/code>, &lt;code>Browser&lt;/code>, &lt;code>OracleHCM&lt;/code>) = system skills, no personal data, shareable via PAI Packs&lt;/li>
&lt;li>&lt;strong>&lt;code>_ALLCAPS&lt;/code>&lt;/strong> (&lt;code>_BLOGGING&lt;/code>, &lt;code>_MAQINA&lt;/code>) = personal skills, private by convention, never exported&lt;/li>
&lt;/ul>
&lt;p>Claude Code has no concept of skill visibility. PAI makes it structural.&lt;/p>
&lt;h3 id="layer-5--cli-tooling-convention">Layer 5 — CLI Tooling Convention&lt;/h3>
&lt;p>Every PAI skill has a &lt;code>Tools/&lt;/code> directory. When a workflow needs to do something repeatable — generate an image, manage a server, sync a repository — it calls a TypeScript CLI tool instead of embedding logic in the workflow markdown itself.&lt;/p>
&lt;p>Tools use &lt;code>#!/usr/bin/env bun&lt;/code>, expose configuration via flags, and have &lt;code>.help.md&lt;/code> documentation files. This keeps workflows simple (intent routing) and tools encapsulated (execution). You can test a tool independently of its workflow.&lt;/p>
&lt;h3 id="layer-6--ai-powered-hooks">Layer 6 — AI-Powered Hooks&lt;/h3>
&lt;p>PAI runs 17 event hooks that fire at specific moments: session start, prompt submission, pre-tool, post-tool, and others. The most important one for response quality is &lt;code>FormatReminder&lt;/code> — it runs AI inference on your &lt;em>raw prompt&lt;/em> before Claude even starts responding, classifies the depth required (FULL / ITERATION / MINIMAL), and injects that classification as authoritative context.&lt;/p>
&lt;p>This is hooks doing real work, not just shell scripts appending text to prompts.&lt;/p>
&lt;h3 id="layer-7--the-algorithm">Layer 7 — The Algorithm&lt;/h3>
&lt;p>Every response PAI generates runs through a 7-phase problem-solving framework: &lt;strong>OBSERVE → THINK → PLAN → BUILD → EXECUTE → VERIFY → LEARN&lt;/strong>.&lt;/p>
&lt;p>This isn&amp;rsquo;t decorative structure. The OBSERVE phase reverse-engineers your actual intent. The THINK phase selects capabilities and validates skill choices against the problem. The VERIFY phase uses &lt;code>TaskCreate&lt;/code>/&lt;code>TaskUpdate&lt;/code> to track measurable success criteria. The LEARN phase captures what to improve next time.&lt;/p>
&lt;p>Skills feed into this framework — they&amp;rsquo;re not parallel to it. When a skill activates, it executes inside the Algorithm, with its results held accountable to the ISC criteria created in OBSERVE.&lt;/p>
&lt;h3 id="layer-8--agent-composition-patterns">Layer 8 — Agent Composition Patterns&lt;/h3>
&lt;p>PAI skills can spawn specialized subagents and compose them using named patterns:&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Pattern&lt;/th>
&lt;th>Shape&lt;/th>
&lt;th>When&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>&lt;strong>Pipeline&lt;/strong>&lt;/td>
&lt;td>A → B → C&lt;/td>
&lt;td>Sequential domain handoff&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;strong>TDD Loop&lt;/strong>&lt;/td>
&lt;td>Engineer ↔ QATester&lt;/td>
&lt;td>Build-verify cycle&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;strong>Fan-out&lt;/strong>&lt;/td>
&lt;td>→ [A, B, C]&lt;/td>
&lt;td>Multiple perspectives needed&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;strong>Gate&lt;/strong>&lt;/td>
&lt;td>A → check → B or retry&lt;/td>
&lt;td>Quality gate before progression&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>A skill that just loads into context can&amp;rsquo;t orchestrate parallel agents. A PAI skill that routes to a workflow that invokes a Fan-out pattern can research, build, and verify in parallel — with a spotcheck agent at the end synthesizing results.&lt;/p>
&lt;h3 id="layer-9--dynamic-loading">Layer 9 — Dynamic Loading&lt;/h3>
&lt;p>Large skills use deferred loading. Only the SKILL.md loads on invocation. Reference documents, API guides, and style specs load only when the specific workflow that needs them runs. This actively manages token budget rather than blowing it on context that might not be needed.&lt;/p>
&lt;hr>
&lt;h2 id="the-feature-gap-in-one-table">The Feature Gap in One Table&lt;/h2>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Feature&lt;/th>
&lt;th>Claude Code (Native)&lt;/th>
&lt;th>PAI System&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>Skill discovery&lt;/td>
&lt;td>YAML &lt;code>description&lt;/code> at startup&lt;/td>
&lt;td>Same + &lt;code>USE WHEN&lt;/code> intent parsing&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Sub-routing&lt;/td>
&lt;td>None&lt;/td>
&lt;td>Workflow routing table&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Personalization&lt;/td>
&lt;td>None&lt;/td>
&lt;td>&lt;code>SKILLCUSTOMIZATIONS&lt;/code> layer&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Skill visibility&lt;/td>
&lt;td>All equal&lt;/td>
&lt;td>System vs Personal convention&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Tooling&lt;/td>
&lt;td>None&lt;/td>
&lt;td>TypeScript CLI tools&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Hooks&lt;/td>
&lt;td>Basic&lt;/td>
&lt;td>17 AI-powered hooks&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Response structure&lt;/td>
&lt;td>Free-form&lt;/td>
&lt;td>Algorithm (7 phases, ISC, verify)&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Agents&lt;/td>
&lt;td>None&lt;/td>
&lt;td>15+ specialized subagent types&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Memory&lt;/td>
&lt;td>None&lt;/td>
&lt;td>File-based cross-session memory&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Dynamic loading&lt;/td>
&lt;td>Full file loaded&lt;/td>
&lt;td>Context files on demand&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Portability&lt;/td>
&lt;td>No convention&lt;/td>
&lt;td>PAI Packs&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;hr>
&lt;h2 id="why-this-matters-practically">Why This Matters Practically&lt;/h2>
&lt;p>The single most useful shift in mental model: &lt;strong>Claude Code skills are context&lt;/strong>. PAI skills are &lt;strong>operational units&lt;/strong>.&lt;/p>
&lt;p>When I ask my system to publish a blog post, the publishing skill doesn&amp;rsquo;t just remind Claude how publishing works. It dispatches to the Publish workflow, which runs image conversion, calls &lt;code>hugo&lt;/code>, commits, pushes to GitHub, and triggers the Actions pipeline that deploys to Namecheap FTP — all as a structured procedure with steps that can fail, be verified, and be corrected independently.&lt;/p>
&lt;p>That&amp;rsquo;s not context injection. That&amp;rsquo;s execution.&lt;/p>
&lt;p>The 34 skills on my system aren&amp;rsquo;t 34 long markdown files. They&amp;rsquo;re 34 capabilities, each with their own routing logic, personalization layer, tooling, and agent integration. Claude Code&amp;rsquo;s mechanism made them possible. PAI&amp;rsquo;s framework made them reliable.&lt;/p>
&lt;hr>
&lt;h2 id="where-to-go-from-here">Where to Go from Here&lt;/h2>
&lt;p>If you&amp;rsquo;re new to PAI and want to understand the broader architecture this sits inside — the memory system, the agent tiers, how RAG ties everything together — the prior post &lt;a href="https://augmentedresilience.com/posts/rag-agents-and-skills-the-three-pillars-inside-my-personal-ai">&lt;em>RAG, Agents, and Skills: The Three Pillars Inside My Personal AI&lt;/em>&lt;/a>
covers the full picture.&lt;/p>
&lt;p>If you want to go deeper on the skill system itself, the canonical reference is &lt;code>~/.claude/skills/PAI/SYSTEM/SKILLSYSTEM.md&lt;/code> — it&amp;rsquo;s the document all skills are built against, and it explains every convention described here in precise detail.&lt;/p>
&lt;p>PAI is open source at &lt;a href="https://github.com/danielmiessler/PAI" target="_blank" rel="noopener noreferrer">github.com/danielmiessler/PAI&lt;/a>
.&lt;/p></content></item><item><title>Building an AI Conference Directory That Populates Itself</title><link>https://augmentedresilience.com/posts/augmented-resilience-posts/building-an-ai-conference-directory-that-populates-itself/</link><pubDate>Sat, 14 Mar 2026 00:00:00 +0000</pubDate><guid>https://augmentedresilience.com/posts/augmented-resilience-posts/building-an-ai-conference-directory-that-populates-itself/</guid><description>&lt;h2 id="the-problem-ai-conferences-are-everywhere-and-nowhere">The Problem: AI Conferences Are Everywhere and Nowhere&lt;/h2>
&lt;p>If you&amp;rsquo;ve ever tried to find a comprehensive list of upcoming AI conferences, you know the pain. There&amp;rsquo;s no single source. AAAI has their page. NeurIPS has theirs. ICML posts deadlines on OpenReview. Half the emerging summits only exist on LinkedIn event pages or buried in Reddit threads.&lt;/p>
&lt;p>I wanted a simple, searchable directory of AI conferences — one site where I could see what&amp;rsquo;s coming up, filter by topic, and get the key details. But I didn&amp;rsquo;t want to manually curate it. I&amp;rsquo;ve seen too many &amp;ldquo;awesome lists&amp;rdquo; on GitHub that are lovingly maintained for three months and then abandoned.&lt;/p></description><content>&lt;h2 id="the-problem-ai-conferences-are-everywhere-and-nowhere">The Problem: AI Conferences Are Everywhere and Nowhere&lt;/h2>
&lt;p>If you&amp;rsquo;ve ever tried to find a comprehensive list of upcoming AI conferences, you know the pain. There&amp;rsquo;s no single source. AAAI has their page. NeurIPS has theirs. ICML posts deadlines on OpenReview. Half the emerging summits only exist on LinkedIn event pages or buried in Reddit threads.&lt;/p>
&lt;p>I wanted a simple, searchable directory of AI conferences — one site where I could see what&amp;rsquo;s coming up, filter by topic, and get the key details. But I didn&amp;rsquo;t want to manually curate it. I&amp;rsquo;ve seen too many &amp;ldquo;awesome lists&amp;rdquo; on GitHub that are lovingly maintained for three months and then abandoned.&lt;/p>
&lt;p>What I wanted was a system that populates itself.&lt;/p>
&lt;p>So I built one. And with Claude Code running through my PAI system, the whole pipeline — from search to database to website — came together over a few focused sessions.&lt;/p>
&lt;p>Here&amp;rsquo;s the full story.&lt;/p>
&lt;hr>
&lt;h2 id="the-architecture-three-layers-zero-manual-data-entry">The Architecture: Three Layers, Zero Manual Data Entry&lt;/h2>
&lt;p>The final system has three layers, each handling a distinct responsibility:&lt;/p>
&lt;pre tabindex="0">&lt;code>SearXNG (search engine)
→ conference_tracker.py (discovery)
→ Airtable (database)
→ fetch-events.mjs (build-time fetch)
→ React + Vite site on Netlify
&lt;/code>&lt;/pre>&lt;p>Each layer is independently useful, loosely coupled, and replaceable. Let&amp;rsquo;s walk through them.&lt;/p>
&lt;hr>
&lt;h2 id="layer-1-the-tracker--finding-conferences-automatically">Layer 1: The Tracker — Finding Conferences Automatically&lt;/h2>
&lt;p>The foundation is a Python script called &lt;code>conference_tracker.py&lt;/code>. Its job is simple: search the web for AI conferences and store what it finds.&lt;/p>
&lt;h3 id="search-searxng-instead-of-google">Search: SearXNG Instead of Google&lt;/h3>
&lt;p>Rather than hitting the Google API (with its quotas and billing), I use &lt;a href="https://github.com/searxng/searxng" target="_blank" rel="noopener noreferrer">SearXNG&lt;/a>
— an open-source, self-hosted meta-search engine. It aggregates results from Google, Bing, DuckDuckGo, and others without API keys or rate limits.&lt;/p>
&lt;p>The tracker runs a curated list of search queries defined in &lt;code>config.yaml&lt;/code>:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-yaml" data-lang="yaml">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f92672">search_queries&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> - &lt;span style="color:#e6db74">&amp;#34;AI conference 2026&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> - &lt;span style="color:#e6db74">&amp;#34;artificial intelligence conference 2026&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> - &lt;span style="color:#e6db74">&amp;#34;machine learning conference 2026&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> - &lt;span style="color:#e6db74">&amp;#34;NeurIPS 2026&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> - &lt;span style="color:#e6db74">&amp;#34;ICML 2026&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> - &lt;span style="color:#e6db74">&amp;#34;AAAI 2026&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> - &lt;span style="color:#e6db74">&amp;#34;AI summit 2026&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> - &lt;span style="color:#e6db74">&amp;#34;deep learning conference 2026&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> - &lt;span style="color:#e6db74">&amp;#34;computer vision conference 2026 CVPR&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> - &lt;span style="color:#e6db74">&amp;#34;natural language processing conference 2026&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Each query returns up to 10 results. The tracker extracts the title, URL, and snippet from each result, deduplicates against what&amp;rsquo;s already in the database, and stores new finds.&lt;/p>
&lt;h3 id="storage-airtable-as-the-source-of-truth">Storage: Airtable as the Source of Truth&lt;/h3>
&lt;p>Why Airtable? Because it&amp;rsquo;s a real database with an API, but it also has a spreadsheet-like UI for manual review. When you&amp;rsquo;re building a pipeline that discovers data automatically, you want a way to eyeball the results and clean up noise — and Airtable is perfect for that.&lt;/p>
&lt;p>The tracker writes five fields per record: &lt;code>title&lt;/code>, &lt;code>websiteUrl&lt;/code>, &lt;code>description&lt;/code>, &lt;code>Source Query&lt;/code>, and &lt;code>Date Found&lt;/code>. That&amp;rsquo;s it. Just the raw discovery data. The structured details come later.&lt;/p>
&lt;p>The deduplication is URL-based — normalized and lowercased. If we&amp;rsquo;ve already stored &lt;code>neurips.cc/2026&lt;/code>, we don&amp;rsquo;t store it again even if it appears in a different search query.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-python" data-lang="python">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#66d9ef">def&lt;/span> &lt;span style="color:#a6e22e">extract_conference_info&lt;/span>(result, source_query):
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">return&lt;/span> {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#e6db74">&amp;#34;title&amp;#34;&lt;/span>: result[&lt;span style="color:#e6db74">&amp;#34;title&amp;#34;&lt;/span>][:&lt;span style="color:#ae81ff">200&lt;/span>],
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#e6db74">&amp;#34;websiteUrl&amp;#34;&lt;/span>: result[&lt;span style="color:#e6db74">&amp;#34;url&amp;#34;&lt;/span>],
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#e6db74">&amp;#34;description&amp;#34;&lt;/span>: result[&lt;span style="color:#e6db74">&amp;#34;snippet&amp;#34;&lt;/span>][:&lt;span style="color:#ae81ff">1000&lt;/span>],
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#e6db74">&amp;#34;Source Query&amp;#34;&lt;/span>: source_query,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#e6db74">&amp;#34;Date Found&amp;#34;&lt;/span>: datetime&lt;span style="color:#f92672">.&lt;/span>now(timezone&lt;span style="color:#f92672">.&lt;/span>utc)&lt;span style="color:#f92672">.&lt;/span>strftime(&lt;span style="color:#e6db74">&amp;#34;%Y-%m-&lt;/span>&lt;span style="color:#e6db74">%d&lt;/span>&lt;span style="color:#e6db74">&amp;#34;&lt;/span>),
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> }
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>After one run, we had 87 unique conference records. The real stuff — NeurIPS, ICML, CVPR, AAAI — alongside smaller but interesting events like the Quantum AI and NLP Conference, Deep Learning Indaba, and the Wharton Human-AI Research summit.&lt;/p>
&lt;hr>
&lt;h2 id="layer-2-the-website--react--vite-on-netlify">Layer 2: The Website — React + Vite on Netlify&lt;/h2>
&lt;p>The directory itself is a React app built with Vite and deployed on Netlify. It&amp;rsquo;s a single-page app with search, tag filtering, and individual event pages.&lt;/p>
&lt;p>The key architectural decision: &lt;strong>data is fetched at build time, not runtime.&lt;/strong> A prebuild script (&lt;code>fetch-events.mjs&lt;/code>) pulls conference data from the database and writes it to a &lt;code>data.ts&lt;/code> file that Vite bundles into the site. This means:&lt;/p>
&lt;ul>
&lt;li>No API keys exposed in the browser&lt;/li>
&lt;li>No CORS issues&lt;/li>
&lt;li>Instant page loads (data is already in the bundle)&lt;/li>
&lt;li>The site works even if Airtable is temporarily down&lt;/li>
&lt;/ul>
&lt;p>The prebuild hook in &lt;code>package.json&lt;/code> makes this automatic:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-json" data-lang="json">&lt;span style="display:flex;">&lt;span>{
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#f92672">&amp;#34;scripts&amp;#34;&lt;/span>: {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#f92672">&amp;#34;fetch-events&amp;#34;&lt;/span>: &lt;span style="color:#e6db74">&amp;#34;bun scripts/fetch-events.mjs&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#f92672">&amp;#34;prebuild&amp;#34;&lt;/span>: &lt;span style="color:#e6db74">&amp;#34;bun scripts/fetch-events.mjs&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#f92672">&amp;#34;build&amp;#34;&lt;/span>: &lt;span style="color:#e6db74">&amp;#34;vite build&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> }
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>}
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Every time Netlify builds the site, it automatically fetches the latest data from Airtable. Fresh data on every deploy.&lt;/p>
&lt;hr>
&lt;h2 id="the-middleman-problem-cutting-google-sheets">The Middleman Problem: Cutting Google Sheets&lt;/h2>
&lt;p>Here&amp;rsquo;s where the story gets interesting.&lt;/p>
&lt;p>The original pipeline had an extra step: Airtable → Google Sheets → website. The &lt;code>fetch-events.mjs&lt;/code> script was pulling from a published Google Sheet CSV. Why? Because when I first prototyped the site, I started with a spreadsheet. It was quick and easy.&lt;/p>
&lt;p>But once the conference tracker was writing directly to Airtable, Google Sheets became a middleman with no purpose. Data had to be synced from Airtable to Sheets (manually or via Zapier), and that sync was another thing that could break.&lt;/p>
&lt;p>The fix was straightforward: teach &lt;code>fetch-events.mjs&lt;/code> to talk directly to the Airtable API.&lt;/p>
&lt;h3 id="airtables-rest-api">Airtable&amp;rsquo;s REST API&lt;/h3>
&lt;p>The Airtable API is clean. A single GET request returns records as JSON:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-javascript" data-lang="javascript">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#66d9ef">const&lt;/span> &lt;span style="color:#a6e22e">url&lt;/span> &lt;span style="color:#f92672">=&lt;/span> &lt;span style="color:#66d9ef">new&lt;/span> &lt;span style="color:#a6e22e">URL&lt;/span>(&lt;span style="color:#e6db74">`https://api.airtable.com/v0/&lt;/span>&lt;span style="color:#e6db74">${&lt;/span>&lt;span style="color:#a6e22e">baseId&lt;/span>&lt;span style="color:#e6db74">}&lt;/span>&lt;span style="color:#e6db74">/&lt;/span>&lt;span style="color:#e6db74">${&lt;/span>&lt;span style="color:#a6e22e">tableId&lt;/span>&lt;span style="color:#e6db74">}&lt;/span>&lt;span style="color:#e6db74">`&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#66d9ef">const&lt;/span> &lt;span style="color:#a6e22e">resp&lt;/span> &lt;span style="color:#f92672">=&lt;/span> &lt;span style="color:#66d9ef">await&lt;/span> &lt;span style="color:#a6e22e">fetch&lt;/span>(&lt;span style="color:#a6e22e">url&lt;/span>.&lt;span style="color:#a6e22e">toString&lt;/span>(), {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#a6e22e">headers&lt;/span>&lt;span style="color:#f92672">:&lt;/span> { &lt;span style="color:#a6e22e">Authorization&lt;/span>&lt;span style="color:#f92672">:&lt;/span> &lt;span style="color:#e6db74">`Bearer &lt;/span>&lt;span style="color:#e6db74">${&lt;/span>&lt;span style="color:#a6e22e">pat&lt;/span>&lt;span style="color:#e6db74">}&lt;/span>&lt;span style="color:#e6db74">`&lt;/span> },
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>});
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#66d9ef">const&lt;/span> &lt;span style="color:#a6e22e">data&lt;/span> &lt;span style="color:#f92672">=&lt;/span> &lt;span style="color:#66d9ef">await&lt;/span> &lt;span style="color:#a6e22e">resp&lt;/span>.&lt;span style="color:#a6e22e">json&lt;/span>();
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">// data.records = [{ id, fields: { title, date, ... } }]
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>The one gotcha: Airtable paginates at 100 records. You need to follow the &lt;code>offset&lt;/code> token:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-javascript" data-lang="javascript">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#66d9ef">async&lt;/span> &lt;span style="color:#66d9ef">function&lt;/span> &lt;span style="color:#a6e22e">fetchFromAirtable&lt;/span>(&lt;span style="color:#a6e22e">pat&lt;/span>, &lt;span style="color:#a6e22e">baseId&lt;/span>, &lt;span style="color:#a6e22e">tableId&lt;/span>) {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">const&lt;/span> &lt;span style="color:#a6e22e">allRecords&lt;/span> &lt;span style="color:#f92672">=&lt;/span> [];
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">let&lt;/span> &lt;span style="color:#a6e22e">offset&lt;/span> &lt;span style="color:#f92672">=&lt;/span> &lt;span style="color:#66d9ef">null&lt;/span>;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">do&lt;/span> {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">const&lt;/span> &lt;span style="color:#a6e22e">url&lt;/span> &lt;span style="color:#f92672">=&lt;/span> &lt;span style="color:#66d9ef">new&lt;/span> &lt;span style="color:#a6e22e">URL&lt;/span>(&lt;span style="color:#e6db74">`https://api.airtable.com/v0/&lt;/span>&lt;span style="color:#e6db74">${&lt;/span>&lt;span style="color:#a6e22e">baseId&lt;/span>&lt;span style="color:#e6db74">}&lt;/span>&lt;span style="color:#e6db74">/&lt;/span>&lt;span style="color:#e6db74">${&lt;/span>&lt;span style="color:#a6e22e">tableId&lt;/span>&lt;span style="color:#e6db74">}&lt;/span>&lt;span style="color:#e6db74">`&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">if&lt;/span> (&lt;span style="color:#a6e22e">offset&lt;/span>) &lt;span style="color:#a6e22e">url&lt;/span>.&lt;span style="color:#a6e22e">searchParams&lt;/span>.&lt;span style="color:#a6e22e">set&lt;/span>(&lt;span style="color:#e6db74">&amp;#39;offset&amp;#39;&lt;/span>, &lt;span style="color:#a6e22e">offset&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">const&lt;/span> &lt;span style="color:#a6e22e">resp&lt;/span> &lt;span style="color:#f92672">=&lt;/span> &lt;span style="color:#66d9ef">await&lt;/span> &lt;span style="color:#a6e22e">fetch&lt;/span>(&lt;span style="color:#a6e22e">url&lt;/span>.&lt;span style="color:#a6e22e">toString&lt;/span>(), {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#a6e22e">headers&lt;/span>&lt;span style="color:#f92672">:&lt;/span> { &lt;span style="color:#a6e22e">Authorization&lt;/span>&lt;span style="color:#f92672">:&lt;/span> &lt;span style="color:#e6db74">`Bearer &lt;/span>&lt;span style="color:#e6db74">${&lt;/span>&lt;span style="color:#a6e22e">pat&lt;/span>&lt;span style="color:#e6db74">}&lt;/span>&lt;span style="color:#e6db74">`&lt;/span> },
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> });
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">const&lt;/span> &lt;span style="color:#a6e22e">data&lt;/span> &lt;span style="color:#f92672">=&lt;/span> &lt;span style="color:#66d9ef">await&lt;/span> &lt;span style="color:#a6e22e">resp&lt;/span>.&lt;span style="color:#a6e22e">json&lt;/span>();
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#a6e22e">allRecords&lt;/span>.&lt;span style="color:#a6e22e">push&lt;/span>(...&lt;span style="color:#a6e22e">data&lt;/span>.&lt;span style="color:#a6e22e">records&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#a6e22e">offset&lt;/span> &lt;span style="color:#f92672">=&lt;/span> &lt;span style="color:#a6e22e">data&lt;/span>.&lt;span style="color:#a6e22e">offset&lt;/span> &lt;span style="color:#f92672">||&lt;/span> &lt;span style="color:#66d9ef">null&lt;/span>;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> } &lt;span style="color:#66d9ef">while&lt;/span> (&lt;span style="color:#a6e22e">offset&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">return&lt;/span> &lt;span style="color:#a6e22e">allRecords&lt;/span>;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>}
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h3 id="graceful-fallback">Graceful Fallback&lt;/h3>
&lt;p>I kept the Google Sheets path as a fallback. The &lt;code>main()&lt;/code> function uses a priority chain:&lt;/p>
&lt;ol>
&lt;li>&lt;strong>Airtable&lt;/strong> — if &lt;code>AIRTABLE_PAT&lt;/code>, &lt;code>AIRTABLE_BASE_ID&lt;/code>, &lt;code>AIRTABLE_TABLE_ID&lt;/code> are set&lt;/li>
&lt;li>&lt;strong>Google Sheets&lt;/strong> — if &lt;code>GOOGLE_SHEET_CSV_URL&lt;/code> is set&lt;/li>
&lt;li>&lt;strong>Fallback events&lt;/strong> — hardcoded sample data so the build never fails&lt;/li>
&lt;/ol>
&lt;p>This means you can&amp;rsquo;t break the site by misconfiguring a data source. The build always succeeds.&lt;/p>
&lt;hr>
&lt;h2 id="layer-3-the-enrichment--ai-powered-data-extraction">Layer 3: The Enrichment — AI-Powered Data Extraction&lt;/h2>
&lt;p>This is where things got really interesting.&lt;/p>
&lt;p>After cutting Google Sheets, I had 87 conference records in Airtable. But they only had three useful fields: title, description, and URL. No dates. No locations. No tags. The site worked, but every event card was sparse — no way to filter by date or location, no tags to browse by topic.&lt;/p>
&lt;p>Filling in 87 records by hand? No thanks.&lt;/p>
&lt;h3 id="the-idea-visit-each-url-and-ask-ai-to-extract-the-data">The Idea: Visit Each URL and Ask AI to Extract the Data&lt;/h3>
&lt;p>The approach: for each conference record, fetch its web page, extract the text content, and use AI inference to pull out structured fields like date, location, organizer, and tags.&lt;/p>
&lt;p>I built an enrichment script — &lt;code>enrich_conferences.py&lt;/code> — that sits alongside the tracker in the same project.&lt;/p>
&lt;h3 id="step-1-fetch-and-clean-the-page">Step 1: Fetch and Clean the Page&lt;/h3>
&lt;p>Each conference URL gets fetched with &lt;code>requests&lt;/code>, then cleaned with BeautifulSoup. Navigation, footers, scripts, and styling get stripped, leaving just the text content:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-python" data-lang="python">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#66d9ef">def&lt;/span> &lt;span style="color:#a6e22e">fetch_page_text&lt;/span>(url, timeout&lt;span style="color:#f92672">=&lt;/span>&lt;span style="color:#ae81ff">15&lt;/span>):
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> resp &lt;span style="color:#f92672">=&lt;/span> requests&lt;span style="color:#f92672">.&lt;/span>get(url, headers&lt;span style="color:#f92672">=&lt;/span>headers, timeout&lt;span style="color:#f92672">=&lt;/span>timeout)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> soup &lt;span style="color:#f92672">=&lt;/span> BeautifulSoup(resp&lt;span style="color:#f92672">.&lt;/span>text, &lt;span style="color:#e6db74">&amp;#34;html.parser&amp;#34;&lt;/span>)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">for&lt;/span> tag &lt;span style="color:#f92672">in&lt;/span> soup([&lt;span style="color:#e6db74">&amp;#34;script&amp;#34;&lt;/span>, &lt;span style="color:#e6db74">&amp;#34;style&amp;#34;&lt;/span>, &lt;span style="color:#e6db74">&amp;#34;nav&amp;#34;&lt;/span>, &lt;span style="color:#e6db74">&amp;#34;footer&amp;#34;&lt;/span>, &lt;span style="color:#e6db74">&amp;#34;header&amp;#34;&lt;/span>, &lt;span style="color:#e6db74">&amp;#34;aside&amp;#34;&lt;/span>]):
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> tag&lt;span style="color:#f92672">.&lt;/span>decompose()
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> text &lt;span style="color:#f92672">=&lt;/span> soup&lt;span style="color:#f92672">.&lt;/span>get_text(separator&lt;span style="color:#f92672">=&lt;/span>&lt;span style="color:#e6db74">&amp;#34;&lt;/span>&lt;span style="color:#ae81ff">\n&lt;/span>&lt;span style="color:#e6db74">&amp;#34;&lt;/span>, strip&lt;span style="color:#f92672">=&lt;/span>&lt;span style="color:#66d9ef">True&lt;/span>)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> lines &lt;span style="color:#f92672">=&lt;/span> [line&lt;span style="color:#f92672">.&lt;/span>strip() &lt;span style="color:#66d9ef">for&lt;/span> line &lt;span style="color:#f92672">in&lt;/span> text&lt;span style="color:#f92672">.&lt;/span>splitlines() &lt;span style="color:#66d9ef">if&lt;/span> line&lt;span style="color:#f92672">.&lt;/span>strip()]
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">return&lt;/span> &lt;span style="color:#e6db74">&amp;#34;&lt;/span>&lt;span style="color:#ae81ff">\n&lt;/span>&lt;span style="color:#e6db74">&amp;#34;&lt;/span>&lt;span style="color:#f92672">.&lt;/span>join(lines)
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h3 id="step-2-ai-extraction-via-pai-inference">Step 2: AI Extraction via PAI Inference&lt;/h3>
&lt;p>The cleaned text gets sent to Claude (via PAI&amp;rsquo;s Inference tool) with a structured extraction prompt. The prompt is specific about what to extract and what format to use:&lt;/p>
&lt;pre tabindex="0">&lt;code>Given text from a conference web page, extract these fields as JSON:
{
&amp;#34;date&amp;#34;: &amp;#34;human-readable date like &amp;#39;May 5-6, 2026&amp;#39;&amp;#34;,
&amp;#34;endDate&amp;#34;: &amp;#34;ISO end date like &amp;#39;2026-05-06&amp;#39;&amp;#34;,
&amp;#34;location&amp;#34;: &amp;#34;City, State/Country&amp;#34;,
&amp;#34;venue&amp;#34;: &amp;#34;venue name&amp;#34;,
&amp;#34;price&amp;#34;: &amp;#34;ticket price or &amp;#39;Free&amp;#39;&amp;#34;,
&amp;#34;organizer&amp;#34;: &amp;#34;organizing body&amp;#34;,
&amp;#34;tags&amp;#34;: &amp;#34;comma-separated topic tags (max 4)&amp;#34;
}
&lt;/code>&lt;/pre>&lt;p>One critical addition: if the page is a &lt;strong>list of conferences&lt;/strong> (like &amp;ldquo;Top 10 AI Conferences of 2026&amp;rdquo;), the AI returns &lt;code>{&amp;quot;is_list_page&amp;quot;: true}&lt;/code> and the script skips it. This was essential — about 15% of our URLs were aggregator pages, not individual conference pages.&lt;/p>
&lt;h3 id="step-3-write-back-to-airtable">Step 3: Write Back to Airtable&lt;/h3>
&lt;p>Non-empty extracted fields get PATCHed back to Airtable. The script only writes fields that actually exist in the table schema — a lesson learned the hard way when &lt;code>venue&lt;/code> and &lt;code>imageUrl&lt;/code> threw 422 errors because those columns hadn&amp;rsquo;t been created yet.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-python" data-lang="python">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#66d9ef">def&lt;/span> &lt;span style="color:#a6e22e">build_patch_fields&lt;/span>(extracted, allowed_fields):
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">if&lt;/span> extracted&lt;span style="color:#f92672">.&lt;/span>get(&lt;span style="color:#e6db74">&amp;#34;is_list_page&amp;#34;&lt;/span>):
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">return&lt;/span> &lt;span style="color:#66d9ef">None&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> patch &lt;span style="color:#f92672">=&lt;/span> {}
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">for&lt;/span> key &lt;span style="color:#f92672">in&lt;/span> [&lt;span style="color:#e6db74">&amp;#34;date&amp;#34;&lt;/span>, &lt;span style="color:#e6db74">&amp;#34;endDate&amp;#34;&lt;/span>, &lt;span style="color:#e6db74">&amp;#34;location&amp;#34;&lt;/span>, &lt;span style="color:#e6db74">&amp;#34;venue&amp;#34;&lt;/span>, &lt;span style="color:#e6db74">&amp;#34;price&amp;#34;&lt;/span>, &lt;span style="color:#e6db74">&amp;#34;organizer&amp;#34;&lt;/span>, &lt;span style="color:#e6db74">&amp;#34;tags&amp;#34;&lt;/span>]:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">if&lt;/span> key &lt;span style="color:#f92672">not&lt;/span> &lt;span style="color:#f92672">in&lt;/span> allowed_fields:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">continue&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> val &lt;span style="color:#f92672">=&lt;/span> extracted&lt;span style="color:#f92672">.&lt;/span>get(key, &lt;span style="color:#e6db74">&amp;#34;&amp;#34;&lt;/span>)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">if&lt;/span> isinstance(val, str) &lt;span style="color:#f92672">and&lt;/span> val&lt;span style="color:#f92672">.&lt;/span>strip():
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> patch[key] &lt;span style="color:#f92672">=&lt;/span> val&lt;span style="color:#f92672">.&lt;/span>strip()
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">return&lt;/span> patch &lt;span style="color:#66d9ef">if&lt;/span> patch &lt;span style="color:#66d9ef">else&lt;/span> &lt;span style="color:#66d9ef">None&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h3 id="the-results">The Results&lt;/h3>
&lt;p>Running the enrichment script across all 87 records:&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Outcome&lt;/th>
&lt;th>Count&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>Records enriched&lt;/td>
&lt;td>48&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>List/aggregator pages (correctly skipped)&lt;/td>
&lt;td>12&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>No extractable fields (social media, OpenReview, etc.)&lt;/td>
&lt;td>11&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Errors (timeouts, HTTP 403s)&lt;/td>
&lt;td>16&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>After enrichment:&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Field&lt;/th>
&lt;th>Records populated&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>Date&lt;/td>
&lt;td>42&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Location&lt;/td>
&lt;td>41&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Tags&lt;/td>
&lt;td>47&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Organizer&lt;/td>
&lt;td>27&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Price&lt;/td>
&lt;td>4&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>From zero structured data to a directory where most events have dates, locations, and topic tags — without opening a single conference website manually.&lt;/p>
&lt;p>Some highlights from the extraction:&lt;/p>
&lt;ul>
&lt;li>&lt;strong>NeurIPS 2026:&lt;/strong> December 6-12, Sydney, Australia — Deep Learning, Research, Algorithms, LLMs&lt;/li>
&lt;li>&lt;strong>CVPR 2026:&lt;/strong> June 3-7, Denver, CO — Computer Vision, Deep Learning, Research&lt;/li>
&lt;li>&lt;strong>ICML 2026:&lt;/strong> July 6-11, Seoul, South Korea — LLMs, Computer Vision, NLP, Robotics&lt;/li>
&lt;li>&lt;strong>AI Council 2026:&lt;/strong> May 12-14, San Francisco, CA — Generative AI, ML Ops, AI Safety&lt;/li>
&lt;li>&lt;strong>MIDL 2026:&lt;/strong> July 8-10, Taipei — Deep Learning, Healthcare AI, Computer Vision&lt;/li>
&lt;/ul>
&lt;hr>
&lt;h2 id="the-pipeline-today">The Pipeline Today&lt;/h2>
&lt;p>Here&amp;rsquo;s what the full system looks like now:&lt;/p>
&lt;pre tabindex="0">&lt;code>SearXNG (self-hosted search)
→ conference_tracker.py (Python — discovers conferences)
→ Airtable (source of truth — 87 records)
→ enrich_conferences.py (Python — AI-powered field extraction)
→ Airtable (now with dates, locations, tags)
→ fetch-events.mjs (Node — build-time data fetch)
→ data.ts (bundled into the site)
→ React + Vite app on Netlify
&lt;/code>&lt;/pre>&lt;p>The tracker discovers. The enricher structures. The fetcher delivers. The site displays. Each piece runs independently and can be re-run at any time.&lt;/p>
&lt;p>The enrichment script is idempotent — it only processes records where the &lt;code>date&lt;/code> field is empty, so running it again only touches new or previously-failed records.&lt;/p>
&lt;hr>
&lt;h2 id="what-id-do-differently-and-whats-next">What I&amp;rsquo;d Do Differently (And What&amp;rsquo;s Next)&lt;/h2>
&lt;h3 id="the-timeout-problem">The Timeout Problem&lt;/h3>
&lt;p>About 16 records hit the 25-second inference timeout. The fast tier (Haiku) is quick but occasionally chokes on pages with dense, complex content. A retry mechanism using the standard tier (Sonnet) for failed records would catch most of these.&lt;/p>
&lt;h3 id="missing-table-columns">Missing Table Columns&lt;/h3>
&lt;p>The &lt;code>venue&lt;/code> and &lt;code>imageUrl&lt;/code> fields don&amp;rsquo;t exist in the Airtable table yet. The enrichment script extracts venue names beautifully (The Venetian for Ai4, COEX Convention Center for ICML, Dongguk University for AAAI Summer), but the data gets dropped because the columns aren&amp;rsquo;t there. A quick table schema update in the Airtable UI fixes this.&lt;/p>
&lt;h3 id="scheduled-runs">Scheduled Runs&lt;/h3>
&lt;p>Right now, both the tracker and enricher are manual. The natural next step is scheduling — run the tracker daily to discover new conferences, the enricher on new records, and trigger a Netlify deploy afterward. The Netlify build hook is already configured; it just needs a cron job or GitHub Action to call it.&lt;/p>
&lt;h3 id="data-quality">Data Quality&lt;/h3>
&lt;p>Some records are noise — Reddit discussion threads, Amazon Science blog posts, Twitter/X profiles. A quality filter (either rule-based on URL patterns or AI-powered) would clean the dataset before enrichment runs.&lt;/p>
&lt;hr>
&lt;h2 id="lessons-learned">Lessons Learned&lt;/h2>
&lt;h3 id="1-eliminate-middlemen-early">1. Eliminate Middlemen Early&lt;/h3>
&lt;p>Google Sheets added zero value once Airtable was in the picture. But it lingered because it was the &amp;ldquo;original&amp;rdquo; approach. Every extra hop in a pipeline is a thing that can break, a thing that needs syncing, and a thing that slows you down. Cut it.&lt;/p>
&lt;h3 id="2-build-time-data-fetching-is-underrated">2. Build-Time Data Fetching Is Underrated&lt;/h3>
&lt;p>Pulling data at build time instead of runtime means no API keys in the browser, no loading spinners, and no CORS headaches. For data that changes daily (not per-second), this is the right architecture.&lt;/p>
&lt;h3 id="3-ai-extraction-beats-manual-curation">3. AI Extraction Beats Manual Curation&lt;/h3>
&lt;p>Using AI to extract structured data from unstructured web pages isn&amp;rsquo;t perfect — we got 48 out of 87 records enriched, not 87 out of 87. But it took 20 minutes of runtime versus what would have been hours of manual work. And the script is re-runnable. Improvement is incremental.&lt;/p>
&lt;h3 id="4-detect-your-datas-shape-before-writing">4. Detect Your Data&amp;rsquo;s Shape Before Writing&lt;/h3>
&lt;p>The Airtable 422 errors on &lt;code>venue&lt;/code> were entirely preventable. The enrichment script now probes the table schema at startup and only writes to fields that exist. Defensive coding at system boundaries saves debugging time.&lt;/p>
&lt;h3 id="5-list-page-detection-is-essential-for-web-scraping-pipelines">5. List Page Detection Is Essential for Web Scraping Pipelines&lt;/h3>
&lt;p>When you&amp;rsquo;re scraping URLs from search results, a significant percentage will be aggregator pages (&amp;ldquo;Top 10 Best AI Conferences&amp;rdquo;) rather than individual event pages. If you don&amp;rsquo;t detect and skip these, you&amp;rsquo;ll corrupt your dataset with merged data from multiple events. The &lt;code>is_list_page&lt;/code> flag in the AI extraction prompt was one of the highest-value additions to the whole pipeline.&lt;/p>
&lt;hr>
&lt;h2 id="the-bigger-picture">The Bigger Picture&lt;/h2>
&lt;p>This project is a miniature version of a pattern I keep coming back to: &lt;strong>systems that compound.&lt;/strong>&lt;/p>
&lt;p>The tracker runs once and discovers 87 conferences. The enricher runs once and structures 48 of them. The next time the tracker runs, it discovers only &lt;em>new&lt;/em> conferences (deduplication handles the rest). The next time the enricher runs, it only processes records it hasn&amp;rsquo;t touched yet.&lt;/p>
&lt;p>Every run makes the dataset better without redoing previous work. That&amp;rsquo;s the whole point of building infrastructure instead of doing things manually — you invest upfront so the system improves over time with minimal additional effort.&lt;/p>
&lt;p>Working with Claude through PAI made each layer come together faster than I expected. The tracker, the Airtable integration, the Google Sheets elimination, the enrichment script — each was a focused session where the AI handled the implementation details while I focused on architecture decisions.&lt;/p>
&lt;p>That&amp;rsquo;s the augmented part of Augmented Resilience. Not replacing the thinking — amplifying it.&lt;/p></content></item><item><title>RAG, Agents, and Skills: The Three Pillars Inside My Personal AI</title><link>https://augmentedresilience.com/posts/augmented-resilience-posts/rag-agents-and-skills---the-three-pillars-inside-my-personal-ai/</link><pubDate>Tue, 24 Feb 2026 00:00:00 +0000</pubDate><guid>https://augmentedresilience.com/posts/augmented-resilience-posts/rag-agents-and-skills---the-three-pillars-inside-my-personal-ai/</guid><description>&lt;h1 id="rag-agents-and-skills-the-three-pillars-inside-my-personal-ai">RAG, Agents, and Skills: The Three Pillars Inside My Personal AI&lt;/h1>
&lt;p>This site — Augmented Resilience — didn&amp;rsquo;t get built the way most blogs do. There was no staring at blank Hugo config files, no manually hunting down Namecheap SSH docs, no scrambling to remember whether the deploy script needed the &lt;code>public/&lt;/code> folder cleaned before each build.&lt;/p>
&lt;p>Instead, I described what I wanted. The AI knew my hosting setup (Namecheap shared hosting), my stack (Hugo with the re-terminal theme), my repo (GitHub, SSH-keyed), and my editor (Obsidian). When a build error surfaced — a theme name mismatch between &lt;code>hugo.toml&lt;/code> and the actual directory — it was diagnosed and fixed before I had time to Google it. When the deploy script needed writing, it was scaffolded against my specific environment. When I accidentally left sensitive data in an early draft, it caught it before the commit.&lt;/p></description><content>&lt;h1 id="rag-agents-and-skills-the-three-pillars-inside-my-personal-ai">RAG, Agents, and Skills: The Three Pillars Inside My Personal AI&lt;/h1>
&lt;p>This site — Augmented Resilience — didn&amp;rsquo;t get built the way most blogs do. There was no staring at blank Hugo config files, no manually hunting down Namecheap SSH docs, no scrambling to remember whether the deploy script needed the &lt;code>public/&lt;/code> folder cleaned before each build.&lt;/p>
&lt;p>Instead, I described what I wanted. The AI knew my hosting setup (Namecheap shared hosting), my stack (Hugo with the re-terminal theme), my repo (GitHub, SSH-keyed), and my editor (Obsidian). When a build error surfaced — a theme name mismatch between &lt;code>hugo.toml&lt;/code> and the actual directory — it was diagnosed and fixed before I had time to Google it. When the deploy script needed writing, it was scaffolded against my specific environment. When I accidentally left sensitive data in an early draft, it caught it before the commit.&lt;/p>
&lt;p>None of that context lived in the prompt. It lived in the infrastructure.&lt;/p>
&lt;p>The system behind it is called &lt;strong>PAI (Personal AI Infrastructure)&lt;/strong> — an open-source framework I run locally on top of Claude Code. And the reason it could handle an entire site build end-to-end without constant hand-holding comes down to three architectural pillars: &lt;strong>RAG&lt;/strong>, &lt;strong>Agents&lt;/strong>, and &lt;strong>Skills&lt;/strong>.&lt;/p>
&lt;hr>
&lt;h2 id="what-is-pai">What Is PAI?&lt;/h2>
&lt;p>PAI is an open-source personal AI infrastructure system that runs on top of Claude Code. It&amp;rsquo;s not a SaaS product — it&amp;rsquo;s a framework you install on your own machine. The system is built around a central idea: &lt;strong>AI systems need structure to be reliable&lt;/strong>. Like scaffolding supports construction, PAI provides the architectural patterns that make AI assistance consistent, contextual, and capable of compounding over time.&lt;/p>
&lt;p>There are 34 skills installed on my system, 17 event hooks, 141 workflows, and a memory system that learns from every interaction. But none of that would matter without three core mechanisms working in concert.&lt;/p>
&lt;p>&lt;img src="https://augmentedresilience.com/images/2026-02-24_18-07-16.png" alt="Image Description">
&lt;em>The PAI statusline — live system stats showing version (v2.4), algorithm (ALG:v0.2.25), skill count (SK: 34), workflows (WF: 141), hooks (17), context usage (48%), memory signals (144 ratings), and a rolling quality score trend.&lt;/em>&lt;/p>
&lt;hr>
&lt;h2 id="pillar-1-rag--your-personal-knowledge-base-in-every-response">Pillar 1: RAG — Your Personal Knowledge Base In Every Response&lt;/h2>
&lt;p>RAG (Retrieval-Augmented Generation) is the pattern of &lt;em>retrieving&lt;/em> relevant documents from a knowledge store and &lt;em>augmenting&lt;/em> the AI&amp;rsquo;s prompt with that context before generating a response. In enterprise AI, this is how you get a chatbot that can answer questions about your internal policies without hallucinating.&lt;/p>
&lt;p>In PAI, RAG is the engine that makes the AI feel like it &lt;em>knows&lt;/em> you.&lt;/p>
&lt;h3 id="how-it-works-in-pai">How It Works in PAI&lt;/h3>
&lt;p>When a session starts, PAI&amp;rsquo;s hook system loads a foundational context layer: my identity, my name, the current date, and the core behavioral rules (the Algorithm). This is the retrieval index — a lightweight map of everything the system knows how to find.&lt;/p>
&lt;p>When I make a request, the system retrieves additional context on demand:&lt;/p>
&lt;ul>
&lt;li>
&lt;p>&lt;strong>Skills frontmatter&lt;/strong> — Each of the 34 skills has a &lt;code>description&lt;/code> field with a &lt;code>USE WHEN&lt;/code> clause. These descriptions load at startup as a routing index. When my request matches a skill&amp;rsquo;s intent, the full skill content loads. This is retrieval — pulling in the right expertise document for the task.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;strong>USER/ context files&lt;/strong> — There&amp;rsquo;s a structured personal knowledge base living at &lt;code>~/.claude/skills/PAI/USER/&lt;/code>. It contains my resume, my TELOS life goals, my contacts, my projects, my tech stack preferences. When I ask a question where my professional background is relevant, that context gets retrieved and injected.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;strong>MEMORY/ directory&lt;/strong> — Every session, every correction, every insight gets captured in a structured memory system organized into &lt;code>WORK/&lt;/code>, &lt;code>LEARNING/&lt;/code>, &lt;code>SIGNALS/&lt;/code>, and &lt;code>RESEARCH/&lt;/code> directories. Past work items, completed tasks, and quality signals from previous interactions can all be retrieved to inform the current one.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;strong>Hook-injected context&lt;/strong> — Event hooks fire at specific moments (session start, before each prompt, after tool use) and inject dynamic context — things like the current depth classification, relevant behavioral rules, or system state.&lt;/p>
&lt;/li>
&lt;/ul>
&lt;h3 id="practical-scenario-building-augmented-resilience">Practical Scenario: Building Augmented Resilience&lt;/h3>
&lt;p>When I was setting up this site and ran into the Hugo theme mismatch error, here&amp;rsquo;s what PAI retrieved without me explaining any of it:&lt;/p>
&lt;ol>
&lt;li>My tech stack preferences from the USER context — Hugo, GitHub, Namecheap, Obsidian as editor&lt;/li>
&lt;li>The WebSavant skill loaded automatically (matched &amp;ldquo;Hugo site&amp;rdquo;, &amp;ldquo;deployment&amp;rdquo; intent), bringing with it Hugo-specific knowledge about theme configuration, &lt;code>hugo.toml&lt;/code> structure, and build pipelines&lt;/li>
&lt;li>My project context from MEMORY — the repo name, the hosting environment, decisions made in prior sessions about the deploy workflow&lt;/li>
&lt;/ol>
&lt;p>By the time I described the error, PAI already knew the environment it was debugging. It didn&amp;rsquo;t need me to explain what kind of hosting I had, which theme I was using, or what my folder structure looked like. The retrieval layer had already assembled that context before a single word of the solution was written.&lt;/p>
&lt;p>That&amp;rsquo;s the difference RAG makes — not smarter AI, but &lt;em>contextually equipped&lt;/em> AI.&lt;/p>
&lt;hr>
&lt;h2 id="pillar-2-skills--domain-expertise-that-activates-itself">Pillar 2: Skills — Domain Expertise That Activates Itself&lt;/h2>
&lt;p>If RAG is how PAI &lt;em>knows&lt;/em> context, Skills are how PAI &lt;em>does&lt;/em> work. A skill is a self-contained expertise module that activates automatically based on intent, routes to the right workflow, and executes a structured procedure.&lt;/p>
&lt;p>Think of each skill as a senior specialist on call — and you never have to explicitly page them.&lt;/p>
&lt;h3 id="the-anatomy-of-a-skill">The Anatomy of a Skill&lt;/h3>
&lt;p>Every skill follows the same structure:&lt;/p>
&lt;pre tabindex="0">&lt;code>SkillName/
├── SKILL.md ← Routing layer (loads on invocation)
├── Workflows/ ← Step-by-step execution procedures
│ └── Create.md
│ └── Update.md
└── Tools/ ← CLI automation scripts (TypeScript)
└── Generate.ts
&lt;/code>&lt;/pre>&lt;p>The &lt;code>SKILL.md&lt;/code> file has two parts:&lt;/p>
&lt;ol>
&lt;li>&lt;strong>YAML frontmatter&lt;/strong> with a &lt;code>USE WHEN&lt;/code> clause — this is how Claude Code knows when to activate the skill&lt;/li>
&lt;li>&lt;strong>Workflow routing table&lt;/strong> — once activated, this routes the request to the correct workflow file&lt;/li>
&lt;/ol>
&lt;p>The magic is in &lt;code>USE WHEN&lt;/code>. Here&amp;rsquo;s a simplified example from the OracleHCM skill:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-yaml" data-lang="yaml">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f92672">description&lt;/span>: &lt;span style="color:#ae81ff">Expert Oracle HCM Cloud troubleshooting and guidance. USE WHEN user&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ae81ff">mentions Oracle HCM, HCM Cloud, HDL, HCM Data Loader, Journey, Checklist,&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ae81ff">workflow approvals, autocomplete rules, fast formulas, security profiles...&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>I never have to say &amp;ldquo;use the Oracle HCM skill.&amp;rdquo; I just describe my problem in natural language. The intent matching system routes it.&lt;/p>
&lt;h3 id="practical-scenario-configuring-seo-and-geo-for-augmentedresiliencecom">Practical Scenario: Configuring SEO and GEO for augmentedresilience.com&lt;/h3>
&lt;p>Before the site went live, I needed proper SEO and GEO — Open Graph tags for social sharing, meta descriptions for search, canonical URLs, a sitemap, and schema.org structured data so AI-powered search engines like Perplexity, ChatGPT, and Claude could understand and cite the content accurately. None of that comes configured out of the box with the re-terminal theme. I said:&lt;/p>
&lt;blockquote>
&lt;p>&amp;ldquo;Set up SEO and apply Generative Engine Optimization to augmentedresilience.com.&amp;rdquo;&lt;/p>&lt;/blockquote>
&lt;p>The system:&lt;/p>
&lt;ol>
&lt;li>&lt;strong>Activated the WebSavant skill&lt;/strong> (matched &amp;ldquo;SEO&amp;rdquo; + &amp;ldquo;GEO&amp;rdquo; + &amp;ldquo;site&amp;rdquo; intent — no skill named, no flags set)&lt;/li>
&lt;li>&lt;strong>Routed to the SEO and AddSchema workflows&lt;/strong> inside that skill&lt;/li>
&lt;li>&lt;strong>Created the correct Hugo partial override&lt;/strong> at &lt;code>layouts/partials/extended_head.html&lt;/code> — the exact injection point the re-terminal theme exposes without touching any theme files&lt;/li>
&lt;li>&lt;strong>Added the full Open Graph tag set&lt;/strong> (&lt;code>og:title&lt;/code>, &lt;code>og:description&lt;/code>, &lt;code>og:image&lt;/code>, &lt;code>og:url&lt;/code>, &lt;code>og:type&lt;/code>) wired to Hugo&amp;rsquo;s page variables&lt;/li>
&lt;li>&lt;strong>Injected schema.org JSON-LD&lt;/strong> for every page type: &lt;code>WebSite&lt;/code> and &lt;code>Person&lt;/code> on the homepage, &lt;code>Article&lt;/code> and &lt;code>BreadcrumbList&lt;/code> on every post, and &lt;code>AboutPage&lt;/code> on &lt;code>/about&lt;/code> — giving AI crawlers a machine-readable knowledge graph of the site&lt;/li>
&lt;li>&lt;strong>Created &lt;code>robots.txt&lt;/code>&lt;/strong> explicitly permitting GPTBot, ClaudeBot, PerplexityBot, and other AI crawlers — with the sitemap URL wired in&lt;/li>
&lt;li>&lt;strong>Configured &lt;code>hugo.toml&lt;/code>&lt;/strong> for canonical URL generation and enabled the built-in sitemap output&lt;/li>
&lt;/ol>
&lt;p>Without the skill, this is a day of Hugo documentation, schema.org spec-reading, and trial-and-error. With it, the full SEO and GEO stack was complete in a single pass — because the skill had already encoded where everything goes in Hugo&amp;rsquo;s directory structure, which schema types matter for which page contexts, and how to wire Hugo&amp;rsquo;s template variables into valid JSON-LD that AI search engines can actually parse.&lt;/p>
&lt;h3 id="the-34-skills-i-have-installed">The 34 Skills I Have Installed&lt;/h3>
&lt;p>My current skill roster includes tools for Oracle HCM support, security recon, OSINT research, browser automation, art generation, document processing, code generation, red teaming, and more. Each one is a packaged capability that activates without friction.&lt;/p>
&lt;p>The system is also designed to be extended — building a new skill means writing a &lt;code>SKILL.md&lt;/code> with a &lt;code>USE WHEN&lt;/code> clause, a workflow routing table, and the workflow files. The CreateSkill skill handles the scaffolding automatically.&lt;/p>
&lt;hr>
&lt;h2 id="pillar-3-agents--parallel-specialized-brains">Pillar 3: Agents — Parallel Specialized Brains&lt;/h2>
&lt;p>Skills handle individual domain expertise. Agents handle &lt;em>scale&lt;/em> and &lt;em>specialization&lt;/em> when a task is too complex for a single pass or requires multiple perspectives simultaneously.&lt;/p>
&lt;p>PAI has a three-tier agent system:&lt;/p>
&lt;h3 id="tier-1-task-tool-subagents-internal-workhorses">Tier 1: Task Tool Subagents (Internal Workhorses)&lt;/h3>
&lt;p>These are pre-built specialist agents that skills and workflows invoke internally: &lt;code>Engineer&lt;/code>, &lt;code>Architect&lt;/code>, &lt;code>Explore&lt;/code>, &lt;code>QATester&lt;/code>, &lt;code>Pentester&lt;/code>, &lt;code>ClaudeResearcher&lt;/code>, &lt;code>GeminiResearcher&lt;/code>, &lt;code>GrokResearcher&lt;/code>, and others.&lt;/p>
&lt;p>When I ask PAI to research something deeply, it doesn&amp;rsquo;t just run one search. It can fan out to multiple research agents simultaneously — Claude, Gemini, and Grok each investigating from different angles — then synthesize the results with a &amp;ldquo;spotcheck&amp;rdquo; agent that verifies consistency.&lt;/p>
&lt;p>This is parallel processing that would take me hours of manual work, running in minutes.&lt;/p>
&lt;h3 id="tier-2-named-agents-persistent-specialists">Tier 2: Named Agents (Persistent Specialists)&lt;/h3>
&lt;p>Named agents are recurring characters with rich backstories, persistent identities, and unique voices via ElevenLabs text-to-speech. They build relationship continuity across sessions.&lt;/p>
&lt;p>My installed named agents include:&lt;/p>
&lt;ul>
&lt;li>&lt;strong>Serena Blackwood&lt;/strong> — Architect. Long-term system design decisions.&lt;/li>
&lt;li>&lt;strong>Marcus Webb&lt;/strong> — Engineer. Strategic technical leadership.&lt;/li>
&lt;li>&lt;strong>Rook Blackburn&lt;/strong> — Pentester. Security testing with a distinct personality.&lt;/li>
&lt;li>&lt;strong>Ava Sterling&lt;/strong> — Researcher (Claude). Strategic deep-dive analysis.&lt;/li>
&lt;li>&lt;strong>Alex Rivera&lt;/strong> — Researcher (Gemini). Multi-perspective comprehensive analysis.&lt;/li>
&lt;/ul>
&lt;p>When Rook runs a security assessment, he doesn&amp;rsquo;t just return findings — he announces them in his own voice through my speakers. It sounds minor. It&amp;rsquo;s not. Distinct voices make it cognitively easier to understand &lt;em>who&lt;/em> did what work and &lt;em>why&lt;/em> you should trust it.&lt;/p>
&lt;h3 id="tier-3-custom-agents-on-demand-compositions">Tier 3: Custom Agents (On-Demand Compositions)&lt;/h3>
&lt;p>For tasks that don&amp;rsquo;t fit a named agent, PAI can compose agents dynamically from trait combinations:&lt;/p>
&lt;ul>
&lt;li>&lt;strong>Expertise traits:&lt;/strong> &lt;code>security&lt;/code>, &lt;code>legal&lt;/code>, &lt;code>finance&lt;/code>, &lt;code>medical&lt;/code>, &lt;code>research&lt;/code>, &lt;code>technical&lt;/code>, &lt;code>creative&lt;/code>&lt;/li>
&lt;li>&lt;strong>Personality traits:&lt;/strong> &lt;code>skeptical&lt;/code>, &lt;code>enthusiastic&lt;/code>, &lt;code>analytical&lt;/code>, &lt;code>contrarian&lt;/code>, &lt;code>meticulous&lt;/code>&lt;/li>
&lt;li>&lt;strong>Approach traits:&lt;/strong> &lt;code>thorough&lt;/code>, &lt;code>rapid&lt;/code>, &lt;code>systematic&lt;/code>, &lt;code>adversarial&lt;/code>, &lt;code>synthesizing&lt;/code>&lt;/li>
&lt;/ul>
&lt;p>Each unique trait combination maps to a different ElevenLabs voice. A &lt;code>security + adversarial&lt;/code> agent gets Callum&amp;rsquo;s edgy voice. An &lt;code>analytical + meticulous&lt;/code> agent gets Charlotte&amp;rsquo;s precise cadence.&lt;/p>
&lt;p>The trait system means I can spin up a custom agent for any edge case without writing a new agent from scratch.&lt;/p>
&lt;h3 id="practical-scenario-pre-launch-validation-of-augmented-resilience">Practical Scenario: Pre-Launch Validation of Augmented Resilience&lt;/h3>
&lt;p>Before pushing the first real commit to augmentedresilience.com, I wasn&amp;rsquo;t going to just cross my fingers and run &lt;code>deploy.py&lt;/code>. I asked PAI to validate the site was actually ready. What happened next wasn&amp;rsquo;t a single check — it was a parallel review board.&lt;/p>
&lt;p>PAI spawned three agents simultaneously:&lt;/p>
&lt;ol>
&lt;li>&lt;strong>Rook Blackburn&lt;/strong> (Pentester) scanned the entire repo for credentials, API keys, and sensitive data I might have accidentally left in a config file or draft post — and announced his findings in his own voice through my speakers&lt;/li>
&lt;li>&lt;strong>A QA agent&lt;/strong> opened the Hugo local preview, walked every page, verified links weren&amp;rsquo;t broken, images loaded, and the deploy pipeline produced a clean &lt;code>public/&lt;/code> build&lt;/li>
&lt;li>&lt;strong>A Researcher agent&lt;/strong> audited the site&amp;rsquo;s meta tags, Open Graph data, and &lt;code>hugo.toml&lt;/code> settings against SEO best practices for a new blog&lt;/li>
&lt;/ol>
&lt;p>A fourth &lt;strong>spotcheck agent&lt;/strong> then reviewed all three outputs for conflicts — did Rook&amp;rsquo;s findings overlap with anything the QA agent flagged? Were there config issues that touched both SEO and security?&lt;/p>
&lt;p>The result was a single consolidated pre-launch checklist. Two issues surfaced: a leftover draft post with personal notes still marked &lt;code>draft: false&lt;/code>, and a missing &lt;code>og:image&lt;/code> tag. Both fixed before the first visitor ever landed.&lt;/p>
&lt;p>The site you&amp;rsquo;re reading right now went live clean because three agents checked it in parallel before I touched the deploy button. That&amp;rsquo;s the difference between asking a question and deploying intelligence.&lt;/p>
&lt;hr>
&lt;h2 id="when-all-three-work-together">When All Three Work Together&lt;/h2>
&lt;p>The real power of PAI isn&amp;rsquo;t any single pillar — it&amp;rsquo;s the composition.&lt;/p>
&lt;p>Here&amp;rsquo;s what happened when I needed to go from &amp;ldquo;Obsidian draft&amp;rdquo; to &amp;ldquo;live on augmentedresilience.com&amp;rdquo; without a manual process I&amp;rsquo;d eventually forget or skip.&lt;/p>
&lt;p>&lt;strong>RAG&lt;/strong> assembled the context before I described the problem. From MEMORY it already knew: Namecheap shared hosting doesn&amp;rsquo;t support native &lt;code>git pull&lt;/code> — content has to be pushed via FTP through GitHub Actions. It knew the Obsidian vault was the content source, that &lt;code>images.py&lt;/code> had to run before &lt;code>hugo&lt;/code> to convert image links, and that Python was the right tool for the orchestration script. Not one of those constraints was in my prompt.&lt;/p>
&lt;p>&lt;strong>Skills&lt;/strong> handled the architecture. WebSavant recognized a Hugo deployment pipeline request and routed to a workflow already aware of the full delivery chain: sync posts from Obsidian → convert images → &lt;code>hugo&lt;/code> build → &lt;code>git commit&lt;/code> → &lt;code>git push&lt;/code> → GitHub Actions → Namecheap FTP. It knew the sequence. It knew why each step had to happen in that order.&lt;/p>
&lt;p>&lt;strong>Agents&lt;/strong> built it. An Engineer agent wrote &lt;code>deploy.py&lt;/code> — the script that runs the whole sequence in a single command. An Architect agent designed the GitHub Actions workflow that picks up after the push and handles the Namecheap delivery step automatically. Two agents, two distinct responsibilities, running the job that a solo developer would have spent an afternoon piecing together from Stack Overflow answers.&lt;/p>
&lt;p>The result:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span>python3 deploy.py &lt;span style="color:#e6db74">&amp;#34;Add new post&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>That&amp;rsquo;s it. One command. Every post that has ever gone live on this site — including this one — passed through a pipeline that RAG, Skills, and Agents built together. It&amp;rsquo;s not running because I set it up manually. It&amp;rsquo;s running because three systems knew what the job required before I finished explaining it.&lt;/p>
&lt;hr>
&lt;h2 id="the-compounding-effect">The Compounding Effect&lt;/h2>
&lt;p>What makes this architecture meaningful over time isn&amp;rsquo;t any single interaction — it&amp;rsquo;s that the system gets better at helping you with every session.&lt;/p>
&lt;p>The MEMORY system captures learnings. The SIGNALS directory tracks your implicit feedback. When something goes wrong, it logs the full context under LEARNING/FAILURES. When a workflow produces a 9-10 response, that signal is captured too. The system adjusts.&lt;/p>
&lt;p>Generic AI starts fresh every time. PAI compounds.&lt;/p>
&lt;p>I&amp;rsquo;m still early in this — the personal profile files still have template placeholders I haven&amp;rsquo;t filled in, and there are skills I&amp;rsquo;ve barely touched. But even at partial configuration, the system already thinks more like a senior colleague than a search engine.&lt;/p>
&lt;p>That&amp;rsquo;s what RAG, Agents, and Skills make possible together: &lt;strong>an AI that knows your context, activates the right expertise automatically, and scales parallel intelligence for complex work&lt;/strong> — all without you having to manage the machinery.&lt;/p></content></item><item><title>When Your PDF Workflow Breaks - Building a Markdown Converter with Claude Code</title><link>https://augmentedresilience.com/posts/augmented-resilience-posts/building-a-pdf-to-markdown-converter-with-claude-code/</link><pubDate>Wed, 18 Feb 2026 00:00:00 +0000</pubDate><guid>https://augmentedresilience.com/posts/augmented-resilience-posts/building-a-pdf-to-markdown-converter-with-claude-code/</guid><description>&lt;h2 id="the-problem-pdfs-are-knowledge-prisons">The Problem: PDFs Are Knowledge Prisons&lt;/h2>
&lt;p>You know that feeling when you download a brilliant research paper, only to realize you can&amp;rsquo;t easily feed it into your AI workflow? Or when you want to add documentation to your knowledge base, but it&amp;rsquo;s locked in a format that doesn&amp;rsquo;t play well with version control or LLM tools?&lt;/p>
&lt;p>Yeah, I was there last week.&lt;/p>
&lt;p>I had just downloaded a fascinating 1.3MB research paper on Generative Engine Optimization and wanted to process it with my AI tools. But PDFs are terrible for this. They&amp;rsquo;re designed for &lt;em>printing&lt;/em>, not for &lt;em>processing&lt;/em>. What I needed was Markdown—clean, portable, AI-friendly Markdown.&lt;/p></description><content>&lt;h2 id="the-problem-pdfs-are-knowledge-prisons">The Problem: PDFs Are Knowledge Prisons&lt;/h2>
&lt;p>You know that feeling when you download a brilliant research paper, only to realize you can&amp;rsquo;t easily feed it into your AI workflow? Or when you want to add documentation to your knowledge base, but it&amp;rsquo;s locked in a format that doesn&amp;rsquo;t play well with version control or LLM tools?&lt;/p>
&lt;p>Yeah, I was there last week.&lt;/p>
&lt;p>I had just downloaded a fascinating 1.3MB research paper on Generative Engine Optimization and wanted to process it with my AI tools. But PDFs are terrible for this. They&amp;rsquo;re designed for &lt;em>printing&lt;/em>, not for &lt;em>processing&lt;/em>. What I needed was Markdown—clean, portable, AI-friendly Markdown.&lt;/p>
&lt;p>So I built a converter. And with Claude Code as my copilot through the PAI (Personal AI Infrastructure) system, the whole thing took less than 30 minutes.&lt;/p>
&lt;p>Here&amp;rsquo;s how it went down.&lt;/p>
&lt;hr>
&lt;h2 id="why-markdown-is-better-than-pdf-for-llms">Why Markdown is Better Than PDF for LLMs&lt;/h2>
&lt;p>Before diving into the build, let&amp;rsquo;s answer the obvious question: &lt;em>why bother converting?&lt;/em> Can&amp;rsquo;t LLMs just read PDFs directly?&lt;/p>
&lt;p>Technically, yes. But the results are significantly worse, and the reasons are fundamental to how PDFs work.&lt;/p>
&lt;h3 id="pdfs-are-layout-first-not-structure-first">PDFs Are Layout-First, Not Structure-First&lt;/h3>
&lt;p>PDFs were designed to describe &lt;em>where things appear on a page&lt;/em>, not &lt;em>what they mean&lt;/em>. As Steven Howard explains in &lt;a href="https://untetheredai.substack.com/p/why-pdfs-fail-under-llm-parsing" target="_blank" rel="noopener noreferrer">Why PDFs Fail Under LLM Parsing&lt;/a>
:&lt;/p>
&lt;blockquote>
&lt;p>&amp;ldquo;Table cells with wrapped text insert hard line breaks that fragment token continuity and break logical row recognition. Headers and footers simply add noise to the context when used with LLMs. Sentences are split with arbitrary CR/LFs making it very difficult to find paragraph boundaries.&amp;rdquo;&lt;/p>&lt;/blockquote>
&lt;p>This architectural mismatch — a format designed for printing being fed into a system designed for understanding — causes cascading problems downstream.&lt;/p>
&lt;h3 id="the-token-efficiency-problem">The Token Efficiency Problem&lt;/h3>
&lt;p>Every token your LLM processes costs money and consumes context window space. PDF extraction wastes both.&lt;/p>
&lt;p>According to analysis from &lt;a href="https://markdownconverters.com/blog/pdf-vs-markdown-ai-tokens" target="_blank" rel="noopener noreferrer">MarkdownConverters&lt;/a>
, &lt;strong>Markdown saves up to 70% more tokens compared to extracted PDF text&lt;/strong> for the same content. The culprit: PDF extraction introduces formatting artifacts, metadata noise, headers/footers, and encoding remnants that all consume tokens without adding semantic value.&lt;/p>
&lt;p>To put that in practical terms: a PDF that would use 10,000 tokens might only need 3,000 tokens when properly converted to Markdown. At scale, this compounds dramatically.&lt;/p>
&lt;h3 id="the-rag-performance-problem">The RAG Performance Problem&lt;/h3>
&lt;p>If you&amp;rsquo;re building Retrieval Augmented Generation (RAG) systems — using documents as a knowledge base for AI — document format directly impacts answer quality.&lt;/p>
&lt;p>The research here is compelling:&lt;/p>
&lt;ul>
&lt;li>
&lt;p>&lt;strong>Academic validation&lt;/strong>: A 2024 paper on arXiv (&lt;a href="https://arxiv.org/abs/2401.12599" target="_blank" rel="noopener noreferrer">Revolutionizing RAG with Enhanced PDF Structure Recognition&lt;/a>
) found that &amp;ldquo;the low accuracy of PDF parsing significantly impacts the effectiveness of professional knowledge-based QA.&amp;rdquo;&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;strong>Industry validation&lt;/strong>: NVIDIA&amp;rsquo;s technical blog documents how their NeMo Retriever pipeline converts extracted content to Markdown specifically because it &amp;ldquo;preserves row/column relationships in an LLM-native format, significantly reducing numeric hallucination&amp;rdquo; — and &lt;strong>reduces incorrect answers by 50%&lt;/strong>. (&lt;a href="https://developer.nvidia.com/blog/approaches-to-pdf-data-extraction-for-information-retrieval/" target="_blank" rel="noopener noreferrer">NVIDIA: Approaches to PDF Data Extraction for Information Retrieval&lt;/a>
)&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;strong>Chunking quality&lt;/strong>: Analysis from &lt;a href="https://medium.com/data-science/improved-rag-document-processing-with-markdown-426a2e0dd82b" target="_blank" rel="noopener noreferrer">Towards Data Science&lt;/a>
shows that Markdown&amp;rsquo;s heading structure (&lt;code>#&lt;/code>, &lt;code>##&lt;/code>, &lt;code>###&lt;/code>) produces semantically meaningful chunks, while PDF-based chunking relies on arbitrary page breaks and heuristics.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;strong>Retrieval failure rates&lt;/strong>: Unstructured.io&amp;rsquo;s &lt;a href="https://unstructured.io/blog/contextual-chunking-in-unstructured-platform-boost-your-rag-retrieval-accuracy" target="_blank" rel="noopener noreferrer">research on contextual chunking&lt;/a>
— tested across 5,563 question-answer pairs — showed an &lt;strong>84% reduction in retrieval failure rates&lt;/strong> when using structure-aware chunking (the kind Markdown enables natively).&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;strong>Real-world outcomes&lt;/strong>: The 2025 Semrush AI Index, cited by &lt;a href="https://developer.webex.com/blog/boosting-ai-performance-the-power-of-llm-friendly-content-in-markdown" target="_blank" rel="noopener noreferrer">Webex Developers Blog&lt;/a>
, found that 72% of top AI-indexed articles used Markdown or Markdown-like structures, achieving &lt;strong>34% higher retrieval accuracy&lt;/strong> across ChatGPT, Perplexity, and Gemini.&lt;/p>
&lt;/li>
&lt;/ul>
&lt;h3 id="the-bottom-line">The Bottom Line&lt;/h3>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Metric&lt;/th>
&lt;th>Impact&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>Token reduction&lt;/td>
&lt;td>Up to 70% fewer tokens vs PDF extraction&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Incorrect answers in RAG&lt;/td>
&lt;td>50% reduction (NVIDIA NeMo)&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Retrieval failure rates&lt;/td>
&lt;td>84% reduction (Unstructured.io)&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Retrieval accuracy&lt;/td>
&lt;td>34% higher (Semrush AI Index 2025)&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>Markdown isn&amp;rsquo;t just more convenient — it&amp;rsquo;s meaningfully better for AI. Converting your document libraries is one of the highest-ROI steps you can take before building any LLM-powered workflow.&lt;/p>
&lt;hr>
&lt;h2 id="the-first-failure-when-bleeding-edge-python-bites-back">The First Failure: When Bleeding-Edge Python Bites Back&lt;/h2>
&lt;p>I&amp;rsquo;m running Python 3.14.2—the latest release, barely a few weeks old. Modern, shiny, cutting-edge. Perfect, right?&lt;/p>
&lt;p>Not quite.&lt;/p>
&lt;p>My first instinct was to use &lt;code>marker-pdf&lt;/code>, a high-performance converter optimized for scientific papers and books. It looked perfect on paper (pun intended). But when I tried to install it:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-text" data-lang="text">&lt;span style="display:flex;">&lt;span>Building wheel for Pillow (pyproject.toml): finished with status &amp;#39;error&amp;#39;
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Ugh.&lt;/p>
&lt;p>Turns out, &lt;code>marker-pdf&lt;/code> depends on Pillow (the Python imaging library), and Pillow hasn&amp;rsquo;t built binary wheels for Python 3.14 yet. I could have downgraded Python. I could have fought with source compilation. But why?&lt;/p>
&lt;p>&lt;strong>This is where working with Claude Code really shines.&lt;/strong> Instead of going down a rabbit hole trying to force marker-pdf to work, Claude suggested pivoting to &lt;strong>PyMuPDF4LLM&lt;/strong>—a mature, actively maintained library specifically designed for AI/LLM workflows.&lt;/p>
&lt;p>And it just worked.&lt;/p>
&lt;hr>
&lt;h2 id="the-solution-pymupdf4llm">The Solution: PyMuPDF4LLM&lt;/h2>
&lt;p>PyMuPDF4LLM turned out to be exactly what I needed:&lt;/p>
&lt;ul>
&lt;li>Works flawlessly with Python 3.14 (no compilation errors)&lt;/li>
&lt;li>Fast and accurate conversion&lt;/li>
&lt;li>Built specifically for feeding documents into LLMs&lt;/li>
&lt;li>Clean, simple API&lt;/li>
&lt;li>Actively maintained by the PyMuPDF team&lt;/li>
&lt;/ul>
&lt;p>The installation was literally:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span>pip install pymupdf4llm
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Five seconds later, I was ready to go.&lt;/p>
&lt;hr>
&lt;h2 id="building-the-tool-first-principles-thinking">Building the Tool: First Principles Thinking&lt;/h2>
&lt;p>As someone new to the CLI world, I&amp;rsquo;ve been learning to think through project structure from first principles. Where should this live? How should it be organized?&lt;/p>
&lt;p>With Claude&amp;rsquo;s guidance, I chose &lt;code>/Users/dsa/projects/pdf-to-markdown/&lt;/code> for a few key reasons:&lt;/p>
&lt;ol>
&lt;li>&lt;strong>Separation of Concerns:&lt;/strong> Tool projects should be separate from my main workspace&lt;/li>
&lt;li>&lt;strong>Discoverability:&lt;/strong> Clear, descriptive naming means I&amp;rsquo;ll find it again in 6 months&lt;/li>
&lt;li>&lt;strong>Reusability:&lt;/strong> This structure works both as a CLI tool AND as a library I could import later&lt;/li>
&lt;/ol>
&lt;p>The project structure ended up simple but complete:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-text" data-lang="text">&lt;span style="display:flex;">&lt;span>pdf-to-markdown/
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>├── README.md # Documentation
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>├── venv/ # Isolated Python environment
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>├── input/ # Test PDFs
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>├── output/ # Generated markdown
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>├── pdf2md # CLI wrapper script
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>└── requirements.txt # Dependencies
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;hr>
&lt;h2 id="the-code-a-simple-but-powerful-cli">The Code: A Simple but Powerful CLI&lt;/h2>
&lt;p>I wanted a tool I could actually use—something with a clean command-line interface that handles the common cases elegantly. Working with Claude through PAI, we created a Python script that does exactly that:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-python" data-lang="python">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">#!/usr/bin/env python3&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#e6db74">&amp;#34;&amp;#34;&amp;#34;
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#e6db74">PDF to Markdown Converter
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#e6db74">A simple CLI tool to convert PDF files to Markdown using PyMuPDF4LLM
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#e6db74">&amp;#34;&amp;#34;&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f92672">import&lt;/span> sys
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f92672">import&lt;/span> os
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f92672">from&lt;/span> pathlib &lt;span style="color:#f92672">import&lt;/span> Path
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f92672">import&lt;/span> pymupdf4llm
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f92672">import&lt;/span> pymupdf
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f92672">from&lt;/span> tqdm &lt;span style="color:#f92672">import&lt;/span> tqdm
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#66d9ef">def&lt;/span> &lt;span style="color:#a6e22e">convert_pdf_to_markdown&lt;/span>(pdf_path: str, output_path: str &lt;span style="color:#f92672">=&lt;/span> &lt;span style="color:#66d9ef">None&lt;/span>) &lt;span style="color:#f92672">-&amp;gt;&lt;/span> str:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#e6db74">&amp;#34;&amp;#34;&amp;#34;Convert a PDF file to Markdown format.&amp;#34;&amp;#34;&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">if&lt;/span> &lt;span style="color:#f92672">not&lt;/span> os&lt;span style="color:#f92672">.&lt;/span>path&lt;span style="color:#f92672">.&lt;/span>exists(pdf_path):
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">raise&lt;/span> &lt;span style="color:#a6e22e">FileNotFoundError&lt;/span>(&lt;span style="color:#e6db74">f&lt;/span>&lt;span style="color:#e6db74">&amp;#34;PDF file not found: &lt;/span>&lt;span style="color:#e6db74">{&lt;/span>pdf_path&lt;span style="color:#e6db74">}&lt;/span>&lt;span style="color:#e6db74">&amp;#34;&lt;/span>)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#75715e"># Get page count for progress bar&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> doc &lt;span style="color:#f92672">=&lt;/span> pymupdf&lt;span style="color:#f92672">.&lt;/span>open(pdf_path)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> page_count &lt;span style="color:#f92672">=&lt;/span> doc&lt;span style="color:#f92672">.&lt;/span>page_count
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> doc&lt;span style="color:#f92672">.&lt;/span>close()
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> print(&lt;span style="color:#e6db74">f&lt;/span>&lt;span style="color:#e6db74">&amp;#34;Converting: &lt;/span>&lt;span style="color:#e6db74">{&lt;/span>pdf_path&lt;span style="color:#e6db74">}&lt;/span>&lt;span style="color:#e6db74">&amp;#34;&lt;/span>)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">with&lt;/span> tqdm(total&lt;span style="color:#f92672">=&lt;/span>page_count, unit&lt;span style="color:#f92672">=&lt;/span>&lt;span style="color:#e6db74">&amp;#34;page&amp;#34;&lt;/span>, desc&lt;span style="color:#f92672">=&lt;/span>&lt;span style="color:#e6db74">&amp;#34;Processing&amp;#34;&lt;/span>, colour&lt;span style="color:#f92672">=&lt;/span>&lt;span style="color:#e6db74">&amp;#34;blue&amp;#34;&lt;/span>) &lt;span style="color:#66d9ef">as&lt;/span> bar:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> md_text &lt;span style="color:#f92672">=&lt;/span> pymupdf4llm&lt;span style="color:#f92672">.&lt;/span>to_markdown(pdf_path, page_chunks&lt;span style="color:#f92672">=&lt;/span>&lt;span style="color:#66d9ef">False&lt;/span>)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> bar&lt;span style="color:#f92672">.&lt;/span>n &lt;span style="color:#f92672">=&lt;/span> page_count
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> bar&lt;span style="color:#f92672">.&lt;/span>refresh()
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">if&lt;/span> output_path &lt;span style="color:#f92672">is&lt;/span> &lt;span style="color:#66d9ef">None&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> output_path &lt;span style="color:#f92672">=&lt;/span> Path(pdf_path)&lt;span style="color:#f92672">.&lt;/span>with_suffix(&lt;span style="color:#e6db74">&amp;#39;.md&amp;#39;&lt;/span>)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">with&lt;/span> open(output_path, &lt;span style="color:#e6db74">&amp;#39;w&amp;#39;&lt;/span>, encoding&lt;span style="color:#f92672">=&lt;/span>&lt;span style="color:#e6db74">&amp;#39;utf-8&amp;#39;&lt;/span>) &lt;span style="color:#66d9ef">as&lt;/span> f:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> f&lt;span style="color:#f92672">.&lt;/span>write(md_text)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> print(&lt;span style="color:#e6db74">f&lt;/span>&lt;span style="color:#e6db74">&amp;#34;✓ Done: &lt;/span>&lt;span style="color:#e6db74">{&lt;/span>output_path&lt;span style="color:#e6db74">}&lt;/span>&lt;span style="color:#e6db74"> (&lt;/span>&lt;span style="color:#e6db74">{&lt;/span>len(md_text)&lt;span style="color:#e6db74">:&lt;/span>&lt;span style="color:#e6db74">,&lt;/span>&lt;span style="color:#e6db74">}&lt;/span>&lt;span style="color:#e6db74"> characters)&amp;#34;&lt;/span>)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">return&lt;/span> str(output_path)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#66d9ef">def&lt;/span> &lt;span style="color:#a6e22e">batch_convert&lt;/span>(input_dir: str, output_dir: str &lt;span style="color:#f92672">=&lt;/span> &lt;span style="color:#66d9ef">None&lt;/span>) &lt;span style="color:#f92672">-&amp;gt;&lt;/span> &lt;span style="color:#66d9ef">None&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#e6db74">&amp;#34;&amp;#34;&amp;#34;Convert all PDFs in a directory to Markdown.&amp;#34;&amp;#34;&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> input_path &lt;span style="color:#f92672">=&lt;/span> Path(input_dir)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">if&lt;/span> &lt;span style="color:#f92672">not&lt;/span> input_path&lt;span style="color:#f92672">.&lt;/span>is_dir():
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">raise&lt;/span> &lt;span style="color:#a6e22e">NotADirectoryError&lt;/span>(&lt;span style="color:#e6db74">f&lt;/span>&lt;span style="color:#e6db74">&amp;#34;Not a directory: &lt;/span>&lt;span style="color:#e6db74">{&lt;/span>input_dir&lt;span style="color:#e6db74">}&lt;/span>&lt;span style="color:#e6db74">&amp;#34;&lt;/span>)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> pdfs &lt;span style="color:#f92672">=&lt;/span> sorted(input_path&lt;span style="color:#f92672">.&lt;/span>glob(&lt;span style="color:#e6db74">&amp;#34;*.pdf&amp;#34;&lt;/span>))
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">if&lt;/span> &lt;span style="color:#f92672">not&lt;/span> pdfs:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> print(&lt;span style="color:#e6db74">f&lt;/span>&lt;span style="color:#e6db74">&amp;#34;No PDF files found in: &lt;/span>&lt;span style="color:#e6db74">{&lt;/span>input_dir&lt;span style="color:#e6db74">}&lt;/span>&lt;span style="color:#e6db74">&amp;#34;&lt;/span>)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> sys&lt;span style="color:#f92672">.&lt;/span>exit(&lt;span style="color:#ae81ff">0&lt;/span>)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">if&lt;/span> output_dir:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> output_dir &lt;span style="color:#f92672">=&lt;/span> Path(output_dir)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">else&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> output_dir &lt;span style="color:#f92672">=&lt;/span> input_path&lt;span style="color:#f92672">.&lt;/span>parent &lt;span style="color:#f92672">/&lt;/span> &lt;span style="color:#e6db74">&amp;#34;output&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> output_dir&lt;span style="color:#f92672">.&lt;/span>mkdir(parents&lt;span style="color:#f92672">=&lt;/span>&lt;span style="color:#66d9ef">True&lt;/span>, exist_ok&lt;span style="color:#f92672">=&lt;/span>&lt;span style="color:#66d9ef">True&lt;/span>)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> total &lt;span style="color:#f92672">=&lt;/span> len(pdfs)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> succeeded &lt;span style="color:#f92672">=&lt;/span> &lt;span style="color:#ae81ff">0&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> failed &lt;span style="color:#f92672">=&lt;/span> &lt;span style="color:#ae81ff">0&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> print(&lt;span style="color:#e6db74">f&lt;/span>&lt;span style="color:#e6db74">&amp;#34;&lt;/span>&lt;span style="color:#ae81ff">\n&lt;/span>&lt;span style="color:#e6db74">Batch mode: &lt;/span>&lt;span style="color:#e6db74">{&lt;/span>total&lt;span style="color:#e6db74">}&lt;/span>&lt;span style="color:#e6db74"> PDF(s) found in &amp;#39;&lt;/span>&lt;span style="color:#e6db74">{&lt;/span>input_dir&lt;span style="color:#e6db74">}&lt;/span>&lt;span style="color:#e6db74">&amp;#39;&amp;#34;&lt;/span>)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> print(&lt;span style="color:#e6db74">f&lt;/span>&lt;span style="color:#e6db74">&amp;#34;Output folder: &lt;/span>&lt;span style="color:#e6db74">{&lt;/span>output_dir&lt;span style="color:#e6db74">}&lt;/span>&lt;span style="color:#ae81ff">\n&lt;/span>&lt;span style="color:#e6db74">&amp;#34;&lt;/span>)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">for&lt;/span> i, pdf_path &lt;span style="color:#f92672">in&lt;/span> enumerate(pdfs, start&lt;span style="color:#f92672">=&lt;/span>&lt;span style="color:#ae81ff">1&lt;/span>):
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> print(&lt;span style="color:#e6db74">f&lt;/span>&lt;span style="color:#e6db74">&amp;#34;[&lt;/span>&lt;span style="color:#e6db74">{&lt;/span>i&lt;span style="color:#e6db74">}&lt;/span>&lt;span style="color:#e6db74">/&lt;/span>&lt;span style="color:#e6db74">{&lt;/span>total&lt;span style="color:#e6db74">}&lt;/span>&lt;span style="color:#e6db74">] &lt;/span>&lt;span style="color:#e6db74">{&lt;/span>pdf_path&lt;span style="color:#f92672">.&lt;/span>name&lt;span style="color:#e6db74">}&lt;/span>&lt;span style="color:#e6db74">&amp;#34;&lt;/span>)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> output_path &lt;span style="color:#f92672">=&lt;/span> output_dir &lt;span style="color:#f92672">/&lt;/span> pdf_path&lt;span style="color:#f92672">.&lt;/span>with_suffix(&lt;span style="color:#e6db74">&amp;#39;.md&amp;#39;&lt;/span>)&lt;span style="color:#f92672">.&lt;/span>name
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">try&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> convert_pdf_to_markdown(str(pdf_path), str(output_path))
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> succeeded &lt;span style="color:#f92672">+=&lt;/span> &lt;span style="color:#ae81ff">1&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">except&lt;/span> &lt;span style="color:#a6e22e">Exception&lt;/span> &lt;span style="color:#66d9ef">as&lt;/span> e:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> print(&lt;span style="color:#e6db74">f&lt;/span>&lt;span style="color:#e6db74">&amp;#34; ✗ Failed: &lt;/span>&lt;span style="color:#e6db74">{&lt;/span>e&lt;span style="color:#e6db74">}&lt;/span>&lt;span style="color:#e6db74">&amp;#34;&lt;/span>)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> failed &lt;span style="color:#f92672">+=&lt;/span> &lt;span style="color:#ae81ff">1&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> print()
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> print(&lt;span style="color:#e6db74">&amp;#34;─&amp;#34;&lt;/span> &lt;span style="color:#f92672">*&lt;/span> &lt;span style="color:#ae81ff">40&lt;/span>)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> print(&lt;span style="color:#e6db74">f&lt;/span>&lt;span style="color:#e6db74">&amp;#34;Batch complete: &lt;/span>&lt;span style="color:#e6db74">{&lt;/span>succeeded&lt;span style="color:#e6db74">}&lt;/span>&lt;span style="color:#e6db74"> converted, &lt;/span>&lt;span style="color:#e6db74">{&lt;/span>failed&lt;span style="color:#e6db74">}&lt;/span>&lt;span style="color:#e6db74"> failed&amp;#34;&lt;/span>)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> print(&lt;span style="color:#e6db74">f&lt;/span>&lt;span style="color:#e6db74">&amp;#34;Output folder: &lt;/span>&lt;span style="color:#e6db74">{&lt;/span>output_dir&lt;span style="color:#e6db74">}&lt;/span>&lt;span style="color:#e6db74">&amp;#34;&lt;/span>)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#66d9ef">def&lt;/span> &lt;span style="color:#a6e22e">main&lt;/span>():
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#e6db74">&amp;#34;&amp;#34;&amp;#34;Main CLI entry point&amp;#34;&amp;#34;&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> args &lt;span style="color:#f92672">=&lt;/span> sys&lt;span style="color:#f92672">.&lt;/span>argv[&lt;span style="color:#ae81ff">1&lt;/span>:]
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">if&lt;/span> &lt;span style="color:#f92672">not&lt;/span> args:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> print(&lt;span style="color:#e6db74">&amp;#34;Usage:&amp;#34;&lt;/span>)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> print(&lt;span style="color:#e6db74">&amp;#34; pdf2md &amp;lt;input.pdf&amp;gt; [output.md] # Convert a single PDF&amp;#34;&lt;/span>)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> print(&lt;span style="color:#e6db74">&amp;#34; pdf2md --batch &amp;lt;folder/&amp;gt; # Convert all PDFs in a folder&amp;#34;&lt;/span>)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> print(&lt;span style="color:#e6db74">&amp;#34; pdf2md --batch &amp;lt;folder/&amp;gt; --output &amp;lt;out_folder/&amp;gt; # Batch with custom output dir&amp;#34;&lt;/span>)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> print(&lt;span style="color:#e6db74">&amp;#34;&lt;/span>&lt;span style="color:#ae81ff">\n&lt;/span>&lt;span style="color:#e6db74">Examples:&amp;#34;&lt;/span>)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> print(&lt;span style="color:#e6db74">&amp;#34; pdf2md document.pdf # Creates document.md&amp;#34;&lt;/span>)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> print(&lt;span style="color:#e6db74">&amp;#34; pdf2md document.pdf custom.md # Creates custom.md&amp;#34;&lt;/span>)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> print(&lt;span style="color:#e6db74">&amp;#34; pdf2md --batch input/ # Converts all PDFs in input/&amp;#34;&lt;/span>)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> print(&lt;span style="color:#e6db74">&amp;#34; pdf2md --batch ~/documents/pdfs/ --output ~/knowledge-base/docs/&amp;#34;&lt;/span>)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> sys&lt;span style="color:#f92672">.&lt;/span>exit(&lt;span style="color:#ae81ff">1&lt;/span>)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">if&lt;/span> args[&lt;span style="color:#ae81ff">0&lt;/span>] &lt;span style="color:#f92672">==&lt;/span> &lt;span style="color:#e6db74">&amp;#34;--batch&amp;#34;&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> input_dir &lt;span style="color:#f92672">=&lt;/span> args[&lt;span style="color:#ae81ff">1&lt;/span>]
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> output_dir &lt;span style="color:#f92672">=&lt;/span> &lt;span style="color:#66d9ef">None&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">if&lt;/span> &lt;span style="color:#e6db74">&amp;#34;--output&amp;#34;&lt;/span> &lt;span style="color:#f92672">in&lt;/span> args:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> idx &lt;span style="color:#f92672">=&lt;/span> args&lt;span style="color:#f92672">.&lt;/span>index(&lt;span style="color:#e6db74">&amp;#34;--output&amp;#34;&lt;/span>)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> output_dir &lt;span style="color:#f92672">=&lt;/span> args[idx &lt;span style="color:#f92672">+&lt;/span> &lt;span style="color:#ae81ff">1&lt;/span>]
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> batch_convert(input_dir, output_dir)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">else&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> pdf_path &lt;span style="color:#f92672">=&lt;/span> args[&lt;span style="color:#ae81ff">0&lt;/span>]
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> output_path &lt;span style="color:#f92672">=&lt;/span> args[&lt;span style="color:#ae81ff">1&lt;/span>] &lt;span style="color:#66d9ef">if&lt;/span> len(args) &lt;span style="color:#f92672">&amp;gt;&lt;/span> &lt;span style="color:#ae81ff">1&lt;/span> &lt;span style="color:#66d9ef">else&lt;/span> &lt;span style="color:#66d9ef">None&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> convert_pdf_to_markdown(pdf_path, output_path)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#66d9ef">if&lt;/span> __name__ &lt;span style="color:#f92672">==&lt;/span> &lt;span style="color:#e6db74">&amp;#34;__main__&amp;#34;&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> main()
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>What I love about this code:&lt;/p>
&lt;ul>
&lt;li>&lt;strong>Smart defaults:&lt;/strong> If you don&amp;rsquo;t specify an output path, it just replaces &lt;code>.pdf&lt;/code> with &lt;code>.md&lt;/code>&lt;/li>
&lt;li>&lt;strong>Progress bars:&lt;/strong> &lt;code>tqdm&lt;/code> gives you a blue progress bar with page count&lt;/li>
&lt;li>&lt;strong>Batch mode:&lt;/strong> &lt;code>--batch&lt;/code> processes an entire folder at once, with optional &lt;code>--output&lt;/code> target&lt;/li>
&lt;li>&lt;strong>Helpful errors:&lt;/strong> Clear messages when things go wrong&lt;/li>
&lt;li>&lt;strong>Flexible usage:&lt;/strong> Works with relative paths, absolute paths, custom output names&lt;/li>
&lt;/ul>
&lt;p>Make it executable:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span>chmod +x pdf2md
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>And now it&amp;rsquo;s a proper command-line tool.&lt;/p>
&lt;hr>
&lt;h2 id="the-moment-of-truth-testing-with-real-data">The Moment of Truth: Testing with Real Data&lt;/h2>
&lt;p>Theory is great. But does it actually work?&lt;/p>
&lt;p>I grabbed that 1.3MB research paper on Generative Engine Optimization and ran:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span>python pdf2md input/test.pdf output/test.md
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>The output:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-text" data-lang="text">&lt;span style="display:flex;">&lt;span>Converting input/test.pdf to Markdown...
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Processing: 100%|████████████████| 12/12 [00:02&amp;lt;00:00, 5.8 pages/s]
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>✓ Done: output/test.md (73,463 characters)
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>&lt;strong>1.3MB PDF → 74KB of clean Markdown in seconds.&lt;/strong>&lt;/p>
&lt;p>I opened the output file, and there it was—perfectly formatted markdown:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-markdown" data-lang="markdown">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">## **GEO: Generative Engine Optimization**
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Pranjal Aggarwal [∗]
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Indian Institute of Technology Delhi
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>New Delhi, India
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>pranjal2041@gmail.com
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Ashwin Kalyan
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Independent
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Seattle, USA
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>asaavashwin@gmail.com
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>...
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Headers, formatting, structure—all preserved. No manual cleanup needed.&lt;/p>
&lt;p>Success.&lt;/p>
&lt;hr>
&lt;h2 id="what-this-unlocks">What This Unlocks&lt;/h2>
&lt;p>Now that I have PDFs converting to Markdown reliably, a whole world of possibilities opens up:&lt;/p>
&lt;h3 id="ai-workflows">AI Workflows&lt;/h3>
&lt;ul>
&lt;li>Feed research papers and documentation directly into Claude or other LLMs&lt;/li>
&lt;li>Build RAG (Retrieval Augmented Generation) pipelines backed by your document library&lt;/li>
&lt;li>Process technical documentation at scale without losing structure&lt;/li>
&lt;/ul>
&lt;h3 id="knowledge-management">Knowledge Management&lt;/h3>
&lt;ul>
&lt;li>Import PDFs into your Obsidian vault automatically&lt;/li>
&lt;li>Version control document content (because it&amp;rsquo;s now plain text in git)&lt;/li>
&lt;li>Full-text search across your entire converted document library&lt;/li>
&lt;/ul>
&lt;h3 id="automation-ideas">Automation Ideas&lt;/h3>
&lt;ul>
&lt;li>Watch folder that auto-converts any dropped PDFs&lt;/li>
&lt;li>Batch process entire directories of reports, papers, or manuals&lt;/li>
&lt;li>Feed converted markdown directly into a vector database&lt;/li>
&lt;li>API wrapper to convert PDFs via HTTP requests&lt;/li>
&lt;/ul>
&lt;hr>
&lt;h2 id="lessons-learned-especially-for-cli-beginners">Lessons Learned (Especially for CLI Beginners)&lt;/h2>
&lt;h3 id="1-virtual-environments-are-non-negotiable">1. Virtual Environments Are Non-Negotiable&lt;/h3>
&lt;p>Every Python project should live in its own virtual environment. Always:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span>python3 -m venv venv
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>source venv/bin/activate
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>pip install --upgrade pip
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>This keeps dependencies isolated and projects reproducible.&lt;/p>
&lt;h3 id="2-bleeding-edge-isnt-always-better">2. Bleeding-Edge Isn&amp;rsquo;t Always Better&lt;/h3>
&lt;p>Python 3.14 is awesome, but sometimes mature tooling (like PyMuPDF) that &amp;ldquo;just works&amp;rdquo; beats bleeding-edge alternatives. Don&amp;rsquo;t be afraid to pivot when something doesn&amp;rsquo;t work.&lt;/p>
&lt;h3 id="3-test-with-real-data">3. Test With Real Data&lt;/h3>
&lt;p>I didn&amp;rsquo;t test with &amp;ldquo;hello.pdf&amp;rdquo; containing two sentences. I tested with a 1.3MB research paper. Real data reveals real issues (or in this case, confirms it works beautifully).&lt;/p>
&lt;h3 id="4-document-as-you-build">4. Document As You Build&lt;/h3>
&lt;p>Writing the README alongside the code made the project immediately understandable. Future-me will thank present-me.&lt;/p>
&lt;h3 id="5-claude-code--pai--superpowers">5. Claude Code + PAI = Superpowers&lt;/h3>
&lt;p>Working with Claude through the PAI infrastructure meant I had a senior developer helping me think through:&lt;/p>
&lt;ul>
&lt;li>Project structure (first principles)&lt;/li>
&lt;li>Library selection (when to pivot)&lt;/li>
&lt;li>Code organization (clean, maintainable)&lt;/li>
&lt;li>Real-world usage patterns&lt;/li>
&lt;/ul>
&lt;p>This wasn&amp;rsquo;t just coding faster—it was learning better patterns while building.&lt;/p>
&lt;hr>
&lt;h2 id="usage-examples">Usage Examples&lt;/h2>
&lt;h3 id="basic-conversion">Basic Conversion&lt;/h3>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e"># Activate environment first (always!)&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>source venv/bin/activate
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e"># Convert a PDF&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>python pdf2md document.pdf
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e"># Custom output name&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>python pdf2md research.pdf my-notes.md
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e"># Full paths&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>python pdf2md ~/Downloads/paper.pdf ~/Documents/notes.md
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h3 id="batch-processing">Batch Processing&lt;/h3>
&lt;p>Convert an entire folder of PDFs:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span>source venv/bin/activate
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e"># Convert all PDFs in a folder (output goes to output/ by default)&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>python pdf2md --batch ~/documents/pdfs/
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e"># Convert to a specific knowledge base directory&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>python pdf2md --batch ~/documents/pdfs/ --output ~/knowledge-base/docs/
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h3 id="add-to-path-optional">Add to PATH (Optional)&lt;/h3>
&lt;p>To use &lt;code>pdf2md&lt;/code> from anywhere:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e"># Add to ~/.zshrc&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>export PATH&lt;span style="color:#f92672">=&lt;/span>&lt;span style="color:#e6db74">&amp;#34;/Users/dsa/projects/pdf-to-markdown:&lt;/span>$PATH&lt;span style="color:#e6db74">&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e"># Then run from anywhere&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>pdf2md ~/Downloads/paper.pdf ~/Documents/paper.md
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;hr>
&lt;h2 id="whats-next">What&amp;rsquo;s Next?&lt;/h2>
&lt;p>This tool works great as-is, but there are some exciting enhancements on the roadmap:&lt;/p>
&lt;h3 id="immediate-improvements">Immediate Improvements&lt;/h3>
&lt;ul>
&lt;li>&lt;strong>Better layout analysis:&lt;/strong> Install &lt;code>pymupdf_layout&lt;/code> for improved structure detection on complex documents&lt;/li>
&lt;li>&lt;strong>Recursive batch mode:&lt;/strong> Process nested folder structures, not just flat directories&lt;/li>
&lt;/ul>
&lt;h3 id="future-integrations">Future Integrations&lt;/h3>
&lt;ul>
&lt;li>&lt;strong>RAG pipeline:&lt;/strong> Auto-feed converted markdown into a vector database&lt;/li>
&lt;li>&lt;strong>Obsidian plugin:&lt;/strong> Detect PDFs in vault and convert automatically&lt;/li>
&lt;li>&lt;strong>FastAPI wrapper:&lt;/strong> Create an HTTP API for web apps to use&lt;/li>
&lt;li>&lt;strong>Electron/Tauri app:&lt;/strong> Build a desktop GUI for non-technical users&lt;/li>
&lt;/ul>
&lt;hr>
&lt;h2 id="the-bigger-picture-why-this-matters">The Bigger Picture: Why This Matters&lt;/h2>
&lt;p>This project is tiny—roughly 100 lines of Python, 30 minutes of work. But it represents something bigger:&lt;/p>
&lt;p>&lt;strong>The ability to build tools that solve your actual problems.&lt;/strong>&lt;/p>
&lt;p>I had a workflow friction (PDFs don&amp;rsquo;t work well with AI tools). I built a solution. Now that friction is gone, and I can focus on higher-level work.&lt;/p>
&lt;p>And the data is clear: converting your document library to Markdown isn&amp;rsquo;t a nice-to-have. It&amp;rsquo;s a multiplier on every AI workflow that follows. Up to 70% fewer tokens consumed. 84% fewer retrieval failures. 50% fewer incorrect answers. These aren&amp;rsquo;t marginal improvements—they&amp;rsquo;re transformational.&lt;/p>
&lt;p>Working with Claude Code through PAI accelerated all of this. It&amp;rsquo;s like having a patient senior developer sitting next to you, suggesting better approaches, catching errors before they happen, and explaining &lt;em>why&lt;/em> certain patterns work.&lt;/p>
&lt;hr>
&lt;h2 id="resources">Resources&lt;/h2>
&lt;ul>
&lt;li>&lt;strong>PyMuPDF4LLM Docs:&lt;/strong> &lt;a href="https://pymupdf.readthedocs.io/en/latest/pymupdf4llm/" target="_blank" rel="noopener noreferrer">https://pymupdf.readthedocs.io/en/latest/pymupdf4llm/&lt;/a>
&lt;/li>
&lt;li>&lt;strong>PyMuPDF GitHub:&lt;/strong> &lt;a href="https://github.com/pymupdf/PyMuPDF" target="_blank" rel="noopener noreferrer">https://github.com/pymupdf/PyMuPDF&lt;/a>
&lt;/li>
&lt;/ul>
&lt;h3 id="citations-markdown-vs-pdf-for-llms">Citations: Markdown vs PDF for LLMs&lt;/h3>
&lt;ul>
&lt;li>&lt;strong>Why PDFs Fail Under LLM Parsing&lt;/strong> — Steven Howard, Untethered AI: &lt;a href="https://untetheredai.substack.com/p/why-pdfs-fail-under-llm-parsing" target="_blank" rel="noopener noreferrer">https://untetheredai.substack.com/p/why-pdfs-fail-under-llm-parsing&lt;/a>
&lt;/li>
&lt;li>&lt;strong>PDF vs Markdown for AI: Token Efficiency&lt;/strong> — MarkdownConverters: &lt;a href="https://markdownconverters.com/blog/pdf-vs-markdown-ai-tokens" target="_blank" rel="noopener noreferrer">https://markdownconverters.com/blog/pdf-vs-markdown-ai-tokens&lt;/a>
&lt;/li>
&lt;li>&lt;strong>Revolutionizing RAG with Enhanced PDF Structure Recognition&lt;/strong> — arXiv:2401.12599 (2024): &lt;a href="https://arxiv.org/abs/2401.12599" target="_blank" rel="noopener noreferrer">https://arxiv.org/abs/2401.12599&lt;/a>
&lt;/li>
&lt;li>&lt;strong>Approaches to PDF Data Extraction for Information Retrieval&lt;/strong> — NVIDIA Technical Blog: &lt;a href="https://developer.nvidia.com/blog/approaches-to-pdf-data-extraction-for-information-retrieval/" target="_blank" rel="noopener noreferrer">https://developer.nvidia.com/blog/approaches-to-pdf-data-extraction-for-information-retrieval/&lt;/a>
&lt;/li>
&lt;li>&lt;strong>Improved RAG Document Processing With Markdown&lt;/strong> — Dr. Leon Eversberg, Towards Data Science: &lt;a href="https://medium.com/data-science/improved-rag-document-processing-with-markdown-426a2e0dd82b" target="_blank" rel="noopener noreferrer">https://medium.com/data-science/improved-rag-document-processing-with-markdown-426a2e0dd82b&lt;/a>
&lt;/li>
&lt;li>&lt;strong>Contextual Chunking: Boost Your RAG Retrieval Accuracy&lt;/strong> — Unstructured.io: &lt;a href="https://unstructured.io/blog/contextual-chunking-in-unstructured-platform-boost-your-rag-retrieval-accuracy" target="_blank" rel="noopener noreferrer">https://unstructured.io/blog/contextual-chunking-in-unstructured-platform-boost-your-rag-retrieval-accuracy&lt;/a>
&lt;/li>
&lt;li>&lt;strong>Boosting AI Performance: The Power of LLM-Friendly Content in Markdown&lt;/strong> — Webex Developers Blog: &lt;a href="https://developer.webex.com/blog/boosting-ai-performance-the-power-of-llm-friendly-content-in-markdown" target="_blank" rel="noopener noreferrer">https://developer.webex.com/blog/boosting-ai-performance-the-power-of-llm-friendly-content-in-markdown&lt;/a>
&lt;/li>
&lt;/ul>
&lt;hr>
&lt;p>&lt;strong>Happy converting!&lt;/strong>&lt;/p></content></item><item><title>Deploying a Hugo Site to Namecheap with PAI</title><link>https://augmentedresilience.com/posts/augmented-resilience-posts/deploying-a-hugo-site-to-namecheap-with-pai/</link><pubDate>Sun, 15 Feb 2026 00:00:00 +0000</pubDate><guid>https://augmentedresilience.com/posts/augmented-resilience-posts/deploying-a-hugo-site-to-namecheap-with-pai/</guid><description>&lt;p>I recently deployed my Hugo blog to Namecheap shared hosting, using Obsidian as my content editor and Claude Code with PAI (Personal AI) as my copilot. Here&amp;rsquo;s a walkthrough of every step, from fixing build errors to setting up a fully automated pipeline that goes from Obsidian to live site in a single command.&lt;/p>
&lt;h2 id="the-starting-point">The Starting Point&lt;/h2>
&lt;p>I created a Hugo blog project called &lt;strong>Augmented Resilience&lt;/strong> and used the &lt;a href="https://github.com/mirus-ua/hugo-theme-re-terminal" target="_blank" rel="noopener noreferrer">re-terminal&lt;/a>
theme, a Namecheap shared hosting account, and a GitHub repository. I used Claude Code in VS Code editor and leveraged Daniel Miessler&amp;rsquo;s Personal AI infrastructure. The goal: get the site live at &lt;a href="https://augmentedresilience.com" target="_blank" rel="noopener noreferrer">augmentedresilience.com&lt;/a>
with a push-to-deploy workflow.&lt;/p></description><content>&lt;p>I recently deployed my Hugo blog to Namecheap shared hosting, using Obsidian as my content editor and Claude Code with PAI (Personal AI) as my copilot. Here&amp;rsquo;s a walkthrough of every step, from fixing build errors to setting up a fully automated pipeline that goes from Obsidian to live site in a single command.&lt;/p>
&lt;h2 id="the-starting-point">The Starting Point&lt;/h2>
&lt;p>I created a Hugo blog project called &lt;strong>Augmented Resilience&lt;/strong> and used the &lt;a href="https://github.com/mirus-ua/hugo-theme-re-terminal" target="_blank" rel="noopener noreferrer">re-terminal&lt;/a>
theme, a Namecheap shared hosting account, and a GitHub repository. I used Claude Code in VS Code editor and leveraged Daniel Miessler&amp;rsquo;s Personal AI infrastructure. The goal: get the site live at &lt;a href="https://augmentedresilience.com" target="_blank" rel="noopener noreferrer">augmentedresilience.com&lt;/a>
with a push-to-deploy workflow.&lt;/p>
&lt;p>For context, the Personal AI Infrastructure System (PAI) from Daniel Miessler (see resources below) is an open-source framework that wraps around Claude Code and turns it into a structured problem-solving system. Instead of just chatting with an AI, PAI runs every request through a 7-phase algorithm — observe, think, plan, build, execute, verify, learn — so nothing gets skipped. It maintains persistent memory across sessions (so it remembers my project structure, preferences, and past decisions), automatically selects specialized agents for different tasks (security review, architecture, engineering), and enforces verification criteria before declaring anything &amp;ldquo;done.&amp;rdquo; For this project, PAI handled everything from debugging Hugo build errors to writing the deploy script to catching sensitive data I accidentally left in this blog post before it went live. It wasn&amp;rsquo;t just an AI assistant — it was the entire workflow engine. I found it easier to use it within VS Code (&lt;em>still getting used to using the command line interface&lt;/em>).&lt;/p>
&lt;h2 id="step-1-fixing-the-hugo-build">Step 1: Fixing the Hugo Build&lt;/h2>
&lt;p>The first issue was a build error:&lt;/p>
&lt;pre tabindex="0">&lt;code>module &amp;#34;hugo-theme-re-terminal&amp;#34; not found
&lt;/code>&lt;/pre>&lt;p>The problem was a mismatch between the theme name in &lt;code>hugo.toml&lt;/code> and the actual directory name. The theme was installed as a git submodule at &lt;code>themes/re-terminal/&lt;/code>, but the config referenced &lt;code>hugo-theme-re-terminal&lt;/code>.&lt;/p>
&lt;p>&lt;strong>Fix:&lt;/strong> Change the theme name in &lt;code>hugo.toml&lt;/code>:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-toml" data-lang="toml">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#a6e22e">theme&lt;/span> = &lt;span style="color:#e6db74">&amp;#34;re-terminal&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>After that, &lt;code>hugo&lt;/code> built the site successfully, generating the &lt;code>public/&lt;/code> folder with all the static files.&lt;/p>
&lt;h2 id="step-2-setting-up-the-github-repository">Step 2: Setting Up the GitHub Repository&lt;/h2>
&lt;p>I initialized the repo and connected it to GitHub:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span>git init
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>git remote add origin git@github.com:dsacosta/Augmented-Resilience.git
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>git add .
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>git commit -m &lt;span style="color:#e6db74">&amp;#34;my first commit&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>git push origin main
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>One gotcha: I initially typed &lt;code>orgin&lt;/code> instead of &lt;code>origin&lt;/code> in the remote add command. Typos happen — double-check your remote names with &lt;code>git remote -v&lt;/code>.&lt;/p>
&lt;h2 id="step-3-connecting-namecheap-to-github-via-ssh">Step 3: Connecting Namecheap to GitHub via SSH&lt;/h2>
&lt;p>This was the trickiest part. Namecheap shared hosting needs an SSH key to clone from a private GitHub repo. Here&amp;rsquo;s what worked:&lt;/p>
&lt;h3 id="generate-an-ssh-key-on-namecheap">Generate an SSH Key on Namecheap&lt;/h3>
&lt;ol>
&lt;li>Log into &lt;strong>cPanel&lt;/strong> on Namecheap&lt;/li>
&lt;li>Go to &lt;strong>SSH Access&lt;/strong> → &lt;strong>Manage SSH Keys&lt;/strong> → &lt;strong>Generate a New Key&lt;/strong>&lt;/li>
&lt;li>Generate an RSA key (I used the default settings)&lt;/li>
&lt;/ol>
&lt;h3 id="remove-the-passphrase">Remove the Passphrase&lt;/h3>
&lt;p>This is critical. cPanel&amp;rsquo;s Git Version Control runs non-interactively, so it can&amp;rsquo;t prompt for a passphrase. I opened &lt;strong>cPanel Terminal&lt;/strong> and ran:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span>ssh-keygen -p -f ~/.ssh/id_rsa
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Enter the old passphrase, then press Enter twice for no new passphrase.&lt;/p>
&lt;h3 id="add-the-public-key-to-github">Add the Public Key to GitHub&lt;/h3>
&lt;ol>
&lt;li>On Namecheap&amp;rsquo;s cPanel Terminal, run: &lt;code>cat ~/.ssh/id_rsa.pub&lt;/code>&lt;/li>
&lt;li>Copy the output&lt;/li>
&lt;li>Go to your GitHub repo → &lt;strong>Settings&lt;/strong> → &lt;strong>Deploy Keys&lt;/strong> → &lt;strong>Add deploy key&lt;/strong>&lt;/li>
&lt;li>Paste the public key and save&lt;/li>
&lt;/ol>
&lt;h3 id="verify-the-connection">Verify the Connection&lt;/h3>
&lt;p>From cPanel Terminal:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span>ssh -T git@github.com
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>You should see: &lt;code>Hi dsacosta/Augmented-Resilience! You've successfully authenticated...&lt;/code>&lt;/p>
&lt;h2 id="step-4-clone-the-repo-on-namecheap">Step 4: Clone the Repo on Namecheap&lt;/h2>
&lt;ol>
&lt;li>In cPanel, go to &lt;strong>Git Version Control&lt;/strong> → &lt;strong>Create&lt;/strong>&lt;/li>
&lt;li>Toggle &lt;strong>Clone a Repository&lt;/strong> on&lt;/li>
&lt;li>Enter the clone URL: &lt;code>git@github.com:dsacosta/Augmented-Resilience.git&lt;/code>&lt;/li>
&lt;li>Set the repository path (I used &lt;code>/home/yourusername/your-repo&lt;/code>)&lt;/li>
&lt;li>Click &lt;strong>Create&lt;/strong>&lt;/li>
&lt;/ol>
&lt;p>Important: Don&amp;rsquo;t clone directly into &lt;code>public_html&lt;/code> or your domain folder — it likely already has files and will error out. Clone to a separate directory and use deployment to copy files over.&lt;/p>
&lt;h2 id="step-5-auto-deployment-with-cpanelyml">Step 5: Auto-Deployment with .cpanel.yml&lt;/h2>
&lt;p>cPanel supports automatic deployment tasks via a &lt;code>.cpanel.yml&lt;/code> file in the repo root. This file tells cPanel what to do after each pull:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-yaml" data-lang="yaml">&lt;span style="display:flex;">&lt;span>---
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f92672">deployment&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#f92672">tasks&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> - &lt;span style="color:#ae81ff">export DEPLOYPATH=/home/yourusername/yourdomain.com/&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> - &lt;span style="color:#ae81ff">/bin/cp -R public/* $DEPLOYPATH&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>This copies everything from the &lt;code>public/&lt;/code> folder (Hugo&amp;rsquo;s build output) into the live site directory.&lt;/p>
&lt;p>After pushing this file to GitHub:&lt;/p>
&lt;ol>
&lt;li>Go to &lt;strong>Git Version Control&lt;/strong> → &lt;strong>Manage&lt;/strong> your repo&lt;/li>
&lt;li>Click the &lt;strong>Pull or Deploy&lt;/strong> tab&lt;/li>
&lt;li>Click &lt;strong>Update from Remote&lt;/strong> to pull the latest&lt;/li>
&lt;li>Click &lt;strong>Deploy HEAD Commit&lt;/strong> to trigger the &lt;code>.cpanel.yml&lt;/code> tasks&lt;/li>
&lt;/ol>
&lt;p>Your site should now be live.&lt;/p>
&lt;h2 id="step-6-fully-automated-deploys-with-github-actions">Step 6: Fully Automated Deploys with GitHub Actions&lt;/h2>
&lt;p>To eliminate the manual &amp;ldquo;pull and deploy&amp;rdquo; step in cPanel, I set up a GitHub Actions workflow that SSHs into Namecheap and triggers the pull automatically on every push.&lt;/p>
&lt;h3 id="generate-a-deploy-key">Generate a Deploy Key&lt;/h3>
&lt;p>On your local machine, generate a key pair with no passphrase:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span>ssh-keygen -t ed25519 -C &lt;span style="color:#e6db74">&amp;#34;github-actions-deploy&amp;#34;&lt;/span> -f ~/.ssh/deploy_key -N &lt;span style="color:#e6db74">&amp;#34;&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Add the &lt;strong>public key&lt;/strong> to Namecheap:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e"># In cPanel Terminal on Namecheap:&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>echo &lt;span style="color:#e6db74">&amp;#34;ssh-ed25519 AAAA...your-key-here github-actions-deploy&amp;#34;&lt;/span> &amp;gt;&amp;gt; ~/.ssh/authorized_keys
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h3 id="add-secrets-to-github">Add Secrets to GitHub&lt;/h3>
&lt;p>Go to your repo → &lt;strong>Settings&lt;/strong> → &lt;strong>Secrets and variables&lt;/strong> → &lt;strong>Actions&lt;/strong> and add:&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Secret&lt;/th>
&lt;th>Value&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>&lt;code>NC_HOST&lt;/code>&lt;/td>
&lt;td>&lt;code>augmentedresilience.com&lt;/code>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>NC_USER&lt;/code>&lt;/td>
&lt;td>Your cPanel username&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>NC_PORT&lt;/code>&lt;/td>
&lt;td>Your SSH port (check cPanel)&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>NC_SSH_KEY&lt;/code>&lt;/td>
&lt;td>The full private key (including BEGIN/END lines)&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;h3 id="create-the-workflow">Create the Workflow&lt;/h3>
&lt;p>Add &lt;code>.github/workflows/deploy.yml&lt;/code> to your repo:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-yaml" data-lang="yaml">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f92672">name&lt;/span>: &lt;span style="color:#ae81ff">Deploy to Namecheap&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f92672">on&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#f92672">push&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#f92672">branches&lt;/span>: [&lt;span style="color:#ae81ff">main]&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f92672">jobs&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#f92672">deploy&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#f92672">runs-on&lt;/span>: &lt;span style="color:#ae81ff">ubuntu-latest&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#f92672">steps&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> - &lt;span style="color:#f92672">name&lt;/span>: &lt;span style="color:#ae81ff">Deploy via SSH&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#f92672">uses&lt;/span>: &lt;span style="color:#ae81ff">appleboy/ssh-action@v1&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#f92672">with&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#f92672">host&lt;/span>: &lt;span style="color:#ae81ff">${{ secrets.NC_HOST }}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#f92672">username&lt;/span>: &lt;span style="color:#ae81ff">${{ secrets.NC_USER }}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#f92672">key&lt;/span>: &lt;span style="color:#ae81ff">${{ secrets.NC_SSH_KEY }}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#f92672">port&lt;/span>: &lt;span style="color:#ae81ff">${{ secrets.NC_PORT }}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#f92672">script&lt;/span>: |&lt;span style="color:#e6db74">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#e6db74"> cd ~/your-repo &amp;amp;&amp;amp; git pull origin main &amp;amp;&amp;amp; /bin/cp -R public/* ~/yourdomain.com/&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Now every push to &lt;code>main&lt;/code> automatically deploys to your live site.&lt;/p>
&lt;h2 id="step-7-one-command-deploy-script">Step 7: One-Command Deploy Script&lt;/h2>
&lt;p>Five manual commands every time you publish? That&amp;rsquo;s not a workflow — that&amp;rsquo;s a chore. I had Claude write a Python script that handles everything in one shot:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-python" data-lang="python">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">#!/usr/bin/env python3&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#e6db74">&amp;#34;&amp;#34;&amp;#34;One-command deploy: Obsidian → Hugo → GitHub → Live site.&amp;#34;&amp;#34;&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f92672">import&lt;/span> subprocess
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f92672">import&lt;/span> sys
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f92672">from&lt;/span> datetime &lt;span style="color:#f92672">import&lt;/span> datetime
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>PROJECT_DIR &lt;span style="color:#f92672">=&lt;/span> &lt;span style="color:#e6db74">&amp;#34;~/Documents/Augmented-Resilience&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>OBSIDIAN_POSTS &lt;span style="color:#f92672">=&lt;/span> &lt;span style="color:#e6db74">&amp;#34;~/projects/obsidian-vault/30-projects/augmented-resilience-posts&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>HUGO_POSTS &lt;span style="color:#f92672">=&lt;/span> &lt;span style="color:#e6db74">f&lt;/span>&lt;span style="color:#e6db74">&amp;#34;&lt;/span>&lt;span style="color:#e6db74">{&lt;/span>PROJECT_DIR&lt;span style="color:#e6db74">}&lt;/span>&lt;span style="color:#e6db74">/content/posts&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#66d9ef">def&lt;/span> &lt;span style="color:#a6e22e">run&lt;/span>(cmd, description, cwd&lt;span style="color:#f92672">=&lt;/span>PROJECT_DIR):
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#e6db74">&amp;#34;&amp;#34;&amp;#34;Run a command and print status.&amp;#34;&amp;#34;&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> print(&lt;span style="color:#e6db74">f&lt;/span>&lt;span style="color:#e6db74">&amp;#34;&lt;/span>&lt;span style="color:#ae81ff">\n&lt;/span>&lt;span style="color:#e6db74">{&lt;/span>&lt;span style="color:#e6db74">&amp;#39;=&amp;#39;&lt;/span>&lt;span style="color:#f92672">*&lt;/span>&lt;span style="color:#ae81ff">50&lt;/span>&lt;span style="color:#e6db74">}&lt;/span>&lt;span style="color:#e6db74">&amp;#34;&lt;/span>)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> print(&lt;span style="color:#e6db74">f&lt;/span>&lt;span style="color:#e6db74">&amp;#34; &lt;/span>&lt;span style="color:#e6db74">{&lt;/span>description&lt;span style="color:#e6db74">}&lt;/span>&lt;span style="color:#e6db74">&amp;#34;&lt;/span>)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> print(&lt;span style="color:#e6db74">f&lt;/span>&lt;span style="color:#e6db74">&amp;#34;&lt;/span>&lt;span style="color:#e6db74">{&lt;/span>&lt;span style="color:#e6db74">&amp;#39;=&amp;#39;&lt;/span>&lt;span style="color:#f92672">*&lt;/span>&lt;span style="color:#ae81ff">50&lt;/span>&lt;span style="color:#e6db74">}&lt;/span>&lt;span style="color:#e6db74">&amp;#34;&lt;/span>)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> result &lt;span style="color:#f92672">=&lt;/span> subprocess&lt;span style="color:#f92672">.&lt;/span>run(cmd, shell&lt;span style="color:#f92672">=&lt;/span>&lt;span style="color:#66d9ef">True&lt;/span>, cwd&lt;span style="color:#f92672">=&lt;/span>cwd)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">if&lt;/span> result&lt;span style="color:#f92672">.&lt;/span>returncode &lt;span style="color:#f92672">!=&lt;/span> &lt;span style="color:#ae81ff">0&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> print(&lt;span style="color:#e6db74">f&lt;/span>&lt;span style="color:#e6db74">&amp;#34;&lt;/span>&lt;span style="color:#ae81ff">\n&lt;/span>&lt;span style="color:#e6db74"> FAILED: &lt;/span>&lt;span style="color:#e6db74">{&lt;/span>description&lt;span style="color:#e6db74">}&lt;/span>&lt;span style="color:#e6db74">&amp;#34;&lt;/span>)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> sys&lt;span style="color:#f92672">.&lt;/span>exit(&lt;span style="color:#ae81ff">1&lt;/span>)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">return&lt;/span> result
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#66d9ef">def&lt;/span> &lt;span style="color:#a6e22e">main&lt;/span>():
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> msg &lt;span style="color:#f92672">=&lt;/span> &lt;span style="color:#e6db74">&amp;#34; &amp;#34;&lt;/span>&lt;span style="color:#f92672">.&lt;/span>join(sys&lt;span style="color:#f92672">.&lt;/span>argv[&lt;span style="color:#ae81ff">1&lt;/span>:]) &lt;span style="color:#66d9ef">if&lt;/span> len(sys&lt;span style="color:#f92672">.&lt;/span>argv) &lt;span style="color:#f92672">&amp;gt;&lt;/span> &lt;span style="color:#ae81ff">1&lt;/span> &lt;span style="color:#66d9ef">else&lt;/span> &lt;span style="color:#e6db74">f&lt;/span>&lt;span style="color:#e6db74">&amp;#34;Site update &lt;/span>&lt;span style="color:#e6db74">{&lt;/span>datetime&lt;span style="color:#f92672">.&lt;/span>now()&lt;span style="color:#f92672">.&lt;/span>strftime(&lt;span style="color:#e6db74">&amp;#39;%Y-%m-&lt;/span>&lt;span style="color:#e6db74">%d&lt;/span>&lt;span style="color:#e6db74"> %H:%M&amp;#39;&lt;/span>)&lt;span style="color:#e6db74">}&lt;/span>&lt;span style="color:#e6db74">&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> run(&lt;span style="color:#e6db74">f&lt;/span>&lt;span style="color:#e6db74">&amp;#39;rsync -av --delete &amp;#34;&lt;/span>&lt;span style="color:#e6db74">{&lt;/span>OBSIDIAN_POSTS&lt;span style="color:#e6db74">}&lt;/span>&lt;span style="color:#e6db74">&amp;#34; &amp;#34;&lt;/span>&lt;span style="color:#e6db74">{&lt;/span>HUGO_POSTS&lt;span style="color:#e6db74">}&lt;/span>&lt;span style="color:#e6db74">&amp;#34;&amp;#39;&lt;/span>, &lt;span style="color:#e6db74">&amp;#34;Syncing posts from Obsidian&amp;#34;&lt;/span>)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> run(&lt;span style="color:#e6db74">f&lt;/span>&lt;span style="color:#e6db74">&amp;#34;python3 &lt;/span>&lt;span style="color:#e6db74">{&lt;/span>PROJECT_DIR&lt;span style="color:#e6db74">}&lt;/span>&lt;span style="color:#e6db74">/images.py&amp;#34;&lt;/span>, &lt;span style="color:#e6db74">&amp;#34;Processing images&amp;#34;&lt;/span>)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> run(&lt;span style="color:#e6db74">&amp;#34;hugo&amp;#34;&lt;/span>, &lt;span style="color:#e6db74">&amp;#34;Building site with Hugo&amp;#34;&lt;/span>)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> run(&lt;span style="color:#e6db74">&amp;#34;git add .&amp;#34;&lt;/span>, &lt;span style="color:#e6db74">&amp;#34;Staging changes&amp;#34;&lt;/span>)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> result &lt;span style="color:#f92672">=&lt;/span> subprocess&lt;span style="color:#f92672">.&lt;/span>run(&lt;span style="color:#e6db74">&amp;#34;git diff --cached --quiet&amp;#34;&lt;/span>, shell&lt;span style="color:#f92672">=&lt;/span>&lt;span style="color:#66d9ef">True&lt;/span>, cwd&lt;span style="color:#f92672">=&lt;/span>PROJECT_DIR)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">if&lt;/span> result&lt;span style="color:#f92672">.&lt;/span>returncode &lt;span style="color:#f92672">==&lt;/span> &lt;span style="color:#ae81ff">0&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> print(&lt;span style="color:#e6db74">&amp;#34;&lt;/span>&lt;span style="color:#ae81ff">\n&lt;/span>&lt;span style="color:#e6db74"> No changes to commit. Site is up to date.&amp;#34;&lt;/span>)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">return&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> run(&lt;span style="color:#e6db74">f&lt;/span>&lt;span style="color:#e6db74">&amp;#39;git commit -m &amp;#34;&lt;/span>&lt;span style="color:#e6db74">{&lt;/span>msg&lt;span style="color:#e6db74">}&lt;/span>&lt;span style="color:#e6db74">&amp;#34;&amp;#39;&lt;/span>, &lt;span style="color:#e6db74">&amp;#34;Committing&amp;#34;&lt;/span>)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> run(&lt;span style="color:#e6db74">&amp;#34;git push origin main&amp;#34;&lt;/span>, &lt;span style="color:#e6db74">&amp;#34;Pushing to GitHub&amp;#34;&lt;/span>)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> print(&lt;span style="color:#e6db74">f&lt;/span>&lt;span style="color:#e6db74">&amp;#34;&lt;/span>&lt;span style="color:#ae81ff">\n&lt;/span>&lt;span style="color:#e6db74">{&lt;/span>&lt;span style="color:#e6db74">&amp;#39;=&amp;#39;&lt;/span>&lt;span style="color:#f92672">*&lt;/span>&lt;span style="color:#ae81ff">50&lt;/span>&lt;span style="color:#e6db74">}&lt;/span>&lt;span style="color:#e6db74">&amp;#34;&lt;/span>)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> print(&lt;span style="color:#e6db74">&amp;#34; DEPLOYED! Your site will be live shortly.&amp;#34;&lt;/span>)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> print(&lt;span style="color:#e6db74">f&lt;/span>&lt;span style="color:#e6db74">&amp;#34;&lt;/span>&lt;span style="color:#e6db74">{&lt;/span>&lt;span style="color:#e6db74">&amp;#39;=&amp;#39;&lt;/span>&lt;span style="color:#f92672">*&lt;/span>&lt;span style="color:#ae81ff">50&lt;/span>&lt;span style="color:#e6db74">}&lt;/span>&lt;span style="color:#ae81ff">\n&lt;/span>&lt;span style="color:#e6db74">&amp;#34;&lt;/span>)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#66d9ef">if&lt;/span> __name__ &lt;span style="color:#f92672">==&lt;/span> &lt;span style="color:#e6db74">&amp;#34;__main__&amp;#34;&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> main()
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Save this as &lt;code>deploy.py&lt;/code> in your project root. Now the entire workflow is:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e"># Default timestamped commit message&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>python3 deploy.py
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e"># Or with a custom message&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>python3 deploy.py &lt;span style="color:#e6db74">&amp;#34;Add new blog post about deployment&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>The script runs every step in sequence — syncs from Obsidian, converts image links, builds with Hugo, commits, and pushes. If any step fails, it stops immediately so you don&amp;rsquo;t push a broken build. Combined with the GitHub Actions workflow from Step 6, pushing triggers the auto-deploy to Namecheap. One command, fully live.&lt;/p>
&lt;h2 id="lessons-learned">Lessons Learned&lt;/h2>
&lt;ul>
&lt;li>&lt;strong>SSH passphrases break cPanel automation.&lt;/strong> Always remove the passphrase from keys used by cPanel&amp;rsquo;s Git Version Control.&lt;/li>
&lt;li>&lt;strong>Theme names must match directory names.&lt;/strong> Hugo looks for the theme in &lt;code>themes/&amp;lt;theme-name&amp;gt;/&lt;/code>, so the &lt;code>theme&lt;/code> value in your config must match exactly.&lt;/li>
&lt;li>&lt;strong>Don&amp;rsquo;t clone into the live site directory.&lt;/strong> Clone to a separate folder and use &lt;code>.cpanel.yml&lt;/code> to copy the built files over.&lt;/li>
&lt;li>&lt;strong>GitHub Actions + SSH is the cleanest auto-deploy for shared hosting.&lt;/strong> No webhooks, no cron jobs — just a simple SSH action that runs on every push.&lt;/li>
&lt;li>&lt;strong>Claude Code with PAI made this possible in a single session.&lt;/strong> From debugging build errors to SSH key troubleshooting to writing GitHub Actions workflows, having an AI pair programmer turned what could have been hours of Stack Overflow rabbit holes into a smooth, guided process.&lt;/li>
&lt;/ul>
&lt;h2 id="tools-used">Tools Used&lt;/h2>
&lt;ul>
&lt;li>&lt;a href="https://gohugo.io/" target="_blank" rel="noopener noreferrer">Hugo&lt;/a>
— Static site generator&lt;/li>
&lt;li>&lt;a href="https://github.com/mirus-ua/hugo-theme-re-terminal" target="_blank" rel="noopener noreferrer">re-terminal theme&lt;/a>
— Hugo theme&lt;/li>
&lt;li>&lt;a href="https://www.namecheap.com/" target="_blank" rel="noopener noreferrer">Namecheap&lt;/a>
— Shared hosting with cPanel&lt;/li>
&lt;li>&lt;a href="https://github.com/features/actions" target="_blank" rel="noopener noreferrer">GitHub Actions&lt;/a>
— CI/CD automation&lt;/li>
&lt;li>&lt;a href="https://claude.ai/" target="_blank" rel="noopener noreferrer">Claude Code&lt;/a>
— AI pair programmer&lt;/li>
&lt;li>&lt;a href="https://danielmiessler.com/blog/personal-ai-infrastructure" target="_blank" rel="noopener noreferrer">Personal AI Infrastructure (PAI)&lt;/a>
— Workflow engine&lt;/li>
&lt;li>&lt;a href="https://obsidian.md/" target="_blank" rel="noopener noreferrer">Obsidian&lt;/a>
— Content authoring&lt;/li>
&lt;li>&lt;a href="https://code.visualstudio.com/" target="_blank" rel="noopener noreferrer">VS Code&lt;/a>
- Development environment; used as the workspace for Claude Code sessions&lt;/li>
&lt;/ul>
&lt;h2 id="resources">Resources&lt;/h2>
&lt;ul>
&lt;li>&lt;a href="https://youtu.be/dnE7c0ELEH8?si=YEDoaoiekMYJIe3U" target="_blank" rel="noopener noreferrer">I started a blog&amp;hellip;..in 2024 (why you should too)&lt;/a>
— The YouTube video that inspired me to start this blog&lt;/li>
&lt;li>&lt;a href="https://danielmiessler.com/blog/personal-ai-infrastructure" target="_blank" rel="noopener noreferrer">Building a Personal AI Infrastructure (PAI)&lt;/a>
— Daniel Miessler&amp;rsquo;s guide to building your own Personal AI system&lt;/li>
&lt;/ul></content></item></channel></rss>