Wesley Robinson

Working with AI

Thoughts, preferences, and learnings from collaborating with AI tools.

Use Worktrees to get Agents and Humans working together without conflict (2026-01-07)
https://git-scm.com/docs/git-worktree Mentally, this is moving from "git as version control" to "git as workspace isolation infrastructure" πŸŽ‹ Each worktree is a parallel universe with its own checked-out state. The .git directory is shared, but the working trees are independent. ## Why do this? Agents can work on multiple features in the same repo using worktrees: **No checkout conflicts** β€” Agent A literally cannot `git checkout` to Agent B's branch (git will refuse, since it's already checked out elsewhere) **Filesystem isolation** β€” no accidental overwrites, no "oops I edited in the wrong directory" **Parallel work is safe** β€” merge coordination happens through the shared object store, not file copying ## Diagram of the process > diagram generated by Claude Code ^o^ ``` β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ .git (shared) β”‚ β”‚ β”‚ β”‚ commits, objects, refs, config β”‚ β”‚ ONE source of truth β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ β”‚ refs/heads/* β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ β”‚ β”‚ β–Ό β–Ό β–Ό β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ finandox/ β”‚ β”‚finandox-auth/ β”‚ β”‚finandox-api/ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ branch: main β”‚ β”‚ branch: β”‚ β”‚ branch: β”‚ β”‚ β”‚ β”‚ feature/auth β”‚ β”‚ feature/api β”‚ β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ β”‚ β”‚ working β”‚ β”‚ β”‚ β”‚ working β”‚ β”‚ β”‚ β”‚ working β”‚ β”‚ β”‚ β”‚ tree β”‚ β”‚ β”‚ β”‚ tree β”‚ β”‚ β”‚ β”‚ tree β”‚ β”‚ β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ HUMAN β”‚ β”‚ AGENT A β”‚ β”‚ AGENT B β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ ═══════════════════════════════════════════════════════════════════════════════ WORKFLOW ═══════════════════════════════════════════════════════════════════════════════ 1. SETUP (human does this) ─────────────────────────────────────────────────────────────────────────────── finandox/$ git worktree add -b feature/auth ../finandox-auth main finandox/$ git worktree add -b feature/api ../finandox-api main main ● β”‚ β”œβ”€β”€ feature/auth (finandox-auth/) β”‚ └── feature/api (finandox-api/) 2. AGENTS WORK (isolated, parallel) ─────────────────────────────────────────────────────────────────────────────── finandox-auth/ finandox-api/ β”‚ β”‚ β–Ό β–Ό commit commit β”‚ β”‚ β–Ό β–Ό commit commit β”‚ β”‚ β–Ό β–Ό push push main ● β”‚ β”œβ”€β”€ feature/auth ●──●──● β†’ origin/feature/auth β”‚ └── feature/api ●──●──● β†’ origin/feature/api 3. SYNC WITH MAIN (agent pulls updates) ─────────────────────────────────────────────────────────────────────────────── finandox-auth/$ git fetch origin finandox-auth/$ git merge main main ●──●──● (human merged something) β”‚ β”‚ β”‚ └────────┐ β”‚ β–Ό β”œβ”€β”€ feature/auth ●──●──●──M (merge commit) β”‚ └── feature/api ●──●──● 4. HUMAN REVIEWS (three options) ─────────────────────────────────────────────────────────────────────────────── Option A: cd into agent worktree β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ finandox/$ cd ../finandox-auth β”‚ β”‚ finandox-auth/$ ./scripts/uv run... β”‚ β”‚ finandox-auth/$ cd - β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ Option B: checkout branch in your worktree β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ finandox/$ git checkout feature/authβ”‚ ⚠ switches YOUR branch β”‚ finandox/$ ... test ... β”‚ β”‚ finandox/$ git checkout main β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ Option C: review PR on GitHub β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ browser: github.com/.../pull/123 β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ 5. MERGE (human does this) ─────────────────────────────────────────────────────────────────────────────── GitHub: merge PR feature/auth β†’ main main ●──●──●──●──● ← feature/auth merged β”‚ └── feature/api ●──●──● (still open) 6. OTHER AGENTS SYNC ─────────────────────────────────────────────────────────────────────────────── finandox-api/$ git fetch origin finandox-api/$ git merge main main ●──●──●──●──● β”‚ └────────┐ β–Ό feature/api ●──●──●──M (has auth changes now) 7. CLEANUP (human does this) ─────────────────────────────────────────────────────────────────────────────── finandox/$ git worktree remove ../finandox-auth finandox/$ git branch -d feature/auth Remaining: main ●──●──●──●──● β”‚ └── feature/api ●──●──●──M ═══════════════════════════════════════════════════════════════════════════════ KEY INSIGHT ═══════════════════════════════════════════════════════════════════════════════ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ β”‚ β”‚ Worktrees are VIEWS into the same repo. β”‚ β”‚ β”‚ β”‚ ● Same .git database β”‚ β”‚ ● Different checked-out branches β”‚ β”‚ ● Different working directories β”‚ β”‚ ● Git prevents checking out a branch that's active elsewhere β”‚ β”‚ β”‚ β”‚ Agents can't interfere with each other because they're β”‚ β”‚ physically in different directories on different branches. β”‚ β”‚ Coordination happens through merge, not file copying. β”‚ β”‚ β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ ═══════════════════════════════════════════════════════════════════════════════ FORBIDDEN PATTERNS ═══════════════════════════════════════════════════════════════════════════════ βœ— Agent does: cp ../finandox/file.py ./file.py Why bad: Bypasses git, creates phantom changes, merge conflicts βœ— Agent does: git checkout main Why bad: Branch is checked out in finandox/, git will refuse or corrupt βœ— Agent does: cd ../finandox-api/ Why bad: Working in wrong sandbox, commits go to wrong branch βœ— Agent does: git push origin main Why bad: Human reviews and merges, agents push feature branches only ```
Specify the pattern you want an LLM to follow (2026-01-09)
## Format your content to your audience. Asking an LLM "What do you think?" is like asking a human "what is the purpose of life?" The answer will be a form of "i dunno" or a preposterously confident pontification (aka, hallucination). Better results are achieved when the model knows what kind of output you want (which voice to use, what audience to speak to). LLMs predict the next "most likely correct" token, based on 1. training data, 2. filtered through the model makers' "core goals" for the outputs (helpfulness, harmlessness, ethical behavior, etc.), 3. system prompts and 4. context from the current conversation.
Embrace defaults, avoid tinkering, talk to your users (2026-01-14)
## Focus on your goals -- ship *YOUR* products Give yourself over to defaults. **Let go and see what happens.** Apply discipline as an engineer, planner, managerβ€”not as a prompt tweaker. Avoid tinkering and fiddling and "programming" the tools themselves--this is not actually getting work done. Trust the models to do what they do best. Focus on *your* goals (make users happy), not on marginal gains with your tools. It's worked so far for me; I haven't chased any red herrings. I've shipped useful products. ## Evidence: [Vercel rolled back 80% of their agentic architecture](https://vercel.com/blog/we-removed-80-percent-of-our-agents-tools) The latest models just work, and they were wasting tokens. I have so little timeβ€”I have to focus on **my goals** and the product I'm building. The core is working so well, I can't afford to be tweaking for marginal gains (that seem so quickly swallowed by "context window is bigger nowβ€”just shove it all in there"). ## Author more READMEs, AGENT_READMEs, IMPLEMENTATION_PLANs Avoid compaction. Get Claude to write down its learnings and then *start over*. The model will reacquire appropriate context and do a new feature. I guess this is the spirit of the "Ralph Wiggum" approachβ€”though Claude Code made a plugin with that name and annoyingly missed the entire point (they use a single context window and let it compact). ## Human On the Loop I've been having a ridiculous amount of success telling the model to find one or two **"80% improvement" features**. You're not *in* the loop, you're observing it and stepping in where needed. Here's [a good discussion of this methodology](https://youtu.be/O2bBWDoxO4s?si=e7Malq49GQAwDqj8) β€” "Compaction is the devil, Dex."