Spec-driven development with swe-journal
I built a terminal-based tool using spec-driven development, OpenAI Codex CLI as LLM agent, and versioned spec files.
The project is named swe-journal and is a journaling tool for software
engineers to keep track of what they do during a workday. It’s built with Rust
and ratatui.
I used the following workflow. Start with an empty git repository and a minimal
AGENTS.md file,
prompt the agent to write a first spec file to a specs/ directory, review it,
ask for the implementation, test it, commit.
Then I continued with a prompt asking to create a v2 spec file, based on the
first one. Each spec builds on the previous ones, and you need to read them all in order to
get the full picture.
Here are some prompts I used along the way for the v5 to v7 versions.
Create spec v5. Add nice colors to interface and allow to navigate in
the entries by pressing up and down.
Add spec v6. I want ability to prefix messages with / commands. Add only one
command for now: /code-submitted which take an URL as input (don't accept
non-URL inputs). Display a :rocket: emoji in front of the line in the journal.
Add spec v7. Display all available commands when / is typed with a description
of them, and allow completion.
I finished with a working project available with unit tests, and a few bugs, as well as a clean series of versioned spec files.

I was also tempted to ask for a full rewrite of the project: Read ordered spec files in specs directory. Implement each of them without looking the next ones. Make a commit after each implementation., which is the version visible at tmartinfr/swe-journal.
Got a subtly different version.
Finally, all of the repo content has been written by agent, except for the
AGENTS.md file. I can LLM compile the project from specs alone as many
times as I want.
By Thomas Martin
Follow me or comment