/**
 * Validation for literacy task definitions.
 */
/**
 * Validate a literacy task definition.
 */
export function validateLiteracyTask(task) {
    const errors = [];
    if (!task.id)
        errors.push({ field: "id", message: "Task ID is required" });
    if (!task.title) {
        errors.push({
            field: "title",
            message: "Task title is required",
        });
    }
    const promptText = task.prompt?.text ??
        task.prompt?.template ??
        task.prompt?.vars?.task ??
        "";
    if (!promptText) {
        errors.push({
            field: "prompt",
            message: "Task prompt text is required",
        });
    }
    return errors;
}
