知识点力图推荐在教育管理系统中的价值,在于把考试成绩、学生或班级维度和统计接口转换成可追踪的分析结果。模块需要和现有接口、权限、页面状态保持一致,不能只写成普通后台表格。

本文基于 考试中心/统计可视化_知识点例题推荐_知识点例题推荐 对应源码,把业务目标拆成模型字段、接口规则、页面交互和验收标准,形成 Codex 可执行的项目代码生成任务。
文章目录
设计与需求
知识点力图推荐不能只按普通 CRUD 理解。源码范围包括 server_backend/modules/TestingCenter/models.py、server_backend/modules/TestingCenter/recommend_engine/rank.py、server_backend/modules/TestingCenter/recommend_engine/strategy.py、server_backend/modules/TestingCenter/tasks.py、server_backend/modules/TestingCenter/views_app/QuestionRecommend.py、server_vue3/src/views/modules/TestingCenter/QuestionRecommend/api.ts,这些文件共同决定页面入口、字段保存、接口动作、权限边界和验收口径。交给 Codex 的任务需要明确业务字段、接口前缀、页面回显和异常处理,避免后端字段、前端表单和 PDD 文档相互脱节。
#mermaid-svg-MWEFRxn1frmpZHUh{font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;fill:#333;}@keyframes edge-animation-frame{from{stroke-dashoffset:0;}}@keyframes dash{to{stroke-dashoffset:0;}}#mermaid-svg-MWEFRxn1frmpZHUh .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#mermaid-svg-MWEFRxn1frmpZHUh .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#mermaid-svg-MWEFRxn1frmpZHUh .error-icon{fill:#552222;}#mermaid-svg-MWEFRxn1frmpZHUh .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-MWEFRxn1frmpZHUh .edge-thickness-normal{stroke-width:1px;}#mermaid-svg-MWEFRxn1frmpZHUh .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-MWEFRxn1frmpZHUh .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-MWEFRxn1frmpZHUh .edge-thickness-invisible{stroke-width:0;fill:none;}#mermaid-svg-MWEFRxn1frmpZHUh .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-MWEFRxn1frmpZHUh .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-MWEFRxn1frmpZHUh .marker{fill:#333333;stroke:#333333;}#mermaid-svg-MWEFRxn1frmpZHUh .marker.cross{stroke:#333333;}#mermaid-svg-MWEFRxn1frmpZHUh svg{font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-MWEFRxn1frmpZHUh p{margin:0;}#mermaid-svg-MWEFRxn1frmpZHUh .label{font-family:"trebuchet ms",verdana,arial,sans-serif;color:#333;}#mermaid-svg-MWEFRxn1frmpZHUh .cluster-label text{fill:#333;}#mermaid-svg-MWEFRxn1frmpZHUh .cluster-label span{color:#333;}#mermaid-svg-MWEFRxn1frmpZHUh .cluster-label span p{background-color:transparent;}#mermaid-svg-MWEFRxn1frmpZHUh .label text,#mermaid-svg-MWEFRxn1frmpZHUh span{fill:#333;color:#333;}#mermaid-svg-MWEFRxn1frmpZHUh .node rect,#mermaid-svg-MWEFRxn1frmpZHUh .node circle,#mermaid-svg-MWEFRxn1frmpZHUh .node ellipse,#mermaid-svg-MWEFRxn1frmpZHUh .node polygon,#mermaid-svg-MWEFRxn1frmpZHUh .node path{fill:#ECECFF;stroke:#9370DB;stroke-width:1px;}#mermaid-svg-MWEFRxn1frmpZHUh .rough-node .label text,#mermaid-svg-MWEFRxn1frmpZHUh .node .label text,#mermaid-svg-MWEFRxn1frmpZHUh .image-shape .label,#mermaid-svg-MWEFRxn1frmpZHUh .icon-shape .label{text-anchor:middle;}#mermaid-svg-MWEFRxn1frmpZHUh .node .katex path{fill:#000;stroke:#000;stroke-width:1px;}#mermaid-svg-MWEFRxn1frmpZHUh .rough-node .label,#mermaid-svg-MWEFRxn1frmpZHUh .node .label,#mermaid-svg-MWEFRxn1frmpZHUh .image-shape .label,#mermaid-svg-MWEFRxn1frmpZHUh .icon-shape .label{text-align:center;}#mermaid-svg-MWEFRxn1frmpZHUh .node.clickable{cursor:pointer;}#mermaid-svg-MWEFRxn1frmpZHUh .root .anchor path{fill:#333333!important;stroke-width:0;stroke:#333333;}#mermaid-svg-MWEFRxn1frmpZHUh .arrowheadPath{fill:#333333;}#mermaid-svg-MWEFRxn1frmpZHUh .edgePath .path{stroke:#333333;stroke-width:2.0px;}#mermaid-svg-MWEFRxn1frmpZHUh .flowchart-link{stroke:#333333;fill:none;}#mermaid-svg-MWEFRxn1frmpZHUh .edgeLabel{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-MWEFRxn1frmpZHUh .edgeLabel p{background-color:rgba(232,232,232, 0.8);}#mermaid-svg-MWEFRxn1frmpZHUh .edgeLabel rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-MWEFRxn1frmpZHUh .labelBkg{background-color:rgba(232, 232, 232, 0.5);}#mermaid-svg-MWEFRxn1frmpZHUh .cluster rect{fill:#ffffde;stroke:#aaaa33;stroke-width:1px;}#mermaid-svg-MWEFRxn1frmpZHUh .cluster text{fill:#333;}#mermaid-svg-MWEFRxn1frmpZHUh .cluster span{color:#333;}#mermaid-svg-MWEFRxn1frmpZHUh div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:12px;background:hsl(80, 100%, 96.2745098039%);border:1px solid #aaaa33;border-radius:2px;pointer-events:none;z-index:100;}#mermaid-svg-MWEFRxn1frmpZHUh .flowchartTitleText{text-anchor:middle;font-size:18px;fill:#333;}#mermaid-svg-MWEFRxn1frmpZHUh rect.text{fill:none;stroke-width:0;}#mermaid-svg-MWEFRxn1frmpZHUh .icon-shape,#mermaid-svg-MWEFRxn1frmpZHUh .image-shape{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-MWEFRxn1frmpZHUh .icon-shape p,#mermaid-svg-MWEFRxn1frmpZHUh .image-shape p{background-color:rgba(232,232,232, 0.8);padding:2px;}#mermaid-svg-MWEFRxn1frmpZHUh .icon-shape .label rect,#mermaid-svg-MWEFRxn1frmpZHUh .image-shape .label rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-MWEFRxn1frmpZHUh .label-icon{display:inline-block;height:1em;overflow:visible;vertical-align:-0.125em;}#mermaid-svg-MWEFRxn1frmpZHUh .node .label-icon path{fill:currentColor;stroke:revert;stroke-width:revert;}#mermaid-svg-MWEFRxn1frmpZHUh :root{--mermaid-font-family:"trebuchet ms",verdana,arial,sans-serif;}#mermaid-svg-MWEFRxn1frmpZHUh .input>*{fill:#EEF4FF!important;stroke:#5B8FF9!important;color:#1D39C4!important;stroke-width:1.2px!important;}#mermaid-svg-MWEFRxn1frmpZHUh .input span{fill:#EEF4FF!important;stroke:#5B8FF9!important;color:#1D39C4!important;stroke-width:1.2px!important;}#mermaid-svg-MWEFRxn1frmpZHUh .input tspan{fill:#1D39C4!important;}#mermaid-svg-MWEFRxn1frmpZHUh .design>*{fill:#F6FFED!important;stroke:#52C41A!important;color:#237804!important;stroke-width:1.2px!important;}#mermaid-svg-MWEFRxn1frmpZHUh .design span{fill:#F6FFED!important;stroke:#52C41A!important;color:#237804!important;stroke-width:1.2px!important;}#mermaid-svg-MWEFRxn1frmpZHUh .design tspan{fill:#237804!important;}#mermaid-svg-MWEFRxn1frmpZHUh .process>*{fill:#FFF7E6!important;stroke:#FA8C16!important;color:#AD4E00!important;stroke-width:1.2px!important;}#mermaid-svg-MWEFRxn1frmpZHUh .process span{fill:#FFF7E6!important;stroke:#FA8C16!important;color:#AD4E00!important;stroke-width:1.2px!important;}#mermaid-svg-MWEFRxn1frmpZHUh .process tspan{fill:#AD4E00!important;}#mermaid-svg-MWEFRxn1frmpZHUh .check>*{fill:#F9F0FF!important;stroke:#722ED1!important;color:#531DAB!important;stroke-width:1.2px!important;}#mermaid-svg-MWEFRxn1frmpZHUh .check span{fill:#F9F0FF!important;stroke:#722ED1!important;color:#531DAB!important;stroke-width:1.2px!important;}#mermaid-svg-MWEFRxn1frmpZHUh .check tspan{fill:#531DAB!important;}#mermaid-svg-MWEFRxn1frmpZHUh .output>*{fill:#E6FFFB!important;stroke:#13C2C2!important;color:#006D75!important;stroke-width:1.2px!important;}#mermaid-svg-MWEFRxn1frmpZHUh .output span{fill:#E6FFFB!important;stroke:#13C2C2!important;color:#006D75!important;stroke-width:1.2px!important;}#mermaid-svg-MWEFRxn1frmpZHUh .output tspan{fill:#006D75!important;} 生成阶段
设计阶段
输入阶段
教育需求
知识点力图推荐
页面结构
数据模型
接口规则
权限验收
读取源码
生成代码
验收修复
| 需求层描述 | 设计层转换 | Codex 代码生成方向 |
|---|---|---|
| 业务目标 | 把考试成绩、学生或班级维度和统计接口转换成可追踪的分析结果。 | 生成模块入口、页面结构和业务说明 |
| 数据模型 | recommend_batch_no(推荐批次号)、scene(推荐场景)、strategy_code(策略编码)、student_id(学号)、student_name(学生姓名)、class_name(班级)、subject_exam(学科)、question_id_ref(题目ID)、question_uuid(题目UUID)、question_type(题型) | 生成序列化、字段校验、查询筛选和保存回显 |
| 页面结构 | server_vue3/src/views/modules/TestingCenter/QuestionRecommend/api.ts | 生成列表、筛选区、表单、详情、预览或自定义操作区 |
| 接口规则 | /api/TestingCenter/QuestionRecommend/、/api/TestingCenter/QuestionRecommend/get_student_questions/、/api/TestingCenter/QuestionRecommend/get_student_select_options/、/api/TestingCenter/QuestionRecommend/get_subject_exam_select_options/、/api/TestingCenter/QuestionRecommend/get_class_select_options/、/api/TestingCenter/QuestionRecommend/update_recommend_feedback/、/api/TestingCenter/QuestionRecommend/update_question_knowledge_relation/、/api/TestingCenter/QuestionRecommend/update_student_knowledge_mastery/、/api/TestingCenter/QuestionRecommend/get_question_recommend_logs/、/api/TestingCenter/QuestionRecommend/get_recommend_strategy_config/、/api/TestingCenter/QuestionRecommend/update_recommend_strategy_config/、/api/TestingCenter/QuestionRecommend/get_recommend_realtime_metrics/、/api/TestingCenter/QuestionRecommend/create_class_recommend_task/、/api/TestingCenter/QuestionRecommend/get_recommend_task_status/、/api/TestingCenter/QuestionRecommend/bootstrap_collaborative_samples/ | 保持 GetStudentQuestions、GetStudentSelectOptions、GetSubjectExamSelectOptions、GetClassSelectOptions、UpdateRecommendFeedback、UpdateQuestionKnowledgeRelation、UpdateStudentKnowledgeMastery、GetQuestionRecommendLogs、GetRecommendStrategyConfig、UpdateRecommendStrategyConfig、GetRecommendRealtimeMetrics、CreateClassRecommendTask、GetRecommendTaskStatus、BootstrapCollaborativeSamples、get_student_select_options、get_subject_exam_select_options、get_class_select_options、create_class_recommend_task、get_recommend_task_status、bootstrap_collaborative_samples、get_student_questions、update_recommend_feedback、update_question_knowledge_relation、update_student_knowledge_mastery、get_question_recommend_logs、get_recommend_strategy_config、update_recommend_strategy_config、get_recommend_realtime_metrics 与页面调用一致 |
| 权限验收 | 按钮权限、接口权限、用户数据范围、异常响应 | 在 PDD 中列出角色、接口和越权用例 |
| 扩展能力 | 数据联动、数据统计、审批流程、批量处理、异步任务 | 只实现源码中真实存在的扩展入口和服务边界 |
更适合交给 Codex 的需求说明,应覆盖源码路径、字段、接口和验收口径。知识点力图推荐的重点是把 QuestionRecommendRecord 与前端接口封装、列表配置、表单状态或自定义页面逻辑合并成一个可测试的模块任务。
可以直接使用下面的Prompt进行模块功能的设计
text
请 Codex 基于教育管理系统真实源码设计"知识点力图推荐"模块。
业务说明:把考试成绩、学生或班级维度和统计接口转换成可追踪的分析结果。
源码范围:server_backend/modules/TestingCenter/models.py、server_backend/modules/TestingCenter/recommend_engine/rank.py、server_backend/modules/TestingCenter/recommend_engine/strategy.py、server_backend/modules/TestingCenter/tasks.py、server_backend/modules/TestingCenter/views_app/QuestionRecommend.py、server_vue3/src/views/modules/TestingCenter/QuestionRecommend/api.ts
接口范围:/api/TestingCenter/QuestionRecommend/、/api/TestingCenter/QuestionRecommend/get_student_questions/、/api/TestingCenter/QuestionRecommend/get_student_select_options/、/api/TestingCenter/QuestionRecommend/get_subject_exam_select_options/、/api/TestingCenter/QuestionRecommend/get_class_select_options/、/api/TestingCenter/QuestionRecommend/update_recommend_feedback/、/api/TestingCenter/QuestionRecommend/update_question_knowledge_relation/、/api/TestingCenter/QuestionRecommend/update_student_knowledge_mastery/、/api/TestingCenter/QuestionRecommend/get_question_recommend_logs/、/api/TestingCenter/QuestionRecommend/get_recommend_strategy_config/、/api/TestingCenter/QuestionRecommend/update_recommend_strategy_config/、/api/TestingCenter/QuestionRecommend/get_recommend_realtime_metrics/、/api/TestingCenter/QuestionRecommend/create_class_recommend_task/、/api/TestingCenter/QuestionRecommend/get_recommend_task_status/、/api/TestingCenter/QuestionRecommend/bootstrap_collaborative_samples/
字段范围:recommend_batch_no(推荐批次号)、scene(推荐场景)、strategy_code(策略编码)、student_id(学号)、student_name(学生姓名)、class_name(班级)、subject_exam(学科)、question_id_ref(题目ID)、question_uuid(题目UUID)、question_type(题型)、difficulty(难度)、knowledge_point_struct(知识点结构)、recommend_score(推荐得分)、reason_type(推荐原因类型)、reason_text(推荐原因)、strategy_snapshot(策略快照)
已有动作:GetStudentQuestions、GetStudentSelectOptions、GetSubjectExamSelectOptions、GetClassSelectOptions、UpdateRecommendFeedback、UpdateQuestionKnowledgeRelation、UpdateStudentKnowledgeMastery、GetQuestionRecommendLogs、GetRecommendStrategyConfig、UpdateRecommendStrategyConfig、GetRecommendRealtimeMetrics、CreateClassRecommendTask、GetRecommendTaskStatus、BootstrapCollaborativeSamples、get_student_select_options、get_subject_exam_select_options、get_class_select_options、create_class_recommend_task、get_recommend_task_status、bootstrap_collaborative_samples、get_student_questions、update_recommend_feedback、update_question_knowledge_relation、update_student_knowledge_mastery、get_question_recommend_logs、get_recommend_strategy_config、update_recommend_strategy_config、get_recommend_realtime_metrics
扩展能力边界:数据联动、数据统计、审批流程、批量处理、异步任务
请输出模块页面结构、数据模型、接口规则、权限验收、测试用例和 Codex 代码生成任务。只允许使用源码中存在的字段、接口和页面状态。
后端设计
知识点力图推荐的后端设计重点不是堆 CRUD 接口,而是建立可复用的数据底座。当前后端范围包括 server_backend/modules/TestingCenter/models.py、server_backend/modules/TestingCenter/recommend_engine/rank.py、server_backend/modules/TestingCenter/recommend_engine/strategy.py、server_backend/modules/TestingCenter/tasks.py、server_backend/modules/TestingCenter/views_app/QuestionRecommend.py。Codex 需要识别模型字段、序列化器、ViewSet、筛选逻辑和自定义 action,并让接口返回结构稳定服务前端。
源码中可识别的模型或查询对象为 QuestionRecommendRecord,核心字段覆盖 recommend_batch_no(推荐批次号)、scene(推荐场景)、strategy_code(策略编码)、student_id(学号)、student_name(学生姓名)、class_name(班级)、subject_exam(学科)、question_id_ref(题目ID)、question_uuid(题目UUID)、question_type(题型)。接口动作包含 GetStudentQuestions、GetStudentSelectOptions、GetSubjectExamSelectOptions、GetClassSelectOptions、UpdateRecommendFeedback、UpdateQuestionKnowledgeRelation、UpdateStudentKnowledgeMastery、GetQuestionRecommendLogs、GetRecommendStrategyConfig、UpdateRecommendStrategyConfig、GetRecommendRealtimeMetrics、CreateClassRecommendTask、GetRecommendTaskStatus、BootstrapCollaborativeSamples、get_student_select_options、get_subject_exam_select_options、get_class_select_options、create_class_recommend_task、get_recommend_task_status、bootstrap_collaborative_samples、get_student_questions、update_recommend_feedback、update_question_knowledge_relation、update_student_knowledge_mastery、get_question_recommend_logs、get_recommend_strategy_config、update_recommend_strategy_config、get_recommend_realtime_metrics,查询参数关注 search(search)、class_name(班级名称)、limit(limit)、prefix(prefix)、task_id(task_id)、student_id(student_id)、scene(scene)、subject_exam(考试科目)、recommend_batch_no(recommend_batch_no)、days(days),这些内容需要和前端封装保持同名语义,避免页面有按钮但后端没有对应能力。
| 后端设计项 | 设计重点 | Codex 生成方向 |
|---|---|---|
| 核心字段 | recommend_batch_no(推荐批次号)、scene(推荐场景)、strategy_code(策略编码)、student_id(学号)、student_name(学生姓名) | 生成序列化、查询筛选、表单回显和保存校验 |
| 补充字段 | class_name(班级)、subject_exam(学科)、question_id_ref(题目ID)、question_uuid(题目UUID)、question_type(题型) | 处理状态、时间、JSON、资源或关联字段的格式转换 |
| 接口视图 | server_backend/modules/TestingCenter/models.py、server_backend/modules/TestingCenter/recommend_engine/rank.py、server_backend/modules/TestingCenter/recommend_engine/strategy.py、server_backend/modules/TestingCenter/tasks.py、server_backend/modules/TestingCenter/views_app/QuestionRecommend.py | 按 /api/TestingCenter/QuestionRecommend/、/api/TestingCenter/QuestionRecommend/get_student_questions/、/api/TestingCenter/QuestionRecommend/get_student_select_options/、/api/TestingCenter/QuestionRecommend/get_subject_exam_select_options/、/api/TestingCenter/QuestionRecommend/get_class_select_options/、/api/TestingCenter/QuestionRecommend/update_recommend_feedback/、/api/TestingCenter/QuestionRecommend/update_question_knowledge_relation/、/api/TestingCenter/QuestionRecommend/update_student_knowledge_mastery/、/api/TestingCenter/QuestionRecommend/get_question_recommend_logs/、/api/TestingCenter/QuestionRecommend/get_recommend_strategy_config/、/api/TestingCenter/QuestionRecommend/update_recommend_strategy_config/、/api/TestingCenter/QuestionRecommend/get_recommend_realtime_metrics/、/api/TestingCenter/QuestionRecommend/create_class_recommend_task/、/api/TestingCenter/QuestionRecommend/get_recommend_task_status/、/api/TestingCenter/QuestionRecommend/bootstrap_collaborative_samples/ 注册列表、详情、保存、删除和已有 action |
| 查询筛选 | search(search)、class_name(班级名称)、limit(limit)、prefix(prefix)、task_id(task_id)、student_id(student_id)、scene(scene)、subject_exam(考试科目)、recommend_batch_no(recommend_batch_no)、days(days) | 生成 filterset、SearchFilter 或自定义查询参数 |
| 权限控制 | 后端接口承担真实访问边界,前端按钮只做入口展示 | 生成权限判断、异常响应和越权测试 |
| 扩展服务 | 数据联动、数据统计、审批流程、批量处理、异步任务 | 按真实源码补齐服务函数、异步任务或状态回写 |
可以直接使用下面的Prompt进行后端代码的设计
text
请 Codex 按"知识点力图推荐"业务从源码上下文设计或补齐后端代码。
后端源码范围:server_backend/modules/TestingCenter/models.py、server_backend/modules/TestingCenter/recommend_engine/rank.py、server_backend/modules/TestingCenter/recommend_engine/strategy.py、server_backend/modules/TestingCenter/tasks.py、server_backend/modules/TestingCenter/views_app/QuestionRecommend.py
模型或查询对象:QuestionRecommendRecord
模型字段范围:recommend_batch_no(推荐批次号)、scene(推荐场景)、strategy_code(策略编码)、student_id(学号)、student_name(学生姓名)、class_name(班级)、subject_exam(学科)、question_id_ref(题目ID)、question_uuid(题目UUID)、question_type(题型)、difficulty(难度)、knowledge_point_struct(知识点结构)、recommend_score(推荐得分)、reason_type(推荐原因类型)、reason_text(推荐原因)、strategy_snapshot(策略快照)
接口前缀:/api/TestingCenter/QuestionRecommend/、/api/TestingCenter/QuestionRecommend/get_student_questions/、/api/TestingCenter/QuestionRecommend/get_student_select_options/、/api/TestingCenter/QuestionRecommend/get_subject_exam_select_options/、/api/TestingCenter/QuestionRecommend/get_class_select_options/、/api/TestingCenter/QuestionRecommend/update_recommend_feedback/、/api/TestingCenter/QuestionRecommend/update_question_knowledge_relation/、/api/TestingCenter/QuestionRecommend/update_student_knowledge_mastery/、/api/TestingCenter/QuestionRecommend/get_question_recommend_logs/、/api/TestingCenter/QuestionRecommend/get_recommend_strategy_config/、/api/TestingCenter/QuestionRecommend/update_recommend_strategy_config/、/api/TestingCenter/QuestionRecommend/get_recommend_realtime_metrics/、/api/TestingCenter/QuestionRecommend/create_class_recommend_task/、/api/TestingCenter/QuestionRecommend/get_recommend_task_status/、/api/TestingCenter/QuestionRecommend/bootstrap_collaborative_samples/
已有接口动作:GetStudentQuestions、GetStudentSelectOptions、GetSubjectExamSelectOptions、GetClassSelectOptions、UpdateRecommendFeedback、UpdateQuestionKnowledgeRelation、UpdateStudentKnowledgeMastery、GetQuestionRecommendLogs、GetRecommendStrategyConfig、UpdateRecommendStrategyConfig、GetRecommendRealtimeMetrics、CreateClassRecommendTask、GetRecommendTaskStatus、BootstrapCollaborativeSamples、get_student_select_options、get_subject_exam_select_options、get_class_select_options、create_class_recommend_task、get_recommend_task_status、bootstrap_collaborative_samples、get_student_questions、update_recommend_feedback、update_question_knowledge_relation、update_student_knowledge_mastery、get_question_recommend_logs、get_recommend_strategy_config、update_recommend_strategy_config、get_recommend_realtime_metrics
查询参数:search(search)、class_name(班级名称)、limit(limit)、prefix(prefix)、task_id(task_id)、student_id(student_id)、scene(scene)、subject_exam(考试科目)、recommend_batch_no(recommend_batch_no)、days(days)
需要生成或修正数据模型、序列化规则、接口视图、路由注册、筛选查询、权限控制和基础校验。同时补齐 数据联动、数据统计、审批流程、批量处理、异步任务 对应的后端接口或服务边界。
输出时列出涉及文件、字段校验、接口返回结构和需要执行的测试。
前端设计
知识点力图推荐的前端设计重点不是把字段堆到页面上,而是让用户能按业务路径完成查询、编辑、状态处理和结果确认。当前前端范围包括 server_vue3/src/views/modules/TestingCenter/QuestionRecommend/api.ts,其中 api.ts 负责接口封装,crud.tsx 或 index.vue 负责列表、表单、自定义布局和按钮交互。
页面需要围绕 recommend_batch_no(推荐批次号)、scene(推荐场景)、strategy_code(策略编码)、student_id(学号)、student_name(学生姓名)、class_name(班级)、subject_exam(学科)、question_id_ref(题目ID)、question_uuid(题目UUID)、question_type(题型) 组织筛选、表单和详情。保存前要处理字段格式转换,保存后刷新列表或回显详情;存在扩展能力时,还要把 数据联动、数据统计、审批流程、批量处理、异步任务 的入口、状态和结果纳入同一套页面状态。
| 前端设计项 | 设计重点 | Codex 生成方向 |
|---|---|---|
| 页面结构 | server_vue3/src/views/modules/TestingCenter/QuestionRecommend/api.ts | 生成列表、筛选区、表单、详情抽屉、弹窗或自定义操作区 |
| 接口封装 | /api/TestingCenter/QuestionRecommend/、/api/TestingCenter/QuestionRecommend/get_student_questions/、/api/TestingCenter/QuestionRecommend/get_student_select_options/、/api/TestingCenter/QuestionRecommend/get_subject_exam_select_options/、/api/TestingCenter/QuestionRecommend/get_class_select_options/、/api/TestingCenter/QuestionRecommend/update_recommend_feedback/、/api/TestingCenter/QuestionRecommend/update_question_knowledge_relation/、/api/TestingCenter/QuestionRecommend/update_student_knowledge_mastery/、/api/TestingCenter/QuestionRecommend/get_question_recommend_logs/、/api/TestingCenter/QuestionRecommend/get_recommend_strategy_config/、/api/TestingCenter/QuestionRecommend/update_recommend_strategy_config/、/api/TestingCenter/QuestionRecommend/get_recommend_realtime_metrics/、/api/TestingCenter/QuestionRecommend/create_class_recommend_task/、/api/TestingCenter/QuestionRecommend/get_recommend_task_status/、/api/TestingCenter/QuestionRecommend/bootstrap_collaborative_samples/ | 统一封装查询、详情、保存、删除和 GetStudentQuestions、GetStudentSelectOptions、GetSubjectExamSelectOptions、GetClassSelectOptions、UpdateRecommendFeedback、UpdateQuestionKnowledgeRelation、UpdateStudentKnowledgeMastery、GetQuestionRecommendLogs、GetRecommendStrategyConfig、UpdateRecommendStrategyConfig、GetRecommendRealtimeMetrics、CreateClassRecommendTask、GetRecommendTaskStatus、BootstrapCollaborativeSamples、get_student_select_options、get_subject_exam_select_options、get_class_select_options、create_class_recommend_task、get_recommend_task_status、bootstrap_collaborative_samples、get_student_questions、update_recommend_feedback、update_question_knowledge_relation、update_student_knowledge_mastery、get_question_recommend_logs、get_recommend_strategy_config、update_recommend_strategy_config、get_recommend_realtime_metrics 等动作 |
| 字段回显 | recommend_batch_no(推荐批次号)、scene(推荐场景)、strategy_code(策略编码)、student_id(学号)、student_name(学生姓名)、class_name(班级)、subject_exam(学科)、question_id_ref(题目ID)、question_uuid(题目UUID)、question_type(题型) | 处理下拉、树形、JSON、状态、时间和资源字段回显 |
| 权限按钮 | 根据 auth、按钮权限或后端权限结果展示操作入口 | 生成新增、编辑、删除、处理、下载或预览按钮 |
| 扩展交互 | 数据联动、数据统计、审批流程、批量处理、异步任务 | 生成入口按钮、加载状态、结果回填、人工确认和异常提示 |
可以直接使用下面的Prompt进行前端代码的设计
text
请 Codex 按"知识点力图推荐"业务生成或补齐前端页面代码。
前端源码范围:server_vue3/src/views/modules/TestingCenter/QuestionRecommend/api.ts
接口范围:/api/TestingCenter/QuestionRecommend/、/api/TestingCenter/QuestionRecommend/get_student_questions/、/api/TestingCenter/QuestionRecommend/get_student_select_options/、/api/TestingCenter/QuestionRecommend/get_subject_exam_select_options/、/api/TestingCenter/QuestionRecommend/get_class_select_options/、/api/TestingCenter/QuestionRecommend/update_recommend_feedback/、/api/TestingCenter/QuestionRecommend/update_question_knowledge_relation/、/api/TestingCenter/QuestionRecommend/update_student_knowledge_mastery/、/api/TestingCenter/QuestionRecommend/get_question_recommend_logs/、/api/TestingCenter/QuestionRecommend/get_recommend_strategy_config/、/api/TestingCenter/QuestionRecommend/update_recommend_strategy_config/、/api/TestingCenter/QuestionRecommend/get_recommend_realtime_metrics/、/api/TestingCenter/QuestionRecommend/create_class_recommend_task/、/api/TestingCenter/QuestionRecommend/get_recommend_task_status/、/api/TestingCenter/QuestionRecommend/bootstrap_collaborative_samples/
字段范围:recommend_batch_no(推荐批次号)、scene(推荐场景)、strategy_code(策略编码)、student_id(学号)、student_name(学生姓名)、class_name(班级)、subject_exam(学科)、question_id_ref(题目ID)、question_uuid(题目UUID)、question_type(题型)、difficulty(难度)、knowledge_point_struct(知识点结构)、recommend_score(推荐得分)、reason_type(推荐原因类型)、reason_text(推荐原因)、strategy_snapshot(策略快照)
已有动作:GetStudentQuestions、GetStudentSelectOptions、GetSubjectExamSelectOptions、GetClassSelectOptions、UpdateRecommendFeedback、UpdateQuestionKnowledgeRelation、UpdateStudentKnowledgeMastery、GetQuestionRecommendLogs、GetRecommendStrategyConfig、UpdateRecommendStrategyConfig、GetRecommendRealtimeMetrics、CreateClassRecommendTask、GetRecommendTaskStatus、BootstrapCollaborativeSamples、get_student_select_options、get_subject_exam_select_options、get_class_select_options、create_class_recommend_task、get_recommend_task_status、bootstrap_collaborative_samples、get_student_questions、update_recommend_feedback、update_question_knowledge_relation、update_student_knowledge_mastery、get_question_recommend_logs、get_recommend_strategy_config、update_recommend_strategy_config、get_recommend_realtime_metrics
需要生成页面结构、列表查询、筛选区域、新增编辑表单、详情预览、权限按钮、保存回显和接口调用;源码已有批量入口时再接入批量操作。涉及扩展交互时只实现源码已有的 数据联动、数据统计、审批流程、批量处理、异步任务,包括入口按钮、状态提示、结果回填和保存回显。
输出时说明字段转换、表单初始化、异常提示和刷新策略。
扩展功能
知识点力图推荐的扩展能力来自源码中的字段结构、接口动作或页面组件,不属于单纯 CRUD。它们的价值在于把教育管理系统中的生成、识别、统计、文件、审批、任务或批量流程接入真实业务数据。
| 扩展功能 | 主要用途 | 落地重点 |
|---|---|---|
| 数据联动 | 把筛选条件、树节点、状态字段、远程下拉和表单回显组织成稳定数据流。 | 字段变化要同步查询参数、保存载荷和回显结构,避免页面临时状态与后端字段脱节。 |
| 数据统计 | 把业务列表、成绩、趋势、看板卡片或图表接口整理成可视化结果。 | 统计接口、筛选条件和前端图表必须使用同一套口径。 |
| 审批流程 | 把状态、处理意见、可操作角色和消息提醒纳入接口层。 | 状态流转由后端校验,前端按钮只展示当前用户可执行操作。 |
| 批量处理 | 支持批量初始化、批量删除、批量分配、批量更新或批量生成。 | 批量动作要限制数据范围,返回成功、失败和异常明细。 |
| 异步任务 | 把耗时生成、导出、下载或后台执行动作交给任务中心跟踪。 | 接口返回任务 ID、状态和错误信息,页面轮询或刷新展示结果。 |
数据联动
源码中的 recommend_batch_no(推荐批次号)、scene(推荐场景)、strategy_code(策略编码)、student_id(学号)、student_name(学生姓名)、class_name(班级)、subject_exam(学科)、question_id_ref(题目ID)、question_uuid(题目UUID)、question_type(题型)、接口参数和页面状态之间存在联动关系。Codex 生成时需要把查询条件、表单选择、字段转换和详情回显串成一条数据流,不能把每个下拉框或状态开关写成互不关联的临时变量。
#mermaid-svg-y8KomTNvKsWv7X5H{font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;fill:#333;}@keyframes edge-animation-frame{from{stroke-dashoffset:0;}}@keyframes dash{to{stroke-dashoffset:0;}}#mermaid-svg-y8KomTNvKsWv7X5H .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#mermaid-svg-y8KomTNvKsWv7X5H .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#mermaid-svg-y8KomTNvKsWv7X5H .error-icon{fill:#552222;}#mermaid-svg-y8KomTNvKsWv7X5H .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-y8KomTNvKsWv7X5H .edge-thickness-normal{stroke-width:1px;}#mermaid-svg-y8KomTNvKsWv7X5H .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-y8KomTNvKsWv7X5H .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-y8KomTNvKsWv7X5H .edge-thickness-invisible{stroke-width:0;fill:none;}#mermaid-svg-y8KomTNvKsWv7X5H .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-y8KomTNvKsWv7X5H .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-y8KomTNvKsWv7X5H .marker{fill:#333333;stroke:#333333;}#mermaid-svg-y8KomTNvKsWv7X5H .marker.cross{stroke:#333333;}#mermaid-svg-y8KomTNvKsWv7X5H svg{font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-y8KomTNvKsWv7X5H p{margin:0;}#mermaid-svg-y8KomTNvKsWv7X5H .label{font-family:"trebuchet ms",verdana,arial,sans-serif;color:#333;}#mermaid-svg-y8KomTNvKsWv7X5H .cluster-label text{fill:#333;}#mermaid-svg-y8KomTNvKsWv7X5H .cluster-label span{color:#333;}#mermaid-svg-y8KomTNvKsWv7X5H .cluster-label span p{background-color:transparent;}#mermaid-svg-y8KomTNvKsWv7X5H .label text,#mermaid-svg-y8KomTNvKsWv7X5H span{fill:#333;color:#333;}#mermaid-svg-y8KomTNvKsWv7X5H .node rect,#mermaid-svg-y8KomTNvKsWv7X5H .node circle,#mermaid-svg-y8KomTNvKsWv7X5H .node ellipse,#mermaid-svg-y8KomTNvKsWv7X5H .node polygon,#mermaid-svg-y8KomTNvKsWv7X5H .node path{fill:#ECECFF;stroke:#9370DB;stroke-width:1px;}#mermaid-svg-y8KomTNvKsWv7X5H .rough-node .label text,#mermaid-svg-y8KomTNvKsWv7X5H .node .label text,#mermaid-svg-y8KomTNvKsWv7X5H .image-shape .label,#mermaid-svg-y8KomTNvKsWv7X5H .icon-shape .label{text-anchor:middle;}#mermaid-svg-y8KomTNvKsWv7X5H .node .katex path{fill:#000;stroke:#000;stroke-width:1px;}#mermaid-svg-y8KomTNvKsWv7X5H .rough-node .label,#mermaid-svg-y8KomTNvKsWv7X5H .node .label,#mermaid-svg-y8KomTNvKsWv7X5H .image-shape .label,#mermaid-svg-y8KomTNvKsWv7X5H .icon-shape .label{text-align:center;}#mermaid-svg-y8KomTNvKsWv7X5H .node.clickable{cursor:pointer;}#mermaid-svg-y8KomTNvKsWv7X5H .root .anchor path{fill:#333333!important;stroke-width:0;stroke:#333333;}#mermaid-svg-y8KomTNvKsWv7X5H .arrowheadPath{fill:#333333;}#mermaid-svg-y8KomTNvKsWv7X5H .edgePath .path{stroke:#333333;stroke-width:2.0px;}#mermaid-svg-y8KomTNvKsWv7X5H .flowchart-link{stroke:#333333;fill:none;}#mermaid-svg-y8KomTNvKsWv7X5H .edgeLabel{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-y8KomTNvKsWv7X5H .edgeLabel p{background-color:rgba(232,232,232, 0.8);}#mermaid-svg-y8KomTNvKsWv7X5H .edgeLabel rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-y8KomTNvKsWv7X5H .labelBkg{background-color:rgba(232, 232, 232, 0.5);}#mermaid-svg-y8KomTNvKsWv7X5H .cluster rect{fill:#ffffde;stroke:#aaaa33;stroke-width:1px;}#mermaid-svg-y8KomTNvKsWv7X5H .cluster text{fill:#333;}#mermaid-svg-y8KomTNvKsWv7X5H .cluster span{color:#333;}#mermaid-svg-y8KomTNvKsWv7X5H div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:12px;background:hsl(80, 100%, 96.2745098039%);border:1px solid #aaaa33;border-radius:2px;pointer-events:none;z-index:100;}#mermaid-svg-y8KomTNvKsWv7X5H .flowchartTitleText{text-anchor:middle;font-size:18px;fill:#333;}#mermaid-svg-y8KomTNvKsWv7X5H rect.text{fill:none;stroke-width:0;}#mermaid-svg-y8KomTNvKsWv7X5H .icon-shape,#mermaid-svg-y8KomTNvKsWv7X5H .image-shape{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-y8KomTNvKsWv7X5H .icon-shape p,#mermaid-svg-y8KomTNvKsWv7X5H .image-shape p{background-color:rgba(232,232,232, 0.8);padding:2px;}#mermaid-svg-y8KomTNvKsWv7X5H .icon-shape .label rect,#mermaid-svg-y8KomTNvKsWv7X5H .image-shape .label rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-y8KomTNvKsWv7X5H .label-icon{display:inline-block;height:1em;overflow:visible;vertical-align:-0.125em;}#mermaid-svg-y8KomTNvKsWv7X5H .node .label-icon path{fill:currentColor;stroke:revert;stroke-width:revert;}#mermaid-svg-y8KomTNvKsWv7X5H :root{--mermaid-font-family:"trebuchet ms",verdana,arial,sans-serif;}#mermaid-svg-y8KomTNvKsWv7X5H .input>*{fill:#EEF4FF!important;stroke:#5B8FF9!important;color:#1D39C4!important;stroke-width:1.2px!important;}#mermaid-svg-y8KomTNvKsWv7X5H .input span{fill:#EEF4FF!important;stroke:#5B8FF9!important;color:#1D39C4!important;stroke-width:1.2px!important;}#mermaid-svg-y8KomTNvKsWv7X5H .input tspan{fill:#1D39C4!important;}#mermaid-svg-y8KomTNvKsWv7X5H .process>*{fill:#FFF7E6!important;stroke:#FA8C16!important;color:#AD4E00!important;stroke-width:1.2px!important;}#mermaid-svg-y8KomTNvKsWv7X5H .process span{fill:#FFF7E6!important;stroke:#FA8C16!important;color:#AD4E00!important;stroke-width:1.2px!important;}#mermaid-svg-y8KomTNvKsWv7X5H .process tspan{fill:#AD4E00!important;}#mermaid-svg-y8KomTNvKsWv7X5H .check>*{fill:#F9F0FF!important;stroke:#722ED1!important;color:#531DAB!important;stroke-width:1.2px!important;}#mermaid-svg-y8KomTNvKsWv7X5H .check span{fill:#F9F0FF!important;stroke:#722ED1!important;color:#531DAB!important;stroke-width:1.2px!important;}#mermaid-svg-y8KomTNvKsWv7X5H .check tspan{fill:#531DAB!important;}#mermaid-svg-y8KomTNvKsWv7X5H .output>*{fill:#E6FFFB!important;stroke:#13C2C2!important;color:#006D75!important;stroke-width:1.2px!important;}#mermaid-svg-y8KomTNvKsWv7X5H .output span{fill:#E6FFFB!important;stroke:#13C2C2!important;color:#006D75!important;stroke-width:1.2px!important;}#mermaid-svg-y8KomTNvKsWv7X5H .output tspan{fill:#006D75!important;} 结果阶段
处理阶段
输入阶段
筛选条件
表单选择
参数转换
接口请求
字段回显
列表刷新
状态更新
交给 Codex 生成时,边界要限定在 server_backend/modules/TestingCenter/models.py、server_backend/modules/TestingCenter/recommend_engine/rank.py、server_backend/modules/TestingCenter/recommend_engine/strategy.py、server_backend/modules/TestingCenter/tasks.py、server_backend/modules/TestingCenter/views_app/QuestionRecommend.py、server_vue3/src/views/modules/TestingCenter/QuestionRecommend/api.ts 内。字段变化要同步查询参数、保存载荷和回显结构,避免页面临时状态与后端字段脱节。 同时需要补齐权限判断、异常提示、保存回显和测试用例。
可以直接使用下面的Prompt进行数据联动设计
text
请 Codex 基于真实源码补齐"知识点力图推荐"的数据联动能力。
模块源码范围:server_backend/modules/TestingCenter/models.py、server_backend/modules/TestingCenter/recommend_engine/rank.py、server_backend/modules/TestingCenter/recommend_engine/strategy.py、server_backend/modules/TestingCenter/tasks.py、server_backend/modules/TestingCenter/views_app/QuestionRecommend.py、server_vue3/src/views/modules/TestingCenter/QuestionRecommend/api.ts
接口范围:/api/TestingCenter/QuestionRecommend/、/api/TestingCenter/QuestionRecommend/get_student_questions/、/api/TestingCenter/QuestionRecommend/get_student_select_options/、/api/TestingCenter/QuestionRecommend/get_subject_exam_select_options/、/api/TestingCenter/QuestionRecommend/get_class_select_options/、/api/TestingCenter/QuestionRecommend/update_recommend_feedback/、/api/TestingCenter/QuestionRecommend/update_question_knowledge_relation/、/api/TestingCenter/QuestionRecommend/update_student_knowledge_mastery/、/api/TestingCenter/QuestionRecommend/get_question_recommend_logs/、/api/TestingCenter/QuestionRecommend/get_recommend_strategy_config/、/api/TestingCenter/QuestionRecommend/update_recommend_strategy_config/、/api/TestingCenter/QuestionRecommend/get_recommend_realtime_metrics/、/api/TestingCenter/QuestionRecommend/create_class_recommend_task/、/api/TestingCenter/QuestionRecommend/get_recommend_task_status/、/api/TestingCenter/QuestionRecommend/bootstrap_collaborative_samples/
字段范围:recommend_batch_no(推荐批次号)、scene(推荐场景)、strategy_code(策略编码)、student_id(学号)、student_name(学生姓名)、class_name(班级)、subject_exam(学科)、question_id_ref(题目ID)、question_uuid(题目UUID)、question_type(题型)、difficulty(难度)、knowledge_point_struct(知识点结构)、recommend_score(推荐得分)、reason_type(推荐原因类型)、reason_text(推荐原因)、strategy_snapshot(策略快照)
功能用途:把筛选条件、树节点、状态字段、远程下拉和表单回显组织成稳定数据流。
落地边界:字段变化要同步查询参数、保存载荷和回显结构,避免页面临时状态与后端字段脱节。
要求只使用源码中已经存在的字段、接口和页面状态,不新增未确认的业务能力。输出接口设计、前端交互、权限约束、异常处理和验收清单。
数据统计
数据统计能力用于把业务列表、成绩、趋势、看板卡片或图表接口整理成可视化结果。交给 Codex 生成时,边界要限定在 server_backend/modules/TestingCenter/models.py、server_backend/modules/TestingCenter/recommend_engine/rank.py、server_backend/modules/TestingCenter/recommend_engine/strategy.py、server_backend/modules/TestingCenter/tasks.py、server_backend/modules/TestingCenter/views_app/QuestionRecommend.py、server_vue3/src/views/modules/TestingCenter/QuestionRecommend/api.ts 内,重点是统计接口、筛选条件和前端图表必须使用同一套口径。
#mermaid-svg-pojrqus9hoYfkpMi{font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;fill:#333;}@keyframes edge-animation-frame{from{stroke-dashoffset:0;}}@keyframes dash{to{stroke-dashoffset:0;}}#mermaid-svg-pojrqus9hoYfkpMi .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#mermaid-svg-pojrqus9hoYfkpMi .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#mermaid-svg-pojrqus9hoYfkpMi .error-icon{fill:#552222;}#mermaid-svg-pojrqus9hoYfkpMi .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-pojrqus9hoYfkpMi .edge-thickness-normal{stroke-width:1px;}#mermaid-svg-pojrqus9hoYfkpMi .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-pojrqus9hoYfkpMi .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-pojrqus9hoYfkpMi .edge-thickness-invisible{stroke-width:0;fill:none;}#mermaid-svg-pojrqus9hoYfkpMi .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-pojrqus9hoYfkpMi .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-pojrqus9hoYfkpMi .marker{fill:#333333;stroke:#333333;}#mermaid-svg-pojrqus9hoYfkpMi .marker.cross{stroke:#333333;}#mermaid-svg-pojrqus9hoYfkpMi svg{font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-pojrqus9hoYfkpMi p{margin:0;}#mermaid-svg-pojrqus9hoYfkpMi .label{font-family:"trebuchet ms",verdana,arial,sans-serif;color:#333;}#mermaid-svg-pojrqus9hoYfkpMi .cluster-label text{fill:#333;}#mermaid-svg-pojrqus9hoYfkpMi .cluster-label span{color:#333;}#mermaid-svg-pojrqus9hoYfkpMi .cluster-label span p{background-color:transparent;}#mermaid-svg-pojrqus9hoYfkpMi .label text,#mermaid-svg-pojrqus9hoYfkpMi span{fill:#333;color:#333;}#mermaid-svg-pojrqus9hoYfkpMi .node rect,#mermaid-svg-pojrqus9hoYfkpMi .node circle,#mermaid-svg-pojrqus9hoYfkpMi .node ellipse,#mermaid-svg-pojrqus9hoYfkpMi .node polygon,#mermaid-svg-pojrqus9hoYfkpMi .node path{fill:#ECECFF;stroke:#9370DB;stroke-width:1px;}#mermaid-svg-pojrqus9hoYfkpMi .rough-node .label text,#mermaid-svg-pojrqus9hoYfkpMi .node .label text,#mermaid-svg-pojrqus9hoYfkpMi .image-shape .label,#mermaid-svg-pojrqus9hoYfkpMi .icon-shape .label{text-anchor:middle;}#mermaid-svg-pojrqus9hoYfkpMi .node .katex path{fill:#000;stroke:#000;stroke-width:1px;}#mermaid-svg-pojrqus9hoYfkpMi .rough-node .label,#mermaid-svg-pojrqus9hoYfkpMi .node .label,#mermaid-svg-pojrqus9hoYfkpMi .image-shape .label,#mermaid-svg-pojrqus9hoYfkpMi .icon-shape .label{text-align:center;}#mermaid-svg-pojrqus9hoYfkpMi .node.clickable{cursor:pointer;}#mermaid-svg-pojrqus9hoYfkpMi .root .anchor path{fill:#333333!important;stroke-width:0;stroke:#333333;}#mermaid-svg-pojrqus9hoYfkpMi .arrowheadPath{fill:#333333;}#mermaid-svg-pojrqus9hoYfkpMi .edgePath .path{stroke:#333333;stroke-width:2.0px;}#mermaid-svg-pojrqus9hoYfkpMi .flowchart-link{stroke:#333333;fill:none;}#mermaid-svg-pojrqus9hoYfkpMi .edgeLabel{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-pojrqus9hoYfkpMi .edgeLabel p{background-color:rgba(232,232,232, 0.8);}#mermaid-svg-pojrqus9hoYfkpMi .edgeLabel rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-pojrqus9hoYfkpMi .labelBkg{background-color:rgba(232, 232, 232, 0.5);}#mermaid-svg-pojrqus9hoYfkpMi .cluster rect{fill:#ffffde;stroke:#aaaa33;stroke-width:1px;}#mermaid-svg-pojrqus9hoYfkpMi .cluster text{fill:#333;}#mermaid-svg-pojrqus9hoYfkpMi .cluster span{color:#333;}#mermaid-svg-pojrqus9hoYfkpMi div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:12px;background:hsl(80, 100%, 96.2745098039%);border:1px solid #aaaa33;border-radius:2px;pointer-events:none;z-index:100;}#mermaid-svg-pojrqus9hoYfkpMi .flowchartTitleText{text-anchor:middle;font-size:18px;fill:#333;}#mermaid-svg-pojrqus9hoYfkpMi rect.text{fill:none;stroke-width:0;}#mermaid-svg-pojrqus9hoYfkpMi .icon-shape,#mermaid-svg-pojrqus9hoYfkpMi .image-shape{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-pojrqus9hoYfkpMi .icon-shape p,#mermaid-svg-pojrqus9hoYfkpMi .image-shape p{background-color:rgba(232,232,232, 0.8);padding:2px;}#mermaid-svg-pojrqus9hoYfkpMi .icon-shape .label rect,#mermaid-svg-pojrqus9hoYfkpMi .image-shape .label rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-pojrqus9hoYfkpMi .label-icon{display:inline-block;height:1em;overflow:visible;vertical-align:-0.125em;}#mermaid-svg-pojrqus9hoYfkpMi .node .label-icon path{fill:currentColor;stroke:revert;stroke-width:revert;}#mermaid-svg-pojrqus9hoYfkpMi :root{--mermaid-font-family:"trebuchet ms",verdana,arial,sans-serif;}#mermaid-svg-pojrqus9hoYfkpMi .input>*{fill:#EEF4FF!important;stroke:#5B8FF9!important;color:#1D39C4!important;stroke-width:1.2px!important;}#mermaid-svg-pojrqus9hoYfkpMi .input span{fill:#EEF4FF!important;stroke:#5B8FF9!important;color:#1D39C4!important;stroke-width:1.2px!important;}#mermaid-svg-pojrqus9hoYfkpMi .input tspan{fill:#1D39C4!important;}#mermaid-svg-pojrqus9hoYfkpMi .process>*{fill:#FFF7E6!important;stroke:#FA8C16!important;color:#AD4E00!important;stroke-width:1.2px!important;}#mermaid-svg-pojrqus9hoYfkpMi .process span{fill:#FFF7E6!important;stroke:#FA8C16!important;color:#AD4E00!important;stroke-width:1.2px!important;}#mermaid-svg-pojrqus9hoYfkpMi .process tspan{fill:#AD4E00!important;}#mermaid-svg-pojrqus9hoYfkpMi .check>*{fill:#F9F0FF!important;stroke:#722ED1!important;color:#531DAB!important;stroke-width:1.2px!important;}#mermaid-svg-pojrqus9hoYfkpMi .check span{fill:#F9F0FF!important;stroke:#722ED1!important;color:#531DAB!important;stroke-width:1.2px!important;}#mermaid-svg-pojrqus9hoYfkpMi .check tspan{fill:#531DAB!important;}#mermaid-svg-pojrqus9hoYfkpMi .output>*{fill:#E6FFFB!important;stroke:#13C2C2!important;color:#006D75!important;stroke-width:1.2px!important;}#mermaid-svg-pojrqus9hoYfkpMi .output span{fill:#E6FFFB!important;stroke:#13C2C2!important;color:#006D75!important;stroke-width:1.2px!important;}#mermaid-svg-pojrqus9hoYfkpMi .output tspan{fill:#006D75!important;} 结果阶段
处理阶段
输入阶段
筛选条件
统计口径
聚合查询
指标计算
图表适配
看板展示
口径验收
交给 Codex 生成时,边界要限定在 server_backend/modules/TestingCenter/models.py、server_backend/modules/TestingCenter/recommend_engine/rank.py、server_backend/modules/TestingCenter/recommend_engine/strategy.py、server_backend/modules/TestingCenter/tasks.py、server_backend/modules/TestingCenter/views_app/QuestionRecommend.py、server_vue3/src/views/modules/TestingCenter/QuestionRecommend/api.ts 内。统计接口、筛选条件和前端图表必须使用同一套口径。 同时需要补齐权限判断、异常提示、保存回显和测试用例。
可以直接使用下面的Prompt进行数据统计功能设计
text
请 Codex 基于真实源码补齐"知识点力图推荐"的数据统计能力。
模块源码范围:server_backend/modules/TestingCenter/models.py、server_backend/modules/TestingCenter/recommend_engine/rank.py、server_backend/modules/TestingCenter/recommend_engine/strategy.py、server_backend/modules/TestingCenter/tasks.py、server_backend/modules/TestingCenter/views_app/QuestionRecommend.py、server_vue3/src/views/modules/TestingCenter/QuestionRecommend/api.ts
接口范围:/api/TestingCenter/QuestionRecommend/、/api/TestingCenter/QuestionRecommend/get_student_questions/、/api/TestingCenter/QuestionRecommend/get_student_select_options/、/api/TestingCenter/QuestionRecommend/get_subject_exam_select_options/、/api/TestingCenter/QuestionRecommend/get_class_select_options/、/api/TestingCenter/QuestionRecommend/update_recommend_feedback/、/api/TestingCenter/QuestionRecommend/update_question_knowledge_relation/、/api/TestingCenter/QuestionRecommend/update_student_knowledge_mastery/、/api/TestingCenter/QuestionRecommend/get_question_recommend_logs/、/api/TestingCenter/QuestionRecommend/get_recommend_strategy_config/、/api/TestingCenter/QuestionRecommend/update_recommend_strategy_config/、/api/TestingCenter/QuestionRecommend/get_recommend_realtime_metrics/、/api/TestingCenter/QuestionRecommend/create_class_recommend_task/、/api/TestingCenter/QuestionRecommend/get_recommend_task_status/、/api/TestingCenter/QuestionRecommend/bootstrap_collaborative_samples/
字段范围:recommend_batch_no(推荐批次号)、scene(推荐场景)、strategy_code(策略编码)、student_id(学号)、student_name(学生姓名)、class_name(班级)、subject_exam(学科)、question_id_ref(题目ID)、question_uuid(题目UUID)、question_type(题型)、difficulty(难度)、knowledge_point_struct(知识点结构)、recommend_score(推荐得分)、reason_type(推荐原因类型)、reason_text(推荐原因)、strategy_snapshot(策略快照)
功能用途:把业务列表、成绩、趋势、看板卡片或图表接口整理成可视化结果。
落地边界:统计接口、筛选条件和前端图表必须使用同一套口径。
要求只使用源码中已经存在的字段、接口和页面状态,不新增未确认的业务能力。输出接口设计、前端交互、权限约束、异常处理和验收清单。
审批流程
审批流程能力用于把状态、处理意见、可操作角色和消息提醒纳入接口层。交给 Codex 生成时,边界要限定在 server_backend/modules/TestingCenter/models.py、server_backend/modules/TestingCenter/recommend_engine/rank.py、server_backend/modules/TestingCenter/recommend_engine/strategy.py、server_backend/modules/TestingCenter/tasks.py、server_backend/modules/TestingCenter/views_app/QuestionRecommend.py、server_vue3/src/views/modules/TestingCenter/QuestionRecommend/api.ts 内,重点是状态流转由后端校验,前端按钮只展示当前用户可执行操作。
#mermaid-svg-3XNhEPmJUOJuPIIR{font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;fill:#333;}@keyframes edge-animation-frame{from{stroke-dashoffset:0;}}@keyframes dash{to{stroke-dashoffset:0;}}#mermaid-svg-3XNhEPmJUOJuPIIR .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#mermaid-svg-3XNhEPmJUOJuPIIR .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#mermaid-svg-3XNhEPmJUOJuPIIR .error-icon{fill:#552222;}#mermaid-svg-3XNhEPmJUOJuPIIR .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-3XNhEPmJUOJuPIIR .edge-thickness-normal{stroke-width:1px;}#mermaid-svg-3XNhEPmJUOJuPIIR .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-3XNhEPmJUOJuPIIR .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-3XNhEPmJUOJuPIIR .edge-thickness-invisible{stroke-width:0;fill:none;}#mermaid-svg-3XNhEPmJUOJuPIIR .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-3XNhEPmJUOJuPIIR .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-3XNhEPmJUOJuPIIR .marker{fill:#333333;stroke:#333333;}#mermaid-svg-3XNhEPmJUOJuPIIR .marker.cross{stroke:#333333;}#mermaid-svg-3XNhEPmJUOJuPIIR svg{font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-3XNhEPmJUOJuPIIR p{margin:0;}#mermaid-svg-3XNhEPmJUOJuPIIR .label{font-family:"trebuchet ms",verdana,arial,sans-serif;color:#333;}#mermaid-svg-3XNhEPmJUOJuPIIR .cluster-label text{fill:#333;}#mermaid-svg-3XNhEPmJUOJuPIIR .cluster-label span{color:#333;}#mermaid-svg-3XNhEPmJUOJuPIIR .cluster-label span p{background-color:transparent;}#mermaid-svg-3XNhEPmJUOJuPIIR .label text,#mermaid-svg-3XNhEPmJUOJuPIIR span{fill:#333;color:#333;}#mermaid-svg-3XNhEPmJUOJuPIIR .node rect,#mermaid-svg-3XNhEPmJUOJuPIIR .node circle,#mermaid-svg-3XNhEPmJUOJuPIIR .node ellipse,#mermaid-svg-3XNhEPmJUOJuPIIR .node polygon,#mermaid-svg-3XNhEPmJUOJuPIIR .node path{fill:#ECECFF;stroke:#9370DB;stroke-width:1px;}#mermaid-svg-3XNhEPmJUOJuPIIR .rough-node .label text,#mermaid-svg-3XNhEPmJUOJuPIIR .node .label text,#mermaid-svg-3XNhEPmJUOJuPIIR .image-shape .label,#mermaid-svg-3XNhEPmJUOJuPIIR .icon-shape .label{text-anchor:middle;}#mermaid-svg-3XNhEPmJUOJuPIIR .node .katex path{fill:#000;stroke:#000;stroke-width:1px;}#mermaid-svg-3XNhEPmJUOJuPIIR .rough-node .label,#mermaid-svg-3XNhEPmJUOJuPIIR .node .label,#mermaid-svg-3XNhEPmJUOJuPIIR .image-shape .label,#mermaid-svg-3XNhEPmJUOJuPIIR .icon-shape .label{text-align:center;}#mermaid-svg-3XNhEPmJUOJuPIIR .node.clickable{cursor:pointer;}#mermaid-svg-3XNhEPmJUOJuPIIR .root .anchor path{fill:#333333!important;stroke-width:0;stroke:#333333;}#mermaid-svg-3XNhEPmJUOJuPIIR .arrowheadPath{fill:#333333;}#mermaid-svg-3XNhEPmJUOJuPIIR .edgePath .path{stroke:#333333;stroke-width:2.0px;}#mermaid-svg-3XNhEPmJUOJuPIIR .flowchart-link{stroke:#333333;fill:none;}#mermaid-svg-3XNhEPmJUOJuPIIR .edgeLabel{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-3XNhEPmJUOJuPIIR .edgeLabel p{background-color:rgba(232,232,232, 0.8);}#mermaid-svg-3XNhEPmJUOJuPIIR .edgeLabel rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-3XNhEPmJUOJuPIIR .labelBkg{background-color:rgba(232, 232, 232, 0.5);}#mermaid-svg-3XNhEPmJUOJuPIIR .cluster rect{fill:#ffffde;stroke:#aaaa33;stroke-width:1px;}#mermaid-svg-3XNhEPmJUOJuPIIR .cluster text{fill:#333;}#mermaid-svg-3XNhEPmJUOJuPIIR .cluster span{color:#333;}#mermaid-svg-3XNhEPmJUOJuPIIR div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:12px;background:hsl(80, 100%, 96.2745098039%);border:1px solid #aaaa33;border-radius:2px;pointer-events:none;z-index:100;}#mermaid-svg-3XNhEPmJUOJuPIIR .flowchartTitleText{text-anchor:middle;font-size:18px;fill:#333;}#mermaid-svg-3XNhEPmJUOJuPIIR rect.text{fill:none;stroke-width:0;}#mermaid-svg-3XNhEPmJUOJuPIIR .icon-shape,#mermaid-svg-3XNhEPmJUOJuPIIR .image-shape{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-3XNhEPmJUOJuPIIR .icon-shape p,#mermaid-svg-3XNhEPmJUOJuPIIR .image-shape p{background-color:rgba(232,232,232, 0.8);padding:2px;}#mermaid-svg-3XNhEPmJUOJuPIIR .icon-shape .label rect,#mermaid-svg-3XNhEPmJUOJuPIIR .image-shape .label rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-3XNhEPmJUOJuPIIR .label-icon{display:inline-block;height:1em;overflow:visible;vertical-align:-0.125em;}#mermaid-svg-3XNhEPmJUOJuPIIR .node .label-icon path{fill:currentColor;stroke:revert;stroke-width:revert;}#mermaid-svg-3XNhEPmJUOJuPIIR :root{--mermaid-font-family:"trebuchet ms",verdana,arial,sans-serif;}#mermaid-svg-3XNhEPmJUOJuPIIR .input>*{fill:#EEF4FF!important;stroke:#5B8FF9!important;color:#1D39C4!important;stroke-width:1.2px!important;}#mermaid-svg-3XNhEPmJUOJuPIIR .input span{fill:#EEF4FF!important;stroke:#5B8FF9!important;color:#1D39C4!important;stroke-width:1.2px!important;}#mermaid-svg-3XNhEPmJUOJuPIIR .input tspan{fill:#1D39C4!important;}#mermaid-svg-3XNhEPmJUOJuPIIR .process>*{fill:#FFF7E6!important;stroke:#FA8C16!important;color:#AD4E00!important;stroke-width:1.2px!important;}#mermaid-svg-3XNhEPmJUOJuPIIR .process span{fill:#FFF7E6!important;stroke:#FA8C16!important;color:#AD4E00!important;stroke-width:1.2px!important;}#mermaid-svg-3XNhEPmJUOJuPIIR .process tspan{fill:#AD4E00!important;}#mermaid-svg-3XNhEPmJUOJuPIIR .check>*{fill:#F9F0FF!important;stroke:#722ED1!important;color:#531DAB!important;stroke-width:1.2px!important;}#mermaid-svg-3XNhEPmJUOJuPIIR .check span{fill:#F9F0FF!important;stroke:#722ED1!important;color:#531DAB!important;stroke-width:1.2px!important;}#mermaid-svg-3XNhEPmJUOJuPIIR .check tspan{fill:#531DAB!important;}#mermaid-svg-3XNhEPmJUOJuPIIR .output>*{fill:#E6FFFB!important;stroke:#13C2C2!important;color:#006D75!important;stroke-width:1.2px!important;}#mermaid-svg-3XNhEPmJUOJuPIIR .output span{fill:#E6FFFB!important;stroke:#13C2C2!important;color:#006D75!important;stroke-width:1.2px!important;}#mermaid-svg-3XNhEPmJUOJuPIIR .output tspan{fill:#006D75!important;} 结果阶段
处理阶段
输入阶段
当前状态
处理意见
权限判断
状态更新
消息提醒
列表刷新
轨迹保留
交给 Codex 生成时,边界要限定在 server_backend/modules/TestingCenter/models.py、server_backend/modules/TestingCenter/recommend_engine/rank.py、server_backend/modules/TestingCenter/recommend_engine/strategy.py、server_backend/modules/TestingCenter/tasks.py、server_backend/modules/TestingCenter/views_app/QuestionRecommend.py、server_vue3/src/views/modules/TestingCenter/QuestionRecommend/api.ts 内。状态流转由后端校验,前端按钮只展示当前用户可执行操作。 同时需要补齐权限判断、异常提示、保存回显和测试用例。
可以直接使用下面的Prompt进行审批流程设计
text
请 Codex 基于真实源码补齐"知识点力图推荐"的审批流程能力。
模块源码范围:server_backend/modules/TestingCenter/models.py、server_backend/modules/TestingCenter/recommend_engine/rank.py、server_backend/modules/TestingCenter/recommend_engine/strategy.py、server_backend/modules/TestingCenter/tasks.py、server_backend/modules/TestingCenter/views_app/QuestionRecommend.py、server_vue3/src/views/modules/TestingCenter/QuestionRecommend/api.ts
接口范围:/api/TestingCenter/QuestionRecommend/、/api/TestingCenter/QuestionRecommend/get_student_questions/、/api/TestingCenter/QuestionRecommend/get_student_select_options/、/api/TestingCenter/QuestionRecommend/get_subject_exam_select_options/、/api/TestingCenter/QuestionRecommend/get_class_select_options/、/api/TestingCenter/QuestionRecommend/update_recommend_feedback/、/api/TestingCenter/QuestionRecommend/update_question_knowledge_relation/、/api/TestingCenter/QuestionRecommend/update_student_knowledge_mastery/、/api/TestingCenter/QuestionRecommend/get_question_recommend_logs/、/api/TestingCenter/QuestionRecommend/get_recommend_strategy_config/、/api/TestingCenter/QuestionRecommend/update_recommend_strategy_config/、/api/TestingCenter/QuestionRecommend/get_recommend_realtime_metrics/、/api/TestingCenter/QuestionRecommend/create_class_recommend_task/、/api/TestingCenter/QuestionRecommend/get_recommend_task_status/、/api/TestingCenter/QuestionRecommend/bootstrap_collaborative_samples/
字段范围:recommend_batch_no(推荐批次号)、scene(推荐场景)、strategy_code(策略编码)、student_id(学号)、student_name(学生姓名)、class_name(班级)、subject_exam(学科)、question_id_ref(题目ID)、question_uuid(题目UUID)、question_type(题型)、difficulty(难度)、knowledge_point_struct(知识点结构)、recommend_score(推荐得分)、reason_type(推荐原因类型)、reason_text(推荐原因)、strategy_snapshot(策略快照)
功能用途:把状态、处理意见、可操作角色和消息提醒纳入接口层。
落地边界:状态流转由后端校验,前端按钮只展示当前用户可执行操作。
要求只使用源码中已经存在的字段、接口和页面状态,不新增未确认的业务能力。输出接口设计、前端交互、权限约束、异常处理和验收清单。
批量处理
批量处理能力用于支持批量初始化、批量删除、批量分配、批量更新或批量生成。交给 Codex 生成时,边界要限定在 server_backend/modules/TestingCenter/models.py、server_backend/modules/TestingCenter/recommend_engine/rank.py、server_backend/modules/TestingCenter/recommend_engine/strategy.py、server_backend/modules/TestingCenter/tasks.py、server_backend/modules/TestingCenter/views_app/QuestionRecommend.py、server_vue3/src/views/modules/TestingCenter/QuestionRecommend/api.ts 内,重点是批量动作要限制数据范围,返回成功、失败和异常明细。
#mermaid-svg-COmBwmfwb1Vv51c3{font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;fill:#333;}@keyframes edge-animation-frame{from{stroke-dashoffset:0;}}@keyframes dash{to{stroke-dashoffset:0;}}#mermaid-svg-COmBwmfwb1Vv51c3 .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#mermaid-svg-COmBwmfwb1Vv51c3 .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#mermaid-svg-COmBwmfwb1Vv51c3 .error-icon{fill:#552222;}#mermaid-svg-COmBwmfwb1Vv51c3 .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-COmBwmfwb1Vv51c3 .edge-thickness-normal{stroke-width:1px;}#mermaid-svg-COmBwmfwb1Vv51c3 .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-COmBwmfwb1Vv51c3 .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-COmBwmfwb1Vv51c3 .edge-thickness-invisible{stroke-width:0;fill:none;}#mermaid-svg-COmBwmfwb1Vv51c3 .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-COmBwmfwb1Vv51c3 .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-COmBwmfwb1Vv51c3 .marker{fill:#333333;stroke:#333333;}#mermaid-svg-COmBwmfwb1Vv51c3 .marker.cross{stroke:#333333;}#mermaid-svg-COmBwmfwb1Vv51c3 svg{font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-COmBwmfwb1Vv51c3 p{margin:0;}#mermaid-svg-COmBwmfwb1Vv51c3 .label{font-family:"trebuchet ms",verdana,arial,sans-serif;color:#333;}#mermaid-svg-COmBwmfwb1Vv51c3 .cluster-label text{fill:#333;}#mermaid-svg-COmBwmfwb1Vv51c3 .cluster-label span{color:#333;}#mermaid-svg-COmBwmfwb1Vv51c3 .cluster-label span p{background-color:transparent;}#mermaid-svg-COmBwmfwb1Vv51c3 .label text,#mermaid-svg-COmBwmfwb1Vv51c3 span{fill:#333;color:#333;}#mermaid-svg-COmBwmfwb1Vv51c3 .node rect,#mermaid-svg-COmBwmfwb1Vv51c3 .node circle,#mermaid-svg-COmBwmfwb1Vv51c3 .node ellipse,#mermaid-svg-COmBwmfwb1Vv51c3 .node polygon,#mermaid-svg-COmBwmfwb1Vv51c3 .node path{fill:#ECECFF;stroke:#9370DB;stroke-width:1px;}#mermaid-svg-COmBwmfwb1Vv51c3 .rough-node .label text,#mermaid-svg-COmBwmfwb1Vv51c3 .node .label text,#mermaid-svg-COmBwmfwb1Vv51c3 .image-shape .label,#mermaid-svg-COmBwmfwb1Vv51c3 .icon-shape .label{text-anchor:middle;}#mermaid-svg-COmBwmfwb1Vv51c3 .node .katex path{fill:#000;stroke:#000;stroke-width:1px;}#mermaid-svg-COmBwmfwb1Vv51c3 .rough-node .label,#mermaid-svg-COmBwmfwb1Vv51c3 .node .label,#mermaid-svg-COmBwmfwb1Vv51c3 .image-shape .label,#mermaid-svg-COmBwmfwb1Vv51c3 .icon-shape .label{text-align:center;}#mermaid-svg-COmBwmfwb1Vv51c3 .node.clickable{cursor:pointer;}#mermaid-svg-COmBwmfwb1Vv51c3 .root .anchor path{fill:#333333!important;stroke-width:0;stroke:#333333;}#mermaid-svg-COmBwmfwb1Vv51c3 .arrowheadPath{fill:#333333;}#mermaid-svg-COmBwmfwb1Vv51c3 .edgePath .path{stroke:#333333;stroke-width:2.0px;}#mermaid-svg-COmBwmfwb1Vv51c3 .flowchart-link{stroke:#333333;fill:none;}#mermaid-svg-COmBwmfwb1Vv51c3 .edgeLabel{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-COmBwmfwb1Vv51c3 .edgeLabel p{background-color:rgba(232,232,232, 0.8);}#mermaid-svg-COmBwmfwb1Vv51c3 .edgeLabel rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-COmBwmfwb1Vv51c3 .labelBkg{background-color:rgba(232, 232, 232, 0.5);}#mermaid-svg-COmBwmfwb1Vv51c3 .cluster rect{fill:#ffffde;stroke:#aaaa33;stroke-width:1px;}#mermaid-svg-COmBwmfwb1Vv51c3 .cluster text{fill:#333;}#mermaid-svg-COmBwmfwb1Vv51c3 .cluster span{color:#333;}#mermaid-svg-COmBwmfwb1Vv51c3 div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:12px;background:hsl(80, 100%, 96.2745098039%);border:1px solid #aaaa33;border-radius:2px;pointer-events:none;z-index:100;}#mermaid-svg-COmBwmfwb1Vv51c3 .flowchartTitleText{text-anchor:middle;font-size:18px;fill:#333;}#mermaid-svg-COmBwmfwb1Vv51c3 rect.text{fill:none;stroke-width:0;}#mermaid-svg-COmBwmfwb1Vv51c3 .icon-shape,#mermaid-svg-COmBwmfwb1Vv51c3 .image-shape{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-COmBwmfwb1Vv51c3 .icon-shape p,#mermaid-svg-COmBwmfwb1Vv51c3 .image-shape p{background-color:rgba(232,232,232, 0.8);padding:2px;}#mermaid-svg-COmBwmfwb1Vv51c3 .icon-shape .label rect,#mermaid-svg-COmBwmfwb1Vv51c3 .image-shape .label rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-COmBwmfwb1Vv51c3 .label-icon{display:inline-block;height:1em;overflow:visible;vertical-align:-0.125em;}#mermaid-svg-COmBwmfwb1Vv51c3 .node .label-icon path{fill:currentColor;stroke:revert;stroke-width:revert;}#mermaid-svg-COmBwmfwb1Vv51c3 :root{--mermaid-font-family:"trebuchet ms",verdana,arial,sans-serif;}#mermaid-svg-COmBwmfwb1Vv51c3 .input>*{fill:#EEF4FF!important;stroke:#5B8FF9!important;color:#1D39C4!important;stroke-width:1.2px!important;}#mermaid-svg-COmBwmfwb1Vv51c3 .input span{fill:#EEF4FF!important;stroke:#5B8FF9!important;color:#1D39C4!important;stroke-width:1.2px!important;}#mermaid-svg-COmBwmfwb1Vv51c3 .input tspan{fill:#1D39C4!important;}#mermaid-svg-COmBwmfwb1Vv51c3 .process>*{fill:#FFF7E6!important;stroke:#FA8C16!important;color:#AD4E00!important;stroke-width:1.2px!important;}#mermaid-svg-COmBwmfwb1Vv51c3 .process span{fill:#FFF7E6!important;stroke:#FA8C16!important;color:#AD4E00!important;stroke-width:1.2px!important;}#mermaid-svg-COmBwmfwb1Vv51c3 .process tspan{fill:#AD4E00!important;}#mermaid-svg-COmBwmfwb1Vv51c3 .check>*{fill:#F9F0FF!important;stroke:#722ED1!important;color:#531DAB!important;stroke-width:1.2px!important;}#mermaid-svg-COmBwmfwb1Vv51c3 .check span{fill:#F9F0FF!important;stroke:#722ED1!important;color:#531DAB!important;stroke-width:1.2px!important;}#mermaid-svg-COmBwmfwb1Vv51c3 .check tspan{fill:#531DAB!important;}#mermaid-svg-COmBwmfwb1Vv51c3 .output>*{fill:#E6FFFB!important;stroke:#13C2C2!important;color:#006D75!important;stroke-width:1.2px!important;}#mermaid-svg-COmBwmfwb1Vv51c3 .output span{fill:#E6FFFB!important;stroke:#13C2C2!important;color:#006D75!important;stroke-width:1.2px!important;}#mermaid-svg-COmBwmfwb1Vv51c3 .output tspan{fill:#006D75!important;} 结果阶段
处理阶段
输入阶段
勾选数据
批量参数
范围校验
批量执行
结果汇总
刷新列表
异常明细
交给 Codex 生成时,边界要限定在 server_backend/modules/TestingCenter/models.py、server_backend/modules/TestingCenter/recommend_engine/rank.py、server_backend/modules/TestingCenter/recommend_engine/strategy.py、server_backend/modules/TestingCenter/tasks.py、server_backend/modules/TestingCenter/views_app/QuestionRecommend.py、server_vue3/src/views/modules/TestingCenter/QuestionRecommend/api.ts 内。批量动作要限制数据范围,返回成功、失败和异常明细。 同时需要补齐权限判断、异常提示、保存回显和测试用例。
可以直接使用下面的Prompt进行批量处理功能设计
text
请 Codex 基于真实源码补齐"知识点力图推荐"的批量处理能力。
模块源码范围:server_backend/modules/TestingCenter/models.py、server_backend/modules/TestingCenter/recommend_engine/rank.py、server_backend/modules/TestingCenter/recommend_engine/strategy.py、server_backend/modules/TestingCenter/tasks.py、server_backend/modules/TestingCenter/views_app/QuestionRecommend.py、server_vue3/src/views/modules/TestingCenter/QuestionRecommend/api.ts
接口范围:/api/TestingCenter/QuestionRecommend/、/api/TestingCenter/QuestionRecommend/get_student_questions/、/api/TestingCenter/QuestionRecommend/get_student_select_options/、/api/TestingCenter/QuestionRecommend/get_subject_exam_select_options/、/api/TestingCenter/QuestionRecommend/get_class_select_options/、/api/TestingCenter/QuestionRecommend/update_recommend_feedback/、/api/TestingCenter/QuestionRecommend/update_question_knowledge_relation/、/api/TestingCenter/QuestionRecommend/update_student_knowledge_mastery/、/api/TestingCenter/QuestionRecommend/get_question_recommend_logs/、/api/TestingCenter/QuestionRecommend/get_recommend_strategy_config/、/api/TestingCenter/QuestionRecommend/update_recommend_strategy_config/、/api/TestingCenter/QuestionRecommend/get_recommend_realtime_metrics/、/api/TestingCenter/QuestionRecommend/create_class_recommend_task/、/api/TestingCenter/QuestionRecommend/get_recommend_task_status/、/api/TestingCenter/QuestionRecommend/bootstrap_collaborative_samples/
字段范围:recommend_batch_no(推荐批次号)、scene(推荐场景)、strategy_code(策略编码)、student_id(学号)、student_name(学生姓名)、class_name(班级)、subject_exam(学科)、question_id_ref(题目ID)、question_uuid(题目UUID)、question_type(题型)、difficulty(难度)、knowledge_point_struct(知识点结构)、recommend_score(推荐得分)、reason_type(推荐原因类型)、reason_text(推荐原因)、strategy_snapshot(策略快照)
功能用途:支持批量初始化、批量删除、批量分配、批量更新或批量生成。
落地边界:批量动作要限制数据范围,返回成功、失败和异常明细。
要求只使用源码中已经存在的字段、接口和页面状态,不新增未确认的业务能力。输出接口设计、前端交互、权限约束、异常处理和验收清单。
异步任务
异步任务能力用于把耗时生成、导出、下载或后台执行动作交给任务中心跟踪。交给 Codex 生成时,边界要限定在 server_backend/modules/TestingCenter/models.py、server_backend/modules/TestingCenter/recommend_engine/rank.py、server_backend/modules/TestingCenter/recommend_engine/strategy.py、server_backend/modules/TestingCenter/tasks.py、server_backend/modules/TestingCenter/views_app/QuestionRecommend.py、server_vue3/src/views/modules/TestingCenter/QuestionRecommend/api.ts 内,重点是接口返回任务 ID、状态和错误信息,页面轮询或刷新展示结果。
#mermaid-svg-LowiV5hESpZ3tHSq{font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;fill:#333;}@keyframes edge-animation-frame{from{stroke-dashoffset:0;}}@keyframes dash{to{stroke-dashoffset:0;}}#mermaid-svg-LowiV5hESpZ3tHSq .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#mermaid-svg-LowiV5hESpZ3tHSq .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#mermaid-svg-LowiV5hESpZ3tHSq .error-icon{fill:#552222;}#mermaid-svg-LowiV5hESpZ3tHSq .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-LowiV5hESpZ3tHSq .edge-thickness-normal{stroke-width:1px;}#mermaid-svg-LowiV5hESpZ3tHSq .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-LowiV5hESpZ3tHSq .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-LowiV5hESpZ3tHSq .edge-thickness-invisible{stroke-width:0;fill:none;}#mermaid-svg-LowiV5hESpZ3tHSq .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-LowiV5hESpZ3tHSq .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-LowiV5hESpZ3tHSq .marker{fill:#333333;stroke:#333333;}#mermaid-svg-LowiV5hESpZ3tHSq .marker.cross{stroke:#333333;}#mermaid-svg-LowiV5hESpZ3tHSq svg{font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-LowiV5hESpZ3tHSq p{margin:0;}#mermaid-svg-LowiV5hESpZ3tHSq .label{font-family:"trebuchet ms",verdana,arial,sans-serif;color:#333;}#mermaid-svg-LowiV5hESpZ3tHSq .cluster-label text{fill:#333;}#mermaid-svg-LowiV5hESpZ3tHSq .cluster-label span{color:#333;}#mermaid-svg-LowiV5hESpZ3tHSq .cluster-label span p{background-color:transparent;}#mermaid-svg-LowiV5hESpZ3tHSq .label text,#mermaid-svg-LowiV5hESpZ3tHSq span{fill:#333;color:#333;}#mermaid-svg-LowiV5hESpZ3tHSq .node rect,#mermaid-svg-LowiV5hESpZ3tHSq .node circle,#mermaid-svg-LowiV5hESpZ3tHSq .node ellipse,#mermaid-svg-LowiV5hESpZ3tHSq .node polygon,#mermaid-svg-LowiV5hESpZ3tHSq .node path{fill:#ECECFF;stroke:#9370DB;stroke-width:1px;}#mermaid-svg-LowiV5hESpZ3tHSq .rough-node .label text,#mermaid-svg-LowiV5hESpZ3tHSq .node .label text,#mermaid-svg-LowiV5hESpZ3tHSq .image-shape .label,#mermaid-svg-LowiV5hESpZ3tHSq .icon-shape .label{text-anchor:middle;}#mermaid-svg-LowiV5hESpZ3tHSq .node .katex path{fill:#000;stroke:#000;stroke-width:1px;}#mermaid-svg-LowiV5hESpZ3tHSq .rough-node .label,#mermaid-svg-LowiV5hESpZ3tHSq .node .label,#mermaid-svg-LowiV5hESpZ3tHSq .image-shape .label,#mermaid-svg-LowiV5hESpZ3tHSq .icon-shape .label{text-align:center;}#mermaid-svg-LowiV5hESpZ3tHSq .node.clickable{cursor:pointer;}#mermaid-svg-LowiV5hESpZ3tHSq .root .anchor path{fill:#333333!important;stroke-width:0;stroke:#333333;}#mermaid-svg-LowiV5hESpZ3tHSq .arrowheadPath{fill:#333333;}#mermaid-svg-LowiV5hESpZ3tHSq .edgePath .path{stroke:#333333;stroke-width:2.0px;}#mermaid-svg-LowiV5hESpZ3tHSq .flowchart-link{stroke:#333333;fill:none;}#mermaid-svg-LowiV5hESpZ3tHSq .edgeLabel{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-LowiV5hESpZ3tHSq .edgeLabel p{background-color:rgba(232,232,232, 0.8);}#mermaid-svg-LowiV5hESpZ3tHSq .edgeLabel rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-LowiV5hESpZ3tHSq .labelBkg{background-color:rgba(232, 232, 232, 0.5);}#mermaid-svg-LowiV5hESpZ3tHSq .cluster rect{fill:#ffffde;stroke:#aaaa33;stroke-width:1px;}#mermaid-svg-LowiV5hESpZ3tHSq .cluster text{fill:#333;}#mermaid-svg-LowiV5hESpZ3tHSq .cluster span{color:#333;}#mermaid-svg-LowiV5hESpZ3tHSq div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:12px;background:hsl(80, 100%, 96.2745098039%);border:1px solid #aaaa33;border-radius:2px;pointer-events:none;z-index:100;}#mermaid-svg-LowiV5hESpZ3tHSq .flowchartTitleText{text-anchor:middle;font-size:18px;fill:#333;}#mermaid-svg-LowiV5hESpZ3tHSq rect.text{fill:none;stroke-width:0;}#mermaid-svg-LowiV5hESpZ3tHSq .icon-shape,#mermaid-svg-LowiV5hESpZ3tHSq .image-shape{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-LowiV5hESpZ3tHSq .icon-shape p,#mermaid-svg-LowiV5hESpZ3tHSq .image-shape p{background-color:rgba(232,232,232, 0.8);padding:2px;}#mermaid-svg-LowiV5hESpZ3tHSq .icon-shape .label rect,#mermaid-svg-LowiV5hESpZ3tHSq .image-shape .label rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-LowiV5hESpZ3tHSq .label-icon{display:inline-block;height:1em;overflow:visible;vertical-align:-0.125em;}#mermaid-svg-LowiV5hESpZ3tHSq .node .label-icon path{fill:currentColor;stroke:revert;stroke-width:revert;}#mermaid-svg-LowiV5hESpZ3tHSq :root{--mermaid-font-family:"trebuchet ms",verdana,arial,sans-serif;}#mermaid-svg-LowiV5hESpZ3tHSq .input>*{fill:#EEF4FF!important;stroke:#5B8FF9!important;color:#1D39C4!important;stroke-width:1.2px!important;}#mermaid-svg-LowiV5hESpZ3tHSq .input span{fill:#EEF4FF!important;stroke:#5B8FF9!important;color:#1D39C4!important;stroke-width:1.2px!important;}#mermaid-svg-LowiV5hESpZ3tHSq .input tspan{fill:#1D39C4!important;}#mermaid-svg-LowiV5hESpZ3tHSq .process>*{fill:#FFF7E6!important;stroke:#FA8C16!important;color:#AD4E00!important;stroke-width:1.2px!important;}#mermaid-svg-LowiV5hESpZ3tHSq .process span{fill:#FFF7E6!important;stroke:#FA8C16!important;color:#AD4E00!important;stroke-width:1.2px!important;}#mermaid-svg-LowiV5hESpZ3tHSq .process tspan{fill:#AD4E00!important;}#mermaid-svg-LowiV5hESpZ3tHSq .check>*{fill:#F9F0FF!important;stroke:#722ED1!important;color:#531DAB!important;stroke-width:1.2px!important;}#mermaid-svg-LowiV5hESpZ3tHSq .check span{fill:#F9F0FF!important;stroke:#722ED1!important;color:#531DAB!important;stroke-width:1.2px!important;}#mermaid-svg-LowiV5hESpZ3tHSq .check tspan{fill:#531DAB!important;}#mermaid-svg-LowiV5hESpZ3tHSq .output>*{fill:#E6FFFB!important;stroke:#13C2C2!important;color:#006D75!important;stroke-width:1.2px!important;}#mermaid-svg-LowiV5hESpZ3tHSq .output span{fill:#E6FFFB!important;stroke:#13C2C2!important;color:#006D75!important;stroke-width:1.2px!important;}#mermaid-svg-LowiV5hESpZ3tHSq .output tspan{fill:#006D75!important;} 结果阶段
处理阶段
输入阶段
任务输入
执行入口
参数校验
后台执行
状态回写
结果展示
异常处理
交给 Codex 生成时,边界要限定在 server_backend/modules/TestingCenter/models.py、server_backend/modules/TestingCenter/recommend_engine/rank.py、server_backend/modules/TestingCenter/recommend_engine/strategy.py、server_backend/modules/TestingCenter/tasks.py、server_backend/modules/TestingCenter/views_app/QuestionRecommend.py、server_vue3/src/views/modules/TestingCenter/QuestionRecommend/api.ts 内。接口返回任务 ID、状态和错误信息,页面轮询或刷新展示结果。 同时需要补齐权限判断、异常提示、保存回显和测试用例。
可以直接使用下面的Prompt进行异步任务设计
text
请 Codex 基于真实源码补齐"知识点力图推荐"的异步任务能力。
模块源码范围:server_backend/modules/TestingCenter/models.py、server_backend/modules/TestingCenter/recommend_engine/rank.py、server_backend/modules/TestingCenter/recommend_engine/strategy.py、server_backend/modules/TestingCenter/tasks.py、server_backend/modules/TestingCenter/views_app/QuestionRecommend.py、server_vue3/src/views/modules/TestingCenter/QuestionRecommend/api.ts
接口范围:/api/TestingCenter/QuestionRecommend/、/api/TestingCenter/QuestionRecommend/get_student_questions/、/api/TestingCenter/QuestionRecommend/get_student_select_options/、/api/TestingCenter/QuestionRecommend/get_subject_exam_select_options/、/api/TestingCenter/QuestionRecommend/get_class_select_options/、/api/TestingCenter/QuestionRecommend/update_recommend_feedback/、/api/TestingCenter/QuestionRecommend/update_question_knowledge_relation/、/api/TestingCenter/QuestionRecommend/update_student_knowledge_mastery/、/api/TestingCenter/QuestionRecommend/get_question_recommend_logs/、/api/TestingCenter/QuestionRecommend/get_recommend_strategy_config/、/api/TestingCenter/QuestionRecommend/update_recommend_strategy_config/、/api/TestingCenter/QuestionRecommend/get_recommend_realtime_metrics/、/api/TestingCenter/QuestionRecommend/create_class_recommend_task/、/api/TestingCenter/QuestionRecommend/get_recommend_task_status/、/api/TestingCenter/QuestionRecommend/bootstrap_collaborative_samples/
字段范围:recommend_batch_no(推荐批次号)、scene(推荐场景)、strategy_code(策略编码)、student_id(学号)、student_name(学生姓名)、class_name(班级)、subject_exam(学科)、question_id_ref(题目ID)、question_uuid(题目UUID)、question_type(题型)、difficulty(难度)、knowledge_point_struct(知识点结构)、recommend_score(推荐得分)、reason_type(推荐原因类型)、reason_text(推荐原因)、strategy_snapshot(策略快照)
功能用途:把耗时生成、导出、下载或后台执行动作交给任务中心跟踪。
落地边界:接口返回任务 ID、状态和错误信息,页面轮询或刷新展示结果。
要求只使用源码中已经存在的字段、接口和页面状态,不新增未确认的业务能力。输出接口设计、前端交互、权限约束、异常处理和验收清单。
Codex开发标准
使用 Codex 开发 知识点力图推荐 时,不能直接让它随意写代码。需求边界、PDD、SOP、接口权限规则和验收标准需要同时约束后端、前端和扩展能力,让生成结果能回到项目源码中运行。
#mermaid-svg-TsrapdatwidSXTlZ{font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;fill:#333;}@keyframes edge-animation-frame{from{stroke-dashoffset:0;}}@keyframes dash{to{stroke-dashoffset:0;}}#mermaid-svg-TsrapdatwidSXTlZ .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#mermaid-svg-TsrapdatwidSXTlZ .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#mermaid-svg-TsrapdatwidSXTlZ .error-icon{fill:#552222;}#mermaid-svg-TsrapdatwidSXTlZ .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-TsrapdatwidSXTlZ .edge-thickness-normal{stroke-width:1px;}#mermaid-svg-TsrapdatwidSXTlZ .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-TsrapdatwidSXTlZ .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-TsrapdatwidSXTlZ .edge-thickness-invisible{stroke-width:0;fill:none;}#mermaid-svg-TsrapdatwidSXTlZ .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-TsrapdatwidSXTlZ .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-TsrapdatwidSXTlZ .marker{fill:#333333;stroke:#333333;}#mermaid-svg-TsrapdatwidSXTlZ .marker.cross{stroke:#333333;}#mermaid-svg-TsrapdatwidSXTlZ svg{font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-TsrapdatwidSXTlZ p{margin:0;}#mermaid-svg-TsrapdatwidSXTlZ .label{font-family:"trebuchet ms",verdana,arial,sans-serif;color:#333;}#mermaid-svg-TsrapdatwidSXTlZ .cluster-label text{fill:#333;}#mermaid-svg-TsrapdatwidSXTlZ .cluster-label span{color:#333;}#mermaid-svg-TsrapdatwidSXTlZ .cluster-label span p{background-color:transparent;}#mermaid-svg-TsrapdatwidSXTlZ .label text,#mermaid-svg-TsrapdatwidSXTlZ span{fill:#333;color:#333;}#mermaid-svg-TsrapdatwidSXTlZ .node rect,#mermaid-svg-TsrapdatwidSXTlZ .node circle,#mermaid-svg-TsrapdatwidSXTlZ .node ellipse,#mermaid-svg-TsrapdatwidSXTlZ .node polygon,#mermaid-svg-TsrapdatwidSXTlZ .node path{fill:#ECECFF;stroke:#9370DB;stroke-width:1px;}#mermaid-svg-TsrapdatwidSXTlZ .rough-node .label text,#mermaid-svg-TsrapdatwidSXTlZ .node .label text,#mermaid-svg-TsrapdatwidSXTlZ .image-shape .label,#mermaid-svg-TsrapdatwidSXTlZ .icon-shape .label{text-anchor:middle;}#mermaid-svg-TsrapdatwidSXTlZ .node .katex path{fill:#000;stroke:#000;stroke-width:1px;}#mermaid-svg-TsrapdatwidSXTlZ .rough-node .label,#mermaid-svg-TsrapdatwidSXTlZ .node .label,#mermaid-svg-TsrapdatwidSXTlZ .image-shape .label,#mermaid-svg-TsrapdatwidSXTlZ .icon-shape .label{text-align:center;}#mermaid-svg-TsrapdatwidSXTlZ .node.clickable{cursor:pointer;}#mermaid-svg-TsrapdatwidSXTlZ .root .anchor path{fill:#333333!important;stroke-width:0;stroke:#333333;}#mermaid-svg-TsrapdatwidSXTlZ .arrowheadPath{fill:#333333;}#mermaid-svg-TsrapdatwidSXTlZ .edgePath .path{stroke:#333333;stroke-width:2.0px;}#mermaid-svg-TsrapdatwidSXTlZ .flowchart-link{stroke:#333333;fill:none;}#mermaid-svg-TsrapdatwidSXTlZ .edgeLabel{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-TsrapdatwidSXTlZ .edgeLabel p{background-color:rgba(232,232,232, 0.8);}#mermaid-svg-TsrapdatwidSXTlZ .edgeLabel rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-TsrapdatwidSXTlZ .labelBkg{background-color:rgba(232, 232, 232, 0.5);}#mermaid-svg-TsrapdatwidSXTlZ .cluster rect{fill:#ffffde;stroke:#aaaa33;stroke-width:1px;}#mermaid-svg-TsrapdatwidSXTlZ .cluster text{fill:#333;}#mermaid-svg-TsrapdatwidSXTlZ .cluster span{color:#333;}#mermaid-svg-TsrapdatwidSXTlZ div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:12px;background:hsl(80, 100%, 96.2745098039%);border:1px solid #aaaa33;border-radius:2px;pointer-events:none;z-index:100;}#mermaid-svg-TsrapdatwidSXTlZ .flowchartTitleText{text-anchor:middle;font-size:18px;fill:#333;}#mermaid-svg-TsrapdatwidSXTlZ rect.text{fill:none;stroke-width:0;}#mermaid-svg-TsrapdatwidSXTlZ .icon-shape,#mermaid-svg-TsrapdatwidSXTlZ .image-shape{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-TsrapdatwidSXTlZ .icon-shape p,#mermaid-svg-TsrapdatwidSXTlZ .image-shape p{background-color:rgba(232,232,232, 0.8);padding:2px;}#mermaid-svg-TsrapdatwidSXTlZ .icon-shape .label rect,#mermaid-svg-TsrapdatwidSXTlZ .image-shape .label rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-TsrapdatwidSXTlZ .label-icon{display:inline-block;height:1em;overflow:visible;vertical-align:-0.125em;}#mermaid-svg-TsrapdatwidSXTlZ .node .label-icon path{fill:currentColor;stroke:revert;stroke-width:revert;}#mermaid-svg-TsrapdatwidSXTlZ :root{--mermaid-font-family:"trebuchet ms",verdana,arial,sans-serif;}#mermaid-svg-TsrapdatwidSXTlZ .input>*{fill:#EEF4FF!important;stroke:#5B8FF9!important;color:#1D39C4!important;stroke-width:1.2px!important;}#mermaid-svg-TsrapdatwidSXTlZ .input span{fill:#EEF4FF!important;stroke:#5B8FF9!important;color:#1D39C4!important;stroke-width:1.2px!important;}#mermaid-svg-TsrapdatwidSXTlZ .input tspan{fill:#1D39C4!important;}#mermaid-svg-TsrapdatwidSXTlZ .design>*{fill:#F6FFED!important;stroke:#52C41A!important;color:#237804!important;stroke-width:1.2px!important;}#mermaid-svg-TsrapdatwidSXTlZ .design span{fill:#F6FFED!important;stroke:#52C41A!important;color:#237804!important;stroke-width:1.2px!important;}#mermaid-svg-TsrapdatwidSXTlZ .design tspan{fill:#237804!important;}#mermaid-svg-TsrapdatwidSXTlZ .dev>*{fill:#FFF7E6!important;stroke:#FA8C16!important;color:#AD4E00!important;stroke-width:1.2px!important;}#mermaid-svg-TsrapdatwidSXTlZ .dev span{fill:#FFF7E6!important;stroke:#FA8C16!important;color:#AD4E00!important;stroke-width:1.2px!important;}#mermaid-svg-TsrapdatwidSXTlZ .dev tspan{fill:#AD4E00!important;}#mermaid-svg-TsrapdatwidSXTlZ .check>*{fill:#F9F0FF!important;stroke:#722ED1!important;color:#531DAB!important;stroke-width:1.2px!important;}#mermaid-svg-TsrapdatwidSXTlZ .check span{fill:#F9F0FF!important;stroke:#722ED1!important;color:#531DAB!important;stroke-width:1.2px!important;}#mermaid-svg-TsrapdatwidSXTlZ .check tspan{fill:#531DAB!important;} 验收交付
Codex开发
模块设计
输入约束
需求边界
PDD设计
SOP目录
接口权限
后端设计
前端设计
扩展功能
读取上下文
生成后端
生成前端
补齐扩展
功能自检
PDD验收
问题修复
模块交付
SOP 标准
SOP 用于约束代码目录、文件职责和开发顺序。Codex 在动手写代码前,需要先确认目录结构和文档位置,再按后端、前端、联动、验收的顺序推进。
text
docs/modules/知识点力图推荐/
├── pdd.md
├── api.md
├── test-cases.md
└── codex-sop.md
server_backend/
└── modules/TestingCenter/models.py
└── modules/TestingCenter/recommend_engine/rank.py
└── modules/TestingCenter/recommend_engine/strategy.py
└── modules/TestingCenter/tasks.py
└── modules/TestingCenter/views_app/QuestionRecommend.py
server_vue3/
└── src/views/modules/TestingCenter/QuestionRecommend/api.ts
| 开发阶段 | Codex 执行目标 | 输出结果 |
|---|---|---|
| 模块设计 | 读取源码、确认字段、接口和页面入口 | 输出模块边界和设计说明 |
| 目录规划 | 规划后端、前端和 docs/modules 文档 | 输出目录结构和文件职责 |
| 后端实现 | 补齐模型、序列化、ViewSet、路由和权限 | 输出可调用接口和基础校验 |
| 前端实现 | 补齐 api.ts、crud.tsx、index.vue 或自定义组件 | 输出可操作页面和保存回显 |
| 数据联动或功能补齐 | 校验筛选、下拉、状态、详情和异常提示 | 输出联动说明和修复记录 |
| 扩展功能 | 按源码补齐 数据联动、数据统计、审批流程、批量处理、异步任务 | 输出扩展接口、交互和边界测试 |
| 验收修复 | 按 PDD 和测试用例检查模块 | 输出验收结果和问题修复 |
可以直接使用下面的Prompt进行SOP撰写
text
请 Codex 按教育管理系统模块开发 SOP,从零实现或补齐"知识点力图推荐"。
源码范围:server_backend/modules/TestingCenter/models.py、server_backend/modules/TestingCenter/recommend_engine/rank.py、server_backend/modules/TestingCenter/recommend_engine/strategy.py、server_backend/modules/TestingCenter/tasks.py、server_backend/modules/TestingCenter/views_app/QuestionRecommend.py、server_vue3/src/views/modules/TestingCenter/QuestionRecommend/api.ts
接口范围:/api/TestingCenter/QuestionRecommend/、/api/TestingCenter/QuestionRecommend/get_student_questions/、/api/TestingCenter/QuestionRecommend/get_student_select_options/、/api/TestingCenter/QuestionRecommend/get_subject_exam_select_options/、/api/TestingCenter/QuestionRecommend/get_class_select_options/、/api/TestingCenter/QuestionRecommend/update_recommend_feedback/、/api/TestingCenter/QuestionRecommend/update_question_knowledge_relation/、/api/TestingCenter/QuestionRecommend/update_student_knowledge_mastery/、/api/TestingCenter/QuestionRecommend/get_question_recommend_logs/、/api/TestingCenter/QuestionRecommend/get_recommend_strategy_config/、/api/TestingCenter/QuestionRecommend/update_recommend_strategy_config/、/api/TestingCenter/QuestionRecommend/get_recommend_realtime_metrics/、/api/TestingCenter/QuestionRecommend/create_class_recommend_task/、/api/TestingCenter/QuestionRecommend/get_recommend_task_status/、/api/TestingCenter/QuestionRecommend/bootstrap_collaborative_samples/
字段范围:recommend_batch_no(推荐批次号)、scene(推荐场景)、strategy_code(策略编码)、student_id(学号)、student_name(学生姓名)、class_name(班级)、subject_exam(学科)、question_id_ref(题目ID)、question_uuid(题目UUID)、question_type(题型)、difficulty(难度)、knowledge_point_struct(知识点结构)、recommend_score(推荐得分)、reason_type(推荐原因类型)、reason_text(推荐原因)、strategy_snapshot(策略快照)
执行要求:
1. 先输出目录结构,不要直接写代码。
2. 先生成 docs/modules/知识点力图推荐/pdd.md、api.md、test-cases.md 和 codex-sop.md。
3. 再根据文档生成后端代码、前端代码、接口封装、权限控制和测试用例。
4. 开发阶段需要包含 数据联动、数据统计、审批流程、批量处理、异步任务,但只能写源码真实存在的能力。
5. 每个阶段输出涉及文件、修改目标和验收方式。
PDD 标准
PDD 是 知识点力图推荐 的设计与验收文档,用于约束 Codex 输出是否符合真实业务。验收不能只看页面能否打开,还要检查字段、接口、权限、异常、回显和扩展功能是否与源码一致。
| 验收维度 | 验收重点 | 通过标准 |
|---|---|---|
| 业务目标 | 把考试成绩、学生或班级维度和统计接口转换成可追踪的分析结果 | 页面和接口围绕该目标闭环 |
| 页面结构 | server_vue3/src/views/modules/TestingCenter/QuestionRecommend/api.ts | 列表、表单、详情或自定义操作区可用 |
| 数据模型 | recommend_batch_no(推荐批次号)、scene(推荐场景)、strategy_code(策略编码)、student_id(学号)、student_name(学生姓名)、class_name(班级)、subject_exam(学科)、question_id_ref(题目ID)、question_uuid(题目UUID)、question_type(题型) | 字段保存、查询、回显和校验一致 |
| 接口规则 | /api/TestingCenter/QuestionRecommend/、/api/TestingCenter/QuestionRecommend/get_student_questions/、/api/TestingCenter/QuestionRecommend/get_student_select_options/、/api/TestingCenter/QuestionRecommend/get_subject_exam_select_options/、/api/TestingCenter/QuestionRecommend/get_class_select_options/、/api/TestingCenter/QuestionRecommend/update_recommend_feedback/、/api/TestingCenter/QuestionRecommend/update_question_knowledge_relation/、/api/TestingCenter/QuestionRecommend/update_student_knowledge_mastery/、/api/TestingCenter/QuestionRecommend/get_question_recommend_logs/、/api/TestingCenter/QuestionRecommend/get_recommend_strategy_config/、/api/TestingCenter/QuestionRecommend/update_recommend_strategy_config/、/api/TestingCenter/QuestionRecommend/get_recommend_realtime_metrics/、/api/TestingCenter/QuestionRecommend/create_class_recommend_task/、/api/TestingCenter/QuestionRecommend/get_recommend_task_status/、/api/TestingCenter/QuestionRecommend/bootstrap_collaborative_samples/ | GetStudentQuestions、GetStudentSelectOptions、GetSubjectExamSelectOptions、GetClassSelectOptions、UpdateRecommendFeedback、UpdateQuestionKnowledgeRelation、UpdateStudentKnowledgeMastery、GetQuestionRecommendLogs、GetRecommendStrategyConfig、UpdateRecommendStrategyConfig、GetRecommendRealtimeMetrics、CreateClassRecommendTask、GetRecommendTaskStatus、BootstrapCollaborativeSamples、get_student_select_options、get_subject_exam_select_options、get_class_select_options、create_class_recommend_task、get_recommend_task_status、bootstrap_collaborative_samples、get_student_questions、update_recommend_feedback、update_question_knowledge_relation、update_student_knowledge_mastery、get_question_recommend_logs、get_recommend_strategy_config、update_recommend_strategy_config、get_recommend_realtime_metrics 能被前端正确调用 |
| 权限控制 | 按角色、按钮和接口权限检查 | 越权访问有后端拦截和错误响应 |
| 测试用例 | 覆盖新增、编辑、删除、查询、异常和回显 | 测试记录包含输入、输出和修复位置 |
| 数据联动 | 把筛选条件、树节点、状态字段、远程下拉和表单回显组织成稳定数据流。 | 字段变化要同步查询参数、保存载荷和回显结构,避免页面临时状态与后端字段脱节。 |
| 数据统计 | 把业务列表、成绩、趋势、看板卡片或图表接口整理成可视化结果。 | 统计接口、筛选条件和前端图表必须使用同一套口径。 |
| 审批流程 | 把状态、处理意见、可操作角色和消息提醒纳入接口层。 | 状态流转由后端校验,前端按钮只展示当前用户可执行操作。 |
| 批量处理 | 支持批量初始化、批量删除、批量分配、批量更新或批量生成。 | 批量动作要限制数据范围,返回成功、失败和异常明细。 |
| 异步任务 | 把耗时生成、导出、下载或后台执行动作交给任务中心跟踪。 | 接口返回任务 ID、状态和错误信息,页面轮询或刷新展示结果。 |
可以直接使用下面的Prompt进行PDD 验收
text
请 Codex 根据 docs/modules/知识点力图推荐/pdd.md 对"知识点力图推荐"进行验收。
源码范围:server_backend/modules/TestingCenter/models.py、server_backend/modules/TestingCenter/recommend_engine/rank.py、server_backend/modules/TestingCenter/recommend_engine/strategy.py、server_backend/modules/TestingCenter/tasks.py、server_backend/modules/TestingCenter/views_app/QuestionRecommend.py、server_vue3/src/views/modules/TestingCenter/QuestionRecommend/api.ts
接口范围:/api/TestingCenter/QuestionRecommend/、/api/TestingCenter/QuestionRecommend/get_student_questions/、/api/TestingCenter/QuestionRecommend/get_student_select_options/、/api/TestingCenter/QuestionRecommend/get_subject_exam_select_options/、/api/TestingCenter/QuestionRecommend/get_class_select_options/、/api/TestingCenter/QuestionRecommend/update_recommend_feedback/、/api/TestingCenter/QuestionRecommend/update_question_knowledge_relation/、/api/TestingCenter/QuestionRecommend/update_student_knowledge_mastery/、/api/TestingCenter/QuestionRecommend/get_question_recommend_logs/、/api/TestingCenter/QuestionRecommend/get_recommend_strategy_config/、/api/TestingCenter/QuestionRecommend/update_recommend_strategy_config/、/api/TestingCenter/QuestionRecommend/get_recommend_realtime_metrics/、/api/TestingCenter/QuestionRecommend/create_class_recommend_task/、/api/TestingCenter/QuestionRecommend/get_recommend_task_status/、/api/TestingCenter/QuestionRecommend/bootstrap_collaborative_samples/
字段范围:recommend_batch_no(推荐批次号)、scene(推荐场景)、strategy_code(策略编码)、student_id(学号)、student_name(学生姓名)、class_name(班级)、subject_exam(学科)、question_id_ref(题目ID)、question_uuid(题目UUID)、question_type(题型)、difficulty(难度)、knowledge_point_struct(知识点结构)、recommend_score(推荐得分)、reason_type(推荐原因类型)、reason_text(推荐原因)、strategy_snapshot(策略快照)
验收范围必须包含 数据联动、数据统计、审批流程、批量处理、异步任务。
请输出验收结果表,标记通过、未通过和需要修复的文件位置。不要只给结论,需要指出具体问题、影响范围和修复建议。
总结
知识点力图推荐的开发价值在于把考试成绩、学生或班级维度和统计接口转换成可追踪的分析结果。它把核心字段、接口规则和页面状态连成业务闭环,避免模块停留在普通列表维护。
Codex 开发该模块时,PDD 定义业务边界和验收标准,SOP 约束目录结构和开发顺序,Prompt 把页面、模型、接口、权限和扩展功能 分阶段交给 Codex 实现。