{
  "date": "2026-08-29",
  "timezone": "Asia/Shanghai",
  "window_start": "2026-08-29T00:00:00+08:00",
  "window_end": "2026-08-30T00: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": 13.6635,
    "total_acp_interactions": 34,
    "active_users": 5,
    "workspace_count": 10,
    "created_workspace_count": 11,
    "new_workspace_count": 10,
    "updated_existing_workspace_count": 0,
    "changed_workspace_count": 10,
    "message_count": 80,
    "user_message_count": 35,
    "assistant_message_count": 41,
    "unknown_user_count": 0,
    "unknown_cost": 0.0
  },
  "teams": [
    {
      "team_path": "Engineering Group / Global Support Intelligence / Intelligent Support",
      "team": "Intelligent Support",
      "cost": 6.3973,
      "acp_interactions": 19,
      "workspace_count": 4,
      "active_users": 1,
      "message_count": 40,
      "user_message_count": 19,
      "cost_per_ws": 1.5993,
      "cost_per_acp": 0.3367,
      "acp_per_ws": 4.75,
      "message_per_ws": 10.0,
      "message_per_acp": 2.1053,
      "correction_message_ratio": null
    },
    {
      "team_path": "Engineering Group / Database Service Engineering / Scalable SQL & Data Service",
      "team": "Scalable SQL & Data Service",
      "cost": 4.5816,
      "acp_interactions": 8,
      "workspace_count": 2,
      "active_users": 1,
      "message_count": 18,
      "user_message_count": 8,
      "cost_per_ws": 2.2908,
      "cost_per_acp": 0.5727,
      "acp_per_ws": 4.0,
      "message_per_ws": 9.0,
      "message_per_acp": 2.25,
      "correction_message_ratio": null
    },
    {
      "team_path": "Engineering Group / Service Orchestration Engineering / Data Integration",
      "team": "Data Integration",
      "cost": 1.333,
      "acp_interactions": 3,
      "workspace_count": 2,
      "active_users": 1,
      "message_count": 9,
      "user_message_count": 3,
      "cost_per_ws": 0.6665,
      "cost_per_acp": 0.4443,
      "acp_per_ws": 1.5,
      "message_per_ws": 4.5,
      "message_per_acp": 3.0,
      "correction_message_ratio": null
    },
    {
      "team_path": "Engineering Group / Global Support Intelligence / Intelligent Support Enablement",
      "team": "Intelligent Support Enablement",
      "cost": 0.9498,
      "acp_interactions": 1,
      "workspace_count": 1,
      "active_users": 1,
      "message_count": 4,
      "user_message_count": 2,
      "cost_per_ws": 0.9498,
      "cost_per_acp": 0.9498,
      "acp_per_ws": 1.0,
      "message_per_ws": 4.0,
      "message_per_acp": 4.0,
      "correction_message_ratio": null
    },
    {
      "team_path": "APAC Business Group / Customer Success & Alliances / Professional Services",
      "team": "Professional Services",
      "cost": 0.4018,
      "acp_interactions": 3,
      "workspace_count": 1,
      "active_users": 1,
      "message_count": 9,
      "user_message_count": 3,
      "cost_per_ws": 0.4018,
      "cost_per_acp": 0.1339,
      "acp_per_ws": 3.0,
      "message_per_ws": 9.0,
      "message_per_acp": 3.0,
      "correction_message_ratio": null
    }
  ],
  "users": [
    {
      "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": 6.3973,
      "acp_interactions": 19,
      "workspace_count": 4,
      "message_count": 40,
      "user_message_count": 19,
      "channel_breakdown": {
        "web": 19
      },
      "frequency_bucket": "高频",
      "depth_bucket": "高轮次",
      "behavior_mode": "高频高轮次",
      "avg_acp_per_ws": 4.75
    },
    {
      "user_email": "ruihao.chen@pingcap.com",
      "name": "陈睿皓",
      "en_name": "Joe Chen",
      "team_path": "Engineering Group / Database Service Engineering / Scalable SQL & Data Service",
      "team": "Scalable SQL & Data Service",
      "mapping_source": "pingcap_members_by_team.csv",
      "cost": 4.5816,
      "acp_interactions": 8,
      "workspace_count": 2,
      "message_count": 18,
      "user_message_count": 8,
      "channel_breakdown": {
        "web": 8
      },
      "frequency_bucket": "高频",
      "depth_bucket": "高轮次",
      "behavior_mode": "高频高轮次",
      "avg_acp_per_ws": 4.0
    },
    {
      "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": 1.333,
      "acp_interactions": 3,
      "workspace_count": 2,
      "message_count": 9,
      "user_message_count": 3,
      "channel_breakdown": {
        "lark": 3
      },
      "frequency_bucket": "高频",
      "depth_bucket": "低轮次",
      "behavior_mode": "高频低轮次",
      "avg_acp_per_ws": 1.5
    },
    {
      "user_email": "sihao.yu@pingcap.com",
      "name": "俞锶浩",
      "en_name": "Shiori Yu",
      "team_path": "Engineering Group / Global Support Intelligence / Intelligent Support Enablement",
      "team": "Intelligent Support Enablement",
      "mapping_source": "investibook-usage-team-overrides.csv",
      "cost": 0.9498,
      "acp_interactions": 1,
      "workspace_count": 1,
      "message_count": 4,
      "user_message_count": 2,
      "channel_breakdown": {
        "cli": 1
      },
      "frequency_bucket": "低频",
      "depth_bucket": "低轮次",
      "behavior_mode": "低频低轮次",
      "avg_acp_per_ws": 1.0
    },
    {
      "user_email": "kaixing.yang@pingcap.com",
      "name": "杨凯星",
      "en_name": "Kaixing Yang",
      "team_path": "APAC Business Group / Customer Success & Alliances / Professional Services",
      "team": "Professional Services",
      "mapping_source": "pingcap_members_by_team.csv",
      "cost": 0.4018,
      "acp_interactions": 3,
      "workspace_count": 1,
      "message_count": 9,
      "user_message_count": 3,
      "channel_breakdown": {
        "lark": 3
      },
      "frequency_bucket": "低频",
      "depth_bucket": "低轮次",
      "behavior_mode": "低频低轮次",
      "avg_acp_per_ws": 3.0
    }
  ],
  "message_categories": [
    {
      "category": "诊断纠偏",
      "user_message_count": 1,
      "share": 0.028571,
      "estimated_cost_by_turn": 0.3904,
      "estimated_cost_by_output_weight": null,
      "avg_user_chars": 16.0,
      "avg_next_assistant_chars": null,
      "classification_method": "rule_based_keywords_v2"
    },
    {
      "category": "产出物迭代",
      "user_message_count": 4,
      "share": 0.114286,
      "estimated_cost_by_turn": 1.5615,
      "estimated_cost_by_output_weight": null,
      "avg_user_chars": 435.75,
      "avg_next_assistant_chars": null,
      "classification_method": "rule_based_keywords_v2"
    },
    {
      "category": "Ad hoc 查询",
      "user_message_count": 17,
      "share": 0.485714,
      "estimated_cost_by_turn": 6.6366,
      "estimated_cost_by_output_weight": null,
      "avg_user_chars": 1171.24,
      "avg_next_assistant_chars": null,
      "classification_method": "rule_based_keywords_v2"
    },
    {
      "category": "诊断启动",
      "user_message_count": 5,
      "share": 0.142857,
      "estimated_cost_by_turn": 1.9519,
      "estimated_cost_by_output_weight": null,
      "avg_user_chars": 89.6,
      "avg_next_assistant_chars": null,
      "classification_method": "rule_based_keywords_v2"
    },
    {
      "category": "解释追问",
      "user_message_count": 2,
      "share": 0.057143,
      "estimated_cost_by_turn": 0.7808,
      "estimated_cost_by_output_weight": null,
      "avg_user_chars": 15.0,
      "avg_next_assistant_chars": null,
      "classification_method": "rule_based_keywords_v2"
    },
    {
      "category": "流程控制/确认",
      "user_message_count": 2,
      "share": 0.057143,
      "estimated_cost_by_turn": 0.7808,
      "estimated_cost_by_output_weight": null,
      "avg_user_chars": 3779.5,
      "avg_next_assistant_chars": null,
      "classification_method": "rule_based_keywords_v2"
    },
    {
      "category": "背景补充",
      "user_message_count": 4,
      "share": 0.114286,
      "estimated_cost_by_turn": 1.5615,
      "estimated_cost_by_output_weight": null,
      "avg_user_chars": 245.75,
      "avg_next_assistant_chars": null,
      "classification_method": "rule_based_keywords_v2"
    }
  ],
  "unmatched_users": [],
  "top_changed_workspaces": [
    {
      "workspace_id": "ws-1787966250676-e654038b6",
      "title": "TCID-13100",
      "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": 4.1167,
      "message_count": 15,
      "user_message_count": 7
    },
    {
      "workspace_id": "ws-1787978610667-90f7d1bed",
      "title": "TCOC-5890",
      "workspace_lifecycle": "new",
      "user_email": "ruihao.chen@pingcap.com",
      "team_path": "Engineering Group / Database Service Engineering / Scalable SQL & Data Service",
      "scenario_group": "non_diagnosis",
      "scenario_category": "fleet_inventory_or_capacity_analysis",
      "cost": 2.7491,
      "message_count": 7,
      "user_message_count": 3
    },
    {
      "workspace_id": "ws-1787979587806-75b140d44",
      "title": "TCOC-5875",
      "workspace_lifecycle": "new",
      "user_email": "ruihao.chen@pingcap.com",
      "team_path": "Engineering Group / Database Service Engineering / Scalable SQL & Data Service",
      "scenario_group": "diagnosis",
      "scenario_category": "tikv_hotspot_or_coprocessor",
      "cost": 1.8326,
      "message_count": 11,
      "user_message_count": 5
    },
    {
      "workspace_id": "ws-1787989984936-839f46096",
      "title": "ST-2925",
      "workspace_lifecycle": "new",
      "user_email": "yikai.puah@pingcap.com",
      "team_path": "Engineering Group / Global Support Intelligence / Intelligent Support",
      "scenario_group": "diagnosis",
      "scenario_category": "tikv_hotspot_or_coprocessor",
      "cost": 1.6831,
      "message_count": 9,
      "user_message_count": 4
    },
    {
      "workspace_id": "lark-ws-0fdd084b-d861-4c12-a427-0d89c5c0227a",
      "title": "Lark O11Y-2650320",
      "workspace_lifecycle": "new",
      "user_email": "jiangjianyuan@pingcap.com",
      "team_path": "Engineering Group / Service Orchestration Engineering / Data Integration",
      "scenario_group": "diagnosis",
      "scenario_category": "cluster_topology_or_scaling",
      "cost": 1.0135,
      "message_count": 6,
      "user_message_count": 2
    },
    {
      "workspace_id": "ws-1787987608451-0a4cef505",
      "title": "O11Y-2650535 investigation",
      "workspace_lifecycle": "new",
      "user_email": "sihao.yu@pingcap.com",
      "team_path": "Engineering Group / Global Support Intelligence / Intelligent Support Enablement",
      "scenario_group": "diagnosis",
      "scenario_category": "storage_or_io_bottleneck",
      "cost": 0.9498,
      "message_count": 4,
      "user_message_count": 2
    },
    {
      "workspace_id": "ws-1787994790414-077f17041",
      "title": "cdc 机器由于打patch down 掉了",
      "workspace_lifecycle": "new",
      "user_email": "yikai.puah@pingcap.com",
      "team_path": "Engineering Group / Global Support Intelligence / Intelligent Support",
      "scenario_group": "diagnosis",
      "scenario_category": "cdc_or_replication_lag",
      "cost": 0.5156,
      "message_count": 14,
      "user_message_count": 7
    },
    {
      "workspace_id": "lark-ws-622a7067-f7a7-4c2d-b03e-c48dfd2b8054",
      "title": "Lark chat",
      "workspace_lifecycle": "new",
      "user_email": "kaixing.yang@pingcap.com",
      "team_path": "APAC Business Group / Customer Success & Alliances / Professional Services",
      "scenario_group": "diagnosis",
      "scenario_category": "tikv_hotspot_or_coprocessor",
      "cost": 0.4018,
      "message_count": 9,
      "user_message_count": 3
    },
    {
      "workspace_id": "lark-ws-5f825db2-6673-46c2-8ea8-d81cafa60c30",
      "title": "Lark O11Y-2650328",
      "workspace_lifecycle": "new",
      "user_email": "jiangjianyuan@pingcap.com",
      "team_path": "Engineering Group / Service Orchestration Engineering / Data Integration",
      "scenario_group": "non_diagnosis",
      "scenario_category": "support_case_triage_or_customer_response",
      "cost": 0.3195,
      "message_count": 3,
      "user_message_count": 1
    },
    {
      "workspace_id": "ws-1787972670920-a9a57ee64",
      "title": "我们有一个集群cdc和tidb 已经在打了patch，版本如下，我们想统一打上这个8.5.4的，怕版",
      "workspace_lifecycle": "new",
      "user_email": "yikai.puah@pingcap.com",
      "team_path": "Engineering Group / Global Support Intelligence / Intelligent Support",
      "scenario_group": "diagnosis",
      "scenario_category": "cdc_or_replication_lag",
      "cost": 0.0819,
      "message_count": 2,
      "user_message_count": 1
    }
  ],
  "charts": {
    "daily_cost_acp": [
      {
        "date": "2026-08-29",
        "cost": 13.6635,
        "acp_interactions": 34,
        "workspace_count": 10,
        "active_users": 5
      }
    ],
    "team_cost_bar": [
      {
        "team": "Intelligent Support",
        "team_path": "Engineering Group / Global Support Intelligence / Intelligent Support",
        "cost": 6.3973,
        "acp_interactions": 19,
        "workspace_count": 4,
        "active_users": 1
      },
      {
        "team": "Scalable SQL & Data Service",
        "team_path": "Engineering Group / Database Service Engineering / Scalable SQL & Data Service",
        "cost": 4.5816,
        "acp_interactions": 8,
        "workspace_count": 2,
        "active_users": 1
      },
      {
        "team": "Data Integration",
        "team_path": "Engineering Group / Service Orchestration Engineering / Data Integration",
        "cost": 1.333,
        "acp_interactions": 3,
        "workspace_count": 2,
        "active_users": 1
      },
      {
        "team": "Intelligent Support Enablement",
        "team_path": "Engineering Group / Global Support Intelligence / Intelligent Support Enablement",
        "cost": 0.9498,
        "acp_interactions": 1,
        "workspace_count": 1,
        "active_users": 1
      },
      {
        "team": "Professional Services",
        "team_path": "APAC Business Group / Customer Success & Alliances / Professional Services",
        "cost": 0.4018,
        "acp_interactions": 3,
        "workspace_count": 1,
        "active_users": 1
      }
    ],
    "team_ratio_scatter": [
      {
        "team": "Intelligent Support",
        "team_path": "Engineering Group / Global Support Intelligence / Intelligent Support",
        "x": 4.75,
        "y": 0.3367,
        "size": 4,
        "cost": 6.3973
      },
      {
        "team": "Scalable SQL & Data Service",
        "team_path": "Engineering Group / Database Service Engineering / Scalable SQL & Data Service",
        "x": 4.0,
        "y": 0.5727,
        "size": 2,
        "cost": 4.5816
      },
      {
        "team": "Data Integration",
        "team_path": "Engineering Group / Service Orchestration Engineering / Data Integration",
        "x": 1.5,
        "y": 0.4443,
        "size": 2,
        "cost": 1.333
      },
      {
        "team": "Intelligent Support Enablement",
        "team_path": "Engineering Group / Global Support Intelligence / Intelligent Support Enablement",
        "x": 1.0,
        "y": 0.9498,
        "size": 1,
        "cost": 0.9498
      },
      {
        "team": "Professional Services",
        "team_path": "APAC Business Group / Customer Success & Alliances / Professional Services",
        "x": 3.0,
        "y": 0.1339,
        "size": 1,
        "cost": 0.4018
      }
    ],
    "message_category_stack": [
      {
        "team": "Intelligent Support",
        "category": "Ad hoc 查询",
        "count": 8
      },
      {
        "team": "Intelligent Support",
        "category": "产出物迭代",
        "count": 3
      },
      {
        "team": "Intelligent Support",
        "category": "流程控制/确认",
        "count": 2
      },
      {
        "team": "Intelligent Support",
        "category": "背景补充",
        "count": 2
      },
      {
        "team": "Intelligent Support",
        "category": "解释追问",
        "count": 1
      },
      {
        "team": "Intelligent Support",
        "category": "诊断启动",
        "count": 2
      },
      {
        "team": "Intelligent Support",
        "category": "诊断纠偏",
        "count": 1
      },
      {
        "team": "Scalable SQL & Data Service",
        "category": "Ad hoc 查询",
        "count": 4
      },
      {
        "team": "Scalable SQL & Data Service",
        "category": "产出物迭代",
        "count": 1
      },
      {
        "team": "Scalable SQL & Data Service",
        "category": "解释追问",
        "count": 1
      },
      {
        "team": "Scalable SQL & Data Service",
        "category": "诊断启动",
        "count": 2
      },
      {
        "team": "Data Integration",
        "category": "Ad hoc 查询",
        "count": 2
      },
      {
        "team": "Data Integration",
        "category": "背景补充",
        "count": 1
      },
      {
        "team": "Intelligent Support Enablement",
        "category": "Ad hoc 查询",
        "count": 2
      },
      {
        "team": "Professional Services",
        "category": "Ad hoc 查询",
        "count": 1
      },
      {
        "team": "Professional Services",
        "category": "背景补充",
        "count": 1
      },
      {
        "team": "Professional Services",
        "category": "诊断启动",
        "count": 1
      }
    ],
    "user_behavior_quadrant": [
      {
        "user_email": "jiangjianyuan@pingcap.com",
        "x": 2,
        "y": 1.5,
        "cost": 1.333,
        "mode": "高频低轮次"
      },
      {
        "user_email": "kaixing.yang@pingcap.com",
        "x": 1,
        "y": 3.0,
        "cost": 0.4018,
        "mode": "低频低轮次"
      },
      {
        "user_email": "ruihao.chen@pingcap.com",
        "x": 2,
        "y": 4.0,
        "cost": 4.5816,
        "mode": "高频高轮次"
      },
      {
        "user_email": "sihao.yu@pingcap.com",
        "x": 1,
        "y": 1.0,
        "cost": 0.9498,
        "mode": "低频低轮次"
      },
      {
        "user_email": "yikai.puah@pingcap.com",
        "x": 4,
        "y": 4.75,
        "cost": 6.3973,
        "mode": "高频高轮次"
      }
    ]
  },
  "workspace_changes_ref": "workspace_changes.json"
}
