name: med-export-policy description: XLSX/DOCX 导出策略与 fallback 链技能。Use when exporting 隔日报.xlsx or 月报-*.docx, determining export method, recording audit fields, or troubleshooting export failures.
med-export-policy
Export fallback chain (strict order):
spreadsheets_skill—@oai/artifact-tool(SpreadsheetFile)node_fallback—exceljs(dynamic import)python_spawn_legacy— compatibility only, must NOT be defaultmanual_required— last resort, report to userDetection methods:
spreadsheets_skill:import("@oai/artifact-tool")succeeds → availablenode_fallback:import("exceljs")succeeds → available- Implementation:
spreadsheet_adapter.mjs→detectSpreadsheetsSkillAvailability(),detectNodeFallbackAvailability()
- Selection logic:
- Try each method in order; use first available
- If
spreadsheets_skillfails at runtime, fall back tonode_fallback(not skip to manual) - Record which method was actually used in audit fields
- Mandatory audit fields (every export):
export_method: which method was used (one of the four above)export_skill: skill name if applicableoutput_path: absolute path to generated fileinput_files: list of input JSON files consumedgenerated_at: ISO timestampfallback_chain: ordered list of methods attempted- Error/degrade fields when applicable
- 隔日报.xlsx data source rules:
desktop_daily_review_source.jsonmust contain ONLY items from Stage2mcp_writeback_summary.writeback_items- Stage1 full ABC is the candidate pool, NOT the 隔日报 data source
- If Stage2 fails/skips, desktop source keeps original full set (to guarantee output exists)
- Orchestrator filters desktop source by writeback itemKey after Stage2 completes
- 隔日报.xlsx structure:
- Sheet "每日反馈": excludes D and
needs_human_review=true; columns: 英文标题, 标题翻译, 规则等级, 语义等级, 最终等级, 期刊/来源, 反馈, 评价 - Sheet "需人工复核": only
needs_human_review=true; additional column: 人工确认等级 - See
med-daily-triagefor full sheet rules
- 双周报-*.docx:
- Generated by
biweekly_docx_report.mjs(usesdocx_support.mjs) - Covers 14-day synthesis window
- Output path:
<reviewRoot>/<yy WeekWW>/双周报-<start>_<end>.docx
- Export root:
- Dynamic:
research_os/文献评价(resolved byruntime_config.mjs→reviewRoot) - NOT hardcoded to any specific user's desktop or documents folder
- Guardrails:
python_spawn_legacyis compatibility-only; must not be default or sole export path- Never claim
spreadsheets_skillusage when it was not actually used - If export fails at all levels, report to user with
manual_requiredstatus and exact error - Export is responsible for workbook generation only; it does NOT perform triage, writeback, translation, or preference learning