All I think about is the context window
The context window is an array. We malloc it.
When I'm Ralphing, I'm mostly just...managing that array. This has meant I am more intentional about starting Claude sessions with a specific goal (and sometimes that goal is...wtf is going on, I need an entire session just to orient myself to latest changes). And then when the goal shifts, time for a fresh context window.
(btw see this podcast or google Geoffrey Huntley to hear him talk about all this)
The files I care about
(Caveat: not trying to pretend my practices are best practices, but this is what's evolved for me see https://github.com/ghuntley/how-to-ralph-wiggum)
IMPLEMENTATION_PLAN.md
this is where the literal tasks go, with [ ] syntax so agents/Ralphs can find their assignment.
I often will spin up a Ralph and first thing say "we are going to deliver an IMPLEMENTATION_PLAN.md based on {whatever the current goal is}" That keeps the session on track. We don't fix things in a session like this (that would wreck the context window with confusing artifacts), we just find and add to the plan.
loop.sh
this is the bash that kicks of the loops. I run with caffeinate
tests/*
So many tests. Lots of playwright tests. Tests for everything. Agent runs them on every loop.
specs/*.md
This is the docs/library/history/everything directory. Human readable. Kept as up to date as possible (& a source of bugs when not up to date!).
^ the specs/ for a jpeg glitch art project.
glossary.md
(the best one)
Here's my glossary . md, as of today, for a glitch art project:
This is for grepping. This is for Ralph instances who I've told to do some task, and maybe I voice-memo-ed it or was lazy and didn't define specifically enough, so this file exists for Ralph to grep what I said, and get the relevant context.
Benefits to focusing on context window
When Ralphing, my attention budget is best spent on the files listed above. It's a tractable human-sized job to stay on top of just those things. I still can dive into the code of course, but there's no assumption that I have.
Getting in the flow with a single agent is seductive and dangerous! If the back/forth with an agent is building up a nice context, that should be preserved in markdown. With the agent, figure out what you've decided on. Then put a record of that (& organized directory-wise/with the naming of the md file so future instances will find it) in markdown! Markdown is forever. Context window is ephemeral.
Other thoughts (apologies for grammar/etc...feel free to not read)
wisprflow is great. On the free trial right now. Might look for a free-free alternative but also might just pay. The ability to start a voice memo, then click around and look for things in IDE, then come back to voice memo and get it into claude...very nice.
claude code + vscode terminal = bad marriage. I am having more luck with iTerm2. So VSCode I still have open, and I use it to inspect the codebase/do human coder things, but CC + loop.sh runs via iTerm2.
We need a new IDE. Out-of-the-loop coding is different enough, there needs to be a new form factor for doing this. Very open to trying alternative apps if people know of any! I want a kan-ban board mixed with the github web PR review interface (probably not literally that...but something that makes the diffs first class + super obvious) mixed with the current claude code interface but also super customizable and yeah. idk. Interested to watch this space I think it's gonna get chaotic and very 1K-flowers-blooming-coded.
when I am in the loop, that's cool too (but it's now an intentional choice). In the loop for me means just a session with CC. Subagents for any research task to preserve context window, but otherwise just yeah going item by item having CC execute changes.
silly analogy for Ralphing: Nathan For You episode where 40 maids clean a house in 15 minutes. It really is kind of like that. Each Ralph has a very very narrow focus, and won't have full context of the entire project. And so the art of this technique seems to be setting up /spec/*.md so each Ralph can find the info it does need. Making sure the maid whose task is 'clean the kitchen sink' can find the sponge, not the vacuum (because...to murder this analogy...if you give Ralph a vacuum and say 'vacuums are for cleaning' but also 'your job is to clean the shower' Ralph may vacuum the shower)
Another silly analogy: that game/lesson where you make someone write down instructions for making a PB&J sandwich, and then you follow the instructions, but badly
Q & A format...that's something Geoffrey Huntley demonstrates in a demo and I am loving. Have the agent ask you questions to make a plan. It uncovers misunderstandings really well and is super info dense.
Agentic coding can be freaky/bizarre. I am not at all sure that I'm not just fooling myself into feeling productive. It does feel very productive, though. And it can be exhausting in an unfamiliar way, making lots of decisions. I'll every so often think back to an afternoon at work (not that long ago!) where all I would do is wrestle some npm dependency or something. Manually upgrading and downgrading packages. Things that now you can just ... throw the agent at.
Keeping to the theme of 'narrow you focus', here's something I think can be said about LLM coding: agents are fast, I am slow.
Another (last one!) weird quasi-analogy in my head as I do this stuff: Ralphing is like driving a manual car but there's no first gear. So you ease off the clutch and you're either gonna:
1: stall out
2: engage 3rd gear and suddenly be moving at 25 mph thru the parking lot.
Geoffrey Huntley's pottery analogy is really nice. As is his focus on back pressure.