Writing lessons
How to write a lesson that works at every level, binds to the learner's project, and is checked fairly.
One lesson, one goal
A lesson teaches one thing you can then do, written as its goal: «You can name what can go wrong in a case». If the goal needs «and», it is two lessons.
Start from a case
Lessons follow the Sypnia way: start from what a person does in the app, and only then talk about screens, tables or code. Set step to say where the lesson sits.
Write once, for every level
Write the shared explanation for everyone, then add what only some levels need in level blocks. A starter needs the idea and what the customer sees; a developer needs the names and the code. Avoid writing four separate lessons.
Use the learner’s project
Ask for examples with uses, and write with the slots ({{case.title}}). Then preview the lesson as different people:
npx @sypnia/learn preview failures-have-names --level starter --project sample
npx @sypnia/learn preview failures-have-names --level developer --project la-espigaCheck the goal, not the answer
- Prefer checks that prove the goal: a
casewith a failure, a passingcases-check, atestscommand. - Avoid checks on the exact text of a file: there are many right answers.
- At most one
question, about understanding, never about memory. - Keep exercises small: one case, one change.
Code stays in English
In every language, file names, commands, case and failure names stay in English. Explain them; never translate them.
Publish
npx @sypnia/learn lint ./learn/use-cases-first
npx @sypnia/learn courses add ./learn/use-cases-firstOn your own engine, publishing needs the admin scope. In Sypnia Cloud, an organization’s owners and admins publish courses for their own members.