{
  "schema_version": 1,
  "diagram_type": "sequence",
  "meta": {"title": "健康管理 Agent 时序图", "subtitle": "一次完整健康报告请求的时序", "quality_profile": "standard"},
  "participants": [
    {"id": "user", "label": "用户", "type": "actor"},
    {"id": "chat", "label": "聊天界面", "type": "frontend"},
    {"id": "orch", "label": "编排层", "type": "backend"},
    {"id": "skill", "label": "Pipeline Skill", "type": "backend"},
    {"id": "tcm", "label": "TCM-RAG", "type": "service"},
    {"id": "llm", "label": "LLM", "type": "external"},
    {"id": "db", "label": "数据库", "type": "storage"}
  ],
  "messages": [
    {"from": "user", "to": "chat", "label": "输入健康数据", "variant": "request"},
    {"from": "chat", "to": "orch", "label": "转发请求", "variant": "request"},
    {"from": "orch", "to": "skill", "label": "启动 S1 采集", "variant": "request"},
    {"from": "skill", "to": "tcm", "label": "并行查询中医知识", "variant": "async"},
    {"from": "skill", "to": "llm", "label": "调用 LLM 分析", "variant": "async"},
    {"from": "tcm", "to": "skill", "label": "返回体质辨识结果", "variant": "reply"},
    {"from": "llm", "to": "skill", "label": "返回分析结果", "variant": "reply"},
    {"from": "skill", "to": "orch", "label": "S1 完成，推进 S2", "variant": "reply"},
    {"from": "orch", "to": "skill", "label": "引擎循环", "variant": "request"},
    {"from": "skill", "to": "llm", "label": "S2 摘要生成", "variant": "request"},
    {"from": "llm", "to": "skill", "label": "返回摘要", "variant": "reply"},
    {"from": "skill", "to": "d", "label": "S3-6 持续", "variant": "request"},
    {"from": "d", "to": "skill", "label": "全部完成", "variant": "reply"},
    {"from": "skill", "to": "orch", "label": "Pipeline 完成", "variant": "reply"},
    {"from": "orch", "to": "chat", "label": "返回健康报告", "variant": "reply"},
    {"from": "chat", "to": "user", "label": "展示报告", "variant": "reply"}
  ]
}
