{
  "date": "2026-08-09",
  "timezone": "Asia/Shanghai",
  "window_start": "2026-08-09T00:00:00+08:00",
  "window_end": "2026-08-10T00:00:00+08:00",
  "granularity": "daily",
  "data_status": "complete",
  "source": {
    "kind": "grafana_prometheus_and_prod_sqlite",
    "grafana_datasource": "DevOps-prometheus",
    "grafana_datasource_id": 80,
    "prometheus_labels": {
      "cluster": "prod-devops",
      "namespace": "investibook",
      "job": "backend",
      "prometheus": "monitoring/o11y-vmagent"
    },
    "prod_backend_sqlite": "/data/db/investibook.db",
    "notes": [
      "Cost comes from prod SQLite interaction_token_usage with runtime-aware accounting: OpenCode ses_* rows use cumulative session deltas; PI UUID and image-parse rows use per-row increments.",
      "workspace_count in summary is cost-derived distinct positive-cost workspaces.",
      "Prometheus is used for ACP interaction counts only; investigatory PI sessions made investibook_acp_session_cost unsuitable as the cost source for mixed-runtime weekly reporting.",
      "message categories are rule-based user-message classifications.",
      "scenario labels are added to split daily workspace_changes rows."
    ]
  },
  "summary": {
    "total_cost": 1.9779,
    "total_acp_interactions": 6,
    "active_users": 4,
    "workspace_count": 6,
    "created_workspace_count": 5,
    "new_workspace_count": 5,
    "updated_existing_workspace_count": 1,
    "changed_workspace_count": 6,
    "message_count": 26,
    "user_message_count": 11,
    "assistant_message_count": 15,
    "unknown_user_count": 0,
    "unknown_cost": 0.0
  },
  "teams": [
    {
      "team_path": "Engineering Group / Service Orchestration Engineering / Data Integration",
      "team": "Data Integration",
      "cost": 0.8957,
      "acp_interactions": 0,
      "workspace_count": 1,
      "active_users": 1,
      "message_count": 3,
      "user_message_count": 1,
      "cost_per_ws": 0.8957,
      "cost_per_acp": null,
      "acp_per_ws": 0.0,
      "message_per_ws": 3.0,
      "message_per_acp": null,
      "correction_message_ratio": null
    },
    {
      "team_path": "Engineering Group / Service Orchestration Engineering / Global Control",
      "team": "Global Control",
      "cost": 0.618,
      "acp_interactions": 4,
      "workspace_count": 2,
      "active_users": 1,
      "message_count": 12,
      "user_message_count": 5,
      "cost_per_ws": 0.309,
      "cost_per_acp": 0.1545,
      "acp_per_ws": 2.0,
      "message_per_ws": 6.0,
      "message_per_acp": 3.0,
      "correction_message_ratio": null
    },
    {
      "team_path": "Engineering Group / Global Support Intelligence / Intelligent Support",
      "team": "Intelligent Support",
      "cost": 0.3695,
      "acp_interactions": 2,
      "workspace_count": 2,
      "active_users": 1,
      "message_count": 8,
      "user_message_count": 4,
      "cost_per_ws": 0.1848,
      "cost_per_acp": 0.1848,
      "acp_per_ws": 1.0,
      "message_per_ws": 4.0,
      "message_per_acp": 4.0,
      "correction_message_ratio": null
    },
    {
      "team_path": "Engineering Group / Database Service Engineering / Efficiency & Quality",
      "team": "Efficiency & Quality",
      "cost": 0.0946,
      "acp_interactions": 0,
      "workspace_count": 1,
      "active_users": 1,
      "message_count": 3,
      "user_message_count": 1,
      "cost_per_ws": 0.0946,
      "cost_per_acp": null,
      "acp_per_ws": 0.0,
      "message_per_ws": 3.0,
      "message_per_acp": null,
      "correction_message_ratio": null
    }
  ],
  "users": [
    {
      "user_email": "jiangjianyuan@pingcap.com",
      "name": "蒋建元",
      "en_name": "",
      "team_path": "Engineering Group / Service Orchestration Engineering / Data Integration",
      "team": "Data Integration",
      "mapping_source": "investibook-usage-team-overrides.csv",
      "cost": 0.8957,
      "acp_interactions": 0,
      "workspace_count": 1,
      "message_count": 3,
      "user_message_count": 1,
      "channel_breakdown": {},
      "frequency_bucket": "低频",
      "depth_bucket": "低轮次",
      "behavior_mode": "低频低轮次",
      "avg_acp_per_ws": 0.0
    },
    {
      "user_email": "xuyifan02@pingcap.com",
      "name": "徐一帆",
      "en_name": "Yifan Xu",
      "team_path": "Engineering Group / Service Orchestration Engineering / Global Control",
      "team": "Global Control",
      "mapping_source": "investibook-usage-team-overrides.csv",
      "cost": 0.618,
      "acp_interactions": 4,
      "workspace_count": 2,
      "message_count": 12,
      "user_message_count": 5,
      "channel_breakdown": {
        "lark": 1,
        "web": 1
      },
      "frequency_bucket": "高频",
      "depth_bucket": "低轮次",
      "behavior_mode": "高频低轮次",
      "avg_acp_per_ws": 2.0
    },
    {
      "user_email": "yikai.puah@pingcap.com",
      "name": "Puah Yi Kai",
      "en_name": "",
      "team_path": "Engineering Group / Global Support Intelligence / Intelligent Support",
      "team": "Intelligent Support",
      "mapping_source": "investibook-usage-team-overrides.csv",
      "cost": 0.3695,
      "acp_interactions": 2,
      "workspace_count": 2,
      "message_count": 8,
      "user_message_count": 4,
      "channel_breakdown": {
        "web": 2
      },
      "frequency_bucket": "高频",
      "depth_bucket": "低轮次",
      "behavior_mode": "高频低轮次",
      "avg_acp_per_ws": 1.0
    },
    {
      "user_email": "shaoxiqian@pingcap.com",
      "name": "邵希茜",
      "en_name": "Anita Shao",
      "team_path": "Engineering Group / Database Service Engineering / Efficiency & Quality",
      "team": "Efficiency & Quality",
      "mapping_source": "investibook-usage-team-overrides.csv",
      "cost": 0.0946,
      "acp_interactions": 0,
      "workspace_count": 1,
      "message_count": 3,
      "user_message_count": 1,
      "channel_breakdown": {},
      "frequency_bucket": "低频",
      "depth_bucket": "低轮次",
      "behavior_mode": "低频低轮次",
      "avg_acp_per_ws": 0.0
    }
  ],
  "message_categories": [
    {
      "category": "Ad hoc 查询",
      "user_message_count": 6,
      "share": 0.545455,
      "estimated_cost_by_turn": 1.0788,
      "estimated_cost_by_output_weight": null,
      "avg_user_chars": 1849.5,
      "avg_next_assistant_chars": null,
      "classification_method": "rule_based_keywords_v2"
    },
    {
      "category": "流程控制/确认",
      "user_message_count": 3,
      "share": 0.272727,
      "estimated_cost_by_turn": 0.5394,
      "estimated_cost_by_output_weight": null,
      "avg_user_chars": 83.67,
      "avg_next_assistant_chars": null,
      "classification_method": "rule_based_keywords_v2"
    },
    {
      "category": "背景补充",
      "user_message_count": 2,
      "share": 0.181818,
      "estimated_cost_by_turn": 0.3596,
      "estimated_cost_by_output_weight": null,
      "avg_user_chars": 55.5,
      "avg_next_assistant_chars": null,
      "classification_method": "rule_based_keywords_v2"
    }
  ],
  "unmatched_users": [],
  "top_changed_workspaces": [
    {
      "workspace_id": "lark-ws-c4aaa23f-29ed-4378-8553-0cc6caa8277e",
      "title": "Lark O11Y-2633990",
      "workspace_lifecycle": "new",
      "user_email": "jiangjianyuan@pingcap.com",
      "team_path": "Engineering Group / Service Orchestration Engineering / Data Integration",
      "scenario_group": "non_diagnosis",
      "scenario_category": "fleet_inventory_or_capacity_analysis",
      "cost": 0.8957,
      "message_count": 3,
      "user_message_count": 1
    },
    {
      "workspace_id": "lark-ws-1d2debe1-f617-44f2-856e-f030abf122ee",
      "title": "Lark O11Y-2634149",
      "workspace_lifecycle": "new",
      "user_email": "xuyifan02@pingcap.com",
      "team_path": "Engineering Group / Service Orchestration Engineering / Global Control",
      "scenario_group": "diagnosis",
      "scenario_category": "storage_or_io_bottleneck",
      "cost": 0.4635,
      "message_count": 6,
      "user_message_count": 3
    },
    {
      "workspace_id": "ws-1786240746223-df366f4d5",
      "title": "cdc节点内存使用不均衡的原因以及解决方法",
      "workspace_lifecycle": "new",
      "user_email": "yikai.puah@pingcap.com",
      "team_path": "Engineering Group / Global Support Intelligence / Intelligent Support",
      "scenario_group": "diagnosis",
      "scenario_category": "memory_or_oom_pressure",
      "cost": 0.3058,
      "message_count": 4,
      "user_message_count": 2
    },
    {
      "workspace_id": "lark-ws-f51cf208-18d4-4234-981c-f3e592ff983c",
      "title": "Lark O11Y-2633484",
      "workspace_lifecycle": "updated_existing",
      "user_email": "xuyifan02@pingcap.com",
      "team_path": "Engineering Group / Service Orchestration Engineering / Global Control",
      "scenario_group": "diagnosis",
      "scenario_category": "backup_or_restore",
      "cost": 0.1546,
      "message_count": 6,
      "user_message_count": 2
    },
    {
      "workspace_id": "lark-ws-99a610f4-e7ec-449a-9828-41a052761148",
      "title": "Lark chat",
      "workspace_lifecycle": "new",
      "user_email": "shaoxiqian@pingcap.com",
      "team_path": "Engineering Group / Database Service Engineering / Efficiency & Quality",
      "scenario_group": "diagnosis",
      "scenario_category": "storage_or_io_bottleneck",
      "cost": 0.0946,
      "message_count": 3,
      "user_message_count": 1
    },
    {
      "workspace_id": "ws-1786270183258-577c30e05",
      "title": "你有排查tidb lake 的权限吗？",
      "workspace_lifecycle": "new",
      "user_email": "yikai.puah@pingcap.com",
      "team_path": "Engineering Group / Global Support Intelligence / Intelligent Support",
      "scenario_group": "non_diagnosis",
      "scenario_category": "product_usage_or_admin",
      "cost": 0.0637,
      "message_count": 4,
      "user_message_count": 2
    }
  ],
  "charts": {
    "daily_cost_acp": [
      {
        "date": "2026-08-09",
        "cost": 1.9779,
        "acp_interactions": 6,
        "workspace_count": 6,
        "active_users": 4
      }
    ],
    "team_cost_bar": [
      {
        "team": "Data Integration",
        "team_path": "Engineering Group / Service Orchestration Engineering / Data Integration",
        "cost": 0.8957,
        "acp_interactions": 0,
        "workspace_count": 1,
        "active_users": 1
      },
      {
        "team": "Global Control",
        "team_path": "Engineering Group / Service Orchestration Engineering / Global Control",
        "cost": 0.618,
        "acp_interactions": 4,
        "workspace_count": 2,
        "active_users": 1
      },
      {
        "team": "Intelligent Support",
        "team_path": "Engineering Group / Global Support Intelligence / Intelligent Support",
        "cost": 0.3695,
        "acp_interactions": 2,
        "workspace_count": 2,
        "active_users": 1
      },
      {
        "team": "Efficiency & Quality",
        "team_path": "Engineering Group / Database Service Engineering / Efficiency & Quality",
        "cost": 0.0946,
        "acp_interactions": 0,
        "workspace_count": 1,
        "active_users": 1
      }
    ],
    "team_ratio_scatter": [
      {
        "team": "Data Integration",
        "team_path": "Engineering Group / Service Orchestration Engineering / Data Integration",
        "x": 0.0,
        "y": null,
        "size": 1,
        "cost": 0.8957
      },
      {
        "team": "Global Control",
        "team_path": "Engineering Group / Service Orchestration Engineering / Global Control",
        "x": 2.0,
        "y": 0.1545,
        "size": 2,
        "cost": 0.618
      },
      {
        "team": "Intelligent Support",
        "team_path": "Engineering Group / Global Support Intelligence / Intelligent Support",
        "x": 1.0,
        "y": 0.1848,
        "size": 2,
        "cost": 0.3695
      },
      {
        "team": "Efficiency & Quality",
        "team_path": "Engineering Group / Database Service Engineering / Efficiency & Quality",
        "x": 0.0,
        "y": null,
        "size": 1,
        "cost": 0.0946
      }
    ],
    "message_category_stack": [
      {
        "team": "Data Integration",
        "category": "Ad hoc 查询",
        "count": 1
      },
      {
        "team": "Global Control",
        "category": "Ad hoc 查询",
        "count": 2
      },
      {
        "team": "Global Control",
        "category": "流程控制/确认",
        "count": 2
      },
      {
        "team": "Global Control",
        "category": "背景补充",
        "count": 1
      },
      {
        "team": "Intelligent Support",
        "category": "Ad hoc 查询",
        "count": 2
      },
      {
        "team": "Intelligent Support",
        "category": "流程控制/确认",
        "count": 1
      },
      {
        "team": "Intelligent Support",
        "category": "背景补充",
        "count": 1
      },
      {
        "team": "Efficiency & Quality",
        "category": "Ad hoc 查询",
        "count": 1
      }
    ],
    "user_behavior_quadrant": [
      {
        "user_email": "jiangjianyuan@pingcap.com",
        "x": 1,
        "y": 0.0,
        "cost": 0.8957,
        "mode": "低频低轮次"
      },
      {
        "user_email": "shaoxiqian@pingcap.com",
        "x": 1,
        "y": 0.0,
        "cost": 0.0946,
        "mode": "低频低轮次"
      },
      {
        "user_email": "xuyifan02@pingcap.com",
        "x": 2,
        "y": 2.0,
        "cost": 0.618,
        "mode": "高频低轮次"
      },
      {
        "user_email": "yikai.puah@pingcap.com",
        "x": 2,
        "y": 1.0,
        "cost": 0.3695,
        "mode": "高频低轮次"
      }
    ]
  },
  "workspace_changes_ref": "workspace_changes.json"
}
