{
  "date": "2026-07-11",
  "timezone": "Asia/Shanghai",
  "window_start": "2026-07-11T00:00:00+08:00",
  "window_end": "2026-07-12T00: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.4865,
    "total_acp_interactions": 8,
    "active_users": 5,
    "workspace_count": 7,
    "created_workspace_count": 4,
    "new_workspace_count": 6,
    "updated_existing_workspace_count": 3,
    "changed_workspace_count": 9,
    "message_count": 49,
    "user_message_count": 24,
    "assistant_message_count": 23,
    "unknown_user_count": 0,
    "unknown_cost": 0.0
  },
  "teams": [
    {
      "team_path": "Engineering Group / Database Service Engineering / Scalable SQL & Data Service",
      "team": "Scalable SQL & Data Service",
      "cost": 2.7292,
      "acp_interactions": 7,
      "workspace_count": 1,
      "active_users": 1,
      "message_count": 45,
      "user_message_count": 21,
      "cost_per_ws": 2.7292,
      "cost_per_acp": 0.3899,
      "acp_per_ws": 7.0,
      "message_per_ws": 45.0,
      "message_per_acp": 6.4286,
      "correction_message_ratio": null
    },
    {
      "team_path": "Engineering Group / Global Support Intelligence / Intelligent Support",
      "team": "Intelligent Support",
      "cost": 1.2083,
      "acp_interactions": 5,
      "workspace_count": 4,
      "active_users": 2,
      "message_count": 28,
      "user_message_count": 14,
      "cost_per_ws": 0.3021,
      "cost_per_acp": 0.2417,
      "acp_per_ws": 1.25,
      "message_per_ws": 7.0,
      "message_per_acp": 5.6,
      "correction_message_ratio": null
    },
    {
      "team_path": "Engineering Group / Database Service Engineering / Observability & Diagnostics Service",
      "team": "Observability & Diagnostics Service",
      "cost": 0.5295,
      "acp_interactions": 0,
      "workspace_count": 1,
      "active_users": 1,
      "message_count": 2,
      "user_message_count": 1,
      "cost_per_ws": 0.5295,
      "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 / Global Support Intelligence / Advanced Intelligent Support",
      "team": "Advanced Intelligent Support",
      "cost": 0.0196,
      "acp_interactions": 0,
      "workspace_count": 1,
      "active_users": 1,
      "message_count": 4,
      "user_message_count": 2,
      "cost_per_ws": 0.0196,
      "cost_per_acp": null,
      "acp_per_ws": 0.0,
      "message_per_ws": 4.0,
      "message_per_acp": null,
      "correction_message_ratio": null
    }
  ],
  "users": [
    {
      "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": 2.7292,
      "acp_interactions": 7,
      "workspace_count": 1,
      "message_count": 15,
      "user_message_count": 7,
      "channel_breakdown": {
        "web": 7
      },
      "frequency_bucket": "低频",
      "depth_bucket": "高轮次",
      "behavior_mode": "低频高轮次",
      "avg_acp_per_ws": 7.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": 1.0079,
      "acp_interactions": 5,
      "workspace_count": 3,
      "message_count": 28,
      "user_message_count": 14,
      "channel_breakdown": {
        "web": 5
      },
      "frequency_bucket": "高频",
      "depth_bucket": "低轮次",
      "behavior_mode": "高频低轮次",
      "avg_acp_per_ws": 1.6667
    },
    {
      "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.5295,
      "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": "wai.ho@pingcap.com",
      "name": "Chun Wai Ho",
      "en_name": "Wai Ho",
      "team_path": "Engineering Group / Global Support Intelligence / Intelligent Support",
      "team": "Intelligent Support",
      "mapping_source": "pingcap_members_by_team.csv",
      "cost": 0.2004,
      "acp_interactions": 0,
      "workspace_count": 1,
      "message_count": 0,
      "user_message_count": 0,
      "channel_breakdown": {},
      "frequency_bucket": "低频",
      "depth_bucket": "低轮次",
      "behavior_mode": "低频低轮次",
      "avg_acp_per_ws": 0.0
    },
    {
      "user_email": "chenqingjing@pingcap.com",
      "name": "Kenny Chan",
      "en_name": "",
      "team_path": "Engineering Group / Global Support Intelligence / Advanced Intelligent Support",
      "team": "Advanced Intelligent Support",
      "mapping_source": "investibook-usage-team-overrides.csv",
      "cost": 0.0196,
      "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
    }
  ],
  "message_categories": [
    {
      "category": "查询纠偏",
      "user_message_count": 3,
      "share": 0.125,
      "estimated_cost_by_turn": 0.5608,
      "estimated_cost_by_output_weight": null,
      "avg_user_chars": 317.0,
      "avg_next_assistant_chars": null,
      "classification_method": "rule_based_keywords_v2"
    },
    {
      "category": "产出物迭代",
      "user_message_count": 2,
      "share": 0.083333,
      "estimated_cost_by_turn": 0.3739,
      "estimated_cost_by_output_weight": null,
      "avg_user_chars": 533.5,
      "avg_next_assistant_chars": null,
      "classification_method": "rule_based_keywords_v2"
    },
    {
      "category": "Ad hoc 查询",
      "user_message_count": 10,
      "share": 0.416667,
      "estimated_cost_by_turn": 1.8694,
      "estimated_cost_by_output_weight": null,
      "avg_user_chars": 1569.9,
      "avg_next_assistant_chars": null,
      "classification_method": "rule_based_keywords_v2"
    },
    {
      "category": "诊断启动",
      "user_message_count": 1,
      "share": 0.041667,
      "estimated_cost_by_turn": 0.1869,
      "estimated_cost_by_output_weight": null,
      "avg_user_chars": 51.0,
      "avg_next_assistant_chars": null,
      "classification_method": "rule_based_keywords_v2"
    },
    {
      "category": "解释追问",
      "user_message_count": 3,
      "share": 0.125,
      "estimated_cost_by_turn": 0.5608,
      "estimated_cost_by_output_weight": null,
      "avg_user_chars": 49.67,
      "avg_next_assistant_chars": null,
      "classification_method": "rule_based_keywords_v2"
    },
    {
      "category": "流程控制/确认",
      "user_message_count": 5,
      "share": 0.208333,
      "estimated_cost_by_turn": 0.9347,
      "estimated_cost_by_output_weight": null,
      "avg_user_chars": 3177.8,
      "avg_next_assistant_chars": null,
      "classification_method": "rule_based_keywords_v2"
    }
  ],
  "unmatched_users": [],
  "top_changed_workspaces": [
    {
      "workspace_id": "ws-1783703639574-b90fc8668",
      "title": "未命名工作空间",
      "workspace_lifecycle": "new",
      "user_email": "oliver.sheng@pingcap.com",
      "team_path": "Engineering Group / Database Service Engineering / Scalable SQL & Data Service",
      "scenario_group": "diagnosis",
      "scenario_category": "sql_plan_or_query",
      "cost": 2.6386,
      "message_count": 15,
      "user_message_count": 7
    },
    {
      "workspace_id": "ws-1783740113204-3455ac111",
      "title": "[2026/07/10 18:58:38.937 +00:00] [ERROR]",
      "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": 0.5466,
      "message_count": 12,
      "user_message_count": 6
    },
    {
      "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.5295,
      "message_count": 2,
      "user_message_count": 1
    },
    {
      "workspace_id": "ws-1783763980486-f47bd45b3",
      "title": "慢查询原因",
      "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.265,
      "message_count": 8,
      "user_message_count": 4
    },
    {
      "workspace_id": "ws-1783703039429-df00c760b",
      "title": "",
      "workspace_lifecycle": "updated_existing",
      "user_email": "wai.ho@pingcap.com",
      "team_path": "Engineering Group / Global Support Intelligence / Intelligent Support",
      "scenario_group": "unknown",
      "scenario_category": null,
      "cost": 0.2004,
      "message_count": 0,
      "user_message_count": 0
    },
    {
      "workspace_id": "ws-1783759501457-b49a4cbcf",
      "title": "new_collations_enabled_on_first_bootstrap",
      "workspace_lifecycle": "new",
      "user_email": "yikai.puah@pingcap.com",
      "team_path": "Engineering Group / Global Support Intelligence / Intelligent Support",
      "scenario_group": "diagnosis",
      "scenario_category": "storage_or_io_bottleneck",
      "cost": 0.1963,
      "message_count": 8,
      "user_message_count": 4
    },
    {
      "workspace_id": "ws-1783703639574-b90fc8668",
      "title": "未命名工作空间",
      "workspace_lifecycle": "new",
      "user_email": "oliver.sheng@pingcap.com",
      "team_path": "Engineering Group / Database Service Engineering / Scalable SQL & Data Service",
      "scenario_group": "diagnosis",
      "scenario_category": "sql_plan_or_query",
      "cost": 0.0599,
      "message_count": 15,
      "user_message_count": 7
    },
    {
      "workspace_id": "ws-1783703639574-b90fc8668",
      "title": "未命名工作空间",
      "workspace_lifecycle": "new",
      "user_email": "oliver.sheng@pingcap.com",
      "team_path": "Engineering Group / Database Service Engineering / Scalable SQL & Data Service",
      "scenario_group": "diagnosis",
      "scenario_category": "sql_plan_or_query",
      "cost": 0.0306,
      "message_count": 15,
      "user_message_count": 7
    },
    {
      "workspace_id": "ws-1783664279267-477336e19",
      "title": "TCOC-5576",
      "workspace_lifecycle": "updated_existing",
      "user_email": "chenqingjing@pingcap.com",
      "team_path": "Engineering Group / Global Support Intelligence / Advanced Intelligent Support",
      "scenario_group": "diagnosis",
      "scenario_category": "cdc_or_replication_lag",
      "cost": 0.0196,
      "message_count": 4,
      "user_message_count": 2
    }
  ],
  "charts": {
    "daily_cost_acp": [
      {
        "date": "2026-07-11",
        "cost": 4.4865,
        "acp_interactions": 8,
        "workspace_count": 7,
        "active_users": 5
      }
    ],
    "team_cost_bar": [
      {
        "team": "Scalable SQL & Data Service",
        "team_path": "Engineering Group / Database Service Engineering / Scalable SQL & Data Service",
        "cost": 2.7292,
        "acp_interactions": 7,
        "workspace_count": 1,
        "active_users": 1
      },
      {
        "team": "Intelligent Support",
        "team_path": "Engineering Group / Global Support Intelligence / Intelligent Support",
        "cost": 1.2083,
        "acp_interactions": 5,
        "workspace_count": 4,
        "active_users": 2
      },
      {
        "team": "Observability & Diagnostics Service",
        "team_path": "Engineering Group / Database Service Engineering / Observability & Diagnostics Service",
        "cost": 0.5295,
        "acp_interactions": 0,
        "workspace_count": 1,
        "active_users": 1
      },
      {
        "team": "Advanced Intelligent Support",
        "team_path": "Engineering Group / Global Support Intelligence / Advanced Intelligent Support",
        "cost": 0.0196,
        "acp_interactions": 0,
        "workspace_count": 1,
        "active_users": 1
      }
    ],
    "team_ratio_scatter": [
      {
        "team": "Scalable SQL & Data Service",
        "team_path": "Engineering Group / Database Service Engineering / Scalable SQL & Data Service",
        "x": 7.0,
        "y": 0.3899,
        "size": 1,
        "cost": 2.7292
      },
      {
        "team": "Intelligent Support",
        "team_path": "Engineering Group / Global Support Intelligence / Intelligent Support",
        "x": 1.25,
        "y": 0.2417,
        "size": 4,
        "cost": 1.2083
      },
      {
        "team": "Observability & Diagnostics Service",
        "team_path": "Engineering Group / Database Service Engineering / Observability & Diagnostics Service",
        "x": 0.0,
        "y": null,
        "size": 1,
        "cost": 0.5295
      },
      {
        "team": "Advanced Intelligent Support",
        "team_path": "Engineering Group / Global Support Intelligence / Advanced Intelligent Support",
        "x": 0.0,
        "y": null,
        "size": 1,
        "cost": 0.0196
      }
    ],
    "message_category_stack": [
      {
        "team": "Scalable SQL & Data Service",
        "category": "Ad hoc 查询",
        "count": 15
      },
      {
        "team": "Scalable SQL & Data Service",
        "category": "产出物迭代",
        "count": 3
      },
      {
        "team": "Scalable SQL & Data Service",
        "category": "查询纠偏",
        "count": 3
      },
      {
        "team": "Intelligent Support",
        "category": "Ad hoc 查询",
        "count": 5
      },
      {
        "team": "Intelligent Support",
        "category": "查询纠偏",
        "count": 2
      },
      {
        "team": "Intelligent Support",
        "category": "流程控制/确认",
        "count": 3
      },
      {
        "team": "Intelligent Support",
        "category": "解释追问",
        "count": 3
      },
      {
        "team": "Intelligent Support",
        "category": "诊断启动",
        "count": 1
      },
      {
        "team": "Observability & Diagnostics Service",
        "category": "产出物迭代",
        "count": 1
      },
      {
        "team": "Advanced Intelligent Support",
        "category": "流程控制/确认",
        "count": 2
      }
    ],
    "user_behavior_quadrant": [
      {
        "user_email": "chenqingjing@pingcap.com",
        "x": 1,
        "y": 0.0,
        "cost": 0.0196,
        "mode": "低频低轮次"
      },
      {
        "user_email": "lingtao.li@pingcap.com",
        "x": 1,
        "y": 0.0,
        "cost": 0.5295,
        "mode": "低频低轮次"
      },
      {
        "user_email": "oliver.sheng@pingcap.com",
        "x": 1,
        "y": 7.0,
        "cost": 2.7292,
        "mode": "低频高轮次"
      },
      {
        "user_email": "wai.ho@pingcap.com",
        "x": 1,
        "y": 0.0,
        "cost": 0.2004,
        "mode": "低频低轮次"
      },
      {
        "user_email": "yikai.puah@pingcap.com",
        "x": 3,
        "y": 1.6667,
        "cost": 1.0079,
        "mode": "高频低轮次"
      }
    ]
  },
  "workspace_changes_ref": "workspace_changes.json"
}
