@sokeai/cli 1.0.95 → 1.0.97

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/package.json +1 -1
  2. package/skills/.claude/settings.local.json +7 -0
  3. package/skills/README.md +1 -1
  4. package/skills/mono/ARCHITECTURE_AND_EXTENSION_GUIDE.md +4 -0
  5. package/skills/mono/SKILL.md +24 -1
  6. package/skills/mono/references/modules/README.md +14 -0
  7. package/skills/mono/references/modules/soke-assign/MODULE.md +36 -7
  8. package/skills/mono/references/modules/soke-assign/README.md +18 -20
  9. package/skills/mono/references/modules/soke-exam/MODULE.md +327 -36
  10. package/skills/mono/references/modules/soke-exam-ai-question/MODULE.md +155 -0
  11. package/skills/mono/references/modules/soke-exam-batch/MODULE.md +50 -0
  12. package/skills/mono/references/modules/soke-exam-from-scratch/MODULE.md +106 -0
  13. package/skills/mono/references/modules/soke-exam-from-scratch/references/from-scratch-flow.md +85 -0
  14. package/skills/mono/references/modules/soke-exam-quick-create/MODULE.md +93 -0
  15. package/skills/mono/references/modules/soke-exam-review/MODULE.md +112 -0
  16. package/skills/mono/references/modules/soke-exam-template-create/MODULE.md +55 -0
  17. package/skills/mono/references/modules/soke-supervisor/MODULE.md +2 -0
  18. package/skills/mono/references/workflows/README.md +4 -2
  19. package/skills/multi/README.md +6 -1
  20. package/skills/multi/soke-assign/README.md +16 -18
  21. package/skills/multi/soke-assign/SKILL.md +42 -4
  22. package/skills/multi/soke-assign/references/dependencies/soke-exam.md +18 -579
  23. package/skills/multi/soke-exam/SKILL.md +378 -33
  24. package/skills/multi/soke-exam-ai-question/SKILL.md +155 -0
  25. package/skills/multi/soke-exam-ai-question/references/shared.md +13 -0
  26. package/skills/multi/soke-exam-batch/SKILL.md +97 -0
  27. package/skills/multi/soke-exam-from-scratch/SKILL.md +95 -0
  28. package/skills/multi/soke-exam-from-scratch/references/from-scratch-flow.md +122 -0
  29. package/skills/multi/soke-exam-from-scratch/references/shared.md +18 -0
  30. package/skills/multi/soke-exam-quick-create/SKILL.md +77 -0
  31. package/skills/multi/soke-exam-quick-create/references/quick-create-flow.md +102 -0
  32. package/skills/multi/soke-exam-quick-create/references/shared.md +12 -0
  33. package/skills/multi/soke-exam-review/SKILL.md +122 -0
  34. package/skills/multi/soke-exam-review/references/review-guidance.md +140 -0
  35. package/skills/multi/soke-exam-review/references/review-management.md +40 -0
  36. package/skills/multi/soke-exam-review/references/shared.md +13 -0
  37. package/skills/multi/soke-exam-template-create/SKILL.md +62 -0
  38. package/skills/multi/soke-exam-template-create/references/shared.md +7 -0
  39. package/skills/multi/soke-exam-template-create/references/template-create-flow.md +75 -0
  40. package/skills/multi/soke-supervisor/SKILL.md +2 -0
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: soke-exam
3
- description: "授客考试管理:创建和查询考试、题库、试题、试卷,管理考试用户和成绩。当用户需要创建考试、创建试题、管理题库、查询考试成绩、查看考试列表时使用。 | Soke exam management: create and query exams, question banks, questions, and papers; manage exam users and scores. Use when users need to create exams, create questions, manage question banks, query exam scores, or view exam lists."
3
+ description: "授客正式考试管理:创建、查询、更新、发布和删除考试,管理分类、题库、试题、试卷、指派、阅卷、成绩、模板、题目分析和导入。当用户需要管理正式考试或考试成绩时使用。 | Soke formal exam management: manage exams, categories, question banks, questions, papers, assignments, reviews, results, templates, analysis, and imports."
4
4
  metadata:
5
5
  requires:
6
6
  bins: ["soke-cli"]
@@ -38,10 +38,14 @@ Pool (题库)
38
38
  | Shortcut | 说明 |
39
39
  |----------|------|
40
40
  | [`+list-exams`](#list-exams) | 列出考试列表 |
41
+ | [`+read-list`](#read-list) | 为学习地图读取考试列表 |
41
42
  | [`+get-exam`](#get-exam) | 获取单个考试详情 |
43
+ | [`+check-exam-creation`](#check-exam-creation) | 检查考试创建、试卷关联和人员指派状态 |
44
+ | [`soke-exam-from-scratch`](#从零创建考试) | 从题库/试题/试卷准备后创建并发布考试 |
45
+ | [`+quick-create-exam`](#快速创建考试) | 选已发布试卷快速创建并验收考试 |
42
46
  | [`+list-exam-users`](#list-exam-users) | 列出考试用户成绩列表 |
43
47
  | [`+get-exam-user`](#get-exam-user) | 获取单个考试用户的详细成绩 |
44
- | [`+list-exam-categories`](#list-exam-categories) | 列出考试分类(通过 API) |
48
+ | [`+list-categories`](#list-categories) | 列出正式考试分类 |
45
49
  | [`+list-pool-categories`](#list-pool-categories) | 列出题库分类 |
46
50
  | [`+list-pools`](#list-pools) | 列出题库列表 |
47
51
  | [`+get-pool`](#get-pool) | 获取题库详情 |
@@ -51,12 +55,23 @@ Pool (题库)
51
55
  | [`+get-paper-questions`](#get-paper-questions) | 获取试卷试题列表 |
52
56
  | [`+get-statistic-data`](#get-statistic-data) | 获取考试统计数据 |
53
57
  | [`+list-user-list`](#list-user-list) | 获取考生用户列表 |
58
+ | [`+get-exam-statistics`](#本轮扩展命令与参数规则) | 获取考试统计汇总 |
59
+ | [`+list-review-exams`](#本轮扩展命令与参数规则) | 查询考试级阅卷队列 |
60
+ | [`+list-exam-results`](#本轮扩展命令与参数规则) | 查询指定考试阅卷结果/成绩 |
61
+ | [`+list-review-results`](#本轮扩展命令与参数规则) | 兼容入口:按 action 查询成绩/阅卷结果 |
62
+ | [`+get-review-result`](#本轮扩展命令与参数规则) | 查询阅卷结果详情 |
63
+ | [`+list-reviewers`](#本轮扩展命令与参数规则) | 查询阅卷人 |
64
+ | [`+list-templates`](#本轮扩展命令与参数规则) | 查询考试模板 |
65
+ | [`+list-question-analysis`](#本轮扩展命令与参数规则) | 查询题目分析 |
66
+ | [`+validate-question-file`](#validate-question-file) | 批量验证 7 种题型结构 |
54
67
 
55
68
  ### 创建/修改类(写)
56
69
 
57
70
  | Shortcut | 说明 |
58
71
  |----------|------|
59
72
  | [`+create-pool-category`](#create-pool-category) | 创建题库分类 |
73
+ | [`+update-pool-category`](#本轮扩展命令与参数规则) | 更新题库分类 |
74
+ | [`+delete-pool-category`](#本轮扩展命令与参数规则) | 删除题库分类 |
60
75
  | [`+create-pool`](#create-pool) | 创建题库 |
61
76
  | [`+update-pool`](#update-pool) | 更新题库 |
62
77
  | [`+create-question`](#create-question) | 创建试题 |
@@ -65,13 +80,210 @@ Pool (题库)
65
80
  | [`+delete-paper`](#delete-paper) | 删除试卷 |
66
81
  | [`+set-paper-score`](#set-paper-score) | 设置试卷分值 |
67
82
  | [`+create-exam`](#create-exam) | 创建考试 |
83
+ | [`+get-share-link`](#快速创建考试) | 获取分享考试链接 |
68
84
  | [`+update-exam`](#update-exam) | 更新考试 |
69
85
  | [`+import-paper`](#import-paper) | 关联试卷到考试 |
70
86
  | [`+assign-exam`](#assign-exam) | 指派考试给用户 |
71
87
  | [`+get-assign`](#get-assign) | 查询考试指派情况 |
88
+ | [`+delete-exam`](#本轮扩展命令与参数规则) | 删除考试 |
89
+ | [`+batch-update-exams`](#本轮扩展命令与参数规则) | 批量更新考试 |
90
+ | [`+batch-close`](#本轮扩展命令与参数规则) | 批量关闭考试 |
91
+ | [`+batch-assign`](#本轮扩展命令与参数规则) | 批量指派考试 |
92
+ | [`+batch-publish`](#本轮扩展命令与参数规则) | 批量发布考试 |
93
+ | [`+batch-delete`](#本轮扩展命令与参数规则) | 批量删除考试 |
94
+ | [`+delete-pool`](#本轮扩展命令与参数规则) | 删除题库 |
95
+ | [`+update-question`](#本轮扩展命令与参数规则) | 更新试题 |
96
+ | [`+delete-question`](#本轮扩展命令与参数规则) | 删除试题 |
97
+ | [`+batch-delete-questions`](#本轮扩展命令与参数规则) | 批量删除试题 |
98
+ | [`+select-paper-questions`](#本轮扩展命令与参数规则) | 选题组卷 |
99
+ | [`+select-questions-to-exam`](#本轮扩展命令与参数规则) | 从指定题目生成试卷并关联已有考试 |
100
+ | [`+delete-paper-question`](#本轮扩展命令与参数规则) | 从试卷删除题目 |
101
+ | [`+clone-paper`](#本轮扩展命令与参数规则) | 克隆试卷 |
102
+ | [`+save-review-result`](#本轮扩展命令与参数规则) | 保存阅卷结果 |
103
+ | [`+change-score`](#本轮扩展命令与参数规则) | 修改成绩 |
104
+ | [`+set-reviewers`](#本轮扩展命令与参数规则) | 设置阅卷人 |
105
+ | [`+clear-exam-record`](#本轮扩展命令与参数规则) | 清除考试记录 |
106
+ | [`+save-template`](#本轮扩展命令与参数规则) | 保存考试模板 |
107
+ | [`+copy-template`](#本轮扩展命令与参数规则) | 套用考试模板 |
108
+ | [`+delete-template`](#本轮扩展命令与参数规则) | 删除考试模板 |
72
109
 
73
110
  ---
74
111
 
112
+ ## 本轮扩展命令与参数规则
113
+
114
+ 本 Skill 管理正式考试及其题库、试题、试卷和成绩;需要使用已发布试卷快速创建多种考试类型时,路由到 `soke-exam-quick-create`。调用链固定为 `soke-cli → open-dev /skills/* → new_soke`。不得绕过 CLI 直接请求 HTTP,也不得把 `soke-exam-question-pool` 的练习答题接口当作正式考试管理接口。
115
+
116
+ ### 从零创建考试
117
+
118
+ 当用户要求“从零创建一场完整考试”,且题目已经由 `soke-exam`/`soke-exam-ai-question` 准备、试卷已经由 S3 组卷并发布时,路由到 [`soke-exam-from-scratch`](../soke-exam-from-scratch/SKILL.md)。该 Skill 只负责承接真实 `paper_id`,创建考试、关联试卷、发布考试和执行创建后完整性检查;不重复创建题库、试题或试卷。
119
+
120
+ ### 快速创建考试
121
+
122
+ 需要“已发布试卷 → 创建考试 → 关联 → 发布 → 验收”时,使用:
123
+
124
+ ```bash
125
+ soke-cli exam +quick-create-exam \
126
+ --type normal|test|share|exercise|operate|periodic|drill \
127
+ --title '<考试名称>' \
128
+ [--category-path '["<exam_category_uuid>"]'] \
129
+ [--course-id <course_uuid>] \
130
+ [--set-time 1 --start-time '<开始时间>' --end-time '<结束时间>'] \
131
+ [--draft|--skip-publish] \
132
+ (--paper-id <published_paper_uuid> | --paper-title '<精确试卷标题>') \
133
+ --format json
134
+ ```
135
+
136
+ 线上合法组合固定为 `normal/test/share/operate + sub_type=0`,以及 `exercise + sub_type=0/1/2/3/4`。练习子类型固定为 `0=小练兵`、`1=一日一练`、`2=一周一练`、`3=一月一练`、`4=自定义周期`。`periodic` 只是 CLI 周期考试别名,必须显式传 `--sub-type 1..4` 后再转换成 `exercise`;漏传会在创建前失败。只有自定义周期传正数 `--cycle-day`(每隔多少天),日/周/月练不能传该参数。`drill` 是小练兵别名,固定转换成 `exercise + sub_type=0`。除课程 `test` 外都走通用创建、关联和发布;`test` 必须带 `course-id`,由课程接口完成绑定。命令会确认试卷 `status=1` 并执行创建后检查。
137
+
138
+ 只要用户说出“一日/一周/一月/N 天一练”,Skill 就必须显式传 `--sub-type 1/2/3/4`;CLI 不再为 `periodic` 猜默认子类型。创建后使用 `+check-exam-creation --expected-sub-type` 验收,`sub_type=4` 再传 `--expected-cycle-day`。
139
+
140
+ 分享考试发布后,用以下命令读取接口返回的 `data.url`:
141
+
142
+ ```bash
143
+ soke-cli exam +get-share-link --exam-id <share_exam_uuid> --format json
144
+ ```
145
+
146
+ ### 新增查询与管理命令
147
+
148
+ ```text
149
+ +list-categories 正式考试分类
150
+ +create-category / +update-category / +delete-category
151
+ +update-pool-category / +delete-pool-category
152
+ +read-list 学习地图读取考试列表
153
+ +update-question / +delete-question / +batch-delete-questions
154
+ +delete-pool
155
+ +select-paper-questions / +select-questions-to-exam / +delete-paper-question / +clone-paper
156
+ +delete-exam / +batch-update-exams / +batch-close / +batch-assign / +batch-publish / +batch-delete / +get-exam-statistics
157
+ +list-review-exams / +list-exam-results / +list-review-results
158
+ +get-review-result / +list-result-screenshots
159
+ +list-reviewers / +set-reviewers / +save-review-result / +change-score
160
+ +clear-exam-record
161
+ +list-templates / +get-template / +save-template / +copy-template / +delete-template
162
+ +list-question-analysis / +get-question-analysis
163
+ +validate-question-file
164
+ +check-exam-creation
165
+ ```
166
+
167
+ 导入和快速组卷命令为:
168
+
169
+ ```text
170
+ +import-question-editor / +import-question-editor-exam
171
+ +import-question-file / +import-questions-to-exam
172
+ +import-questions-to-many-paper-exam / +import-many-papers-to-exam
173
+ +create-exam-paper-from-import / +create-random-exam-paper
174
+ ```
175
+
176
+ ### 参数规则
177
+
178
+ - 已知标量使用独立 flag;数组和对象使用 `--xxx-json` 或 `--xxx-file`,例如 `--paper-ids-file`、`--data-file`、`--user-list-file`。
179
+ - `+create-exam`/`+update-exam` 支持证书、积分/学分、提醒、防作弊、随机、答题保存、电子签名和阅卷配置等高级字段;完整字段以当前命令 `--help` 为准。
180
+ - 证书关联属于考试高级功能,使用 `--certificate-id`、`--certificate-title`、`--set-certificate-status`、`--set-certificate-rule`、`--certificate-rule-json/--certificate-rule-file`,不使用单独的 `+link-certificate`。
181
+ - `+create-exam` 的老项目创建接口要求 `--set-time 1`、`--start-time` 和 `--end-time`;传入 `--paper-id` 时 CLI 会在创建成功后自动调用 `+import-paper` 对应接口,不能只依据创建响应判断已关联。
182
+ - 试题的老项目多选题类型值是 `choice`,不是 `multiple_choice`。`+create-question`、`+update-question`、`+validate-question-file` 和编辑器 JSON 导入兼容接受 `multiple_choice`,CLI 会在发给老项目前归一化为 `choice`;`+create-paper` 的 `--type-metas-json`、选题组卷的 `--question-count-json` 和 `--type-metas-json` 必须始终使用 `choice`。
183
+ - `+create-question` 默认不自动重试写请求,避免服务端已落库但响应异常时生成重复题目。只有确认题库中没有新增题目后,才可显式使用 `--retry-transient` 对无 `request_id` 的系统故障最多重试 3 次。
184
+ - `+delete-question` 与 `+batch-delete-questions` 都使用老项目 `examQuestion/batchDelete`,请求按表单字段 `questionIds[0]...` 和必填 `poolId` 发送;不要再调用已在部分环境返回 404 的直删路径。`+list-questions` 默认发送 `status=all`,并使用老项目识别的 `poolId` 筛选题库。
185
+ - 创建或更新考试时 CLI 发送 `minute`/`second`;老项目控制器内部计算 `max_duration = minute * 60 + second` 并落库。`max_duration=0` 表示不限时,周期考试也允许传非零时长;Skill 不得自行改发 `max_duration`。
186
+ - `+update-exam` 每次都必须传 `--title`。CLI 会先读取当前考试详情,再补齐未传字段,避免老项目覆盖式 PUT 把类型、时间、及格分等字段重置;显式传入的 `false/0` 会被保留并发送。传入 `--paper-id` 时会在更新后单独关联试卷。
187
+ - 文件导入支持 `--file-key`,也支持本地 `--file`:CLI 先通过 OSS 签名流程上传,再把生成的 `fileKey` 传给 open-dev。编辑器题目 JSON 由 CLI 按老项目 Base64 URL-safe 约定编码。
188
+ - 导入和模板相关命令支持 `--payload-json/--payload-file` 传递尚未单独映射的老接口字段,但不得用它替代已有独立 flag;阅卷/改成绩分别使用各自的 `--data-json/--data-file`。
189
+
190
+ ### 考试列表状态与写操作回查
191
+
192
+ `+list-exams` 的 `--status` 必须按老项目状态值传递:`0=草稿`、`1=已发布`、`2=已关闭`。当用户在对话中查询“关闭中/已关闭/已关闭的考试”时,必须明确调用:
193
+
194
+ ```bash
195
+ soke-cli exam +list-exams --status 2 --format json
196
+ ```
197
+
198
+ CLI 会把 `status=2` 传给 open-dev 的 `/skills/exam/list`,open-dev 再覆盖路由默认的 `status=1` 后转发老项目;不得省略该参数,也不要用 `--keyword` 代替状态筛选。
199
+
200
+ `+update-exam --action close` 和 `+delete-exam` 都是“写入后回查”命令:
201
+
202
+ - 关闭:CLI 自动查询 `/skills/exam/detail/{exam_id}`,只有详情中的 `status=2`(或规范化后的 `closed`)且更新请求成功,才返回 `ok=true`。
203
+ - 删除:CLI 自动查询同一详情接口,只有删除请求成功且详情明确返回 404/不存在/已删除,才返回 `ok=true`。
204
+ - 详情仍存在、网络/权限/500 错误或无法判断时,不得报告操作成功;使用 `--format json` 查看 `update/delete` 和 `info` 原始回查结果。
205
+
206
+ ### 批量更新约束
207
+
208
+ `+batch-update-exams` 当前对应老项目 `allow_external` 类型,单次最多 40 个考试;它不负责批量发布、关闭、删除或指派。
209
+
210
+ 批量考试写操作由 `soke-exam-batch` Skill 负责,专用命令和老项目接口如下:
211
+
212
+ | CLI | 老项目接口 | 固定参数 | 数组参数 |
213
+ |---|---|---|---|
214
+ | `+batch-close` | `POST /publicservice/admin/v1/batchOperation/batchClose` | `status=2`、`module=exam` | `uuids[n]` |
215
+ | `+batch-assign` | `POST /publicservice/admin/v1/assignLog/batchAdd` | `module=exam`、`learn_type=required` | `target_ids[n]` |
216
+ | `+batch-publish` | `POST /publicservice/admin/v1/PublishSource/batchPublish` | `module=exam` | `uuids[n]` |
217
+ | `+batch-delete` | `POST /publicservice/admin/v1/batchOperation/batchdelete` | `module=exam` | `uuids[n]` |
218
+
219
+ 四个命令都要求 `--exam-ids` 或 `--exam-ids-file` 为非空 JSON 字符串数组,并通过 form-urlencoded 发送索引字段。批量指派还要求 `--users-json/--users-file` 为完整 `users` JSON 对象,可选 `--ignore-users-json/--ignore-users-file`;详细工作流见 [`soke-exam-batch`](../soke-exam-batch/SKILL.md)。执行前必须查询范围、展示确认清单并取得用户明确确认。
220
+
221
+ 老项目可能只返回整体 `code/message/data`,CLI 保留原始返回,不伪造逐项结果。关闭、发布、删除和指派需要逐项确定时,分别使用 `+get-exam` 或 `+get-assign` 回查;批量接口返回业务错误时记录原始错误和 request_id,不盲目重试。
222
+
223
+ `+select-questions-to-exam` 对应老项目 v2 `importQuestion/selectionQuestionToExam`,用于“先创建考试,再从已选题目生成试卷并关联到该考试”的组卷场景。它与 `+select-paper-questions` 不同:后者操作已有试卷,前者在 `action=add` 时由老项目创建试卷并完成考试关联。
224
+
225
+ ```bash
226
+ soke-cli exam +select-questions-to-exam \
227
+ --exam-id <exam_uuid> \
228
+ --title "选题出题" \
229
+ --pool-ids-json '["<pool_uuid>"]' \
230
+ --question-ids-json '["<question_uuid_1>","<question_uuid_2>"]' \
231
+ --question-count-json '{"all":2,"uncertain_choice":2,"single_choice":0,"choice":0,"determine":0,"essay":0,"fill":0,"material":0}' \
232
+ --type-metas-json '{"uncertain_choice":{"count":2,"score":2,"miss_score":0}}' \
233
+ --action add \
234
+ --score-type 1
235
+ ```
236
+
237
+ 参数规则:
238
+
239
+ - `--exam-id`、`--title`、`--pool-ids-json`、`--question-ids-json`、`--question-count-json`、`--type-metas-json` 是该场景的核心输入。
240
+ - `--pool-ids-json` 和 `--question-ids-json` 必须是非空字符串数组;`--question-count-json` 和 `--type-metas-json` 必须是对象。
241
+ - `typeMetas` 支持七种正式考试题型;每个实际题型至少提供 `count`、`score`,`choice`/`uncertain_choice` 还必须提供 `miss_score`。
242
+ - `--action add` 新建试卷并关联考试;`--action edit` 更新已有试卷,必须同时提供 `--paper-id`。
243
+ - 该命令固定使用 `pattern=selection`,不能改为 `questionType` 或 `random`。
244
+ - `action=add` 的老项目成功响应为 `{"code":"save_success","status":"ok","message":"设置成功","data":[]}`,不会返回新建的 `paperId`,也不需要该 ID。该接口已经完成“创建试卷、写入题目、发布试卷、关联考试”;继续使用创建考试时 `data.uuid` 得到的 `exam_id`,直接调用 `+update-exam --action publish` 发布考试。`+get-exam`、`+get-paper` 或 `+list-papers` 只用于发布后的核验。
245
+
246
+ ### 创建后的完整性检查
247
+
248
+ 考试创建、组卷/关联、发布和指派是多个独立写入步骤。完成任一创建流程的关键节点后,必须使用只读命令检查真实状态,不能只依据写接口返回的成功消息:
249
+
250
+ ```bash
251
+ soke-cli exam +check-exam-creation \
252
+ --exam-id <exam_uuid> \
253
+ --expected-title "考试名称" \
254
+ --expected-category-id <exam_category_uuid> \
255
+ --expected-status published \
256
+ --format json
257
+ ```
258
+
259
+ 该命令会检查考试 `uuid/title/category/status`、`paper_id`/`paper_ids`、每个关联试卷的发布状态和题目数、考试与试卷题目数,以及 `+get-assign` 返回的用户/部门/岗位/群组/角色范围。`--min-question-count` 默认是 `1`;需要确认已指派人员时增加 `--require-assignment`,需要确认有效人数时使用 `--min-assignees N`。
260
+
261
+ - 普通创建流程:关联试卷后检查一次;发布考试后用 `--expected-status published` 再检查一次;指派后增加 `--require-assignment` 再检查一次。
262
+ - selection 创建流程:`+select-questions-to-exam` 成功、发布考试后检查一次;不要因为老接口返回 `data=[]` 而跳过检查。
263
+ - 默认未指派人员只产生 `warning`,不影响试卷和考试创建检查;传入 `--require-assignment` 或 `--min-assignees` 后,未满足指派要求会返回非零退出码。
264
+ - `ok=false` 或命令返回非零时,不能向用户输出“考试创建完成”;应根据 `checks`、`errors` 和 `warnings` 继续修复或补做对应步骤。
265
+
266
+ ### 阅卷、成绩和高风险操作
267
+
268
+ 正式考试阅卷查询和创建后的阅卷配置使用独立的 `soke-exam-review` Skill。
269
+
270
+ #### 创建后阅卷配置硬闸门(WorkBuddy)
271
+
272
+ 考试创建、关联、发布、指派和完整性检查后,必须读取 `+get-exam --exam-id <exam_uuid> --format json`。仅当 `info.need_handle=1` 时,在最终报告前真实调用 `AskUserQuestion`(或等价 `ask_user_question`)原生弹窗;第一窗 `header="阅卷方式"`,固定单选“AI阅卷 / 选择阅卷人 / 主管理员阅卷”,不得用聊天正文编号代替。选择阅卷人后,先 `assign +list-users`,再弹出 `header="设置阅卷人"` 的多选窗口;选择主管理员后,从当前 `soke-cli config show` 读取“用户ID”作为 `dept_user_id`,不写死示例 ID。
273
+
274
+ `info.need_handle=0` 或缺失时禁止弹出和阅卷写入。弹窗选择、对应写入和 `+get-exam`/`+list-reviewers` 回查未完成前,即使 `+check-exam-creation` 是 `ok=true` 也不得报告流程完成。用户主动明确跳过时记录 `review_config=skipped` 并说明风险。必须读取并执行 [`../soke-exam-review/references/review-guidance.md`](../soke-exam-review/references/review-guidance.md) 的分支命令和回查规则。
275
+
276
+ 两个语义明确的只读命令固定对应老项目同一路由的两个 action:
277
+
278
+ - `+list-review-exams` → `action=index`,返回考试级阅卷队列;`--reviewing-status` 对应 `reviewing_status`,`--reader-type` 对应 `reader_type`。
279
+ - `+list-exam-results` → `action=resultList`,要求 `--exam-id`,返回指定考试的考生结果;`--status` 对应结果状态,`--from` 对应结果来源。
280
+
281
+ 两个命令都支持 `--page`、`--page-size`/`--limit`、`--keyword`、`--lang`、`--utcoffset`,需要完整老项目字段时使用 `--format json`。`+list-review-results` 保留作为兼容入口,可显式传 `--action index` 或 `--action resultList`。
282
+
283
+ `+save-review-result`、`+change-score`、`+set-reviewers`、`+clear-exam-record`、批量更新、删除、发布、指派范围变更和模板套用执行前必须确认目标与影响范围。`+change-score` 必须提供 `--reason`。写后使用 `+get-exam`、`+get-paper`、`+get-assign` 或 `+get-review-result` 回查,不以 CLI 的成功文字作为唯一完成依据。
284
+
285
+ 模板和题目分析使用 `+list-templates`、`+get-template`、`+save-template`、`+copy-template`、`+delete-template`、`+list-question-analysis`、`+get-question-analysis`;题目分析的 JSON 查询可用 `--format json`,老项目文件流导出需单独验证,不能当成普通 JSON。
286
+
75
287
  ## 试题类型与格式
76
288
 
77
289
  ### 7 种题型一览
@@ -79,7 +291,7 @@ Pool (题库)
79
291
  | type 值 | 中文名 | choices | answer | 特殊说明 |
80
292
  |---------|--------|---------|--------|---------|
81
293
  | `single_choice` | 单选题 | 必传 | `["0"]` 索引数组 | 只有一个正确答案 |
82
- | `determine` | 判断题 | 不需要 | `["0"]` 对 / `["1"]` 错 | 默认选项为对/错 |
294
+ | `determine` | 判断题 | 不需要 | `["1"]` 对 / `["0"]` 错 | 默认选项为对/错 |
83
295
  | `choice` | 多选题 | 必传 | `["0","1"]` 索引数组 | 多个正确答案 |
84
296
  | `uncertain_choice` | 不定项选择 | 必传 | `["0","2"]` 索引数组 | 答案数量不固定 |
85
297
  | `fill` | 填空题 | 不需要 | **不传** | 见下方专节 |
@@ -88,13 +300,13 @@ Pool (题库)
88
300
 
89
301
  ### 填空题(fill)专节
90
302
 
91
- **填空题答案嵌入在 title 中**,使用 `[[答案N]]` 标记(N 从 1 开始),**不传 `--answer` 参数**。
303
+ **填空题答案嵌入在 title 中**,使用 `[[实际答案]]` 标记;多个可接受答案使用 `|` 分隔,**不传 `--answer` 参数**。
92
304
 
93
305
  ```bash
94
306
  # 正确:答案标记嵌入 title
95
307
  soke-cli exam +create-question \
96
308
  --type fill \
97
- --title "鲁班是[[答案1]]国人,本名[[答案2]]。" \
309
+ --title "鲁班是[[鲁国]]人,本名[[公输般]]。" \
98
310
  --answer-type 1 \
99
311
  --pool-id "<pool-uuid>" \
100
312
  --score 5 --difficulty simple
@@ -102,7 +314,7 @@ soke-cli exam +create-question \
102
314
  # 错误:用 ______ 或其他标记 — 后端无法识别,报"答案为空"
103
315
  soke-cli exam +create-question \
104
316
  --type fill \
105
- --title "鲁班是______国人" \ # ❌ 不是 [[答案N]]
317
+ --title "鲁班是______国人" \ # ❌ 不是 [[实际答案]]
106
318
  ...
107
319
  ```
108
320
 
@@ -115,7 +327,8 @@ soke-cli exam +create-question \
115
327
  | `3` | 仅供参考 |
116
328
 
117
329
  **常见错误**:
118
- - 用 `______` / `___` / `(答案1)` 代替 `[[答案1]]` → 后端解析失败
330
+ - 用 `______` / `___` / `(答案1)` 代替 `[[实际答案]]` → 后端解析失败
331
+ - 把 `[[答案1]]` 当作字面占位符 → 老项目会把“答案1”保存为答案,而不是实际答案
119
332
  - 传了 `--answer` 参数 → 对 fill 类型无效,会被忽略
120
333
  - 不传 `--answer-type` → CLI 自动默认 `"1"`,一般不会出问题
121
334
 
@@ -128,20 +341,36 @@ soke-cli exam +create-question \
128
341
  | 类型 | 用途 | 查询方式 |
129
342
  |------|------|---------|
130
343
  | **题库分类** (Pool Category) | 用于 `+create-pool --path` | `soke-cli exam +list-pool-categories` |
131
- | **考试分类** (Exam Category) | 用于 `+create-exam --path` 和 `+update-exam --path` | `soke-cli api GET /skills/examCategory/list` |
344
+ | **考试分类** (Exam Category) | 用于 `+create-exam --category-path`/`--path` 和 `+update-exam --category-path`/`--path` | `soke-cli exam +list-categories` |
132
345
 
133
- **常见错误**:在 `+create-exam` 或 `+update-exam --action publish` 的 `--path` 中传入题库分类 UUID → 报"设置失败"/"分类不能为空"。
346
+ **常见错误**:在 `+create-exam` 或 `+update-exam --action publish` 的 `--path`/`--category-path` 中传入题库分类 UUID → 报"设置失败"/"分类不能为空"。
134
347
 
135
- ### +list-exam-categories
348
+ ### +list-categories
136
349
 
137
350
  列出考试分类(通过 API 查询)。
138
351
 
139
352
  ```bash
140
- soke-cli api GET /skills/examCategory/list
353
+ soke-cli exam +list-categories --format json
141
354
  ```
142
355
 
143
356
  返回 JSON,从 `data.list.list[].uuid` 获取考试分类 UUID。
144
357
 
358
+ 正式考试分类支持完整 CRUD:
359
+
360
+ ```bash
361
+ soke-cli exam +create-category \
362
+ --title "年度考核" \
363
+ [--parent-id <parent_id>] [--path <path>] \
364
+ [--dept-list-file <departments.json>] \
365
+ [--user-list-file <users.json>] \
366
+ [--sort-info-file <sort-info.json>]
367
+
368
+ soke-cli exam +update-category --category-id <category_uuid> --title "新名称"
369
+ soke-cli exam +delete-category --category-id <category_uuid>
370
+ ```
371
+
372
+ 分类创建/更新还支持 `--weight`、`--visible-type`、`--old-title`、`--old-path`、`--type`,以及对应的 `--xxx-json/--xxx-file` 数组或对象参数。
373
+
145
374
  ---
146
375
 
147
376
  ## 命令详解
@@ -153,7 +382,10 @@ soke-cli api GET /skills/examCategory/list
153
382
  ```bash
154
383
  soke-cli exam +create-exam \
155
384
  --title <考试标题> \
156
- [--is-papers 1] \
385
+ --set-time 1 \
386
+ --start-time "2026-09-18 00:00:00" \
387
+ --end-time "2026-12-31 23:59:59" \
388
+ [--paper-id <published_paper_uuid>] \
157
389
  [--source self] \
158
390
  [--path '["<exam_category_uuid>"]']
159
391
  ```
@@ -164,9 +396,12 @@ soke-cli exam +create-exam \
164
396
  | `--is-papers` | 否 | 是否关联试卷:0=否 1=是(默认 0) |
165
397
  | `--is-in` | 否 | 是否内部考试:0=否 1=是(默认 0) |
166
398
  | `--is-offline` | 否 | 是否线下考试:0=否 1=是(默认 0) |
167
- | `--set-time` | 否 | 是否设置考试时间(默认 0) |
399
+ | `--set-time` | 是 | 必须传 `1`,老项目创建接口要求开启时间窗 |
400
+ | `--start-time` | 是 | 考试开始时间 |
401
+ | `--end-time` | 是 | 考试结束时间 |
168
402
  | `--source` | 否 | 来源:self/mall/public(默认 self) |
169
403
  | `--path` | 条件 | **考试分类** ID 数组(不是题库分类),JSON 格式,发布考试时必传 |
404
+ | `--paper-id` | 否 | 已发布试卷 UUID;创建成功后由 CLI 自动调用关联接口 |
170
405
 
171
406
  ---
172
407
 
@@ -189,7 +424,7 @@ soke-cli exam +create-question \
189
424
 
190
425
  | 参数 | 必需 | 说明 |
191
426
  |------|------|------|
192
- | `--title` | 是 | 试题内容,fill 类型必须含 `[[答案N]]` |
427
+ | `--title` | 是 | 试题内容,fill 类型必须含 `[[实际答案]]` |
193
428
  | `--type` | 是 | 题型:single_choice/choice/uncertain_choice/determine/fill/essay/material |
194
429
  | `--score` | 是 | 分值,必须大于 0 |
195
430
  | `--difficulty` | 是 | 难度:simple/medium/hard |
@@ -201,6 +436,25 @@ soke-cli exam +create-question \
201
436
  | `--dept-id` | 否 | 部门 ID |
202
437
  | `--dept-name` | 否 | 部门名称 |
203
438
 
439
+ ### +validate-question-file
440
+
441
+ 在批量录入前验证题目 JSON 是否符合 7 种正式考试题型的结构。该命令只在 CLI 本地校验,不请求接口、不写入题库;校验失败返回非零退出码。
442
+
443
+ ```bash
444
+ soke-cli exam +validate-question-file \
445
+ --questions-file ./questions.json \
446
+ --format json
447
+ ```
448
+
449
+ 也可以直接传数组 JSON:
450
+
451
+ ```bash
452
+ soke-cli exam +validate-question-file \
453
+ --questions-json '[{"title":"1+1=?","type":"single_choice","choices":["1","2"],"answer":["1"],"score":2,"difficulty":"simple"}]'
454
+ ```
455
+
456
+ 校验内容包括:题型枚举、题干、分值、难度、选择题选项与答案索引、判断题答案、填空题 `[[实际答案]]` 与 `answerType`、简答题参考答案/评分依据,以及材料题字段和已传入的 `parent_uuid` 格式。材料题父子关系涉及老项目已存在的 UUID 或服务端生成的 UUID,CLI 不伪造关系;导入 Skill 仍必须单独确认材料题父子关系。
457
+
204
458
  ---
205
459
 
206
460
  ### +create-pool
@@ -225,6 +479,21 @@ soke-cli exam +create-pool \
225
479
  soke-cli exam +create-pool-category --title <分类名称>
226
480
  ```
227
481
 
482
+ 题库分类更新和删除:
483
+
484
+ ```bash
485
+ soke-cli exam +update-pool-category --category-id <category_uuid> --title <新名称>
486
+ soke-cli exam +delete-pool-category --category-id <category_uuid>
487
+ ```
488
+
489
+ ### +read-list
490
+
491
+ 为学习地图等编排场景读取考试列表:
492
+
493
+ ```bash
494
+ soke-cli exam +read-list [--page 1] [--page-size 10]
495
+ ```
496
+
228
497
  ---
229
498
 
230
499
  ### +create-paper
@@ -274,7 +543,7 @@ soke-cli exam +update-paper \
274
543
 
275
544
  ### +update-exam
276
545
 
277
- 更新考试,支持发布。**发布时 `--title` 和 `--path` 必传**,`action` 会映射为后端 `act` 字段。
546
+ 更新考试,支持发布和关闭。**每次更新都必须传 `--title`**,`action` 会映射为后端 `act` 字段;`action` 只允许 `publish`、`close` 或留空。CLI 会先回读详情,补齐老项目覆盖式更新所需的未传字段;`--paper-id` 通过独立关联接口处理。
278
547
 
279
548
  ```bash
280
549
  # 发布考试(title + path 必传)
@@ -288,13 +557,27 @@ soke-cli exam +update-exam \
288
557
  soke-cli exam +update-exam \
289
558
  --exam-id <exam_uuid> \
290
559
  --title <新标题>
560
+
561
+ # 更新并关联试卷
562
+ soke-cli exam +update-exam \
563
+ --exam-id <exam_uuid> \
564
+ --title <考试标题> \
565
+ --paper-id <published_paper_uuid> \
566
+ --format json
567
+
568
+ # 关闭考试;CLI 会自动回查详情并确认 status=2
569
+ soke-cli exam +update-exam \
570
+ --exam-id <exam_uuid> \
571
+ --title <考试标题> \
572
+ --action close \
573
+ --format json
291
574
  ```
292
575
 
293
576
  | 参数 | 必需 | 说明 |
294
577
  |------|------|------|
295
578
  | `--exam-id` | 是 | 考试 UUID |
296
- | `--title` | 条件 | 发布时必传,避免标题被清空 |
297
- | `--action` | 否 | `publish`=发布考试,留空仅更新信息 |
579
+ | `--title` | 是 | 每次更新必传,老项目接口要求标题字段 |
580
+ | `--action` | 否 | `publish`=发布考试,`close`=关闭考试,留空仅更新信息 |
298
581
  | `--path` | 条件 | 发布时必传,**考试分类** UUID 数组 JSON(不是题库分类) |
299
582
 
300
583
  **发布前提**:
@@ -302,6 +585,8 @@ soke-cli exam +update-exam \
302
585
  2. 考试已通过 `+import-paper` 关联了试卷
303
586
  3. 试卷已通过 `+update-paper --action publish` 发布
304
587
 
588
+ 关闭操作的 JSON 结果包含 `update`、`info`、`verified_status` 和 `ok`;详情回查不是 `closed` 时命令返回非零。
589
+
305
590
  ---
306
591
 
307
592
  ### +assign-exam
@@ -317,18 +602,31 @@ soke-cli exam +assign-exam \
317
602
  | 参数 | 必需 | 说明 |
318
603
  |------|------|------|
319
604
  | `--exam-id` | 是 | 考试 UUID |
320
- | `--user-ids` | 是 | 用户 dept_user_id 数组,JSON 格式 |
605
+ | `--user-ids` | 条件 | 用户 dept_user_id 数组,JSON 格式 |
606
+ | `--dept-list-json/--dept-list-file` | 条件 | 部门范围对象数组 |
607
+ | `--position-list-json/--position-list-file` | 否 | 岗位范围对象数组 |
608
+ | `--group-list-json/--group-list-file` | 否 | 群组范围对象数组 |
609
+ | `--role-list-json/--role-list-file` | 否 | 角色范围对象数组 |
610
+ | `--users-json/--users-file` | 条件 | 老项目完整 `users` 对象;不能与便捷范围参数混用 |
611
+ | `--assign-data-json/--assign-data-file` | 兼容 | 旧参数名,按完整 `users` 对象处理 |
612
+ | `--ignore-users-json/--ignore-users-file` | 否 | 忽略用户对象,默认 `{"user_list":[]}` |
613
+ | `--learn-type` | 否 | 学习类型,默认 `required` |
614
+ | `--date` | 否 | `users.date`,默认空字符串 |
615
+
616
+ 至少提供用户、部门、岗位、群组、角色或完整 `users` 之一。CLI 调用老项目 `POST /publicservice/admin/v1/assignLog`,以 form-urlencoded 发送 `module=exam`、`learn_type`、`users`、`ignore_users` 和 `target_id`。
321
617
 
322
618
  **查找用户 ID**:`soke-cli assign +list-users --keyword "姓名"`
323
619
 
620
+ `+assign-exam` 写入后会立即调用 `GET /publicservice/admin/v1/assignLog?module=exam&target_id=...`,按 `data.list[].assign_key` 核对全部目标范围。只有 `verification` 通过且命令退出码为 0 才能报告指派成功;写接口返回 success 但读回缺少用户、部门、岗位、群组或角色时视为未完成。
621
+
324
622
  ---
325
623
 
326
624
  ### +get-assign
327
625
 
328
- 查询考试已指派的用户列表。
626
+ 查询考试的 assignLog 指派结果,包括用户、部门、岗位、群组和角色。
329
627
 
330
628
  ```bash
331
- soke-cli exam +get-assign --exam-id <exam_uuid>
629
+ soke-cli exam +get-assign --exam-id <exam_uuid> --page 1 --page-size 100 --format json
332
630
  ```
333
631
 
334
632
  ---
@@ -360,7 +658,27 @@ soke-cli exam +import-paper \
360
658
  soke-cli exam +get-exam --exam-id <exam_uuid>
361
659
  ```
362
660
 
363
- 返回字段包括:`uuid`, `title`, `status`(0=未发布 1=已发布), `paper_id`, `question_count`, `total_score`, `pass_score` 等。
661
+ 返回字段包括:`uuid`, `title`, `status`(0=草稿/未发布,1=已发布,2=已关闭), `paper_id`, `question_count`, `total_score`, `pass_score` 等。
662
+
663
+ ### +check-exam-creation
664
+
665
+ 检查考试创建后的真实状态,命令只读,不会修改考试、试卷或指派数据。
666
+
667
+ ```bash
668
+ soke-cli exam +check-exam-creation \
669
+ --exam-id <exam_uuid> \
670
+ [--expected-title "考试名称"] \
671
+ [--expected-type periodic --expected-sub-type 1|2|3|4] \
672
+ [--expected-cycle-day <自定义周期间隔天数>] \
673
+ [--expected-category-id <exam_category_uuid>] \
674
+ [--expected-status any|draft|published|closed] \
675
+ [--min-question-count 1] \
676
+ [--require-assignment] \
677
+ [--min-assignees <人数>] \
678
+ --format json
679
+ ```
680
+
681
+ 检查结果包含 `exam_created`、`basic_info`、`expected_sub_type`、`expected_cycle_day`、`paper_associated`、`paper_ready`、`paper_questions`、`assignment` 等项。默认状态允许草稿,默认不把未指派人员作为失败;发布和上线验收时应传 `--expected-status published`,要求人员已指派时应传 `--require-assignment`。检查失败会输出 JSON 报告并返回非零退出码。
364
682
 
365
683
  ---
366
684
 
@@ -371,13 +689,27 @@ soke-cli exam +get-exam --exam-id <exam_uuid>
371
689
  ```bash
372
690
  soke-cli exam +list-exams \
373
691
  [--page <页码>] \
374
- [--page-size <每页条数>]
692
+ [--page-size <每页条数>] \
693
+ [--status 0|1|2]
375
694
  ```
376
695
 
377
696
  | 参数 | 默认值 | 说明 |
378
697
  |------|--------|------|
379
698
  | `--page` | 1 | 页码 |
380
699
  | `--page-size` | 10 | 每页条数 |
700
+ | `--status` | 空 | `0=草稿`,`1=已发布`,`2=已关闭`;查询已关闭考试时必须传 `2` |
701
+
702
+ ### +delete-exam
703
+
704
+ 删除考试。CLI 会在删除请求后自动查询考试详情,只有详情明确表示不存在/已删除才会返回成功。
705
+
706
+ ```bash
707
+ soke-cli exam +delete-exam \
708
+ --exam-id <exam_uuid> \
709
+ --format json
710
+ ```
711
+
712
+ 命令调用老项目大小写敏感的 `POST /publicservice/admin/v1/batchOperation/batchdelete`。JSON 结果包含 `delete`、`info_status` 和 `ok`:`info_status=not_found` 或 `soft_deleted` 且 `ok=true` 表示已确认删除;`exists`、`check_failed` 或 `not_confirmed` 均表示未确认成功。`+batch-delete` 同样逐项回查,任一考试未确认删除时整体返回非零。
381
713
 
382
714
  ---
383
715
 
@@ -487,7 +819,7 @@ soke-cli exam +create-question \
487
819
  # 填空题 — 答案嵌入 title 中,不传 --answer
488
820
  soke-cli exam +create-question \
489
821
  --pool-id "<pool_uuid>" --type fill \
490
- --title "...[[答案1]]...[[答案2]]..." \
822
+ --title "鲁班是[[鲁国]]人,本名[[公输般]]。" \
491
823
  --score 5 --difficulty medium
492
824
 
493
825
  # 4. 创建试卷(从题库按题型抽取)
@@ -506,13 +838,14 @@ soke-cli exam +update-paper \
506
838
  # 5.5 ⚠️ 查找考试分类(注意:考试分类 ≠ 题库分类!)
507
839
  # 题库分类 UUID 用于 pool,考试分类 UUID 用于 exam。两者不同!
508
840
  # 查询已有考试分类:
509
- soke-cli api GET /skills/examCategory/list
841
+ soke-cli exam +list-categories --format json
510
842
  # → 从中选择一个分类 UUID(如无合适的,请联系管理员创建)
511
843
 
512
844
  # 6. 创建考试(--path 必须使用考试分类 UUID,不是题库分类 UUID)
513
845
  soke-cli exam +create-exam \
514
846
  --title "考试名" \
515
- --path '["<exam_category_uuid>"]'
847
+ --path '["<exam_category_uuid>"]' \
848
+ --set-time 1 --start-time "2026-09-18 00:00:00" --end-time "2026-12-31 23:59:59"
516
849
 
517
850
  # 7. 关联试卷到考试
518
851
  soke-cli exam +import-paper \
@@ -551,20 +884,32 @@ soke-cli exam +get-statistic-data --exam-id <exam_uuid>
551
884
  soke-cli exam +list-exam-users --exam-id <exam_uuid>
552
885
  ```
553
886
 
887
+ `+get-statistic-data` 是当前单场统计的事实来源,对应老项目
888
+ `GET /exam/admin/v1/examUser/getStatisticData`,`--exam-id` 必须转为查询参数
889
+ `examId`(驼峰)。返回字段为 `all_num`(应考人数)、`not_attempt_num`(未参加)、
890
+ `not_passed_num`(未通过)、`passed_num`(通过)、`reviewing_num`(阅卷中)、
891
+ `pass_rate`(总通过率)、`attempt_rate`(参加率)、`have_pass_rate`(已参加通过率)
892
+ 和 `is_all_company`。老项目 `Exam::getExamStatistics` 当前只有路由/文档残留,
893
+ 因此 `+get-exam-statistics` 使用同一 `examUser/getStatisticData` 兼容入口。
894
+
895
+ `+list-exam-users` 对应老项目 `GET /exam/admin/v1/examUser`,同样要求 `examId`,
896
+ 用于查看逐个考生记录。若考试没有考生或老项目返回“系统故障”,先保留统计汇总,
897
+ 并将参与者明细标记为“暂无数据/后端异常”;不要把该响应当作 CLI 已取得零条列表。
898
+
554
899
  ---
555
900
 
556
901
  ## 常见问题与排错
557
902
 
558
903
  ### 填空题报"答案为空"
559
904
 
560
- title 中没有使用 `[[答案N]]` 标记。检查:
561
- - `______` → 改成 `[[答案1]]`
562
- - `___` → 改成 `[[答案1]]`
563
- - `(答案1)` → 改成 `[[答案1]]`
905
+ title 中没有使用 `[[实际答案]]` 标记。检查:
906
+ - `______` → 改成 `[[实际答案]]`,例如 `[[鲁国]]`
907
+ - `___` → 改成 `[[实际答案]]`,例如 `[[鲁国]]`
908
+ - `(答案1)` → 改成 `[[实际答案]]`,例如 `[[鲁国]]`
564
909
 
565
910
  ### 填空题报 500 错误
566
911
 
567
- `--answer-type` 未传且 title 含 `[[答案N]]` 时可能触发(CLI 已默认 `"1"`,一般不再出现)。
912
+ `--answer-type` 未传且 title 含 `[[实际答案]]` 时可能触发(CLI 已默认 `"1"`,一般不再出现)。
568
913
 
569
914
  ### 创建成功但没有输出
570
915
 
@@ -586,13 +931,13 @@ API 返回了业务错误(如 `status: "error"`)但没显示。用 `--format
586
931
 
587
932
  ## 注意事项
588
933
 
589
- 1. **填空答案格式**: 必须用 `[[答案N]]` 嵌入 title,不能用 `______` 或自定义标记
934
+ 1. **填空答案格式**: 必须用 `[[实际答案]]` 嵌入 title,不能用 `______` 或自定义标记
590
935
  2. **填空不传 --answer**: fill 类型的 `--answer` 参数会被忽略,答案在 title 标记中
591
936
  3. **--answer-type 默认值**: fill 类型不传时 CLI 自动设为 `"1"`(完全一致)
592
937
  4. **choices key 格式**: `{"key":"A1","value":"A"}` — key 是选项标识,value 是选项文本
593
938
  5. **answer 索引**: 选择题答案用 0-based 索引,`"0"` 表示第一个选项
594
- 6. **判断题 answer**: `["0"]` 对,`["1"]` 错
939
+ 6. **判断题 answer**: `["1"]` 对,`["0"]` 错
595
940
  7. **试卷必须先发布且带标题**: `+update-paper --title "..." --action publish`
596
941
  8. **考试创建时需带分类**: `+create-exam --path '["<category_uuid>"]'`,否则无法发布
597
942
  9. **发布考试**: `+update-exam --title "..." --action publish --path '["<category_uuid>"]'`,`action` 映射为后端 `act` 字段
598
- 8. **考试状态**: status=0 未发布,status=1 已发布
943
+ 8. **考试状态**: status=0 草稿,status=1 已发布,status=2 已关闭;查询已关闭考试使用 `+list-exams --status 2`