Archr
A terminal tool for keeping a project on its intended architecture when most of the code is written by coding agents.
Archr is a terminal tool for reading a whole project, writing down the architecture it's meant to have, and reviewing changes against it. A good portion of my code is now written by coding agents, and I work with them the way I'd work with a team of senior engineers: they write the code, I own the shape of it. Archr is the tool for that second half.
Motivation
Agents write good enough code and weak architecture. Each change looks fine on its own, but the project drifts. Review tools work on a changeset, so they show the drift one diff at a time. Nothing showed me the whole project, what it's meant to be, and where it has gone wrong - and once a project has drifted, there's no diff left to review.
Approach
- Browse the whole project, not just a diff, and read code with its architecture beside it
- Two kinds of note: annotations say what the project is meant to be and last; comments belong to one review and go with it
- Both are plain Markdown with frontmatter, so an agent reads them without help
- Agents work through a CLI: they read comments, reply to them, and propose changes to annotations, but never edit one themselves
Annotations and comments
An annotation is part of the project: it sits on a folder, a file or a range of lines, and it's committed, so it travels with the code and git is its history. A comment is part of one review, and is never committed. When a comment turns out to be a rule rather than a request, one key promotes it to an annotation.
A comment says "change this"; an annotation says "this is how it's meant to be". An agent can push back on the first, and has to respect the second.
Briefing the team
Each project has its own working rules for agents, the way I'd brief a new senior joining the team. A few from Quire's:
- A question gets an answer as its reply, not a change.
- When a comment asks for something an annotation rules out, the annotation wins: stop and ask the human. Never decide between them yourself.
- When an answer of yours turns out wrong, or a later change makes it stale, reply again to the same comment, saying what changed.
Reviewing, tours that agents write to show me how a flow crosses several files, and the rest are in the documentation.
Where it is
Archr is in a live trial on Quire, with Assay, Pulse and Cinder next. Next is re-anchoring: notes don't yet follow their lines when a file changes underneath them. After that, a helicopter view: the project as areas - concepts such as caching that cross folders - each fogged when its code has changed since I last understood it, so I can bring my picture of one part up to date while the rest stays in fog. It's Go, with Bubble Tea and Lip Gloss for the interface.