{
  "date": "2026-06-28",
  "timezone": "Asia/Shanghai",
  "window_start": "2026-06-28T00:00:00+08:00",
  "window_end": "2026-06-29T00: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": 4.3618,
    "total_acp_interactions": 12,
    "active_users": 7,
    "workspace_count": 8,
    "created_workspace_count": 7,
    "new_workspace_count": 10,
    "updated_existing_workspace_count": 1,
    "changed_workspace_count": 11,
    "message_count": 37,
    "user_message_count": 17,
    "assistant_message_count": 19,
    "unknown_user_count": 0,
    "unknown_cost": 0.0
  },
  "teams": [
    {
      "team_path": "Engineering Group / Global Support Intelligence / Intelligent Support Enablement",
      "team": "Intelligent Support Enablement",
      "cost": 1.4714,
      "acp_interactions": 3,
      "workspace_count": 1,
      "active_users": 1,
      "message_count": 14,
      "user_message_count": 6,
      "cost_per_ws": 1.4714,
      "cost_per_acp": 0.4905,
      "acp_per_ws": 3.0,
      "message_per_ws": 14.0,
      "message_per_acp": 4.6667,
      "correction_message_ratio": null
    },
    {
      "team_path": "Engineering Group / Service Orchestration Engineering / Essential & Premium",
      "team": "Essential & Premium",
      "cost": 1.4416,
      "acp_interactions": 0,
      "workspace_count": 1,
      "active_users": 1,
      "message_count": 8,
      "user_message_count": 4,
      "cost_per_ws": 1.4416,
      "cost_per_acp": null,
      "acp_per_ws": 0.0,
      "message_per_ws": 8.0,
      "message_per_acp": null,
      "correction_message_ratio": null
    },
    {
      "team_path": "Japan Business Group / Technical Service",
      "team": "Technical Service",
      "cost": 0.714,
      "acp_interactions": 0,
      "workspace_count": 1,
      "active_users": 1,
      "message_count": 6,
      "user_message_count": 2,
      "cost_per_ws": 0.714,
      "cost_per_acp": null,
      "acp_per_ws": 0.0,
      "message_per_ws": 6.0,
      "message_per_acp": null,
      "correction_message_ratio": null
    },
    {
      "team_path": "Engineering Group / Global Support Intelligence / Intelligent Support",
      "team": "Intelligent Support",
      "cost": 0.3453,
      "acp_interactions": 0,
      "workspace_count": 2,
      "active_users": 1,
      "message_count": 14,
      "user_message_count": 7,
      "cost_per_ws": 0.1727,
      "cost_per_acp": null,
      "acp_per_ws": 0.0,
      "message_per_ws": 7.0,
      "message_per_acp": null,
      "correction_message_ratio": null
    },
    {
      "team_path": "Engineering Group / Database Service Engineering / Observability & Diagnostics Service",
      "team": "Observability & Diagnostics Service",
      "cost": 0.2053,
      "acp_interactions": 1,
      "workspace_count": 1,
      "active_users": 1,
      "message_count": 2,
      "user_message_count": 1,
      "cost_per_ws": 0.2053,
      "cost_per_acp": 0.2053,
      "acp_per_ws": 1.0,
      "message_per_ws": 2.0,
      "message_per_acp": 2.0,
      "correction_message_ratio": null
    },
    {
      "team_path": "Engineering Group / Database Service Engineering / Efficiency & Quality / Quality Assurance Service",
      "team": "Quality Assurance Service",
      "cost": 0.1149,
      "acp_interactions": 2,
      "workspace_count": 1,
      "active_users": 1,
      "message_count": 4,
      "user_message_count": 2,
      "cost_per_ws": 0.1149,
      "cost_per_acp": 0.0575,
      "acp_per_ws": 2.0,
      "message_per_ws": 4.0,
      "message_per_acp": 2.0,
      "correction_message_ratio": null
    },
    {
      "team_path": "Engineering Group / Database Service Engineering / Efficiency & Quality",
      "team": "Efficiency & Quality",
      "cost": 0.0693,
      "acp_interactions": 1,
      "workspace_count": 1,
      "active_users": 1,
      "message_count": 3,
      "user_message_count": 1,
      "cost_per_ws": 0.0693,
      "cost_per_acp": 0.0693,
      "acp_per_ws": 1.0,
      "message_per_ws": 3.0,
      "message_per_acp": 3.0,
      "correction_message_ratio": null
    }
  ],
  "users": [
    {
      "user_email": "xieyujie@pingcap.com",
      "name": "谢玉洁",
      "en_name": "Yujie Xie",
      "team_path": "Engineering Group / Global Support Intelligence / Intelligent Support Enablement",
      "team": "Intelligent Support Enablement",
      "mapping_source": "investibook-usage-team-overrides.csv",
      "cost": 1.4714,
      "acp_interactions": 3,
      "workspace_count": 1,
      "message_count": 7,
      "user_message_count": 3,
      "channel_breakdown": {
        "web": 3
      },
      "frequency_bucket": "低频",
      "depth_bucket": "低轮次",
      "behavior_mode": "低频低轮次",
      "avg_acp_per_ws": 3.0
    },
    {
      "user_email": "jianghuaxi@pingcap.com",
      "name": "江华禧",
      "en_name": "Huaxi Jiang",
      "team_path": "Engineering Group / Service Orchestration Engineering / Essential & Premium",
      "team": "Essential & Premium",
      "mapping_source": "investibook-usage-team-overrides.csv",
      "cost": 1.4416,
      "acp_interactions": 0,
      "workspace_count": 1,
      "message_count": 4,
      "user_message_count": 2,
      "channel_breakdown": {},
      "frequency_bucket": "低频",
      "depth_bucket": "低轮次",
      "behavior_mode": "低频低轮次",
      "avg_acp_per_ws": 0.0
    },
    {
      "user_email": "zhigang.du@pingcap.com",
      "name": "杜志刚",
      "en_name": "Zhigang Du",
      "team_path": "Japan Business Group / Technical Service",
      "team": "Technical Service",
      "mapping_source": "pingcap_members_by_team.csv",
      "cost": 0.714,
      "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": "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.3453,
      "acp_interactions": 0,
      "workspace_count": 2,
      "message_count": 14,
      "user_message_count": 7,
      "channel_breakdown": {
        "web": 5
      },
      "frequency_bucket": "高频",
      "depth_bucket": "低轮次",
      "behavior_mode": "高频低轮次",
      "avg_acp_per_ws": 0.0
    },
    {
      "user_email": "lingtao.li@pingcap.com",
      "name": "李凌涛",
      "en_name": "Lingtao Li",
      "team_path": "Engineering Group / Database Service Engineering / Observability & Diagnostics Service",
      "team": "Observability & Diagnostics Service",
      "mapping_source": "pingcap_members_by_team.csv",
      "cost": 0.2053,
      "acp_interactions": 1,
      "workspace_count": 1,
      "message_count": 2,
      "user_message_count": 1,
      "channel_breakdown": {
        "cli": 1
      },
      "frequency_bucket": "低频",
      "depth_bucket": "低轮次",
      "behavior_mode": "低频低轮次",
      "avg_acp_per_ws": 1.0
    },
    {
      "user_email": "yichen.han@pingcap.com",
      "name": "韩轶辰",
      "en_name": "Yichen Han",
      "team_path": "Engineering Group / Database Service Engineering / Efficiency & Quality / Quality Assurance Service",
      "team": "Quality Assurance Service",
      "mapping_source": "pingcap_members_by_team.csv",
      "cost": 0.1149,
      "acp_interactions": 2,
      "workspace_count": 1,
      "message_count": 4,
      "user_message_count": 2,
      "channel_breakdown": {
        "web": 2
      },
      "frequency_bucket": "低频",
      "depth_bucket": "低轮次",
      "behavior_mode": "低频低轮次",
      "avg_acp_per_ws": 2.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.0693,
      "acp_interactions": 1,
      "workspace_count": 1,
      "message_count": 3,
      "user_message_count": 1,
      "channel_breakdown": {
        "lark": 1
      },
      "frequency_bucket": "低频",
      "depth_bucket": "低轮次",
      "behavior_mode": "低频低轮次",
      "avg_acp_per_ws": 1.0
    }
  ],
  "message_categories": [
    {
      "category": "查询纠偏",
      "user_message_count": 1,
      "share": 0.058824,
      "estimated_cost_by_turn": 0.2566,
      "estimated_cost_by_output_weight": null,
      "avg_user_chars": 17.0,
      "avg_next_assistant_chars": null,
      "classification_method": "rule_based_keywords_v2"
    },
    {
      "category": "产出物迭代",
      "user_message_count": 1,
      "share": 0.058824,
      "estimated_cost_by_turn": 0.2566,
      "estimated_cost_by_output_weight": null,
      "avg_user_chars": 1014.0,
      "avg_next_assistant_chars": null,
      "classification_method": "rule_based_keywords_v2"
    },
    {
      "category": "Ad hoc 查询",
      "user_message_count": 8,
      "share": 0.470588,
      "estimated_cost_by_turn": 2.0526,
      "estimated_cost_by_output_weight": null,
      "avg_user_chars": 992.0,
      "avg_next_assistant_chars": null,
      "classification_method": "rule_based_keywords_v2"
    },
    {
      "category": "诊断启动",
      "user_message_count": 1,
      "share": 0.058824,
      "estimated_cost_by_turn": 0.2566,
      "estimated_cost_by_output_weight": null,
      "avg_user_chars": 4119.0,
      "avg_next_assistant_chars": null,
      "classification_method": "rule_based_keywords_v2"
    },
    {
      "category": "解释追问",
      "user_message_count": 1,
      "share": 0.058824,
      "estimated_cost_by_turn": 0.2566,
      "estimated_cost_by_output_weight": null,
      "avg_user_chars": 19.0,
      "avg_next_assistant_chars": null,
      "classification_method": "rule_based_keywords_v2"
    },
    {
      "category": "流程控制/确认",
      "user_message_count": 2,
      "share": 0.117647,
      "estimated_cost_by_turn": 0.5132,
      "estimated_cost_by_output_weight": null,
      "avg_user_chars": 294.5,
      "avg_next_assistant_chars": null,
      "classification_method": "rule_based_keywords_v2"
    },
    {
      "category": "背景补充",
      "user_message_count": 3,
      "share": 0.176471,
      "estimated_cost_by_turn": 0.7697,
      "estimated_cost_by_output_weight": null,
      "avg_user_chars": 1558.33,
      "avg_next_assistant_chars": null,
      "classification_method": "rule_based_keywords_v2"
    }
  ],
  "unmatched_users": [],
  "top_changed_workspaces": [
    {
      "workspace_id": "ws-1782617448703-204a82f13",
      "title": "未命名工作空间",
      "workspace_lifecycle": "new",
      "user_email": "xieyujie@pingcap.com",
      "team_path": "Engineering Group / Global Support Intelligence / Intelligent Support Enablement",
      "scenario_group": "diagnosis",
      "scenario_category": "memory_or_oom_pressure",
      "cost": 1.4449,
      "message_count": 7,
      "user_message_count": 3
    },
    {
      "workspace_id": "ws-1782609068790-8e501f348",
      "title": "O11Y-2601512 IncidentClusterOfflineStoreProgressPending investigation",
      "workspace_lifecycle": "new",
      "user_email": "jianghuaxi@pingcap.com",
      "team_path": "Engineering Group / Service Orchestration Engineering / Essential & Premium",
      "scenario_group": "diagnosis",
      "scenario_category": "storage_or_io_bottleneck",
      "cost": 1.435,
      "message_count": 4,
      "user_message_count": 2
    },
    {
      "workspace_id": "lark-ws-4b90620a-f486-4675-87f8-521a4dbe6871",
      "title": "Lark O11Y-2601512",
      "workspace_lifecycle": "new",
      "user_email": "zhigang.du@pingcap.com",
      "team_path": "Japan Business Group / Technical Service",
      "scenario_group": "diagnosis",
      "scenario_category": "backup_or_restore",
      "cost": 0.7096,
      "message_count": 3,
      "user_message_count": 1
    },
    {
      "workspace_id": "ws-1782611312916-4d76196be",
      "title": "背景：",
      "workspace_lifecycle": "new",
      "user_email": "yikai.puah@pingcap.com",
      "team_path": "Engineering Group / Global Support Intelligence / Intelligent Support",
      "scenario_group": "diagnosis",
      "scenario_category": "component_failure_or_bug",
      "cost": 0.2386,
      "message_count": 10,
      "user_message_count": 5
    },
    {
      "workspace_id": "ws-1781598701127-da28e5bfa",
      "title": "tikv自动巡检",
      "workspace_lifecycle": "updated_existing",
      "user_email": "lingtao.li@pingcap.com",
      "team_path": "Engineering Group / Database Service Engineering / Observability & Diagnostics Service",
      "scenario_group": "non_diagnosis",
      "scenario_category": "inspection_or_report_generation",
      "cost": 0.2053,
      "message_count": 2,
      "user_message_count": 1
    },
    {
      "workspace_id": "ws-1782651572846-593e00e46",
      "title": "Cluster 10548442198567164826",
      "workspace_lifecycle": "new",
      "user_email": "yichen.han@pingcap.com",
      "team_path": "Engineering Group / Database Service Engineering / Efficiency & Quality / Quality Assurance Service",
      "scenario_group": "diagnosis",
      "scenario_category": "backup_or_restore",
      "cost": 0.1149,
      "message_count": 4,
      "user_message_count": 2
    },
    {
      "workspace_id": "ws-1782610006270-2e2885beb",
      "title": "tidb 面板 999 duration， other 值的面板存在高延迟，这个other",
      "workspace_lifecycle": "new",
      "user_email": "yikai.puah@pingcap.com",
      "team_path": "Engineering Group / Global Support Intelligence / Intelligent Support",
      "scenario_group": "diagnosis",
      "scenario_category": "sql_plan_or_query",
      "cost": 0.1067,
      "message_count": 4,
      "user_message_count": 2
    },
    {
      "workspace_id": "lark-ws-7287741f-3661-407c-ba13-969e863da2db",
      "title": "Lark chat",
      "workspace_lifecycle": "new",
      "user_email": "shaoxiqian@pingcap.com",
      "team_path": "Engineering Group / Database Service Engineering / Efficiency & Quality",
      "scenario_group": "unknown",
      "scenario_category": null,
      "cost": 0.0693,
      "message_count": 3,
      "user_message_count": 1
    },
    {
      "workspace_id": "ws-1782617448703-204a82f13",
      "title": "未命名工作空间",
      "workspace_lifecycle": "new",
      "user_email": "xieyujie@pingcap.com",
      "team_path": "Engineering Group / Global Support Intelligence / Intelligent Support Enablement",
      "scenario_group": "diagnosis",
      "scenario_category": "memory_or_oom_pressure",
      "cost": 0.0265,
      "message_count": 7,
      "user_message_count": 3
    },
    {
      "workspace_id": "ws-1782609068790-8e501f348",
      "title": "O11Y-2601512 IncidentClusterOfflineStoreProgressPending investigation",
      "workspace_lifecycle": "new",
      "user_email": "jianghuaxi@pingcap.com",
      "team_path": "Engineering Group / Service Orchestration Engineering / Essential & Premium",
      "scenario_group": "diagnosis",
      "scenario_category": "storage_or_io_bottleneck",
      "cost": 0.0066,
      "message_count": 4,
      "user_message_count": 2
    },
    {
      "workspace_id": "lark-ws-4b90620a-f486-4675-87f8-521a4dbe6871",
      "title": "Lark O11Y-2601512",
      "workspace_lifecycle": "new",
      "user_email": "zhigang.du@pingcap.com",
      "team_path": "Japan Business Group / Technical Service",
      "scenario_group": "diagnosis",
      "scenario_category": "backup_or_restore",
      "cost": 0.0043,
      "message_count": 3,
      "user_message_count": 1
    }
  ],
  "charts": {
    "daily_cost_acp": [
      {
        "date": "2026-06-28",
        "cost": 4.3618,
        "acp_interactions": 12,
        "workspace_count": 8,
        "active_users": 7
      }
    ],
    "team_cost_bar": [
      {
        "team": "Intelligent Support Enablement",
        "team_path": "Engineering Group / Global Support Intelligence / Intelligent Support Enablement",
        "cost": 1.4714,
        "acp_interactions": 3,
        "workspace_count": 1,
        "active_users": 1
      },
      {
        "team": "Essential & Premium",
        "team_path": "Engineering Group / Service Orchestration Engineering / Essential & Premium",
        "cost": 1.4416,
        "acp_interactions": 0,
        "workspace_count": 1,
        "active_users": 1
      },
      {
        "team": "Technical Service",
        "team_path": "Japan Business Group / Technical Service",
        "cost": 0.714,
        "acp_interactions": 0,
        "workspace_count": 1,
        "active_users": 1
      },
      {
        "team": "Intelligent Support",
        "team_path": "Engineering Group / Global Support Intelligence / Intelligent Support",
        "cost": 0.3453,
        "acp_interactions": 0,
        "workspace_count": 2,
        "active_users": 1
      },
      {
        "team": "Observability & Diagnostics Service",
        "team_path": "Engineering Group / Database Service Engineering / Observability & Diagnostics Service",
        "cost": 0.2053,
        "acp_interactions": 1,
        "workspace_count": 1,
        "active_users": 1
      },
      {
        "team": "Quality Assurance Service",
        "team_path": "Engineering Group / Database Service Engineering / Efficiency & Quality / Quality Assurance Service",
        "cost": 0.1149,
        "acp_interactions": 2,
        "workspace_count": 1,
        "active_users": 1
      },
      {
        "team": "Efficiency & Quality",
        "team_path": "Engineering Group / Database Service Engineering / Efficiency & Quality",
        "cost": 0.0693,
        "acp_interactions": 1,
        "workspace_count": 1,
        "active_users": 1
      }
    ],
    "team_ratio_scatter": [
      {
        "team": "Intelligent Support Enablement",
        "team_path": "Engineering Group / Global Support Intelligence / Intelligent Support Enablement",
        "x": 3.0,
        "y": 0.4905,
        "size": 1,
        "cost": 1.4714
      },
      {
        "team": "Essential & Premium",
        "team_path": "Engineering Group / Service Orchestration Engineering / Essential & Premium",
        "x": 0.0,
        "y": null,
        "size": 1,
        "cost": 1.4416
      },
      {
        "team": "Technical Service",
        "team_path": "Japan Business Group / Technical Service",
        "x": 0.0,
        "y": null,
        "size": 1,
        "cost": 0.714
      },
      {
        "team": "Intelligent Support",
        "team_path": "Engineering Group / Global Support Intelligence / Intelligent Support",
        "x": 0.0,
        "y": null,
        "size": 2,
        "cost": 0.3453
      },
      {
        "team": "Observability & Diagnostics Service",
        "team_path": "Engineering Group / Database Service Engineering / Observability & Diagnostics Service",
        "x": 1.0,
        "y": 0.2053,
        "size": 1,
        "cost": 0.2053
      },
      {
        "team": "Quality Assurance Service",
        "team_path": "Engineering Group / Database Service Engineering / Efficiency & Quality / Quality Assurance Service",
        "x": 2.0,
        "y": 0.0575,
        "size": 1,
        "cost": 0.1149
      },
      {
        "team": "Efficiency & Quality",
        "team_path": "Engineering Group / Database Service Engineering / Efficiency & Quality",
        "x": 1.0,
        "y": 0.0693,
        "size": 1,
        "cost": 0.0693
      }
    ],
    "message_category_stack": [
      {
        "team": "Intelligent Support Enablement",
        "category": "Ad hoc 查询",
        "count": 4
      },
      {
        "team": "Intelligent Support Enablement",
        "category": "背景补充",
        "count": 2
      },
      {
        "team": "Essential & Premium",
        "category": "Ad hoc 查询",
        "count": 4
      },
      {
        "team": "Technical Service",
        "category": "Ad hoc 查询",
        "count": 2
      },
      {
        "team": "Intelligent Support",
        "category": "Ad hoc 查询",
        "count": 2
      },
      {
        "team": "Intelligent Support",
        "category": "查询纠偏",
        "count": 1
      },
      {
        "team": "Intelligent Support",
        "category": "流程控制/确认",
        "count": 1
      },
      {
        "team": "Intelligent Support",
        "category": "背景补充",
        "count": 1
      },
      {
        "team": "Intelligent Support",
        "category": "解释追问",
        "count": 1
      },
      {
        "team": "Intelligent Support",
        "category": "诊断启动",
        "count": 1
      },
      {
        "team": "Observability & Diagnostics Service",
        "category": "产出物迭代",
        "count": 1
      },
      {
        "team": "Quality Assurance Service",
        "category": "Ad hoc 查询",
        "count": 1
      },
      {
        "team": "Quality Assurance Service",
        "category": "背景补充",
        "count": 1
      },
      {
        "team": "Efficiency & Quality",
        "category": "流程控制/确认",
        "count": 1
      }
    ],
    "user_behavior_quadrant": [
      {
        "user_email": "jianghuaxi@pingcap.com",
        "x": 1,
        "y": 0.0,
        "cost": 1.4416,
        "mode": "低频低轮次"
      },
      {
        "user_email": "lingtao.li@pingcap.com",
        "x": 1,
        "y": 1.0,
        "cost": 0.2053,
        "mode": "低频低轮次"
      },
      {
        "user_email": "shaoxiqian@pingcap.com",
        "x": 1,
        "y": 1.0,
        "cost": 0.0693,
        "mode": "低频低轮次"
      },
      {
        "user_email": "xieyujie@pingcap.com",
        "x": 1,
        "y": 3.0,
        "cost": 1.4714,
        "mode": "低频低轮次"
      },
      {
        "user_email": "yichen.han@pingcap.com",
        "x": 1,
        "y": 2.0,
        "cost": 0.1149,
        "mode": "低频低轮次"
      },
      {
        "user_email": "yikai.puah@pingcap.com",
        "x": 2,
        "y": 0.0,
        "cost": 0.3453,
        "mode": "高频低轮次"
      },
      {
        "user_email": "zhigang.du@pingcap.com",
        "x": 1,
        "y": 0.0,
        "cost": 0.714,
        "mode": "低频低轮次"
      }
    ]
  },
  "workspace_changes_ref": "workspace_changes.json"
}
