A spec for your own idea
You will learn
How to say an idea as one input, one output and one test, and why an idea with no test is not ready to hand to an agent.
An agent can build only what you can say. The smallest thing you can say about an idea has three parts: one input, one output and one test that tells you it is done. Take a made-up reading log: the input is one book title, the output is how many books are logged, and the test is that after one title the count is 1. The spec of this lesson holds those three as numbers and checks them with 4 tests. Ready means one of each: 1 x 1 x 1 = 1. Set the test count to 0 and the tests that name it go red, because an idea with no test is not ready to hand over. Your own idea can be as small as this one.
Try it
In the spec, set IDEA_TESTS to 0 and read which 2 tests fail; then put it back. Then write your own idea as one input, one output and one test, one sentence each.
The three parts an idea needs before you hand it to an agent, filled in for a made-up reading log. Lesson 25 of the Vibecoding course.
specs/vibecoding/own_spec.t27
// SPDX-License-Identifier: Apache-2.0
; Vibecoding, lesson 25: A spec for your own idea.
; An idea is ready to hand to an agent when you can name its one input, its one output and the
; one test that tells you it is done. This spec is that sentence as a program, for a made-up
; idea: a reading log that takes one book title and answers with how many books are logged.
; Change a number below and see which test goes red. Ready is one of each: 1 x 1 x 1 = 1.
; phi^2 + 1/phi^2 = 3 | TRINITY
module vibecoding_own_spec;
; The idea, in numbers a beginner can count.
pub const IDEA_INPUTS : u8 = 1;
pub const IDEA_OUTPUTS : u8 = 1;
pub const IDEA_TESTS : u8 = 1;
test the_reading_log_has_one_input {
assert IDEA_INPUTS == 1;
}
test the_reading_log_has_one_output {
assert IDEA_OUTPUTS == 1;
}
test the_reading_log_has_a_test_that_says_done {
assert IDEA_TESTS >= 1;
}
test the_idea_is_ready_to_hand_over {
assert IDEA_INPUTS * IDEA_OUTPUTS * IDEA_TESTS == 1;
}
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.