21. CLI Project (pocket version)
TL;DR (5 lines)
- A first program must be complete, not decorative.
- The entry contract matters from the beginning.
- A single procedure is enough to teach flow and failure.
- The invalid example should isolate one structural mistake.
- The goal is understanding the whole program shape, not memorizing tokens.
Concrete Problem
Beginners often see the first file as a bag of syntax instead of the smallest end-to-end executable program.
Coherent example
space demo/starting
proc greet(name: string) -> int {
if name == "" { give 11 }
give 0
}
entry main at core/app {
return greet("world")
}
Global explanation
The first chapter should prove one thing clearly: a Vitte project is an entry point, a small contract, and an observable result. That is enough to understand before learning richer constructs.
Short exercise
Extend the example with one small data form and keep the same clean flow from input to exit code.
Next best action
Keep the example small, reproduce it locally, then continue to the full chapter if you need the broader context.