format: 1id: use-cases-firsttitle: Your app as use casesdescription: Describe what people can do in your app, and what can go wrong.level: [starter, builder]language: eslanguages: [es, en]lessons: [what-is-a-use-case, failures-have-names, journeys, the-map-is-the-scope]checkpoints: [the-map-is-the-scope]
Field
Type
What it is
format
1
the format version; tools refuse one they do not know
id, title, description
text
the course; id matches ^[a-z][a-z0-9-]{1,62}$
level
list
the levels it is written for
language, languages
codes
the language it was made in first, and every language it has
lessons
list
lesson ids, in order
checkpoints
list
lessons that, once passed, let Learn propose the next level
---id: failures-have-namestitle: Failures have namesgoal: You can name what can go wrong in a case, and what the person is told.level: [starter, builder]step: mapneeds: [what-is-a-use-case]minutes: 8video: file: media/failures-have-names.mp4 captions: { es: media/failures-have-names.es.vtt, en: media/failures-have-names.en.vtt } chapters: [{ at: 0, title: A case that can fail }, { at: 95, title: What the customer reads }]uses: case: { has: failures }exercise: brief: Add a case where a customer cancels an order, with the failure that says it is too late. checks: - cases-check - case: { exists: true, has: failures } - question: why-name-it---Your case «{{case.title}}» can end badly: {{case.failures[0].name}}.:::level starterThink of what your customer reads when that happens. That sentence is part of your app.::::::level builderThe failure's `name` is what the code and the traces use; its `tell` is what the person reads.::::::question why-name-itWhy give a failure a name instead of showing «Error»?- [x] So the person knows what happened and what to do- [ ] So the app looks more technical:::
The header
Field
Required
What it is
id, title
yes
a stable id and the title people see
goal
yes
one sentence: what you can do after the lesson
level
yes
the levels it is written for
step
yes
where it sits in the Sypnia way: idea, map, contract, design, data, code, publish or production
needs
no
lessons it expects you to have done; shown, never enforced
minutes
no
about how long it takes
video
no
the file, its captions per language and its chapters
the brief, the branch (default learn/<id>) and the checks (Checks)
Selectors in uses
Slot
Selector
Picks
case
has: failures, has: where, writes: 2
a case with failures, with a place in the app, or writing at least two tables
table
rls: true
a table with row-level security
trace
error: true
a trace that ended in a failure (preview or test by default)
promise
true
a promise of the landing page with its cases
With no match, the slot is filled from the sample project, La Espiga.
The body
Markdown, with the slots {{case.title}}, {{case.id}}, {{case.failures[0].name}}, {{table.name}}, {{trace.case}} filled from the chosen items.
Level blocks:::level starter builder … ::: appear only for those levels. Text outside them is for everyone.
Questions:::question <id> … ::: with options; [x] marks the right ones. A question can be a check.
Rules
One file per language: failures-have-names.lesson.md is the course’s first language, failures-have-names.en.lesson.md another one. Same header fields; only text changes.
Unknown fields are kept and reported as warnings. Your own fields start with x-.