- run_match 新增 skip_incomplete:批量缺省跳过画像不完整教师并记录 skipped,指定单教师仍 PROFILE_INCOMPLETE;汇总页出"画像待补录"行 - render-html 补 --report-id 行上下文(inputMapping $row.$pk),CLI 容错解析回退最近 10 份 - report_service 日志改容错 _log(),修复未 setup 时单跑测试崩溃的顺序依赖 - fixtures 替换为教师画像/赛道/期望结论金标准样例,新增 sample_tracks.json - 新增 4 个批量跳过用例(314 项,除 3 个已知 jsonschema 环境失败外全绿) - tests/README 增补本机无共享 runtime 的测试方式;TUTORIAL/ACTIONS.md 同步表述
415 lines
12 KiB
JSON
415 lines
12 KiB
JSON
{
|
||
"schemaVersion": 1,
|
||
"skill": "match-guide-track-default",
|
||
"actions": [
|
||
{
|
||
"id": "match-teachers",
|
||
"label": "赛道匹配",
|
||
"description": "按教师画像与指南赛道做标签匹配+硬门槛过滤,生成 Top 3 推荐与《申报策略建议书》。缺省匹配全部教师。",
|
||
"placements": ["agent", "toolbar"],
|
||
"executionProfile": "sync",
|
||
"interaction": "form",
|
||
"bind": {
|
||
"tables": ["teacher_profiles"]
|
||
},
|
||
"entrypoint": {
|
||
"type": "cli",
|
||
"command": "match",
|
||
"args": ["--teacher", "{{teacherName}}", "--year", "{{year}}"]
|
||
},
|
||
"inputSchema": {
|
||
"type": "object",
|
||
"properties": {
|
||
"teacherName": {
|
||
"type": "string",
|
||
"title": "教师姓名",
|
||
"description": "只匹配该教师。留空匹配全部教师。"
|
||
},
|
||
"year": {
|
||
"type": "number",
|
||
"title": "指南年度",
|
||
"description": "缺省用赛道库最新年度。可选。"
|
||
}
|
||
}
|
||
},
|
||
"hostEffects": {
|
||
"onSuccess": ["reloadTable"]
|
||
}
|
||
},
|
||
{
|
||
"id": "match-batch-input",
|
||
"label": "批量赛道匹配",
|
||
"description": "匹配 input/ 目录中的教师画像 JSON 与库内赛道;适合指南发布后集中跑(任务中心可见进度)。",
|
||
"placements": ["agent"],
|
||
"executionProfile": "async",
|
||
"entrypoint": {
|
||
"type": "cli",
|
||
"command": "match-batch-input",
|
||
"args": []
|
||
}
|
||
},
|
||
{
|
||
"id": "add-teacher",
|
||
"label": "录入教师画像",
|
||
"description": "按姓名录入/更新教师学术画像(幂等,未提供字段不覆盖)。",
|
||
"placements": ["toolbar"],
|
||
"executionProfile": "sync",
|
||
"interaction": "form",
|
||
"bind": {
|
||
"tables": ["teacher_profiles"]
|
||
},
|
||
"entrypoint": {
|
||
"type": "cli",
|
||
"command": "add-teacher",
|
||
"args": [
|
||
"--name", "{{name}}",
|
||
"--department", "{{department}}",
|
||
"--title", "{{title}}",
|
||
"--tags", "{{tags}}",
|
||
"--papers", "{{papers}}",
|
||
"--projects", "{{projects}}",
|
||
"--sci-q1", "{{sciQ1}}",
|
||
"--core-papers", "{{corePapers}}"
|
||
]
|
||
},
|
||
"inputSchema": {
|
||
"type": "object",
|
||
"properties": {
|
||
"name": {
|
||
"type": "string",
|
||
"title": "教师姓名",
|
||
"description": "必填。"
|
||
},
|
||
"department": {
|
||
"type": "string",
|
||
"title": "所属学院",
|
||
"description": "可选。"
|
||
},
|
||
"title": {
|
||
"type": "string",
|
||
"title": "职称",
|
||
"description": "讲师/副教授/教授。",
|
||
"enum": ["讲师", "副教授", "教授"]
|
||
},
|
||
"tags": {
|
||
"type": "string",
|
||
"title": "研究标签",
|
||
"description": "逗号分隔,匹配主依据。"
|
||
},
|
||
"papers": {
|
||
"type": "string",
|
||
"title": "近3年论文",
|
||
"description": "分号分隔标题。可选。"
|
||
},
|
||
"projects": {
|
||
"type": "string",
|
||
"title": "项目经历",
|
||
"description": "分号分隔。可选。"
|
||
},
|
||
"sciQ1": {
|
||
"type": "number",
|
||
"title": "SCI一区篇数",
|
||
"description": "可选。"
|
||
},
|
||
"corePapers": {
|
||
"type": "number",
|
||
"title": "核心论文篇数",
|
||
"description": "可选。"
|
||
}
|
||
},
|
||
"required": ["name"]
|
||
},
|
||
"hostEffects": {
|
||
"onSuccess": ["reloadTable"]
|
||
}
|
||
},
|
||
{
|
||
"id": "add-track",
|
||
"label": "录入指南赛道",
|
||
"description": "录入/更新指南赛道(按年度+学部+类型+赛道名幂等)。",
|
||
"placements": ["toolbar"],
|
||
"executionProfile": "sync",
|
||
"interaction": "form",
|
||
"bind": {
|
||
"tables": ["guide_tracks"]
|
||
},
|
||
"entrypoint": {
|
||
"type": "cli",
|
||
"command": "add-track",
|
||
"args": [
|
||
"--year", "{{year}}",
|
||
"--track-name", "{{trackName}}",
|
||
"--program", "{{program}}",
|
||
"--agency", "{{agency}}",
|
||
"--tags", "{{tags}}",
|
||
"--priority", "{{priority}}",
|
||
"--min-title", "{{minTitle}}",
|
||
"--min-sci-q1", "{{minSciQ1}}",
|
||
"--quota", "{{quota}}",
|
||
"--source", "{{source}}"
|
||
]
|
||
},
|
||
"inputSchema": {
|
||
"type": "object",
|
||
"properties": {
|
||
"year": {
|
||
"type": "number",
|
||
"title": "指南年度",
|
||
"description": "必填。"
|
||
},
|
||
"trackName": {
|
||
"type": "string",
|
||
"title": "赛道名称",
|
||
"description": "必填。"
|
||
},
|
||
"program": {
|
||
"type": "string",
|
||
"title": "项目类型",
|
||
"description": "如 面上项目。"
|
||
},
|
||
"agency": {
|
||
"type": "string",
|
||
"title": "学部/归口",
|
||
"description": "可选。"
|
||
},
|
||
"tags": {
|
||
"type": "string",
|
||
"title": "需求标签",
|
||
"description": "逗号分隔,匹配主依据。"
|
||
},
|
||
"priority": {
|
||
"type": "string",
|
||
"title": "优先方向",
|
||
"description": "逗号分隔,加分项。可选。"
|
||
},
|
||
"minTitle": {
|
||
"type": "string",
|
||
"title": "职称门槛",
|
||
"description": "讲师及以上/副高及以上/正高及以上。",
|
||
"enum": ["讲师及以上", "副高及以上", "正高及以上"]
|
||
},
|
||
"minSciQ1": {
|
||
"type": "number",
|
||
"title": "SCI一区门槛",
|
||
"description": "最少篇数。可选。"
|
||
},
|
||
"quota": {
|
||
"type": "number",
|
||
"title": "拟资助数",
|
||
"description": "可选。"
|
||
},
|
||
"source": {
|
||
"type": "string",
|
||
"title": "指南来源",
|
||
"description": "文件名/文号。可选。"
|
||
}
|
||
},
|
||
"required": ["year", "trackName"]
|
||
},
|
||
"hostEffects": {
|
||
"onSuccess": ["reloadTable"]
|
||
}
|
||
},
|
||
{
|
||
"id": "import-teachers",
|
||
"label": "批量导入画像",
|
||
"description": "粘贴教师画像 JSON 数组批量导入/更新。",
|
||
"placements": ["agent"],
|
||
"executionProfile": "sync",
|
||
"interaction": "form",
|
||
"entrypoint": {
|
||
"type": "cli",
|
||
"command": "import-teachers",
|
||
"args": ["--teachers-json", "{{teachersJson}}"]
|
||
},
|
||
"inputSchema": {
|
||
"type": "object",
|
||
"properties": {
|
||
"teachersJson": {
|
||
"type": "string",
|
||
"title": "画像 JSON",
|
||
"description": "教师对象数组。",
|
||
"display_type": "textarea"
|
||
}
|
||
},
|
||
"required": ["teachersJson"]
|
||
}
|
||
},
|
||
{
|
||
"id": "import-tracks",
|
||
"label": "批量导入赛道",
|
||
"description": "粘贴指南赛道 JSON 数组批量导入/更新。",
|
||
"placements": ["agent"],
|
||
"executionProfile": "sync",
|
||
"interaction": "form",
|
||
"entrypoint": {
|
||
"type": "cli",
|
||
"command": "import-tracks",
|
||
"args": ["--tracks-json", "{{tracksJson}}"]
|
||
},
|
||
"inputSchema": {
|
||
"type": "object",
|
||
"properties": {
|
||
"tracksJson": {
|
||
"type": "string",
|
||
"title": "赛道 JSON",
|
||
"description": "赛道对象数组。",
|
||
"display_type": "textarea"
|
||
}
|
||
},
|
||
"required": ["tracksJson"]
|
||
}
|
||
},
|
||
{
|
||
"id": "list-teachers",
|
||
"label": "查询教师画像",
|
||
"description": "按学院查询教师画像。",
|
||
"placements": ["agent"],
|
||
"executionProfile": "sync",
|
||
"entrypoint": {
|
||
"type": "cli",
|
||
"command": "list-teachers",
|
||
"args": ["--department", "{{department}}"]
|
||
},
|
||
"inputSchema": {
|
||
"type": "object",
|
||
"properties": {
|
||
"department": {
|
||
"type": "string",
|
||
"title": "学院",
|
||
"description": "可选。"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
{
|
||
"id": "list-tracks",
|
||
"label": "查询指南赛道",
|
||
"description": "按年度查询指南赛道。",
|
||
"placements": ["agent"],
|
||
"executionProfile": "sync",
|
||
"entrypoint": {
|
||
"type": "cli",
|
||
"command": "list-tracks",
|
||
"args": ["--year", "{{year}}"]
|
||
},
|
||
"inputSchema": {
|
||
"type": "object",
|
||
"properties": {
|
||
"year": {
|
||
"type": "number",
|
||
"title": "年度",
|
||
"description": "可选。"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
{
|
||
"id": "list-reports",
|
||
"label": "查询推荐历史",
|
||
"description": "查看最近的赛道匹配报告。",
|
||
"placements": ["agent"],
|
||
"executionProfile": "sync",
|
||
"entrypoint": {
|
||
"type": "cli",
|
||
"command": "list-reports",
|
||
"args": ["--limit", "{{limit}}"]
|
||
},
|
||
"inputSchema": {
|
||
"type": "object",
|
||
"properties": {
|
||
"limit": {
|
||
"type": "number",
|
||
"title": "条数",
|
||
"description": "默认 20。可选。"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
{
|
||
"id": "render-html",
|
||
"label": "生成建议书",
|
||
"description": "重建《申报策略建议书》HTML(未选择报告行时重建最近 10 份)。",
|
||
"placements": ["toolbar", "skill-detail", "agent"],
|
||
"executionProfile": "sync",
|
||
"interaction": "direct",
|
||
"bind": {
|
||
"tables": ["match_reports"],
|
||
"inputMapping": {
|
||
"id": "$row.$pk"
|
||
}
|
||
},
|
||
"inputSchema": {
|
||
"type": "object",
|
||
"properties": {
|
||
"id": {
|
||
"type": "number",
|
||
"title": "报告编号",
|
||
"description": "重建该报告的建议书。未选择行时留空,重建最近 10 份。",
|
||
"readOnly": true
|
||
}
|
||
}
|
||
},
|
||
"entrypoint": {
|
||
"type": "cli",
|
||
"command": "render-html",
|
||
"args": ["--report-id", "{{id}}"]
|
||
},
|
||
"steps": [
|
||
{
|
||
"when": "afterSuccess",
|
||
"do": "refreshCatalog"
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"id": "stats",
|
||
"label": "匹配统计",
|
||
"description": "查看画像总量、赛道库年度分布与强推荐名单。",
|
||
"placements": ["agent", "skill-detail"],
|
||
"executionProfile": "sync",
|
||
"entrypoint": {
|
||
"type": "cli",
|
||
"command": "stats",
|
||
"args": []
|
||
}
|
||
},
|
||
{
|
||
"id": "health",
|
||
"label": "运行检查",
|
||
"description": "检查技能运行环境。",
|
||
"placements": ["skill-detail"],
|
||
"executionProfile": "sync",
|
||
"entrypoint": {
|
||
"type": "cli",
|
||
"command": "health",
|
||
"args": []
|
||
}
|
||
},
|
||
{
|
||
"id": "version",
|
||
"label": "查看版本",
|
||
"description": "返回技能版本。",
|
||
"placements": ["skill-detail"],
|
||
"executionProfile": "sync",
|
||
"entrypoint": {
|
||
"type": "cli",
|
||
"command": "version",
|
||
"args": []
|
||
}
|
||
},
|
||
{
|
||
"id": "config-path",
|
||
"label": "查看配置位置",
|
||
"description": "返回用户 .env 路径。",
|
||
"placements": ["skill-detail"],
|
||
"executionProfile": "sync",
|
||
"entrypoint": {
|
||
"type": "cli",
|
||
"command": "config-path",
|
||
"args": []
|
||
}
|
||
}
|
||
]
|
||
}
|