KBS: Unpacking Todo
Today's change to Knowledge Bases is addressing my unhappiness at the beginning of the month: "Data modeling". I've returned to the work of unpacking Note into Todo, to make it easier to control the TypeID prefix, and prepare for making a Todo repository.
Revisiting Guidance Docs
A handy thing about coding agents: they can make such a wide-ranging change with minimal effort (see the number of changed files in the commit). Additionally, the coding principles guidance doc paid for itself — agent code review noted the duplicated validation logic for title and content now in both Note and Todo and recommended deduplication. I redirected it to encapsulate the validation into new types, a favorite software engineering technique of mine (see "Aside: Correct Construction"), as well as adjusted the guidance.
Reflecting as I write this post, I may distill my correct construction description into a guidance document. I am also realizing that I had to make a correction around favoring use of the Control.Assert module for value assertions, which should probably become a principle.
Activity Prompts
In the course of prompting the coding agent, I started with a codebase analysis to produce an implementation plan document. After the agent produced the document, I asked the coding agent to reflect on the process we followed and write up instructions in prompts/activities/implementation-plan.md. Once we finished the implementation, I prompted a different agent to analyze the changes made and review the changes against the coding principles. And again I asked the agent to reflect on the process we followed and to write up instructions in prompts/activities/code-review.md.
Test-Driven Development
I have heard anecdotal evidence, most recently from Martin Fowler and Simon Willison of the effectiveness of Test-Driven Development (TDD) in keeping agents on task and not cutting corners. I had today's implementation plan include instructions to write unit tests first, run them, and only then edit the code. The jury is still out here — I didn't see any poor behavior, but I also didn't see any above-average performance. I'll keep working the strategy and see where it takes me.
Next Time
- We'll work through creating a repository for Todos.
- If I have enough time / energy, we'll also work on
bs add todo .... - I'll add the correct construction pattern to the guidance.
Related Commits
d5fcf06— refactor: unpack notes into todo