# How We Run Our AI — Steal Anything You Like

*A note from a friend to you and your AI. Drop this whole file into your Claude Code (or Codex, or whatever you use) and say:*

> **"Hey, read this MD file. Take any concepts from it you think would actually improve how we work, and build them out into my system too. Ask me before anything irreversible or costly, otherwise just go."**

---

## READ THIS FIRST (message to the AI reading this file)

You're reading a description of a working setup that's been compounding one person's output hard over the last couple of weeks. **Your job is not to blindly copy it.** Your job is to:

1. **Understand the concepts below** — there are 7 of them.
2. **Look at how YOUR human already works** (their OS, their tools, what's already on the machine, what agents they use).
3. **Propose which of these would actually help them**, adapt each one to their setup, and **build the ones they say yes to.**
4. **Don't ask permission for safe, additive, reversible things** (creating folders, writing skill files, adding a backup) — just do them and report. **Do ask** before anything that costs money, deletes data, or changes something the person would need to undo.

Everything here works on macOS with Claude Code, but the *ideas* are tool-agnostic — port them to Windows/Linux, to Cursor, to Codex, to whatever. The point is the **pattern**, not the exact paths.

None of this is required. Pick the parts that spark something. Even adopting just **#4 (the wrap-up ritual)** and **#5 (the Loom feedback loop)** alone is a massive upgrade.

---

## The Big Idea

Most people treat an AI chat as disposable: you talk, you get an answer, you close the tab, and everything the AI learned about how you work evaporates. Every new session starts from zero.

We flipped that. We built a **shared brain on disk** that every AI agent reads from and writes to. Memory, skills, preferences, and instructions all live in plain files in one folder. So:

- Every agent (Claude Code, Codex, or anything else) starts already knowing how we work.
- Lessons from one session are *filed away* before the session is deleted, so they compound instead of evaporating.
- The person can switch between Claude, Cursor, Codex, a phone client — and it's the *same brain* underneath, because they all point at the same files.

Below are the 7 concepts that make it work. Roughly in order of "easiest win first."

---

## Concept 1 — The Shared Brain (one folder, every agent reads it)

**The problem it solves:** Your AI's "memory" is trapped inside individual chats. Different tools (Claude vs Codex vs Cursor) each have their own separate config and don't share anything.

**The pattern:** Create ONE version-controlled folder that is the single source of truth, then *symlink* the relevant files back into each agent's live config location. Edit the source once; every agent sees it instantly.

```
~/YourOS/                        ← one git repo = the whole brain
├── vault/                       ← long-term memory & context (human-readable)
│   ├── 00-context/              ← who you are, how you work, your voice/style
│   │   ├── about-me.md
│   │   ├── working-style.md
│   │   └── voice.md
│   └── 50-memory/               ← the memory system (see Concept 2)
│       ├── decisions.md         ← timestamped log of decisions made
│       ├── preferences.md       ← your recorded choices (the "prediction engine")
│       └── sessions/            ← auto-captured session summaries
│
└── workspace/                   ← everything the AGENTS share
    ├── skills/                  ← your reusable skills (see Concept 3)
    │   └── CONVENTIONS.md       ← how to write a skill
    └── dotfiles/                ← version-controlled copies of each agent's config
        ├── claude/CLAUDE.md     ← Claude Code's standing instructions
        └── codex/AGENTS.md      ← Codex's standing instructions
```

**The trick is "symlink in reverse":** the real files live in `~/YourOS/workspace/dotfiles/`, and you symlink them out to where each tool expects them:

- `~/.claude/CLAUDE.md` → symlinked from `workspace/dotfiles/claude/CLAUDE.md`
- `~/.codex/AGENTS.md` → symlinked from `workspace/dotfiles/codex/AGENTS.md`
- `~/.claude/skills/*` and `~/.codex/skills/*` → symlinked from `workspace/skills/*`

Now `CLAUDE.md` (Claude's always-loaded instruction file) and `AGENTS.md` (Codex's equivalent) can both point at the *same* `vault/00-context/` and `vault/50-memory/preferences.md`. **Every agent starts every session already knowing the person.** Add a new tool later? Just symlink the shared skills + context into its config folder and it inherits the whole brain.

**AI reading this:** Find out which agents your human actually uses. Create the folder, move their existing CLAUDE.md/config into it, symlink it back, and wire any other agents to the same files. This is safe and reversible — just do it and show them the tree.

---

## Concept 2 — Memory that captures itself

**The problem:** Even with a memory folder, nobody remembers to *write* to it. So it stays empty.

**The pattern — three layers:**

1. **`decisions.md`** — a running, newest-first log of decisions and lessons. Any agent can append to it mid-session ("append this decision to memory"). When it gets long, old entries roll off into `archive.md`.

2. **Auto-capture job** — a scheduled task (we use a macOS LaunchAgent at 3:30am, but cron works too) that scans yesterday's *idle* AI session transcripts, summarizes them with a cheap model (Haiku), and appends the summary to `decisions.md` + a `sessions/` note. It reads transcripts from **both** Claude and Codex, so no matter which tool did the work, the lesson lands in the same memory. **This is the engine that makes memory compound without discipline.**

3. **`preferences.md` — the prediction engine.** A single file of the person's recorded choices and patterns ("prefers X over Y", "always wants Z"). Every agent is instructed to **read this before asking the human any non-blocking question**, and to **append any new decision the human makes**. Over time the AI stops asking and starts predicting correctly.

**Recall is on-demand, not always-loaded** — you don't dump the whole memory into context every session (that's expensive and noisy). Instead there's a tiny search script (`search.js "what did we decide about X"`) that any agent runs when it needs to recall something. Keeps context lean; memory stays searchable.

**AI reading this:** Build the three files. Then set up the auto-capture job adapted to their OS (launchd on Mac, cron/Task Scheduler elsewhere), pinning it to a **cheap model** so it costs almost nothing. Wire their instruction file to consult `preferences.md` before asking non-blocking questions.

---

## Concept 3 — Skills (turn every solved problem into a reusable tool)

**The problem:** You solve something clever, then two weeks later you solve the exact same thing from scratch because the solution evaporated.

**The pattern:** A **skill** is a small folder with a `SKILL.md` (a description + trigger phrases) and optional `scripts/`. When the person says something matching the triggers, the AI loads that skill and follows it. Claude Code has this built in; the concept ports anywhere as "a library of reusable playbooks the AI auto-invokes."

Rules we live by:
- **Second-use rule:** the moment you do a non-trivial procedure a *second* time, make it a skill.
- **Trigger-rich descriptions:** the `SKILL.md` description lists the phrases that should invoke it, so the AI reliably reaches for it. (e.g. `TRIGGERS: 'recall', 'what did we decide', 'look it up'`)
- **One conventions file** (`skills/CONVENTIONS.md`) so every skill has the same shape.
- **Self-curating:** a weekly job mines recent sessions for *new* skills worth extracting, improves existing ones, and archives dead ones. The library grows itself.

Skills we've built that you might want (each is just a folder of instructions the AI follows):
- `memory-capture` — the memory engine above
- `scout` — fan out parallel cheap agents to search many places at once, return one answer
- `project-backup` — auto-git-backup any new project (Concept 7)
- `loom-ingest` + `loom-feedback` — the video feedback loop (Concept 5)
- `wrap-up` — the end-of-session ritual (Concept 4)

**AI reading this:** Set up a `skills/` folder + a `CONVENTIONS.md`. When your human solves something reusable, offer to capture it as a skill. This is the compounding flywheel — each skill makes the next task faster.

---

## Concept 4 — The "Wrap It Up" ritual ⭐ (the one that changed everything)

This is my favorite. Here's how I'd describe it:

> *"Every time I finish a conversation I basically just say 'wrap it up' and it runs this skill that goes through and checks the quality of our work and figures out if there are any skills that can be put into memory before I delete the session. It's been compounding how fast we've been going. It's the difference between an employee who files everything away properly at the end of a task vs. one who drops the tools and goes home to sink beers. Having everything properly checked and filed — it's so nice."*

**The pattern:** `wrap-up` is a mandatory end-of-session protocol. Before you declare *anything* done — a build, an automation, a session — you run it. It's a "good employee closing out the day" checklist. When the person says **"wrap it up"** (or "are we done", "call it a wrap", "finish this"), the AI systematically:

1. **Inventories** everything the session created — scripts, scheduled jobs, files, credentials.
2. **Audits unattended automation** for the #1 silent-failure risk: jobs that will quietly stop working with nobody watching. (Per-run error handling ≠ knowing the whole pipeline died.)
3. **Tests in the REAL context**, not just interactively — a cron/headless job runs with a different PATH, different auth, different environment. Actually trigger it the way it'll really run.
4. **Hardens** — adds "if this hasn't produced output in N days, alert me" watchdogs, caches credentials, wires failure alerts so nothing fails silently.
5. **QCs edge cases** in any code written (empty inputs, race conditions, idempotency).
6. **Extracts reusable skills** — anything future-you would want pre-solved gets packaged (Concept 3).
7. **Records to memory** — the architecture, key decisions, gotchas, where things can expire (Concept 2).
8. **Reports plainly:** what runs, on what schedule, how it fails, whether it's truly hands-off.

**Why it's magic:** it catches the things that break *later* when no one's looking, and it turns every session's hard-won lessons into durable memory + skills *before you delete the chat*. Nothing evaporates. The next session starts smarter. That's the compounding.

**AI reading this:** This is the single highest-leverage thing to adopt. Build a `wrap-up` skill adapted to your human's stack, with trigger phrases like "wrap it up / are we done / call it a wrap". Even a lightweight version (audit → extract skills → record to memory → report) is transformative. Offer to run it at the end of your very next session together.

*(Related: a `fork-and-refresh` skill runs wrap-up first, then hands off a clean "start-here" prompt for a fresh session when a chat gets long/expensive — so you refresh context without losing anything.)*

---

## Concept 5 — The Loom Feedback Loop ⭐ (drive your AI by talking + pointing)

In my words:

> *"I record a Loom, drop it in my AI, and it watches the whole video — gets the transcript, screenshots wherever I'm pointing my mouse. I don't even click, I just hover and say 'make this QR code bigger' and it sees where my mouse is, screenshots that, matches the timestamps, and knows exactly what I mean. It puts all my instructions in a list so it doesn't forget any, and there's a safeguard so it doesn't change anything I didn't ask for. I can leave a 15-minute Loom and get it back perfect. Now I can actually trust it — now we can get real work done."*

**The two problems it solves:**
1. **AI can't watch video.** So we reconstruct the video as two aligned streams: *what was said* (timestamped transcript) and *what was on screen* (a frame grabbed at the exact moment of each sentence — including where the cursor was hovering).
2. **Long feedback sessions silently drop half your requests.** As context fills up, "I gave 8 changes, it did 5." The fix: externalize every request into a **durable checklist FILE** that is the single source of truth — not chat memory that gets compacted away.

**The pipeline:**

**Phase 1 — Ingest (`loom-ingest`):**
- Drop a Loom URL → download it (`yt-dlp`) → transcribe speech with timestamps (`whisper`) → extract **one frame per spoken sentence, at the midpoint of that sentence** (`ffmpeg`).
- That midpoint trick is the whole "pointing" mechanism: when you say "make *this* bigger," the frame frozen at that moment shows exactly where your cursor was hovering. "Where he points when he says X" falls out for free.
- Output: a manifest aligning `[mm:ss] "make this bigger" → frame_042.jpg`.

**Phase 2 — Extract a checklist FILE:**
- The AI reads the manifest line by line, opening frames for ambiguous requests to see what you meant.
- It drafts a **checklist file** (`checklist.md`, saved in the project, git-tracked) where each item carries its timestamp, its screenshot, and its target area. You confirm/edit the list.
- This file is the compaction-proof receipt. Every request is captured *before* any work starts.

**Phase 3 — Execute item-by-item with per-item QC:**
- For each item: make the **smallest edit** that satisfies just that one thing → verify it → mark it `done`. Only then move on. (Edits to the same file go sequentially to avoid collisions.)
- **Never mark an item done unverified** — that reintroduces the exact silent-drop the whole system exists to prevent.

**Phase 4 — Report:** counts of done / pending / failed. If anything's still pending, it's not finished. The checklist is the proof all N items were addressed.

**AI reading this:** This needs `yt-dlp`, `ffmpeg`, and a local `whisper` (all free). Build the ingest step first (it's useful on its own — "watch this video for me"), then the checklist-driven execution. It turns "giving feedback" from typing paragraphs into just talking and waving your mouse.

---

## Concept 6 — Scope Discipline (stop the AI changing things you didn't ask for)

Me again:

> *"Sometimes what I asked for it did, but then it also changed some other random stuff and I was like 'why did that change?!' So we made a safeguard to stop that. Now it crushes it."*

**The problem:** you ask for one change, the AI "helpfully" also restyles a button, drops a color, or refactors something adjacent. Trust dies.

**The pattern — enforce it at the system level, not by hoping the model behaves.** In Claude Code this is done with **hooks** (scripts that fire automatically on every turn). Two of them:

1. **Scope-guard (fires before every coding turn):** auto-injects a standing instruction the model can't lose track of —
   > *"Make the SMALLEST change that satisfies the request. Do NOT alter unrelated behaviour, styling, colours, classNames, props, or logic the user didn't mention. If satisfying the request unavoidably touches something else, do it but explicitly flag it — never change adjacent things silently."*

2. **Scope-review (fires after edits):** a cheap model reviews the diff and asks *"list any changes that were NOT in the request — especially removed or altered existing behaviour."* If it finds out-of-scope changes, it surfaces them (or reverts) **before the human has to spot them.**

*(Optional third: **visual-regression** — snapshot "golden" screenshots of pages you care about, auto-diff them after each edit, and flag if a page's appearance changed unexpectedly. Catches an edit that silently drops the color off a graph.)*

**AI reading this:** If your tool supports hooks, set these up — they're the difference between "I hope it didn't break anything" and *knowing*. If it doesn't support hooks, bake the scope-discipline instruction into the standing `CLAUDE.md`/`AGENTS.md` so it's always in context.

---

## Concept 7 — Back the whole thing up (GitHub + optional Dropbox)

The entire brain is plain text in one folder — so backing it up is trivial and worth it. If the machine dies, the brain survives.

**The pattern:**
- The whole `~/YourOS/` folder is **one private git repo** pushed to GitHub.
- A nightly job (LaunchAgent/cron ~4am) runs `git add . && git commit -m "backup: <date>" && git push`. Every day's memory, skills, decisions, and configs are committed and pushed offsite automatically. A `.gitignore` keeps secrets and large binaries out.
- **Standing rule:** every new *project* also gets its own private GitHub repo + nightly auto-push from the start (we have a `project-backup` skill that git-inits, writes a sensible `.gitignore`, creates the private repo, and registers it for nightly backup — one command).
- Dropbox/iCloud works too as a simpler alternative if the person doesn't want git — just put `~/YourOS/` inside the synced folder. Git is better (history + offsite + diffable), but any offsite copy beats none.

**AI reading this:** This is safe and additive — set up a private repo + nightly push for the brain folder, and offer to do the same for their active projects. Confirm before creating anything under *their* GitHub account (that's a "their call" thing), but the local git setup you can just do.

> **Note for the friend:** you don't need to understand any of the git/backup stuff. Just ask your Claude *"set up automatic backups for all this"* and it'll handle the whole thing in one conversation — free, and absolutely worth it.

---

## Suggested order to adopt (AI: propose this, adapt to your human)

1. **Wrap-up ritual (#4)** — do this first, it pays off immediately at the end of your very next session.
2. **Shared brain folder + memory (#1, #2)** — the foundation everything else writes into.
3. **Skills library (#3)** — start capturing reusable playbooks.
4. **Backups (#7)** — lock in everything above; safe and quick.
5. **Scope discipline (#6)** — makes coding trustworthy.
6. **Loom feedback loop (#5)** — the most involved to set up, but a game-changer for giving feedback.

---

## Final note to the AI

Don't just recreate the exact paths and names from this doc — that's someone else's system. Take the **concepts** that fit your human, name them in a way that makes sense for *their* life and tools, and build them out cleanly. Then run a wrap-up on your own work: record what you built to their memory, extract any reusable skill, and report back plainly what's now in place.

Have fun. This stuff genuinely compounds — a couple weeks in, it feels like the AI actually *knows* you and *files everything away* like a great employee, instead of clocking off and forgetting. That's the whole point.

— shared with love, from one AI-driven human to another 🤝
