med-export-policy

star 29

XLSX/DOCX 导出策略与 fallback 链技能。Use when exporting 隔日报.xlsx or 月报-*.docx, determining export method, recording audit fields, or troubleshooting export failures.

Chip-G0202 By Chip-G0202 schedule Updated 6/7/2026

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

  1. Export fallback chain (strict order):

  2. spreadsheets_skill@oai/artifact-tool (SpreadsheetFile)

  3. node_fallbackexceljs (dynamic import)

  4. python_spawn_legacy — compatibility only, must NOT be default

  5. manual_required — last resort, report to user

  6. Detection methods:

  • spreadsheets_skill: import("@oai/artifact-tool") succeeds → available
  • node_fallback: import("exceljs") succeeds → available
  • Implementation: spreadsheet_adapter.mjsdetectSpreadsheetsSkillAvailability(), detectNodeFallbackAvailability()
  1. Selection logic:
  • Try each method in order; use first available
  • If spreadsheets_skill fails at runtime, fall back to node_fallback (not skip to manual)
  • Record which method was actually used in audit fields
  1. Mandatory audit fields (every export):
  • export_method: which method was used (one of the four above)
  • export_skill: skill name if applicable
  • output_path: absolute path to generated file
  • input_files: list of input JSON files consumed
  • generated_at: ISO timestamp
  • fallback_chain: ordered list of methods attempted
  • Error/degrade fields when applicable
  1. 隔日报.xlsx data source rules:
  • desktop_daily_review_source.json must contain ONLY items from Stage2 mcp_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
  1. 隔日报.xlsx structure:
  • Sheet "每日反馈": excludes D and needs_human_review=true; columns: 英文标题, 标题翻译, 规则等级, 语义等级, 最终等级, 期刊/来源, 反馈, 评价
  • Sheet "需人工复核": only needs_human_review=true; additional column: 人工确认等级
  • See med-daily-triage for full sheet rules
  1. 双周报-*.docx:
  • Generated by biweekly_docx_report.mjs (uses docx_support.mjs)
  • Covers 14-day synthesis window
  • Output path: <reviewRoot>/<yy WeekWW>/双周报-<start>_<end>.docx
  1. Export root:
  • Dynamic: research_os/文献评价 (resolved by runtime_config.mjsreviewRoot)
  • NOT hardcoded to any specific user's desktop or documents folder
  1. Guardrails:
  • python_spawn_legacy is compatibility-only; must not be default or sole export path
  • Never claim spreadsheets_skill usage when it was not actually used
  • If export fails at all levels, report to user with manual_required status and exact error
  • Export is responsible for workbook generation only; it does NOT perform triage, writeback, translation, or preference learning
Install via CLI
npx skills add https://github.com/Chip-G0202/zotero-med-pipeline --skill med-export-policy
Repository Details
star Stars 29
call_split Forks 4
navigation Branch main
article Path SKILL.md
More from Creator