Parent epic: #11
Depends on: D1 (#12), D2 (#13), D3 (#14)
Estimate: ~1 dev-day (~5h Opus)
范围 Scope
epic 收口:暴露 routing 决策给 API/dashboard、跑端到端 demo、补完测试和文档。让维护者打开运行中的 app 就能完整审计。
改动 Changes
API
- 新建
web/manuscript_routes.py Flask Blueprint:
POST /api/manuscript/<run_id>/route — 触发 venue_router,返回 selection
GET /api/manuscript/<run_id>/venue — 当前选定 + rationale + rejected_venues
GET /api/manuscript/<run_id>/format_lint — lint report
web/app.py — 注册新 Blueprint
Dashboard
web/templates/index.html — 加 venue 卡片(chosen + score + 3 个 rejected + lint count + 状态 badge)
web/static/js/manuscript.js — 新建,拉数据并渲染
- 复用
agenda.js 的卡片样式
Demo
- 新建
scripts/demo_manuscript_routing.py:
- 用 fixture state 跑 router → 输出 selection
- 顺序触发 ICLR / NeurIPS / arXiv 三个 adapter,各产出一个 bundle
- 跑 format_linter,打印 lint summary
- 输出每 bundle 路径 + 截图建议命令
Tests
tests/test_manuscript_routes.py — 3 个 HTTP 测试覆盖三个 endpoint
- 总 coverage:本 epic 累计新增 ~18 测试
Docs
- 更新
docs/top_venue_manuscript_chain.md:
- 去掉 "all default bundles use ICLR2026" 硬约束描述
- 改为 "venue_router 决定 + multi-adapter 可插拔"
- 加 architecture 图(router → adapter → linter → gate → bundle)
- 更新
README.md — 加 "Manuscript Venue Routing" 章节,列 6 venue + 配置入口
验收 Acceptance
AI 可验收证据包(必须)
PR 必须生成:
artifacts/d4_manuscript_routing_e2e_acceptance.json
字段至少包含:
{
"base_ref": "...",
"commit": "...",
"demo_command": "python scripts/demo_manuscript_routing.py ...",
"demo_run_id": 123,
"api": {
"route": {"status": 200, "response_path": "...", "chosen_venue": "..."},
"venue": {"status": 200, "response_path": "...", "rejected_count": 3},
"format_lint": {"status": 200, "response_path": "...", "lint_count": 0}
},
"dashboard": {
"screenshot_path": "...",
"contains_chosen_venue": true,
"contains_rejected_venues": true,
"contains_lint_count": true
},
"bundles": [
{"venue": "iclr2026", "path": "...", "main_tex_sha256": "..."},
{"venue": "neurips2024", "path": "...", "main_tex_sha256": "..."},
{"venue": "arxiv_plain", "path": "...", "main_tex_sha256": "..."}
],
"docs_updated": ["docs/top_venue_manuscript_chain.md", "README.md"],
"test_command": "...",
"test_summary": "..."
}
防伪 / 防硬编码要求
- API response 必须包含
chosen_venue、score、rationale、rejected_venues、rule_set、selection_id。
- Demo 必须能从空 DB 或 fixture DB 自行 seed 所需数据,不能依赖维护者本地已有生产数据。
- 3 个 bundle 的
main.tex_sha256 必须不同,证明不是复制同一个输出冒充多模板。
- Dashboard 截图只是辅助证据,AI 验收以 API response 和 artifact manifest 为主。
scripts/demo_manuscript_routing.py 必须非交互式可运行,并在失败时返回非 0 exit code。
范围外 Out of scope
- 自动投稿对接
- 多轮 revision 自动循环
- 期刊(journal)模板
Parent epic: #11
Depends on: D1 (#12), D2 (#13), D3 (#14)
Estimate: ~1 dev-day (~5h Opus)
范围 Scope
epic 收口:暴露 routing 决策给 API/dashboard、跑端到端 demo、补完测试和文档。让维护者打开运行中的 app 就能完整审计。
改动 Changes
API
web/manuscript_routes.pyFlask Blueprint:POST /api/manuscript/<run_id>/route— 触发 venue_router,返回 selectionGET /api/manuscript/<run_id>/venue— 当前选定 + rationale + rejected_venuesGET /api/manuscript/<run_id>/format_lint— lint reportweb/app.py— 注册新 BlueprintDashboard
web/templates/index.html— 加 venue 卡片(chosen + score + 3 个 rejected + lint count + 状态 badge)web/static/js/manuscript.js— 新建,拉数据并渲染agenda.js的卡片样式Demo
scripts/demo_manuscript_routing.py:Tests
tests/test_manuscript_routes.py— 3 个 HTTP 测试覆盖三个 endpointDocs
docs/top_venue_manuscript_chain.md:README.md— 加 "Manuscript Venue Routing" 章节,列 6 venue + 配置入口验收 Acceptance
scripts/demo_manuscript_routing.py一条命令产出 3 个 bundle,artifacts 路径可下载pytest全绿(含 D1~D3 累计新增);如存在已知 baseline fail,必须列出具体测试名和原因docs/top_venue_manuscript_chain.md+README.md更新已 commitAI 可验收证据包(必须)
PR 必须生成:
字段至少包含:
{ "base_ref": "...", "commit": "...", "demo_command": "python scripts/demo_manuscript_routing.py ...", "demo_run_id": 123, "api": { "route": {"status": 200, "response_path": "...", "chosen_venue": "..."}, "venue": {"status": 200, "response_path": "...", "rejected_count": 3}, "format_lint": {"status": 200, "response_path": "...", "lint_count": 0} }, "dashboard": { "screenshot_path": "...", "contains_chosen_venue": true, "contains_rejected_venues": true, "contains_lint_count": true }, "bundles": [ {"venue": "iclr2026", "path": "...", "main_tex_sha256": "..."}, {"venue": "neurips2024", "path": "...", "main_tex_sha256": "..."}, {"venue": "arxiv_plain", "path": "...", "main_tex_sha256": "..."} ], "docs_updated": ["docs/top_venue_manuscript_chain.md", "README.md"], "test_command": "...", "test_summary": "..." }防伪 / 防硬编码要求
chosen_venue、score、rationale、rejected_venues、rule_set、selection_id。main.tex_sha256必须不同,证明不是复制同一个输出冒充多模板。scripts/demo_manuscript_routing.py必须非交互式可运行,并在失败时返回非 0 exit code。范围外 Out of scope