generate-learning-content
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseGenerate or improve exercode learning content
生成或改进 Exercode 学习内容
-
Inspect the requested outcome, repository instructions, and existing learning-content layout. When the user is unavailable (e.g. in an automated workflow), make reasonable decisions from the available context instead of pausing for confirmation; the confirmation steps of the workflows below then fall back to the same rule.
-
If the repository is not prepared for Exercode course authoring, follow setup-exercode-course-repository before authoring.
-
Follow every applicable authoring workflow:
- generate-course-materials for courses, lecture texts, and embedded questions.
- generate-judge-problems for judge v2 problems.
- generate-judge-contest for contests and their problem sets.
Treat both course-material and Judge-problem workflows as applicable when writing, modifying, or executing code is part of the course's learning objective. Do not treat embedded questions or complete code examples as substitutes for graded coding practice. -
Run the validation and evaluation required by every applicable workflow and fix failures until clean.
-
For each generated or changed judge problem, run every model answer through theCLI when
exercode-problemis available: from the problem directory,@exercode/problem-utils(it applies the problem's ownbunx exercode-problem judge model_answers/<languageId>when present and the standard stdio judge otherwise; see generate-judge-problems/references/problem-format.md). Confirm the command exits 0, prints at least onejudge.tsline, and every printed line has the accepted decision codeTEST_CASE_RESULT;2000checks all problems' model answers at once, but runs them without harness params and therefore fails parameterized problems — exclude those withbunx exercode-problem <problemsDir>and judge them individually. Judge each starter template too and confirm it does not pass every test case.--skip <substring> -
Report the generated or changed paths, validation and evaluation performed, assumptions made, and intentionally retained warnings.
-
检查预期结果、仓库说明和现有学习内容布局。当用户无法联系时(例如在自动化工作流中),应根据可用上下文作出合理决策,而不是暂停等待确认;以下工作流中的确认步骤也遵循同一规则。
-
如果仓库尚未准备好用于编写 Exercode 课程,请先按照 setup-exercode-course-repository 进行设置,然后再编写内容。
-
遵循每项适用的编写工作流:
- 对于课程、讲解文本和内嵌问题,遵循 generate-course-materials。
- 对于 Judge v2 题目,遵循 generate-judge-problems。
- 对于比赛及其题集,遵循 generate-judge-contest。
当编写、修改或执行代码属于课程学习目标时,课程资料工作流和 Judge 题目工作流均视为适用。不要将内嵌问题或完整代码示例视为计分编码练习的替代品。 -
运行每项适用工作流所要求的验证和评估,并修复失败项,直至全部通过。
-
对每个生成或更改的 Judge 题目,如果可用,则通过
@exercode/problem-utilsCLI 评测每个模型答案:从题目目录运行exercode-problem(存在题目自身的bunx exercode-problem judge model_answers/<languageId>时使用该文件,否则使用标准 stdio judge;参见 generate-judge-problems/references/problem-format.md)。确认命令以状态码 0 退出、至少打印一行judge.ts,且每条打印结果都使用接受判定码TEST_CASE_RESULT;2000可以一次检查所有题目的模型答案,但由于运行时不提供 harness 参数,因此会判定参数化题目失败——请使用bunx exercode-problem <problemsDir>排除这些题目,并单独进行评测。也应评测每个 starter template,并确认其无法通过所有测试用例。--skip <substring> -
报告生成或更改的路径、已执行的验证和评估、所作的假设,以及有意保留的警告。