feat: theme-level weekly sessions and theme-grouped knowledge library
- New theme_sessions + theme_session_completions PocketBase collections - Generate a detailed per-week theme summary covering every topic in the week's curriculum slot via EMIT_THEME_SESSION_TOOL; cache per (curriculum_version, week_number) - Replace Leren.jsx "This Week's Topic" card with "This Week's Theme Session" that opens the new ThemeSessionView; per-topic micro-learnings remain reachable as optional practice from inside the session - Group the Knowledge Library by topic.theme, pin the current week's theme on top, and badge topics already covered by the active session - Mark week complete when the user finishes reading the theme session Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -418,3 +418,39 @@ export const EMIT_FLASHCARD_SET_TOOL = {
|
||||
},
|
||||
};
|
||||
|
||||
// ── Theme session (theme-level weekly summary) ───────────────────────────────
|
||||
|
||||
export const EMIT_THEME_SESSION_TOOL = {
|
||||
name: 'emit_theme_session',
|
||||
description: 'Return a detailed weekly theme session that synthesises every topic in the week into one coherent learning experience. Cover each topic in its own section and finish with how the topics connect plus key takeaways for the theme.',
|
||||
input_schema: {
|
||||
type: 'object',
|
||||
properties: {
|
||||
title: { type: 'string', description: 'A short, learner-facing title for this weekly theme session. 3–8 words.' },
|
||||
intro: { type: 'string', description: 'One-paragraph introduction (3–5 sentences) framing the theme and why it matters to a Respellion employee this week.' },
|
||||
topicSections: {
|
||||
type: 'array',
|
||||
description: 'One section per topic in the week. Use the topic_id you were given so the UI can link back to per-topic practice.',
|
||||
items: {
|
||||
type: 'object',
|
||||
properties: {
|
||||
topic_id: { type: 'string', description: 'The id of the topic this section covers (must match one of the topic ids provided).' },
|
||||
label: { type: 'string', description: 'The topic label, as provided.' },
|
||||
summary: { type: 'string', description: 'Detailed summary of the topic in HTML. Use <p>, <ul>, <li>, <strong>. At least 4 sentences with a concrete example or application.' },
|
||||
},
|
||||
required: ['topic_id', 'label', 'summary'],
|
||||
},
|
||||
minItems: 1,
|
||||
},
|
||||
connections: { type: 'string', description: 'A short HTML paragraph (2–4 sentences) explaining how the topics in this week connect to each other within the theme.' },
|
||||
keyTakeaways: {
|
||||
type: 'array',
|
||||
items: { type: 'string' },
|
||||
minItems: 3,
|
||||
description: 'At least 3 punchy bullet takeaways covering the theme as a whole.',
|
||||
},
|
||||
},
|
||||
required: ['title', 'intro', 'topicSections', 'connections', 'keyTakeaways'],
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user