con un clic
substitute-swap
// Swap to substitute material via MES. Picks the best candidate using a multi-criteria scorer (Python).
// Swap to substitute material via MES. Picks the best candidate using a multi-criteria scorer (Python).
Default procurement order via ERP. Use when no substitute is available and supplier cannot expedite.
Send expedite request to supplier portal. Use only when the material's supplier has capability=expedite.
Echo back the agent input's session_id verbatim. Designed specifically for verifying session_id propagation through agent chains. Invoke this skill whenever a session_id is present in the agent input.
全局归档协议。只要任务需要写入任何文件(含 PLAN.md、报告、JSON 等归档物),必须按本技能执行 Session→ARCHIVE_ID、TIMESTAMP、双轨路径(根段须为 archives/)、回读校验与状态回执;WebUI 的 archive_grid 必须用 Markdown 中语言标识为 json 的围栏代码块输出。
定时计划协议。仅当用户请求创建定时计划、定时任务、提醒、自动化安排、周期或延迟任务时生效;包含 ORA 拆解、PLAN.md 持久化、用户书面确认 PLAN 后再创建定时任务、已落地计划的修改须同步更新 PLAN.md、任务消息首要指令与 PLAN 模板。须与 archive-protocol 技能一并遵守。
| name | substitute_swap |
| description | Swap to substitute material via MES. Picks the best candidate using a multi-criteria scorer (Python). |
| version | 0.1.0 |
Material has one or more in-stock substitute SKUs (same Material ObjectType,
distinguishable by SKU prefix SUB- and material_risk == "normal").
Entry shell:
TOOL_BACKEND_URL={{TOOL_BACKEND_PUBLIC_URL}} CANDIDATES='[{"sku":"SUB-001A","stock":200,"compat_score":0.95,"cost_delta_pct":5,"lead_time_hours":2},{"sku":"SUB-001B","stock":80,"compat_score":0.85,"cost_delta_pct":2,"lead_time_hours":4}]' python pick_substitute.py --sku <sku>
The script:
${TOOL_BACKEND_URL}/mes/swap.{chosen_sku, scores} JSON to stdout.DA reads stdout, surfaces chosen substitute and rationale to user.