Generate structured lesson plans for guitar students based on their skill level, current songs, and learning goals. Use when preparing for lessons, creating practice schedules, or when a teacher asks for help planning a session.
Generate time-blocked, structured lesson plans by pulling real student data from Supabase (song repertoire, lesson history, notes) and synthesizing it via the AI layer into an actionable session plan.
When invoked, gather these inputs:
profiles table)Then execute:
# Get student profile
mcp__supabase__execute_sql("SELECT * FROM profiles WHERE id = '<student_id>' OR email ILIKE '%<name>%'")
# Get song repertoire with statuses
mcp__supabase__execute_sql("
SELECT s.id, s.title, s.author, s.level, s.key, s.chords, sr.status, sr.updated_at
FROM songs s
JOIN student_repertoire sr ON sr.song_id = s.id
WHERE sr.student_id = '<student_id>'
ORDER BY sr.updated_at DESC
")
# Get recent lessons (last 5)
mcp__supabase__execute_sql("
SELECT l.id, l.lesson_number, l.date, l.notes, l.status,
array_agg(s.title) as songs_covered
FROM lessons l
LEFT JOIN lesson_songs ls ON ls.lesson_id = l.id
LEFT JOIN songs s ON s.id = ls.song_id
WHERE l.student_id = '<student_id>'
GROUP BY l.id
ORDER BY l.date DESC LIMIT 5
")
# Get pending assignments
mcp__supabase__execute_sql("
SELECT a.id, a.title, a.description, a.due_date, a.status
FROM assignments a
WHERE a.student_id = '<student_id>' AND a.status != 'completed'
ORDER BY a.due_date
")
Infer from data:
to_learn songs, < 10 completed lessons, beginner-level songsremembered/mastered songs, 50+ lessons, advanced songsUse the AI layer or structured template to build the plan:
Plan structure for {duration}-minute lesson:
1. Warm-up ({warm_up_time} min)
2. Technique focus ({technique_time} min)
3. Song work ({song_time} min) -- ordered by priority
4. New material / theory ({new_material_time} min)
5. Wrap-up & homework ({wrap_up_time} min)
Render as markdown with time stamps, song priorities, and homework assignments.
| Section | 30 min | 45 min | 60 min |
|---|---|---|---|
| Warm-up | 3 min | 5 min | 5 min |
| Technique | 5 min | 10 min | 15 min |
| Song work | 15 min | 20 min | 25 min |
| New material | 4 min | 5 min | 10 min |
| Wrap-up & homework | 3 min | 5 min | 5 min |
When selecting songs for the lesson, prioritize:
started songs -- actively being learned, highest ROIto_learn songs with pending assignments -- student expects to work on theseremembered songs -- quick review to maintain, spaced repetitionto_learn songs (no assignment) -- introduce if time allowsmastered songs -- skip unless performance prep or student requestsIf the AI layer is available (lib/ai/), use it to enhance the plan:
// Use the lesson-notes agent pattern for generating contextual notes
import { getAIProvider } from '@/lib/ai';
const provider = getAIProvider();
const prompt = `Generate a lesson plan for a ${skillLevel} guitar student.
Recent songs: ${songList}
Recent lesson notes: ${recentNotes}
Duration: ${duration} minutes
Focus: ${focusArea || 'general'}`;
Falls back to the structured template above when AI is unavailable.
# Lesson Plan: {Student Name}
**Date**: {today} | **Duration**: {duration} min | **Level**: {level}
## 1. Warm-up (0:00 - {end_time})
- {exercises based on level}
## 2. Technique Focus ({start} - {end})
- {technique drills relevant to current songs}
## 3. Song Work ({start} - {end})
### Song A: "{title}" by {author} [STATUS: {status}]
- Focus: {specific section or skill}
- Goal: {measurable goal for this session}
### Song B: "{title}" by {author} [STATUS: {status}]
- Focus: {specific section or skill}
- Goal: {measurable goal for this session}
## 4. New Material ({start} - {end})
- {new chord, technique, or theory concept}
## 5. Homework ({start} - {end})
- [ ] {assignment 1 with time estimate}
- [ ] {assignment 2 with time estimate}
- [ ] {assignment 3 with time estimate}
**Notes for next lesson**: {carry-over items}
Input: "Generate a lesson plan for Maria, 45 minutes, focus on fingerpicking"
Input: "Quick 30-min plan for student ID abc-123"
Input: "Create a lesson plan for all my students this week"
lib/ai/index.ts, lib/ai/agents/lesson-notes.tstypes/User.ts, types/StudentRepertoire.ts/api/student/lessons, /api/song/student-songslib/supabase/