{
  "date": "2026-07-19",
  "timezone": "Asia/Shanghai",
  "window_start": "2026-07-19T00:00:00+08:00",
  "window_end": "2026-07-20T00: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": 32.9458,
    "total_acp_interactions": 32,
    "active_users": 6,
    "workspace_count": 7,
    "created_workspace_count": 7,
    "new_workspace_count": 11,
    "updated_existing_workspace_count": 1,
    "changed_workspace_count": 12,
    "message_count": 200,
    "user_message_count": 103,
    "assistant_message_count": 94,
    "unknown_user_count": 0,
    "unknown_cost": 0.0
  },
  "teams": [
    {
      "team_path": "APAC Business Group / Customer Success & Alliances / Technical Account Management",
      "team": "Technical Account Management",
      "cost": 16.684,
      "acp_interactions": 25,
      "workspace_count": 1,
      "active_users": 1,
      "message_count": 108,
      "user_message_count": 54,
      "cost_per_ws": 16.684,
      "cost_per_acp": 0.6674,
      "acp_per_ws": 25.0,
      "message_per_ws": 108.0,
      "message_per_acp": 4.32,
      "correction_message_ratio": null
    },
    {
      "team_path": "Engineering Group / Service Orchestration Engineering / Essential & Premium",
      "team": "Essential & Premium",
      "cost": 11.4132,
      "acp_interactions": 25,
      "workspace_count": 3,
      "active_users": 1,
      "message_count": 251,
      "user_message_count": 134,
      "cost_per_ws": 3.8044,
      "cost_per_acp": 0.4565,
      "acp_per_ws": 8.3333,
      "message_per_ws": 83.6667,
      "message_per_acp": 10.04,
      "correction_message_ratio": null
    },
    {
      "team_path": "Engineering Group / Enterprise Customer Engineering",
      "team": "Enterprise Customer Engineering",
      "cost": 3.3141,
      "acp_interactions": 4,
      "workspace_count": 1,
      "active_users": 1,
      "message_count": 9,
      "user_message_count": 4,
      "cost_per_ws": 3.3141,
      "cost_per_acp": 0.8285,
      "acp_per_ws": 4.0,
      "message_per_ws": 9.0,
      "message_per_acp": 2.25,
      "correction_message_ratio": null
    },
    {
      "team_path": "Engineering Group / Database Service Engineering / TiDB Scalability Service",
      "team": "TiDB Scalability Service",
      "cost": 0.9167,
      "acp_interactions": 2,
      "workspace_count": 2,
      "active_users": 2,
      "message_count": 11,
      "user_message_count": 4,
      "cost_per_ws": 0.4584,
      "cost_per_acp": 0.4584,
      "acp_per_ws": 1.0,
      "message_per_ws": 5.5,
      "message_per_acp": 5.5,
      "correction_message_ratio": null
    },
    {
      "team_path": "Engineering Group / Database Service Engineering / Observability & Diagnostics Service",
      "team": "Observability & Diagnostics Service",
      "cost": 0.6178,
      "acp_interactions": 1,
      "workspace_count": 1,
      "active_users": 1,
      "message_count": 2,
      "user_message_count": 1,
      "cost_per_ws": 0.6178,
      "cost_per_acp": 0.6178,
      "acp_per_ws": 1.0,
      "message_per_ws": 2.0,
      "message_per_acp": 2.0,
      "correction_message_ratio": null
    }
  ],
  "users": [
    {
      "user_email": "brian.w@pingcap.com",
      "name": "张建伟",
      "en_name": "Brian.Zhang",
      "team_path": "APAC Business Group / Customer Success & Alliances / Technical Account Management",
      "team": "Technical Account Management",
      "mapping_source": "investibook-usage-team-overrides.csv",
      "cost": 16.684,
      "acp_interactions": 25,
      "workspace_count": 1,
      "message_count": 54,
      "user_message_count": 27,
      "channel_breakdown": {
        "web": 3
      },
      "frequency_bucket": "低频",
      "depth_bucket": "高轮次",
      "behavior_mode": "低频高轮次",
      "avg_acp_per_ws": 25.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": 11.4132,
      "acp_interactions": 25,
      "workspace_count": 2,
      "message_count": 124,
      "user_message_count": 66,
      "channel_breakdown": {
        "cli": 25
      },
      "frequency_bucket": "高频",
      "depth_bucket": "高轮次",
      "behavior_mode": "高频高轮次",
      "avg_acp_per_ws": 12.5
    },
    {
      "user_email": "qinziqian@pingcap.com",
      "name": "秦子谦",
      "en_name": "Ziqian Qin",
      "team_path": "Engineering Group / Enterprise Customer Engineering",
      "team": "Enterprise Customer Engineering",
      "mapping_source": "pingcap_members_by_team.csv",
      "cost": 3.3141,
      "acp_interactions": 4,
      "workspace_count": 1,
      "message_count": 9,
      "user_message_count": 4,
      "channel_breakdown": {
        "lark": 1,
        "web": 1
      },
      "frequency_bucket": "低频",
      "depth_bucket": "高轮次",
      "behavior_mode": "低频高轮次",
      "avg_acp_per_ws": 4.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.6178,
      "acp_interactions": 1,
      "workspace_count": 1,
      "message_count": 2,
      "user_message_count": 1,
      "channel_breakdown": {},
      "frequency_bucket": "低频",
      "depth_bucket": "低轮次",
      "behavior_mode": "低频低轮次",
      "avg_acp_per_ws": 1.0
    },
    {
      "user_email": "xuchengxuan@pingcap.com",
      "name": "徐成选",
      "en_name": "Chris Xu",
      "team_path": "Engineering Group / Database Service Engineering / TiDB Scalability Service",
      "team": "TiDB Scalability Service",
      "mapping_source": "investibook-usage-team-overrides.csv",
      "cost": 0.5699,
      "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": "liangyutong@pingcap.com",
      "name": "梁宇彤",
      "en_name": "Ryan Liang",
      "team_path": "Engineering Group / Database Service Engineering / TiDB Scalability Service",
      "team": "TiDB Scalability Service",
      "mapping_source": "investibook-usage-team-overrides.csv",
      "cost": 0.3468,
      "acp_interactions": 2,
      "workspace_count": 1,
      "message_count": 5,
      "user_message_count": 2,
      "channel_breakdown": {
        "web": 2
      },
      "frequency_bucket": "低频",
      "depth_bucket": "低轮次",
      "behavior_mode": "低频低轮次",
      "avg_acp_per_ws": 2.0
    }
  ],
  "message_categories": [
    {
      "category": "查询纠偏",
      "user_message_count": 2,
      "share": 0.019417,
      "estimated_cost_by_turn": 0.6397,
      "estimated_cost_by_output_weight": null,
      "avg_user_chars": 53.0,
      "avg_next_assistant_chars": null,
      "classification_method": "rule_based_keywords_v2"
    },
    {
      "category": "产出物迭代",
      "user_message_count": 6,
      "share": 0.058252,
      "estimated_cost_by_turn": 1.9192,
      "estimated_cost_by_output_weight": null,
      "avg_user_chars": 198.17,
      "avg_next_assistant_chars": null,
      "classification_method": "rule_based_keywords_v2"
    },
    {
      "category": "Ad hoc 查询",
      "user_message_count": 74,
      "share": 0.718447,
      "estimated_cost_by_turn": 23.6698,
      "estimated_cost_by_output_weight": null,
      "avg_user_chars": 414.76,
      "avg_next_assistant_chars": null,
      "classification_method": "rule_based_keywords_v2"
    },
    {
      "category": "诊断启动",
      "user_message_count": 7,
      "share": 0.067961,
      "estimated_cost_by_turn": 2.239,
      "estimated_cost_by_output_weight": null,
      "avg_user_chars": 138.71,
      "avg_next_assistant_chars": null,
      "classification_method": "rule_based_keywords_v2"
    },
    {
      "category": "解释追问",
      "user_message_count": 1,
      "share": 0.009709,
      "estimated_cost_by_turn": 0.3199,
      "estimated_cost_by_output_weight": null,
      "avg_user_chars": 11.0,
      "avg_next_assistant_chars": null,
      "classification_method": "rule_based_keywords_v2"
    },
    {
      "category": "流程控制/确认",
      "user_message_count": 11,
      "share": 0.106796,
      "estimated_cost_by_turn": 3.5185,
      "estimated_cost_by_output_weight": null,
      "avg_user_chars": 18.36,
      "avg_next_assistant_chars": null,
      "classification_method": "rule_based_keywords_v2"
    },
    {
      "category": "未归类",
      "user_message_count": 2,
      "share": 0.019417,
      "estimated_cost_by_turn": 0.6397,
      "estimated_cost_by_output_weight": null,
      "avg_user_chars": 4.5,
      "avg_next_assistant_chars": null,
      "classification_method": "rule_based_keywords_v2"
    }
  ],
  "unmatched_users": [],
  "top_changed_workspaces": [
    {
      "workspace_id": "ws-1784444014779-446f97cf1",
      "title": "给这几个集群做个巡检，https://clinic.pingcap.com/portal/#/clu",
      "workspace_lifecycle": "new",
      "user_email": "brian.w@pingcap.com",
      "team_path": "APAC Business Group / Customer Success & Alliances / Technical Account Management",
      "scenario_group": "diagnosis",
      "scenario_category": "resource_control_or_capacity",
      "cost": 16.3516,
      "message_count": 54,
      "user_message_count": 27
    },
    {
      "workspace_id": "ws-1784399736222-affb185a5",
      "title": "O11Y-2618801 TiFlash compute volume 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": 10.4598,
      "message_count": 120,
      "user_message_count": 64
    },
    {
      "workspace_id": "lark-ws-9654a5b3-109e-42cf-89e1-4a068bb2e3d0",
      "title": "Lark GTOC-8585",
      "workspace_lifecycle": "new",
      "user_email": "qinziqian@pingcap.com",
      "team_path": "Engineering Group / Enterprise Customer Engineering",
      "scenario_group": "diagnosis",
      "scenario_category": "sql_plan_or_query",
      "cost": 3.3141,
      "message_count": 9,
      "user_message_count": 4
    },
    {
      "workspace_id": "ws-1784391803147-a669cc140",
      "title": "O11Y-2618772 TiDBClusterAlertStorm 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.81,
      "message_count": 4,
      "user_message_count": 2
    },
    {
      "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.6178,
      "message_count": 2,
      "user_message_count": 1
    },
    {
      "workspace_id": "lark-ws-041771ba-d1a3-4cf9-8f83-295b191ce262",
      "title": "Lark chat",
      "workspace_lifecycle": "new",
      "user_email": "xuchengxuan@pingcap.com",
      "team_path": "Engineering Group / Database Service Engineering / TiDB Scalability Service",
      "scenario_group": "diagnosis",
      "scenario_category": "resource_control_or_capacity",
      "cost": 0.5544,
      "message_count": 3,
      "user_message_count": 1
    },
    {
      "workspace_id": "ws-1784419952297-794f5478f",
      "title": "O11Y-2618928",
      "workspace_lifecycle": "new",
      "user_email": "liangyutong@pingcap.com",
      "team_path": "Engineering Group / Database Service Engineering / TiDB Scalability Service",
      "scenario_group": "non_diagnosis",
      "scenario_category": "fleet_inventory_or_capacity_analysis",
      "cost": 0.3468,
      "message_count": 5,
      "user_message_count": 2
    },
    {
      "workspace_id": "ws-1784444014779-446f97cf1",
      "title": "给这几个集群做个巡检，https://clinic.pingcap.com/portal/#/clu",
      "workspace_lifecycle": "new",
      "user_email": "brian.w@pingcap.com",
      "team_path": "APAC Business Group / Customer Success & Alliances / Technical Account Management",
      "scenario_group": "diagnosis",
      "scenario_category": "resource_control_or_capacity",
      "cost": 0.3324,
      "message_count": 54,
      "user_message_count": 27
    },
    {
      "workspace_id": "ws-1784399736222-affb185a5",
      "title": "O11Y-2618801 TiFlash compute volume 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.1402,
      "message_count": 120,
      "user_message_count": 64
    },
    {
      "workspace_id": "lark-ws-041771ba-d1a3-4cf9-8f83-295b191ce262",
      "title": "Lark chat",
      "workspace_lifecycle": "new",
      "user_email": "xuchengxuan@pingcap.com",
      "team_path": "Engineering Group / Database Service Engineering / TiDB Scalability Service",
      "scenario_group": "diagnosis",
      "scenario_category": "resource_control_or_capacity",
      "cost": 0.0155,
      "message_count": 3,
      "user_message_count": 1
    },
    {
      "workspace_id": "ws-1784391803147-a669cc140",
      "title": "O11Y-2618772 TiDBClusterAlertStorm 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.0032,
      "message_count": 4,
      "user_message_count": 2
    },
    {
      "workspace_id": "ws-1784390617326-3bc3efa96",
      "title": "O11Y-2618762 BizChangefeedCheckpointHighDelay1h investigation",
      "workspace_lifecycle": "new",
      "user_email": "jianghuaxi@pingcap.com",
      "team_path": "Engineering Group / Service Orchestration Engineering / Essential & Premium",
      "scenario_group": "diagnosis",
      "scenario_category": "cdc_or_replication_lag",
      "cost": 0,
      "message_count": 3,
      "user_message_count": 2
    }
  ],
  "charts": {
    "daily_cost_acp": [
      {
        "date": "2026-07-19",
        "cost": 32.9458,
        "acp_interactions": 32,
        "workspace_count": 7,
        "active_users": 6
      }
    ],
    "team_cost_bar": [
      {
        "team": "Technical Account Management",
        "team_path": "APAC Business Group / Customer Success & Alliances / Technical Account Management",
        "cost": 16.684,
        "acp_interactions": 25,
        "workspace_count": 1,
        "active_users": 1
      },
      {
        "team": "Essential & Premium",
        "team_path": "Engineering Group / Service Orchestration Engineering / Essential & Premium",
        "cost": 11.4132,
        "acp_interactions": 25,
        "workspace_count": 3,
        "active_users": 1
      },
      {
        "team": "Enterprise Customer Engineering",
        "team_path": "Engineering Group / Enterprise Customer Engineering",
        "cost": 3.3141,
        "acp_interactions": 4,
        "workspace_count": 1,
        "active_users": 1
      },
      {
        "team": "TiDB Scalability Service",
        "team_path": "Engineering Group / Database Service Engineering / TiDB Scalability Service",
        "cost": 0.9167,
        "acp_interactions": 2,
        "workspace_count": 2,
        "active_users": 2
      },
      {
        "team": "Observability & Diagnostics Service",
        "team_path": "Engineering Group / Database Service Engineering / Observability & Diagnostics Service",
        "cost": 0.6178,
        "acp_interactions": 1,
        "workspace_count": 1,
        "active_users": 1
      }
    ],
    "team_ratio_scatter": [
      {
        "team": "Technical Account Management",
        "team_path": "APAC Business Group / Customer Success & Alliances / Technical Account Management",
        "x": 25.0,
        "y": 0.6674,
        "size": 1,
        "cost": 16.684
      },
      {
        "team": "Essential & Premium",
        "team_path": "Engineering Group / Service Orchestration Engineering / Essential & Premium",
        "x": 8.3333,
        "y": 0.4565,
        "size": 3,
        "cost": 11.4132
      },
      {
        "team": "Enterprise Customer Engineering",
        "team_path": "Engineering Group / Enterprise Customer Engineering",
        "x": 4.0,
        "y": 0.8285,
        "size": 1,
        "cost": 3.3141
      },
      {
        "team": "TiDB Scalability Service",
        "team_path": "Engineering Group / Database Service Engineering / TiDB Scalability Service",
        "x": 1.0,
        "y": 0.4584,
        "size": 2,
        "cost": 0.9167
      },
      {
        "team": "Observability & Diagnostics Service",
        "team_path": "Engineering Group / Database Service Engineering / Observability & Diagnostics Service",
        "x": 1.0,
        "y": 0.6178,
        "size": 1,
        "cost": 0.6178
      }
    ],
    "message_category_stack": [
      {
        "team": "Technical Account Management",
        "category": "Ad hoc 查询",
        "count": 24
      },
      {
        "team": "Technical Account Management",
        "category": "产出物迭代",
        "count": 10
      },
      {
        "team": "Technical Account Management",
        "category": "未归类",
        "count": 4
      },
      {
        "team": "Technical Account Management",
        "category": "查询纠偏",
        "count": 2
      },
      {
        "team": "Technical Account Management",
        "category": "流程控制/确认",
        "count": 8
      },
      {
        "team": "Technical Account Management",
        "category": "解释追问",
        "count": 2
      },
      {
        "team": "Technical Account Management",
        "category": "诊断启动",
        "count": 4
      },
      {
        "team": "Essential & Premium",
        "category": "Ad hoc 查询",
        "count": 118
      },
      {
        "team": "Essential & Premium",
        "category": "流程控制/确认",
        "count": 12
      },
      {
        "team": "Essential & Premium",
        "category": "诊断启动",
        "count": 4
      },
      {
        "team": "Enterprise Customer Engineering",
        "category": "Ad hoc 查询",
        "count": 1
      },
      {
        "team": "Enterprise Customer Engineering",
        "category": "查询纠偏",
        "count": 1
      },
      {
        "team": "Enterprise Customer Engineering",
        "category": "诊断启动",
        "count": 2
      },
      {
        "team": "TiDB Scalability Service",
        "category": "Ad hoc 查询",
        "count": 2
      },
      {
        "team": "TiDB Scalability Service",
        "category": "流程控制/确认",
        "count": 1
      },
      {
        "team": "TiDB Scalability Service",
        "category": "诊断启动",
        "count": 1
      },
      {
        "team": "Observability & Diagnostics Service",
        "category": "产出物迭代",
        "count": 1
      }
    ],
    "user_behavior_quadrant": [
      {
        "user_email": "brian.w@pingcap.com",
        "x": 1,
        "y": 25.0,
        "cost": 16.684,
        "mode": "低频高轮次"
      },
      {
        "user_email": "jianghuaxi@pingcap.com",
        "x": 2,
        "y": 12.5,
        "cost": 11.4132,
        "mode": "高频高轮次"
      },
      {
        "user_email": "liangyutong@pingcap.com",
        "x": 1,
        "y": 2.0,
        "cost": 0.3468,
        "mode": "低频低轮次"
      },
      {
        "user_email": "lingtao.li@pingcap.com",
        "x": 1,
        "y": 1.0,
        "cost": 0.6178,
        "mode": "低频低轮次"
      },
      {
        "user_email": "qinziqian@pingcap.com",
        "x": 1,
        "y": 4.0,
        "cost": 3.3141,
        "mode": "低频高轮次"
      },
      {
        "user_email": "xuchengxuan@pingcap.com",
        "x": 1,
        "y": 0.0,
        "cost": 0.5699,
        "mode": "低频低轮次"
      }
    ]
  },
  "workspace_changes_ref": "workspace_changes.json"
}
