{
  "date": "2026-07-12",
  "timezone": "Asia/Shanghai",
  "window_start": "2026-07-12T00:00:00+08:00",
  "window_end": "2026-07-13T00: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": 5.4398,
    "total_acp_interactions": 8,
    "active_users": 5,
    "workspace_count": 5,
    "created_workspace_count": 4,
    "new_workspace_count": 6,
    "updated_existing_workspace_count": 1,
    "changed_workspace_count": 7,
    "message_count": 21,
    "user_message_count": 9,
    "assistant_message_count": 10,
    "unknown_user_count": 0,
    "unknown_cost": 0.0
  },
  "teams": [
    {
      "team_path": "Engineering Group / Database Service Engineering / TiDB Scalability Service",
      "team": "TiDB Scalability Service",
      "cost": 2.4347,
      "acp_interactions": 3,
      "workspace_count": 1,
      "active_users": 1,
      "message_count": 12,
      "user_message_count": 6,
      "cost_per_ws": 2.4347,
      "cost_per_acp": 0.8116,
      "acp_per_ws": 3.0,
      "message_per_ws": 12.0,
      "message_per_acp": 4.0,
      "correction_message_ratio": null
    },
    {
      "team_path": "Japan Business Group / Technical Service",
      "team": "Technical Service",
      "cost": 1.7593,
      "acp_interactions": 2,
      "workspace_count": 1,
      "active_users": 1,
      "message_count": 10,
      "user_message_count": 4,
      "cost_per_ws": 1.7593,
      "cost_per_acp": 0.8797,
      "acp_per_ws": 2.0,
      "message_per_ws": 10.0,
      "message_per_acp": 5.0,
      "correction_message_ratio": null
    },
    {
      "team_path": "Engineering Group / Database Service Engineering / Scalable SQL & Data Service",
      "team": "Scalable SQL & Data Service",
      "cost": 0.6144,
      "acp_interactions": 2,
      "workspace_count": 1,
      "active_users": 1,
      "message_count": 5,
      "user_message_count": 2,
      "cost_per_ws": 0.6144,
      "cost_per_acp": 0.3072,
      "acp_per_ws": 2.0,
      "message_per_ws": 5.0,
      "message_per_acp": 2.5,
      "correction_message_ratio": null
    },
    {
      "team_path": "Engineering Group / Database Service Engineering / Observability & Diagnostics Service",
      "team": "Observability & Diagnostics Service",
      "cost": 0.5607,
      "acp_interactions": 0,
      "workspace_count": 1,
      "active_users": 1,
      "message_count": 2,
      "user_message_count": 1,
      "cost_per_ws": 0.5607,
      "cost_per_acp": null,
      "acp_per_ws": 0.0,
      "message_per_ws": 2.0,
      "message_per_acp": null,
      "correction_message_ratio": null
    },
    {
      "team_path": "Engineering Group / Database Service Engineering / Efficiency & Quality",
      "team": "Efficiency & Quality",
      "cost": 0.0706,
      "acp_interactions": 1,
      "workspace_count": 1,
      "active_users": 1,
      "message_count": 3,
      "user_message_count": 1,
      "cost_per_ws": 0.0706,
      "cost_per_acp": 0.0706,
      "acp_per_ws": 1.0,
      "message_per_ws": 3.0,
      "message_per_acp": 3.0,
      "correction_message_ratio": null
    }
  ],
  "users": [
    {
      "user_email": "yuhao.zhang@pingcap.com",
      "name": "张昱豪",
      "en_name": "Yuhao Zhang",
      "team_path": "Engineering Group / Database Service Engineering / TiDB Scalability Service",
      "team": "TiDB Scalability Service",
      "mapping_source": "investibook-usage-team-overrides.csv",
      "cost": 2.4347,
      "acp_interactions": 3,
      "workspace_count": 1,
      "message_count": 6,
      "user_message_count": 3,
      "channel_breakdown": {
        "web": 3
      },
      "frequency_bucket": "低频",
      "depth_bucket": "低轮次",
      "behavior_mode": "低频低轮次",
      "avg_acp_per_ws": 3.0
    },
    {
      "user_email": "mizuki.masuda@pingcap.com",
      "name": "Masuda Mizuki",
      "en_name": "Mizuki Masuda",
      "team_path": "Japan Business Group / Technical Service",
      "team": "Technical Service",
      "mapping_source": "pingcap_members_by_team.csv",
      "cost": 1.7593,
      "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
    },
    {
      "user_email": "oliver.sheng@pingcap.com",
      "name": "吕夫洋",
      "en_name": "Oliver Sheng",
      "team_path": "Engineering Group / Database Service Engineering / Scalable SQL & Data Service",
      "team": "Scalable SQL & Data Service",
      "mapping_source": "pingcap_members_by_team.csv",
      "cost": 0.6144,
      "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
    },
    {
      "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.5607,
      "acp_interactions": 0,
      "workspace_count": 1,
      "message_count": 2,
      "user_message_count": 1,
      "channel_breakdown": {},
      "frequency_bucket": "低频",
      "depth_bucket": "低轮次",
      "behavior_mode": "低频低轮次",
      "avg_acp_per_ws": 0.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.0706,
      "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.111111,
      "estimated_cost_by_turn": 0.6044,
      "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": 6,
      "share": 0.666667,
      "estimated_cost_by_turn": 3.6265,
      "estimated_cost_by_output_weight": null,
      "avg_user_chars": 123.0,
      "avg_next_assistant_chars": null,
      "classification_method": "rule_based_keywords_v2"
    },
    {
      "category": "诊断启动",
      "user_message_count": 1,
      "share": 0.111111,
      "estimated_cost_by_turn": 0.6044,
      "estimated_cost_by_output_weight": null,
      "avg_user_chars": 43.0,
      "avg_next_assistant_chars": null,
      "classification_method": "rule_based_keywords_v2"
    },
    {
      "category": "背景补充",
      "user_message_count": 1,
      "share": 0.111111,
      "estimated_cost_by_turn": 0.6044,
      "estimated_cost_by_output_weight": null,
      "avg_user_chars": 215.0,
      "avg_next_assistant_chars": null,
      "classification_method": "rule_based_keywords_v2"
    }
  ],
  "unmatched_users": [],
  "top_changed_workspaces": [
    {
      "workspace_id": "ws-1783789095126-eeedc3529",
      "title": "26/07/12 WeTech 多集群 rg_ddl RU 异常飙升现象观察",
      "workspace_lifecycle": "new",
      "user_email": "yuhao.zhang@pingcap.com",
      "team_path": "Engineering Group / Database Service Engineering / TiDB Scalability Service",
      "scenario_group": "diagnosis",
      "scenario_category": "resource_control_or_capacity",
      "cost": 2.4284,
      "message_count": 6,
      "user_message_count": 3
    },
    {
      "workspace_id": "ws-1783831964405-41e16396f",
      "title": "TCID-12908",
      "workspace_lifecycle": "new",
      "user_email": "mizuki.masuda@pingcap.com",
      "team_path": "Japan Business Group / Technical Service",
      "scenario_group": "diagnosis",
      "scenario_category": "tikv_hotspot_or_coprocessor",
      "cost": 1.7372,
      "message_count": 5,
      "user_message_count": 2
    },
    {
      "workspace_id": "ws-1783823284781-0ae0cca34",
      "title": "未命名工作空间",
      "workspace_lifecycle": "new",
      "user_email": "oliver.sheng@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": 0.6144,
      "message_count": 5,
      "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.5607,
      "message_count": 2,
      "user_message_count": 1
    },
    {
      "workspace_id": "lark-ws-9bb7abe3-363c-4e58-a462-6433bde5ccae",
      "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.0706,
      "message_count": 3,
      "user_message_count": 1
    },
    {
      "workspace_id": "ws-1783831964405-41e16396f",
      "title": "TCID-12908",
      "workspace_lifecycle": "new",
      "user_email": "mizuki.masuda@pingcap.com",
      "team_path": "Japan Business Group / Technical Service",
      "scenario_group": "diagnosis",
      "scenario_category": "tikv_hotspot_or_coprocessor",
      "cost": 0.0221,
      "message_count": 5,
      "user_message_count": 2
    },
    {
      "workspace_id": "ws-1783789095126-eeedc3529",
      "title": "26/07/12 WeTech 多集群 rg_ddl RU 异常飙升现象观察",
      "workspace_lifecycle": "new",
      "user_email": "yuhao.zhang@pingcap.com",
      "team_path": "Engineering Group / Database Service Engineering / TiDB Scalability Service",
      "scenario_group": "diagnosis",
      "scenario_category": "resource_control_or_capacity",
      "cost": 0.0063,
      "message_count": 6,
      "user_message_count": 3
    }
  ],
  "charts": {
    "daily_cost_acp": [
      {
        "date": "2026-07-12",
        "cost": 5.4398,
        "acp_interactions": 8,
        "workspace_count": 5,
        "active_users": 5
      }
    ],
    "team_cost_bar": [
      {
        "team": "TiDB Scalability Service",
        "team_path": "Engineering Group / Database Service Engineering / TiDB Scalability Service",
        "cost": 2.4347,
        "acp_interactions": 3,
        "workspace_count": 1,
        "active_users": 1
      },
      {
        "team": "Technical Service",
        "team_path": "Japan Business Group / Technical Service",
        "cost": 1.7593,
        "acp_interactions": 2,
        "workspace_count": 1,
        "active_users": 1
      },
      {
        "team": "Scalable SQL & Data Service",
        "team_path": "Engineering Group / Database Service Engineering / Scalable SQL & Data Service",
        "cost": 0.6144,
        "acp_interactions": 2,
        "workspace_count": 1,
        "active_users": 1
      },
      {
        "team": "Observability & Diagnostics Service",
        "team_path": "Engineering Group / Database Service Engineering / Observability & Diagnostics Service",
        "cost": 0.5607,
        "acp_interactions": 0,
        "workspace_count": 1,
        "active_users": 1
      },
      {
        "team": "Efficiency & Quality",
        "team_path": "Engineering Group / Database Service Engineering / Efficiency & Quality",
        "cost": 0.0706,
        "acp_interactions": 1,
        "workspace_count": 1,
        "active_users": 1
      }
    ],
    "team_ratio_scatter": [
      {
        "team": "TiDB Scalability Service",
        "team_path": "Engineering Group / Database Service Engineering / TiDB Scalability Service",
        "x": 3.0,
        "y": 0.8116,
        "size": 1,
        "cost": 2.4347
      },
      {
        "team": "Technical Service",
        "team_path": "Japan Business Group / Technical Service",
        "x": 2.0,
        "y": 0.8797,
        "size": 1,
        "cost": 1.7593
      },
      {
        "team": "Scalable SQL & Data Service",
        "team_path": "Engineering Group / Database Service Engineering / Scalable SQL & Data Service",
        "x": 2.0,
        "y": 0.3072,
        "size": 1,
        "cost": 0.6144
      },
      {
        "team": "Observability & Diagnostics Service",
        "team_path": "Engineering Group / Database Service Engineering / Observability & Diagnostics Service",
        "x": 0.0,
        "y": null,
        "size": 1,
        "cost": 0.5607
      },
      {
        "team": "Efficiency & Quality",
        "team_path": "Engineering Group / Database Service Engineering / Efficiency & Quality",
        "x": 1.0,
        "y": 0.0706,
        "size": 1,
        "cost": 0.0706
      }
    ],
    "message_category_stack": [
      {
        "team": "TiDB Scalability Service",
        "category": "Ad hoc 查询",
        "count": 6
      },
      {
        "team": "Technical Service",
        "category": "Ad hoc 查询",
        "count": 4
      },
      {
        "team": "Scalable SQL & Data Service",
        "category": "Ad hoc 查询",
        "count": 1
      },
      {
        "team": "Scalable SQL & Data Service",
        "category": "诊断启动",
        "count": 1
      },
      {
        "team": "Observability & Diagnostics Service",
        "category": "产出物迭代",
        "count": 1
      },
      {
        "team": "Efficiency & Quality",
        "category": "背景补充",
        "count": 1
      }
    ],
    "user_behavior_quadrant": [
      {
        "user_email": "lingtao.li@pingcap.com",
        "x": 1,
        "y": 0.0,
        "cost": 0.5607,
        "mode": "低频低轮次"
      },
      {
        "user_email": "mizuki.masuda@pingcap.com",
        "x": 1,
        "y": 2.0,
        "cost": 1.7593,
        "mode": "低频低轮次"
      },
      {
        "user_email": "oliver.sheng@pingcap.com",
        "x": 1,
        "y": 2.0,
        "cost": 0.6144,
        "mode": "低频低轮次"
      },
      {
        "user_email": "shaoxiqian@pingcap.com",
        "x": 1,
        "y": 1.0,
        "cost": 0.0706,
        "mode": "低频低轮次"
      },
      {
        "user_email": "yuhao.zhang@pingcap.com",
        "x": 1,
        "y": 3.0,
        "cost": 2.4347,
        "mode": "低频低轮次"
      }
    ]
  },
  "workspace_changes_ref": "workspace_changes.json"
}
