← loadout

Chapter 1 of 8 · free preview

Why Claude Code Needs an OS

It is 11pm on a Tuesday. You are tired. You ask Claude Code for help with a thing you have been hacking on for hours. The model thinks for two seconds and agrees with the approach. You ship it. Wednesday morning you read what shipped and it is wrong in a way you can see now but could not see last night, and the only signal that anything was off was that the model agreed too easily.

That is the fall. It happens in small ways every day and in larger ways every few weeks, and the worst part is that nothing in the default Claude Code experience is built to catch you.

I built a setup that catches me when I fall.

Six months of small interventions, layered carefully, mostly unglamorous. The model is no smarter. The scaffolding around it is. This book is everything I wrote down along the way, and the setup itself is what I now call Loadout.

The starting point looked like this. I installed Claude Code. I opened it. I typed a question. It answered. I typed another. It answered that too.

By the second week the pattern was clear. It forgot what project I was in. It asked me the same clarifying question every Tuesday. It fabricated function names that did not exist. It cheerfully agreed with plans I knew were wrong, because I was tired and did not push back hard enough.

That is not Claude Code being bad. That is Claude Code being a toolbox. A hammer does not remember which nails you drove yesterday. Tools wait for you to pick them up, point them, and swing. They do not catch you when you swing at the wrong nail.

The people who get 10x out of Claude Code stopped treating it like a toolbox months ago. They built an operating layer around it. A system that remembers, focuses, intervenes, and improves itself. They call it different things. Dotfiles. Prompts. Workflows. The architecture underneath is recognizable across all of them, and the thing it does, underneath the layers, is catch you when you fall.

I built mine and called it Loadout. This book is the architecture, the file shapes, and the failure modes I hit on the way.

The headline I keep coming back to: this is the Claude Code setup that catches you when you fall.

One chapter per layer. Plus a few connective ones.

Here is the spine.

  1. Memory. A small always-loaded file the model reads every turn, plus a typed long-term store of facts about you, decisions you made, and patterns the model has observed.
  2. Rules. Stack-specific knowledge that lives outside the always-loaded context and gets pulled in only when relevant. Your iOS gotchas do not pollute your Python sessions.
  3. Hooks. The Claude Code harness is event-driven. You can intercept session start, every user prompt, every tool call, the stop event. Most users never touch these. You will.
  4. Focus. A standing definition of what you are working on right now and what you locked in for today, surfaced into every turn so the model can intercept drift before you do.
  5. Voice. Optional, but transformative. A TTS partner that talks back, with verbosity and tone matched to what you are actually doing.

Five layers. The chapters after this one go deep on each, in order. The last chapter ties them together into a working install.

A toolbox is reactive. An OS is persistent.

You point a toolbox. It swings. When you put it down it forgets the swing happened.

An OS is persistent. State survives the session. Context survives the day. Decisions you made on Tuesday are visible on Thursday. Patterns the model observed three weeks ago shape the response you get this morning.

Three before-and-after pairs from my own logs. Most relatable first.

Before. "Let's build a new dashboard tool." The model says great, here is a starter scaffold. Three hours later I have prototyped something I did not need and the auth migration I came in to ship is still untouched.

After. The drift-check hook fires on the prompt. It injects today's locked priorities (ship the auth migration) plus the live focus from now.md. The model reads both, sees the mismatch, and intervenes by name: "Shiny object pattern. Today's lock is the auth migration. Park the dashboard idea, or call this a real pivot and update now set. Pick one." I either confirm the pivot or I do not, but the moment is conscious instead of automatic.

Before. "Claude, can you check the auth middleware?" The model reads the file, answers in general terms, forgets. Next week the same question gets the same shape of answer, with no memory that we have been here three times.

After. The model reads the file. The memory layer surfaces a one-line hook from the index: "auth-middleware rewrite is driven by legal and compliance, not tech debt. Scope decisions favor compliance over ergonomics." The model pulls the full entry, sees the reasoning, and frames its answer inside that constraint. I did not have to remember to mention it. The constraint shows up because I wrote it down once.

Before. "Why did we choose Postgres over MySQL again?" The model guesses based on general knowledge. The guess sounds reasonable. It is wrong in a small but expensive way.

After. The model reads the project memory entry that records the decision and the reasoning. It surfaces the actual constraint that drove the choice (a specific Postgres extension we depend on), and tells me whether that constraint still holds today. The decision is durable because the reasoning is durable.

None of this is magic. It is all file-based, deterministic, inspectable. The model is the same. The environment is what changed.

That is the whole pitch in one sentence. The model is the same. The environment is what changed.

Three things you have already noticed.

If you have spent more than a few hours in Claude Code:

  1. It is incredible when the context is right. When the model has the right files open, the right constraints in view, and a clear definition of done, the output is genuinely good. Better than most engineers I have worked with on most tasks.
  2. The context is almost never right by default. You start every session with a blank model staring at a folder. Whatever you knew yesterday is gone. Whatever the model figured out last week is gone. You spend the first ten minutes re-priming.
  3. Fixing the context manually every session is exhausting. Pasting in the same paragraph of background. Re-stating the same constraints. Re-explaining the same architecture. After a month of this most people quietly stop using Claude Code for hard work.

The OS solves number three. Not by magically loading the right context (that is still a hard problem) but by building the machinery that loads the right context automatically based on what you are doing, where you are, and what you were working on.

The good news: most of the machinery is small. Markdown files and shell scripts. None of it requires a programming background beyond what you already have.

The bad news: nobody ships this out of the box. You have to build it. That is what the rest of the book is.

And who it isn't.

You will get the most out of this if:

You will get less out of this if:

If two of those describe you, save your money. If none of them do, the rest of the book is for you.

Linear is fine. But chapter 5 stands alone.

Linear is fine. Each chapter builds on the previous one. Memory before rules. Rules before hooks. Hooks before focus, because focus is itself a hook pattern. Voice last because it is the only optional layer.

Chapter 5 is the highest-leverage standalone. If you only have time for one chapter, read Focus and Drift. It is the layer that changes daily use the most. You can install it without any of the others and feel the difference inside a week. The rest of the chapters give it more to work with, but the focus system stands alone.

The Starter Pack tier includes installable files. Every chapter ends with a "what to install" section. If you bought the Guide tier ($49) those sections describe the file shapes and you build them yourself. If you bought the Starter Pack ($149) the files are in the zip and you can cp them straight into ~/.claude/ and start adapting. The 1:1 tier ($249) adds an hour of working through your specific setup with me.

The architecture is opinionated by design. I am not going to pretend there is one right way to organize an OS layer for Claude Code. There is not. This is my way, refined over six months of daily use across several real projects of my own. Where I have strong opinions I will say why. Where there are real tradeoffs I will name them. Adopt what works. Throw out what does not. The architecture survives editing.

Tuned for Claude Code. Most of it ports.

The OS layer is tuned for Claude Code specifically. The behaviors it leans on (long context, strong instruction-following, willingness to follow elaborate rules, fast tool use, file-system-first ergonomics) are particularly Claude-shaped right now.

Some of it transfers. I have ported pieces to Cursor, Cline, Aider, and Codex with roughly a 70% success rate. The memory layer ports almost cleanly. The focus hooks port if the harness exposes the right events. The voice layer is mostly Claude-Code-specific because of how the Stop event works.

This book is written for Claude Code because that is where I built it, and because writing model-agnostic documentation would require hedging that would make the book worse for everyone.

Day 0: install Claude Code in 15 minutes.

The rest of this book assumes Claude Code is already running on your laptop. If it is not yet, this appendix is for you. Fifteen minutes, three steps, one terminal. Done.

1. Install Claude Code (5 minutes).

On macOS, Linux, or WSL, the official one-line install is:

curl -fsSL https://claude.ai/install.sh | bash

Source: code.claude.com/docs/en/setup (verified 2026-05-26). Homebrew (brew install --cask claude-code) and npm (npm install -g @anthropic-ai/claude-code) work too. Windows PowerShell uses irm https://claude.ai/install.ps1 | iex.

Verify the install with claude --version. If you see a version number, you're in. If you see "command not found," restart your terminal so the new ~/.local/bin entry is on your PATH, and try again.

2. Authenticate and open your first session (5 minutes).

From any project directory, type:

claude

The first run opens your browser to sign in. You need a Pro, Max, Team, Enterprise, or Console account. The free Claude.ai plan does not include Claude Code. After auth, you land in the Claude Code prompt: a single text box, no menus, no buttons.

What your first session looks like. Ask it something small. "List the files in this folder." "Read the README and tell me what this project does." Watch how it uses the Read and Bash tools out loud, asking before destructive things. That is the harness, the thing the rest of this book teaches you how to instrument.

You will notice immediately that the harness has no memory of yesterday. Every session starts fresh. That is the problem the OS layer in chapters 2 through 7 solves. For Day 0, just feel the absence so you know what we are adding.

3. If auth doesn't work (5 minutes).

Two failure modes show up most. First: the browser opens but never finishes auth. Close it, run claude again, and try a different browser (Safari and Chrome both work; some corporate browser profiles block the callback). Second: the terminal reports "command not found" after a successful install. The native installer puts the binary at ~/.local/bin/claude; if your shell does not include that on PATH, add this line to ~/.zshrc (or ~/.bashrc) and restart the terminal:

export PATH="$HOME/.local/bin:$PATH"

For everything else, claude doctor runs a built-in diagnostic and prints what is wrong. The official troubleshooting page at code.claude.com/docs/en/troubleshoot-install covers the rest.

Now that you have Claude Code installed, here's what comes next →

Seven more chapters wait in the guide.

Chapter 2 builds the memory layer. Chapter 5 is the focus system (the standalone). Chapter 8 walks the full install. About 8 chapters.

Get chapter two free.

Leave your email and I'll send the next chapter when it's ready, plus the occasional note when AJ ships something worth your time. No firehose, no weekly quota for its own sake. Unsubscribe anytime.