Clause
Software keeps working long after people forget why it is built the way it is. AI makes that worse: it writes reasonable-looking changes faster than anyone can check them against the original design. Clause is my attempt to make the reasons a permanent, checkable part of the software: written down, linked to the code that carries them out and the tests that prove them, and checked on every change. AI does most of the writing; I decide what should exist and why.
The loss of the why
The idea
A language for design
Prose specifications are readable, but a program can't follow them. Code is precise, but it records what was built, not why, or what it promised. So Clause has its own language for writing designs down. It reads like an ordinary document, but every important idea in it (a requirement, a rule that must always hold, a decision, a place where outside input must be checked) is a named piece that a program can find and follow. Each piece is linked to what it serves and to what depends on it, all the way down to the code that carries it out and the tests that prove it. It turns a design from a description into something the software is held to.
Ask the design questions
What breaks if I change this rule? Which promises have no test yet? What has to be built first?
Tests that mean something
The design asks for its tests, and a test only counts if it would fail when the code is wrong.
Change with known reach
When a design changes under finished code, everything built on it is flagged at once, not months later.
Decide once, hold everywhere
A way of building things is chosen once, and every part that uses it is held to it.
Safety where it matters
Places where outside input enters declare what must be tested, and count only when those tests ran.
Honest gaps
Something can be left for later, but only openly, with a reason and a date to come back to it.
Built with itself
Used on real robotics software
In parallel, I have been using Clause on a real-time robotics library in C++ and CUDA, running on both CPU and GPU: 3-D geometry, collision detection, the kinematics of robot arms, and motion planning. Its design is written in the Clause language, and its code and tests are tied to that design. This is exactly the kind of software where design drift is expensive. That work is paused for now, while the core of Clause moves forward.
How the work is done
Intent
What the system is meant to do, and why.
Design
The parts, the rules, and how they relate.
Promises
What each piece of code commits to.
Code
Each piece points back to the promise it keeps.
Evidence
Tests and reviews that show each promise is kept.