Build it, then measure one thing
You will learn
Why one number read from a run beats a feeling, and what one run cannot tell you.
When your project runs, pick one thing to measure and read it from the run itself. Made-up example: the reading log was run on 4 titles and kept 3. The share kept is 3 x 100 / 4 = 75 out of 100. That is the whole fact: one run, one number. It does not say what the next run will give, so the widget lists that as nothing yet. The spec has 3 tests: a measure needs at least one run, a run cannot keep more than it was given, and the share is read from the run. Set KEPT to 5 and two of them go red.
Try it
In the spec, set KEPT to 5 and read the 2 tests that fail; then put it back. Pick one thing in your own project that a run can print, and write down how you will read it.
One run of a made-up reading log, one number read from it, and what that number can and cannot tell you. Lesson 26 of the Vibecoding course.
specs/vibecoding/measure.t27
// SPDX-License-Identifier: Apache-2.0
; Vibecoding, lesson 26: Build it, then measure one thing.
; After your project runs, pick ONE thing to measure and read it from a run, not from a hunch.
; Made-up example: the reading log from lesson 25 was run on 4 titles and kept 3 of them.
; The measure is the share kept. Plant a bug: set KEPT to 5 and see which test goes red.
; phi^2 + 1/phi^2 = 3 | TRINITY
module vibecoding_measure;
; What the run printed.
pub const RUNS : u8 = 4;
pub const KEPT : u8 = 3;
test a_measure_needs_at_least_one_run {
assert RUNS > 0;
}
test a_run_cannot_keep_more_than_it_was_given {
assert KEPT <= RUNS;
}
test the_share_kept_is_read_from_the_run {
assert KEPT * 100 / RUNS == 75;
}
All lessons
Module 1 · What vibecoding is
You describe, an agent writes, you run it and check. What a program is, and five myths put to a test.
Module 2 · Your desk
An editor with an agent beside it, ten terminal commands, and reading an error message.
Module 3 · Save points with git
A commit is a save point, a branch is a safe try, and a key is a pair of which one stays private.
Module 4 · Prompting
The parts of a prompt, an example in place of an adjective, and one small step at a time.
Module 5 · The working loop
Four phases from idea to ship, the loop of ask, run, read and fix, and what to do when it is stuck.
Module 6 · A test as the judge
A test says yes or no, a planted bug shows the test works, and a diff is read before it is accepted.
Module 7 · The parts of an agent
What an agent answers with, what it can do with tools, and what it keeps between messages.
Module 8 · A first bot
A bot is a message loop, a bot comes from a spec, and a secret stays out of the repository and the prompt.
Module 9 · Your own project
A spec for your own idea, one thing measured after it runs, and an honest plan for the next month.