# Lesson #001 — PPTX speaker-note bug **Date:** 2026-05-24 **Trigger:** PPTX export missing speaker notes when slide layout = "Title-Only" **Cost:** 14 min debug, 1 user reroll ## What went wrong python-pptx defaults `notes_slide` to *not auto-created* on Title-Only layouts. Joe's `compose_deck()` assumed it always existed → silent dropped notes. ## Root cause (修復) `slide.has_notes_slide` returns False until `.notes_slide` is accessed once. ## Corrected pattern (進化) ```python def ensure_notes(slide): _ = slide.notes_slide # touch to materialize return slide.notes_slide ``` ## Guard added - Unit test `test_speaker_notes_persist.py` in `applelai001/joe` - Lint rule: any `slide.notes_slide` access must go through `ensure_notes()` ## Promotion path After 3 occurrences this graduates into `joe/SOUL.md` as a canonical pattern. --- *Joe lesson notes feed a self-improving agent loop (skill: proactive-self-improving-agent).*