{
  "date": "2026-07-05",
  "timezone": "Asia/Shanghai",
  "window_start": "2026-07-05T00:00:00+08:00",
  "window_end": "2026-07-06T00: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": 9.1252,
    "total_acp_interactions": 21,
    "active_users": 4,
    "workspace_count": 6,
    "created_workspace_count": 3,
    "new_workspace_count": 5,
    "updated_existing_workspace_count": 4,
    "changed_workspace_count": 9,
    "message_count": 72,
    "user_message_count": 34,
    "assistant_message_count": 36,
    "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": 5.173,
      "acp_interactions": 15,
      "workspace_count": 2,
      "active_users": 1,
      "message_count": 112,
      "user_message_count": 54,
      "cost_per_ws": 2.5865,
      "cost_per_acp": 0.3449,
      "acp_per_ws": 7.5,
      "message_per_ws": 56.0,
      "message_per_acp": 7.4667,
      "correction_message_ratio": null
    },
    {
      "team_path": "Engineering Group / Global Support Intelligence / Intelligent Support",
      "team": "Intelligent Support",
      "cost": 3.4783,
      "acp_interactions": 2,
      "workspace_count": 2,
      "active_users": 1,
      "message_count": 10,
      "user_message_count": 6,
      "cost_per_ws": 1.7392,
      "cost_per_acp": 1.7392,
      "acp_per_ws": 1.0,
      "message_per_ws": 5.0,
      "message_per_acp": 5.0,
      "correction_message_ratio": null
    },
    {
      "team_path": "Engineering Group / Database Service Engineering / Observability & Diagnostics Service",
      "team": "Observability & Diagnostics Service",
      "cost": 0.3855,
      "acp_interactions": 1,
      "workspace_count": 1,
      "active_users": 1,
      "message_count": 2,
      "user_message_count": 1,
      "cost_per_ws": 0.3855,
      "cost_per_acp": 0.3855,
      "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",
      "team": "Efficiency & Quality",
      "cost": 0.0884,
      "acp_interactions": 0,
      "workspace_count": 1,
      "active_users": 1,
      "message_count": 9,
      "user_message_count": 3,
      "cost_per_ws": 0.0884,
      "cost_per_acp": null,
      "acp_per_ws": 0.0,
      "message_per_ws": 9.0,
      "message_per_acp": null,
      "correction_message_ratio": null
    }
  ],
  "users": [
    {
      "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": 5.173,
      "acp_interactions": 15,
      "workspace_count": 2,
      "message_count": 56,
      "user_message_count": 27,
      "channel_breakdown": {
        "web": 15
      },
      "frequency_bucket": "高频",
      "depth_bucket": "高轮次",
      "behavior_mode": "高频高轮次",
      "avg_acp_per_ws": 7.5
    },
    {
      "user_email": "wen.hu@pingcap.com",
      "name": "胡雯",
      "en_name": "Wen Hu",
      "team_path": "Engineering Group / Global Support Intelligence / Intelligent Support",
      "team": "Intelligent Support",
      "mapping_source": "pingcap_members_by_team.csv",
      "cost": 3.4783,
      "acp_interactions": 2,
      "workspace_count": 2,
      "message_count": 5,
      "user_message_count": 3,
      "channel_breakdown": {
        "web": 2
      },
      "frequency_bucket": "高频",
      "depth_bucket": "低轮次",
      "behavior_mode": "高频低轮次",
      "avg_acp_per_ws": 1.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.3855,
      "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": "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.0884,
      "acp_interactions": 0,
      "workspace_count": 1,
      "message_count": 9,
      "user_message_count": 3,
      "channel_breakdown": {
        "lark": 3
      },
      "frequency_bucket": "低频",
      "depth_bucket": "低轮次",
      "behavior_mode": "低频低轮次",
      "avg_acp_per_ws": 0.0
    }
  ],
  "message_categories": [
    {
      "category": "查询纠偏",
      "user_message_count": 1,
      "share": 0.029412,
      "estimated_cost_by_turn": 0.2684,
      "estimated_cost_by_output_weight": null,
      "avg_user_chars": 40.0,
      "avg_next_assistant_chars": null,
      "classification_method": "rule_based_keywords_v2"
    },
    {
      "category": "产出物迭代",
      "user_message_count": 2,
      "share": 0.058824,
      "estimated_cost_by_turn": 0.5368,
      "estimated_cost_by_output_weight": null,
      "avg_user_chars": 532.5,
      "avg_next_assistant_chars": null,
      "classification_method": "rule_based_keywords_v2"
    },
    {
      "category": "Ad hoc 查询",
      "user_message_count": 15,
      "share": 0.441176,
      "estimated_cost_by_turn": 4.0258,
      "estimated_cost_by_output_weight": null,
      "avg_user_chars": 83.6,
      "avg_next_assistant_chars": null,
      "classification_method": "rule_based_keywords_v2"
    },
    {
      "category": "诊断启动",
      "user_message_count": 7,
      "share": 0.205882,
      "estimated_cost_by_turn": 1.8787,
      "estimated_cost_by_output_weight": null,
      "avg_user_chars": 71.57,
      "avg_next_assistant_chars": null,
      "classification_method": "rule_based_keywords_v2"
    },
    {
      "category": "解释追问",
      "user_message_count": 4,
      "share": 0.117647,
      "estimated_cost_by_turn": 1.0736,
      "estimated_cost_by_output_weight": null,
      "avg_user_chars": 6.5,
      "avg_next_assistant_chars": null,
      "classification_method": "rule_based_keywords_v2"
    },
    {
      "category": "流程控制/确认",
      "user_message_count": 4,
      "share": 0.117647,
      "estimated_cost_by_turn": 1.0736,
      "estimated_cost_by_output_weight": null,
      "avg_user_chars": 5.25,
      "avg_next_assistant_chars": null,
      "classification_method": "rule_based_keywords_v2"
    },
    {
      "category": "方法论/能力咨询",
      "user_message_count": 1,
      "share": 0.029412,
      "estimated_cost_by_turn": 0.2684,
      "estimated_cost_by_output_weight": null,
      "avg_user_chars": 25.0,
      "avg_next_assistant_chars": null,
      "classification_method": "rule_based_keywords_v2"
    }
  ],
  "unmatched_users": [],
  "top_changed_workspaces": [
    {
      "workspace_id": "ws-1783255764633-d09ce67c5",
      "title": "O11Y-2608904",
      "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.8713,
      "message_count": 25,
      "user_message_count": 12
    },
    {
      "workspace_id": "ws-1782823887312-ef75226ce",
      "title": "未命名工作空间",
      "workspace_lifecycle": "updated_existing",
      "user_email": "wen.hu@pingcap.com",
      "team_path": "Engineering Group / Global Support Intelligence / Intelligent Support",
      "scenario_group": "diagnosis",
      "scenario_category": "sql_plan_or_query",
      "cost": 2.368,
      "message_count": 5,
      "user_message_count": 3
    },
    {
      "workspace_id": "ws-1783257879236-27c5bec70",
      "title": "O11Y-2608903",
      "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": "sql_plan_or_query",
      "cost": 2.2085,
      "message_count": 31,
      "user_message_count": 15
    },
    {
      "workspace_id": "ws-1782200915895-efff5dc2d",
      "title": "",
      "workspace_lifecycle": "updated_existing",
      "user_email": "wen.hu@pingcap.com",
      "team_path": "Engineering Group / Global Support Intelligence / Intelligent Support",
      "scenario_group": "unknown",
      "scenario_category": null,
      "cost": 1.0951,
      "message_count": 0,
      "user_message_count": 0
    },
    {
      "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.3855,
      "message_count": 2,
      "user_message_count": 1
    },
    {
      "workspace_id": "lark-ws-2ed96a0f-48fe-4833-97d6-d6e617fc816e",
      "title": "Lark chat",
      "workspace_lifecycle": "new",
      "user_email": "shaoxiqian@pingcap.com",
      "team_path": "Engineering Group / Database Service Engineering / Efficiency & Quality",
      "scenario_group": "diagnosis",
      "scenario_category": "transaction_or_lock_contention",
      "cost": 0.0884,
      "message_count": 9,
      "user_message_count": 3
    },
    {
      "workspace_id": "ws-1783255764633-d09ce67c5",
      "title": "O11Y-2608904",
      "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": 0.0622,
      "message_count": 25,
      "user_message_count": 12
    },
    {
      "workspace_id": "ws-1783257879236-27c5bec70",
      "title": "O11Y-2608903",
      "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": "sql_plan_or_query",
      "cost": 0.0311,
      "message_count": 31,
      "user_message_count": 15
    },
    {
      "workspace_id": "ws-1782823887312-ef75226ce",
      "title": "未命名工作空间",
      "workspace_lifecycle": "updated_existing",
      "user_email": "wen.hu@pingcap.com",
      "team_path": "Engineering Group / Global Support Intelligence / Intelligent Support",
      "scenario_group": "diagnosis",
      "scenario_category": "sql_plan_or_query",
      "cost": 0.0153,
      "message_count": 5,
      "user_message_count": 3
    }
  ],
  "charts": {
    "daily_cost_acp": [
      {
        "date": "2026-07-05",
        "cost": 9.1252,
        "acp_interactions": 21,
        "workspace_count": 6,
        "active_users": 4
      }
    ],
    "team_cost_bar": [
      {
        "team": "Scalable SQL & Data Service",
        "team_path": "Engineering Group / Database Service Engineering / Scalable SQL & Data Service",
        "cost": 5.173,
        "acp_interactions": 15,
        "workspace_count": 2,
        "active_users": 1
      },
      {
        "team": "Intelligent Support",
        "team_path": "Engineering Group / Global Support Intelligence / Intelligent Support",
        "cost": 3.4783,
        "acp_interactions": 2,
        "workspace_count": 2,
        "active_users": 1
      },
      {
        "team": "Observability & Diagnostics Service",
        "team_path": "Engineering Group / Database Service Engineering / Observability & Diagnostics Service",
        "cost": 0.3855,
        "acp_interactions": 1,
        "workspace_count": 1,
        "active_users": 1
      },
      {
        "team": "Efficiency & Quality",
        "team_path": "Engineering Group / Database Service Engineering / Efficiency & Quality",
        "cost": 0.0884,
        "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.5,
        "y": 0.3449,
        "size": 2,
        "cost": 5.173
      },
      {
        "team": "Intelligent Support",
        "team_path": "Engineering Group / Global Support Intelligence / Intelligent Support",
        "x": 1.0,
        "y": 1.7392,
        "size": 2,
        "cost": 3.4783
      },
      {
        "team": "Observability & Diagnostics Service",
        "team_path": "Engineering Group / Database Service Engineering / Observability & Diagnostics Service",
        "x": 1.0,
        "y": 0.3855,
        "size": 1,
        "cost": 0.3855
      },
      {
        "team": "Efficiency & Quality",
        "team_path": "Engineering Group / Database Service Engineering / Efficiency & Quality",
        "x": 0.0,
        "y": null,
        "size": 1,
        "cost": 0.0884
      }
    ],
    "message_category_stack": [
      {
        "team": "Scalable SQL & Data Service",
        "category": "Ad hoc 查询",
        "count": 22
      },
      {
        "team": "Scalable SQL & Data Service",
        "category": "产出物迭代",
        "count": 2
      },
      {
        "team": "Scalable SQL & Data Service",
        "category": "查询纠偏",
        "count": 2
      },
      {
        "team": "Scalable SQL & Data Service",
        "category": "流程控制/确认",
        "count": 8
      },
      {
        "team": "Scalable SQL & Data Service",
        "category": "解释追问",
        "count": 8
      },
      {
        "team": "Scalable SQL & Data Service",
        "category": "诊断启动",
        "count": 12
      },
      {
        "team": "Intelligent Support",
        "category": "Ad hoc 查询",
        "count": 4
      },
      {
        "team": "Intelligent Support",
        "category": "诊断启动",
        "count": 2
      },
      {
        "team": "Observability & Diagnostics Service",
        "category": "产出物迭代",
        "count": 1
      },
      {
        "team": "Efficiency & Quality",
        "category": "Ad hoc 查询",
        "count": 2
      },
      {
        "team": "Efficiency & Quality",
        "category": "方法论/能力咨询",
        "count": 1
      }
    ],
    "user_behavior_quadrant": [
      {
        "user_email": "lingtao.li@pingcap.com",
        "x": 1,
        "y": 1.0,
        "cost": 0.3855,
        "mode": "低频低轮次"
      },
      {
        "user_email": "ruihao.chen@pingcap.com",
        "x": 2,
        "y": 7.5,
        "cost": 5.173,
        "mode": "高频高轮次"
      },
      {
        "user_email": "shaoxiqian@pingcap.com",
        "x": 1,
        "y": 0.0,
        "cost": 0.0884,
        "mode": "低频低轮次"
      },
      {
        "user_email": "wen.hu@pingcap.com",
        "x": 2,
        "y": 1.0,
        "cost": 3.4783,
        "mode": "高频低轮次"
      }
    ]
  },
  "workspace_changes_ref": "workspace_changes.json"
}
