Vibe Coding A String Formatting Library 1
Recently I've been interested in contributing some crates to Alire, the Ada equivalent of Rust's Cargo, because I want to have some fun and build some useful libraries for people. The first thing my mind turned towards was a library for formatted strings.
Formatted strings for different types are difficult to do in Ada because of the type system. You can't just put anything in any argument and rely on reflection like more dynamic languages. Even if you could, that's not very efficient.
In fact, the standard way to format strings as shown in most Ada learning materials appears to be painstakingly constructing them with append operations and the Image aspect like so.
Put_Line ("This is my integer " & Ingeger'Image (My_Int))
Surely there had to be a better way.
First Attempt
My first attempt was minimal and arguably not a large improvement over the manual way. There were struggles in learning how to set up an Alire project in the first place and struggles with the Ada language since I haven't written anything this heavy-duty with it yet. My initial API only provided a few functions.
Fortunately, this was enough to be included in the Alire index under the name format_strings as a version 0.1. I knew there would be a lot more work to do if this library would ever be ready for use in real projects.
Enter Vibe Coding
Recently I've been playing with AI agents for coding. The code behind this website was largely drafted by Codex, but Codex is very limited by its own isolated cloud environment. It's good for things which are standard and well understood, but very few things I want to make are standard and well understood. Codex's environment, for example, has a limited set of approved packages and you can't install the GNAT compiler on it.
Anthropic decided to take the concept a different route. They released Claude Code, a terminal application with some basic file editing tools and access to the shell. This is a much more flexible approach because it can learn to use anything you have installed on your computer and can directly access your files and projects. The catch is you have to watch it more closely and make sure to have backups and version control. It could always go haywire and trash your work.
Google more recently decided to take the same approach as Anthropic and release Gemini CLI. Much of the same pros and cons apply, with early reviews pointing out Gemini is not as polished in this space as Claude. However, I work at Google and will probably be using Gemini CLI a lot in the coming months.
In all honesty, I'm disappointed in both Anthropic and Google here for how slapdash these applications seem considering the basic concept of wiring an LLM to your local shell and letting it run commands is an idea people have been playing with for two years now. These applications are both written in node.js and look like something I'd expect one person to produce in a month or two of working at the problem.
The Challenge
I wanted to see if I could take my format_strings library from v0.1 straight to v1.0 without the many nights and weekends it would have taken me to do it manually during which I probably would have gotten bored and abandoned the project.
For this task I selected Claude Code with their most powerful Opus model. I knew this would be a project requiring substantial design and implementation work. Also I had some Anthropic credits that would have expired soon.
Preparation
To help Claude stay on task, I told it to start by writing a design document for a string formatting library that could serve as an exemplary Alire package and balance Ada's compile-time safety with ease-of-use. Claude drafted DESIGN.org because I told it I liked org mode.
It was an ambitious design, and I didn't count on Claude to know where to start, so I asked also to write a detailed road map of incremental implementation milestones with the stipulation that all new features should be accompanied by tests and every commit should compile and pass the tests. Claude drafted ROADMAP.org.