One-Shot and Retreat

30 March 2026

Years ago, I played a Timeline game with some coworkers, and I immediately wanted to play this game to sequence other events in more specific (or even personal) domains.

Years passed with only a TODO note, so this year, I figured this might be a good candidate to see what Gemini CLI can mostly do on its own in "one shot".

I wrote an initial spec, and I told the agent to read it and implement the whole thing. Of course, it ran off in the wrong direction for the first pass, so I deleted the resulting code, expanded the spec with some more detail, and kicked it off again. I did this about 7 more times, and the results kind of worked, but randomly included and ignored some of my directions. As usual, the guesses it took were mostly welcome, since I just needed to see something, but didn’t know what yet.

Spending tokens to generate the whole thing and throw it away spent lots of tokens and time. Is it really "one shot" if you need to do it multiple times?

A handful of those candidate applications would have been a fine starting point, so I kept one, and went into iterative mode. From that point, I asked the agent for small focused changes like I had for other apps. It’s really good at gathering the context from the existing project and implementing those fixes and enhancements. I (we?) worked much faster and consistently in small bites.

The agent was able to locate and build some datasets for me, but I also scraped and transformed a dataset from the Computer History Museum. That was one of my main motivations to get this project going.

My implementation of Timeline is fun to explore very specific domains and to learn. It’s like flashcards.


Reverse Proxy in shadow-cljs

03 March 2026

I’ve broken my reverse proxy configuration in shadow-cljs multiple times, so I need a reminder for myself.

I have the server-side api running in a container, and the CLJS is running in shadow-cljs in dev mode.

With a :proxy-url set, shadow-cljs will forward any request it can’t match with a file in the root to the other server. This helps avoid Cross-Site-Request-Forgery failures in the browser during development.

 :dev-http {3000 {:root "public"
                  :proxy-url "http://localhost:7000/my-backend-service"}}

The important part is to ensure the URL lacks the trailing slash. With the slash, I see lots of not-found errors from the backend server for everything but the default index.


Teach the AI to Unit Test

19 February 2026

The Gemini AI will make some pretty good guesses about how a 3rd-party API may work. It is good at searching the internet, but when APIs have changed across versions, the old and new docs and examples it’ll find can confuse it. In a dynamic language and environment you’ll not spot these errors until runtime.

To combat the ambiguity and to give the AI agent more power to solve its own problems, ask it to add some tests around the code that uses the API. (In my case, the API is the XTDB client API.) Once it has a way to execute the code through tests, it’ll quickly start figuring out where it’s made mistakes and start running its own experiments to observe errors, search for fixes, and applying those fixes around the codebase. I exhibit the same pattern when I’m doing it by hand.

The tests also give you, the human, an easier entry point to evaluate the code the AI generated. If the tests look gnarly, you know to suggest refactorings to improve the architecture and make it easier to test. When the AI has the tests passing, and the test code is easy enough to read, then you can have a closer look at the application code to refine and keep that maintainable too.


Ask the AI

09 February 2026

Gemini CLI is getting even stronger for Clojure code. The clojure-mcp is part of that power: it’s exploring the code and fixing up syntax quicker now.

In addition to writing code, it’s been good at listing and implementing optimizations and refactorings to improve the code when asked.

I’d still like to remind you to ask the AI to explain itself. It’s still our responsibility to understand what it’s doing and to question its decisions, just like we would to get the best we can from any other teammate. It’s our opportunity to learn and understand too from a very comprehensive summary of all the internet searches I used to need to do for myself.


All the Posts

March 2026

February 2026

December 2025

November 2025

August 2025

March 2025

April 2024

April 2023

February 2023

November 2022

January 2021

November 2020

October 2020

August 2020

May 2020

December 2019

November 2019

October 2018

May 2018

March 2018

February 2018

January 2018

November 2017

September 2017

June 2017