research-v1.yml 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. # 科研五阶段产物 Gate 流水线(模板)— 对应 docs/PRODUCT_GATE_DESIGN.md §8.1。
  2. # plan → literature → simulation → analysis → paper,逐级验收。
  3. # 注:plan/literature 已可端到端跑(见 research-demo.yml);simulation/analysis/paper
  4. # 需要带工具的 react agent(WriteFile / 代码执行),属 v1.1 工作,这里作为模板占位。
  5. pipeline:
  6. id: research-v1
  7. name: 科研五阶段流水线
  8. defaults:
  9. on_fail: retry
  10. retry: 2
  11. stages:
  12. - id: plan
  13. name: 研究计划
  14. agent: {ref: agents/planner.yml}
  15. produces:
  16. - {name: plan.md, type: md, path: "final/plan.md", required: true}
  17. gate:
  18. kind: rule
  19. rule: 'has("plan.md") and regex("plan.md", "(?i)hypothesis")'
  20. - id: literature
  21. name: 文献综述
  22. consumes: [plan]
  23. agent: {ref: agents/lit-mapper.yml}
  24. produces:
  25. - {name: refs.json, type: json, path: "results/refs.json", required: true}
  26. - {name: survey.md, type: md, path: "final/survey.md", required: true}
  27. gate:
  28. kind: rule
  29. rule: 'has("refs.json") and json_len("refs.json") >= 10'
  30. - id: simulation
  31. name: 仿真实验
  32. consumes: [plan, literature]
  33. agent: {ref: agents/simulator.yml} # react + 代码执行工具(v1.1)
  34. produces:
  35. - {name: sim_results, type: dir, path: "results/sim/*", required: true}
  36. gate:
  37. kind: rule
  38. rule: 'count() >= 1'
  39. on_fail: halt
  40. - id: analysis
  41. name: 结果分析
  42. consumes: [simulation]
  43. agent: {ref: agents/analyst.yml}
  44. produces:
  45. - {name: analysis.md, type: md, path: "final/analysis.md", required: true}
  46. gate:
  47. kind: llm_judge
  48. judge:
  49. model: {provider: ollama, name: qwen2.5:7b}
  50. rubric: "分析是否覆盖所有仿真指标、有统计显著性讨论、结论有数据支撑"
  51. threshold: 0.7
  52. - id: paper
  53. name: 论文成稿
  54. consumes: [plan, literature, analysis]
  55. agent: {ref: agents/writer.yml}
  56. produces:
  57. - {name: paper.md, type: md, path: "final/paper.md", required: true}
  58. gate:
  59. kind: llm_judge
  60. judge:
  61. rubric: "结构完整(摘要/方法/结果/讨论)、引用与 refs.json 一致、无明显逻辑断裂"
  62. threshold: 0.8