package domain // CourseGoal is a server-owned, versioned learning objective. SeedTaskID is never // sent to Flowise; it provides a reviewed fallback and maps existing attempts. type CourseGoal struct { ID string `json:"id"` Description string `json:"description"` PromptTemplate string `json:"prompt_template"` AllowedForms []string `json:"allowed_forms"` Skill string `json:"-"` SeedTaskID string `json:"-"` } func IntroductionGoals() []CourseGoal { return []CourseGoal{ {ID: "introductions.name", Description: "Bedeutung von name als Name einer Person erkennen; Lösung Name", PromptTemplate: "Was bedeutet „name“ in „My name is “?", AllowedForms: []string{"Name", "Wohnort", "Alter"}, Skill: "vocabulary", SeedTaskID: "a1i_v1_vocab_1"}, {ID: "introductions.from", Description: "Bedeutung ausschließlich des Wortes from bei Herkunft erkennen; Lösung aus", PromptTemplate: "Was bedeutet „from“ in „I am from “?", AllowedForms: []string{"aus", "mit", "bei"}, Skill: "vocabulary", SeedTaskID: "a1i_v1_vocab_2"}, {ID: "introductions.be_i", Description: "am nach I bei der Vorstellung mit Namen oder Herkunft verwenden", PromptTemplate: "Ergänze: I ___ from .", AllowedForms: []string{"am", "is", "are"}, Skill: "grammar", SeedTaskID: "a1i_v1_grammar_1"}, {ID: "introductions.be_name", Description: "is nach My name verwenden", PromptTemplate: "Ergänze: My name ___ .", AllowedForms: []string{"am", "is", "are"}, Skill: "grammar", SeedTaskID: "a1i_v1_grammar_2"}, } } type CourseLearningState struct { GoalAttemptCount int `json:"goal_attempt_count"` GoalCorrectCount int `json:"goal_correct_count"` RecentResults []bool `json:"recent_results"` // Oldest to newest, at most five. } type GenerateCourseTaskRequest struct { Task string `json:"task"` SchemaVersion int `json:"schema_version"` TargetLanguage string `json:"target_language"` CEFRLevel string `json:"cefr_level"` UILanguage string `json:"ui_language"` ModuleID string `json:"module_id"` Skill string `json:"skill"` Kind string `json:"kind"` LearningGoal CourseGoal `json:"learning_goal"` LearningState CourseLearningState `json:"learning_state"` AvoidPrompts []string `json:"avoid_prompts"` Rules string `json:"rules"` RetryInstruction string `json:"retry_instruction,omitempty"` } type GeneratedCourseTask struct { SchemaVersion int `json:"schema_version"` TargetLanguage string `json:"target_language"` CEFRLevel string `json:"cefr_level"` ModuleID string `json:"module_id"` LearningGoalID string `json:"learning_goal_id"` Skill string `json:"skill"` Kind string `json:"kind"` Prompt string `json:"prompt"` Options []string `json:"options"` Solution string `json:"solution"` Explanation string `json:"explanation"` } type CoursePracticeSelection struct { Goal CourseGoal State CourseLearningState AvoidPrompts []string } type CoursePracticeResult struct { Task CourseTask `json:"task"` Source string `json:"source"` }