feat(mcp): summary-by-default transcripts + new get_lesson_transcript tool - #46
Merged
Merged
Conversation
… tool For tonight's Week 3 / Connectors session: get_lesson now defaults to a short admin-written transcript summary instead of the full ~30-100K-char transcript markdown. The full transcript moves to a new dedicated tool, get_lesson_transcript, that callers reach for explicitly when they need verbatim quotes or specific moments. This is the right architectural posture — student queries like "what did we cover in week 2" hit a cheap response (~15K chars instead of 110K), while "pull the verbatim transcript" remains available with one tool call. Aaron writes summaries via admin_upsert_lesson by piping the transcript through Claude during/before the session — itself a great demonstration of the connector-as-collaborator workflow. ## Schema (migration 0022) ALTER TABLE lessons ADD COLUMN transcript_summary text; Schema-only addition. Existing rows stay NULL until summarized. ## get_lesson response shape Drops `transcriptMarkdown` from the default. Adds: - `transcriptSummary` — the short admin-written summary - `hasTranscript` — boolean flag for the existence of the full version - `hasTranscriptSummary` — boolean flag for the summary The recordingUrl stays in the response (it's tiny). list_lessons gets the same hasTranscriptSummary flag so Claude can chain confidently. ## get_lesson_transcript (new tool) Args: weekNumber (required), cohortSlug (optional, defaults via the existing resolveActiveCohortSlug). Returns the full transcriptMarkdown + recordingUrl. Description steers callers toward get_lesson for the common case and reserves this tool for "I need verbatim." ## admin_upsert_lesson Adds optional transcriptSummary input. Aaron's workflow: 1. get_lesson_transcript(weekNumber=2) → pull the transcript 2. Ask Claude "summarize this in 1-2 paragraphs" 3. admin_upsert_lesson(cohortSlug, weekNumber=2, transcriptSummary='…') All inside Claude.ai, no platform-side code change needed to ship a summary for a week. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
For tonight's Week 3 / Connectors session:
get_lessondefaults to a short admin-written transcript summary instead of the full ~30-100K-char transcript markdown. The full transcript moves to a new dedicated tool,get_lesson_transcript, reached for explicitly when callers need verbatim quotes or specific moments.Right architectural posture: student queries like "what did we cover in weeks 1 and 2" hit a cheap response (~15K chars instead of 110K), while "pull the verbatim transcript" stays available with one tool call. Aaron writes summaries via
admin_upsert_lessonby piping the transcript through Claude during/before the session — itself a great live demo of the connector-as-collaborator workflow.Migration 0022 (needs your migration approval)
Schema-only addition. Existing rows stay NULL until summarized. Verified locally.
get_lessonresponse shapeDrops
transcriptMarkdown. Adds:transcriptSummary— the short admin-written summary (NULL until written)hasTranscript— boolean for existence of the full versionhasTranscriptSummary— boolean for the summaryrecordingUrlstays (it's tiny — 80 chars).list_lessonsgets the samehasTranscriptSummaryflag so Claude can chain confidently.Updated description steers callers: "The full session transcript is intentionally NOT in this response (it can be 30-100K chars per week and bloats context); reach for get_lesson_transcript when you need verbatim quotes or specific moments."
get_lesson_transcript(new tool)Description tells Claude to prefer
get_lessonfor the common case and reserve this for "I need verbatim."admin_upsert_lessonAdds optional
transcriptSummaryinput. Aaron's live demo workflow:get_lesson_transcript(weekNumber=2)→ pull the transcriptadmin_upsert_lesson(cohortSlug='cohort-1', weekNumber=2, transcriptSummary='…')All inside Claude.ai, no platform-side code change needed to ship a summary.
Setup-guide block for Week 3 lesson body
Aaron — the existing block from #45 still works for student onboarding. For tonight's facilitator demo of writing a summary, the moves are:
Test plan
npx tsc --noEmitclean (CI runs)npm run db:migrate:localapplies cleanly;transcript_summarycolumn addedget_lesson(weekNumber=2)→ returns summary (NULL initially), no transcriptMarkdown, hasTranscript: trueget_lesson_transcript(weekNumber=2)→ returns full 96K-char transcriptadmin_upsert_lesson(...transcriptSummary=…)→ writesget_lesson(weekNumber=2)again → summary now populatedNotes
🤖 Generated with Claude Code