index_lessons_from_markdown
Parse Markdown lesson blocks and insert or update them in a SQLite lessons table, returning indexed, created, updated counts and parser warnings.
Instructions
Index lessons from a markdown file directly into SQLite.
Same logic as index_rules_from_markdown but targets the lessons table.
Access level: write. Returns: JSON with indexed/created/updated counts, a per-scope breakdown, and any parser warnings or errors.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | 'atomic': parse canonical ## LL-XXX-NNN blocks (the {TECH} segment is optional — plain ## LL-NNN is also accepted) and upsert them directly into lessons/lesson_history. 'legacy': parse old ### blocks into pending_proposals only, never writing to lessons directly. | atomic |
| filepath | Yes | Path to the source .md file containing lesson blocks. | |
| default_scope_id | Yes | Scope assigned to blocks that don't declare their own **Scope:** field (e.g. 'global-java', 'project-<id>'). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |