save_lesson_draft
Validates and saves a lesson draft to the course's lessons folder, requiring sections: Learning objectives, Prerequisites, Content, Summary, Exercises, Further reading.
Instructions
Step 5 of the course build — save one drafted lesson to disk.
Writes a single lesson's markdown into the course's lessons folder; call it
once per lesson during drafting. The content is validated and rejected
unless it contains all required sections, in order:
## Learning objectives, ## Prerequisites, ## Content (with ### Section N:
subsections), ## Summary, ## Exercises, ## Further reading. The filename is
derived from the lesson number and its title in lessons.json.
Args:
slug: The course slug; selects the
knowledge/courses/<slug>/lessons/ folder to write into.
lesson_id: The lesson id, which must match an id in lessons.json
(e.g. "lesson-01"); used to look up the title and build the filename.
content: The full markdown body of the lesson, including all required
sections listed above.
Returns:
A confirmation with the written file path, or a rejection message
listing the required sections that are missing.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| slug | Yes | ||
| lesson_id | Yes | ||
| content | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |