{
  "date": "2026-07-04",
  "timezone": "Asia/Shanghai",
  "window_start": "2026-07-04T00:00:00+08:00",
  "window_end": "2026-07-05T00: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": 6.038,
    "total_acp_interactions": 4,
    "active_users": 5,
    "workspace_count": 5,
    "created_workspace_count": 2,
    "new_workspace_count": 4,
    "updated_existing_workspace_count": 4,
    "changed_workspace_count": 8,
    "message_count": 17,
    "user_message_count": 8,
    "assistant_message_count": 9,
    "unknown_user_count": 0,
    "unknown_cost": 0.0
  },
  "teams": [
    {
      "team_path": "Engineering Group / Database Service Engineering / Efficiency & Quality",
      "team": "Efficiency & Quality",
      "cost": 2.2659,
      "acp_interactions": 1,
      "workspace_count": 1,
      "active_users": 1,
      "message_count": 6,
      "user_message_count": 2,
      "cost_per_ws": 2.2659,
      "cost_per_acp": 2.2659,
      "acp_per_ws": 1.0,
      "message_per_ws": 6.0,
      "message_per_acp": 6.0,
      "correction_message_ratio": null
    },
    {
      "team_path": "Engineering Group / Database Service Engineering / TiDB Scalability Service",
      "team": "TiDB Scalability Service",
      "cost": 1.9688,
      "acp_interactions": 0,
      "workspace_count": 1,
      "active_users": 1,
      "message_count": 20,
      "user_message_count": 10,
      "cost_per_ws": 1.9688,
      "cost_per_acp": null,
      "acp_per_ws": 0.0,
      "message_per_ws": 20.0,
      "message_per_acp": null,
      "correction_message_ratio": null
    },
    {
      "team_path": "APAC Business Group / Customer Success & Alliances / Professional Services",
      "team": "Professional Services",
      "cost": 1.3192,
      "acp_interactions": 1,
      "workspace_count": 1,
      "active_users": 1,
      "message_count": 4,
      "user_message_count": 2,
      "cost_per_ws": 1.3192,
      "cost_per_acp": 1.3192,
      "acp_per_ws": 1.0,
      "message_per_ws": 4.0,
      "message_per_acp": 4.0,
      "correction_message_ratio": null
    },
    {
      "team_path": "Engineering Group / Database Service Engineering / Observability & Diagnostics Service",
      "team": "Observability & Diagnostics Service",
      "cost": 0.3615,
      "acp_interactions": 1,
      "workspace_count": 1,
      "active_users": 1,
      "message_count": 2,
      "user_message_count": 1,
      "cost_per_ws": 0.3615,
      "cost_per_acp": 0.3615,
      "acp_per_ws": 1.0,
      "message_per_ws": 2.0,
      "message_per_acp": 2.0,
      "correction_message_ratio": null
    },
    {
      "team_path": "Engineering Group / Global Support Intelligence / Intelligent Support",
      "team": "Intelligent Support",
      "cost": 0.1226,
      "acp_interactions": 1,
      "workspace_count": 1,
      "active_users": 1,
      "message_count": 0,
      "user_message_count": 0,
      "cost_per_ws": 0.1226,
      "cost_per_acp": 0.1226,
      "acp_per_ws": 1.0,
      "message_per_ws": 0.0,
      "message_per_acp": 0.0,
      "correction_message_ratio": null
    }
  ],
  "users": [
    {
      "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": 2.2659,
      "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
    },
    {
      "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": 1.9688,
      "acp_interactions": 0,
      "workspace_count": 1,
      "message_count": 10,
      "user_message_count": 5,
      "channel_breakdown": {},
      "frequency_bucket": "低频",
      "depth_bucket": "低轮次",
      "behavior_mode": "低频低轮次",
      "avg_acp_per_ws": 0.0
    },
    {
      "user_email": "zhi.xie@pingcap.com",
      "name": "谢智",
      "en_name": "Zhi Xie",
      "team_path": "APAC Business Group / Customer Success & Alliances / Professional Services",
      "team": "Professional Services",
      "mapping_source": "investibook-usage-team-overrides.csv",
      "cost": 1.3192,
      "acp_interactions": 1,
      "workspace_count": 1,
      "message_count": 2,
      "user_message_count": 1,
      "channel_breakdown": {
        "web": 1
      },
      "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.3615,
      "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": "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.1226,
      "acp_interactions": 1,
      "workspace_count": 1,
      "message_count": 0,
      "user_message_count": 0,
      "channel_breakdown": {
        "web": 1
      },
      "frequency_bucket": "低频",
      "depth_bucket": "低轮次",
      "behavior_mode": "低频低轮次",
      "avg_acp_per_ws": 1.0
    }
  ],
  "message_categories": [
    {
      "category": "产出物迭代",
      "user_message_count": 3,
      "share": 0.375,
      "estimated_cost_by_turn": 2.2643,
      "estimated_cost_by_output_weight": null,
      "avg_user_chars": 358.0,
      "avg_next_assistant_chars": null,
      "classification_method": "rule_based_keywords_v2"
    },
    {
      "category": "Ad hoc 查询",
      "user_message_count": 1,
      "share": 0.125,
      "estimated_cost_by_turn": 0.7548,
      "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": 2,
      "share": 0.25,
      "estimated_cost_by_turn": 1.5095,
      "estimated_cost_by_output_weight": null,
      "avg_user_chars": 122.5,
      "avg_next_assistant_chars": null,
      "classification_method": "rule_based_keywords_v2"
    },
    {
      "category": "解释追问",
      "user_message_count": 1,
      "share": 0.125,
      "estimated_cost_by_turn": 0.7548,
      "estimated_cost_by_output_weight": null,
      "avg_user_chars": 39.0,
      "avg_next_assistant_chars": null,
      "classification_method": "rule_based_keywords_v2"
    },
    {
      "category": "流程控制/确认",
      "user_message_count": 1,
      "share": 0.125,
      "estimated_cost_by_turn": 0.7548,
      "estimated_cost_by_output_weight": null,
      "avg_user_chars": 136.0,
      "avg_next_assistant_chars": null,
      "classification_method": "rule_based_keywords_v2"
    }
  ],
  "unmatched_users": [],
  "top_changed_workspaces": [
    {
      "workspace_id": "lark-ws-e85b3d41-b141-4ee6-838c-cda849078d23",
      "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": 2.252,
      "message_count": 3,
      "user_message_count": 1
    },
    {
      "workspace_id": "ws-1783135086403-6f36315e8",
      "title": "26/07/03 WeTech rg_analyze 资源组 RC 超限",
      "workspace_lifecycle": "new",
      "user_email": "yuhao.zhang@pingcap.com",
      "team_path": "Engineering Group / Database Service Engineering / TiDB Scalability Service",
      "scenario_group": "diagnosis",
      "scenario_category": "gc_or_allocator_pressure",
      "cost": 1.8344,
      "message_count": 10,
      "user_message_count": 5
    },
    {
      "workspace_id": "ws-1782351660225-bb37d6c53",
      "title": "UE Cassandra Report 10658480506726873193",
      "workspace_lifecycle": "updated_existing",
      "user_email": "zhi.xie@pingcap.com",
      "team_path": "APAC Business Group / Customer Success & Alliances / Professional Services",
      "scenario_group": "diagnosis",
      "scenario_category": "sql_plan_or_query",
      "cost": 1.3007,
      "message_count": 2,
      "user_message_count": 1
    },
    {
      "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.3615,
      "message_count": 2,
      "user_message_count": 1
    },
    {
      "workspace_id": "ws-1783135086403-6f36315e8",
      "title": "26/07/03 WeTech rg_analyze 资源组 RC 超限",
      "workspace_lifecycle": "new",
      "user_email": "yuhao.zhang@pingcap.com",
      "team_path": "Engineering Group / Database Service Engineering / TiDB Scalability Service",
      "scenario_group": "diagnosis",
      "scenario_category": "gc_or_allocator_pressure",
      "cost": 0.1344,
      "message_count": 10,
      "user_message_count": 5
    },
    {
      "workspace_id": "ws-1782941611520-1a406ab15",
      "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.1226,
      "message_count": 0,
      "user_message_count": 0
    },
    {
      "workspace_id": "ws-1782351660225-bb37d6c53",
      "title": "UE Cassandra Report 10658480506726873193",
      "workspace_lifecycle": "updated_existing",
      "user_email": "zhi.xie@pingcap.com",
      "team_path": "APAC Business Group / Customer Success & Alliances / Professional Services",
      "scenario_group": "diagnosis",
      "scenario_category": "sql_plan_or_query",
      "cost": 0.0185,
      "message_count": 2,
      "user_message_count": 1
    },
    {
      "workspace_id": "lark-ws-e85b3d41-b141-4ee6-838c-cda849078d23",
      "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.0139,
      "message_count": 3,
      "user_message_count": 1
    }
  ],
  "charts": {
    "daily_cost_acp": [
      {
        "date": "2026-07-04",
        "cost": 6.038,
        "acp_interactions": 4,
        "workspace_count": 5,
        "active_users": 5
      }
    ],
    "team_cost_bar": [
      {
        "team": "Efficiency & Quality",
        "team_path": "Engineering Group / Database Service Engineering / Efficiency & Quality",
        "cost": 2.2659,
        "acp_interactions": 1,
        "workspace_count": 1,
        "active_users": 1
      },
      {
        "team": "TiDB Scalability Service",
        "team_path": "Engineering Group / Database Service Engineering / TiDB Scalability Service",
        "cost": 1.9688,
        "acp_interactions": 0,
        "workspace_count": 1,
        "active_users": 1
      },
      {
        "team": "Professional Services",
        "team_path": "APAC Business Group / Customer Success & Alliances / Professional Services",
        "cost": 1.3192,
        "acp_interactions": 1,
        "workspace_count": 1,
        "active_users": 1
      },
      {
        "team": "Observability & Diagnostics Service",
        "team_path": "Engineering Group / Database Service Engineering / Observability & Diagnostics Service",
        "cost": 0.3615,
        "acp_interactions": 1,
        "workspace_count": 1,
        "active_users": 1
      },
      {
        "team": "Intelligent Support",
        "team_path": "Engineering Group / Global Support Intelligence / Intelligent Support",
        "cost": 0.1226,
        "acp_interactions": 1,
        "workspace_count": 1,
        "active_users": 1
      }
    ],
    "team_ratio_scatter": [
      {
        "team": "Efficiency & Quality",
        "team_path": "Engineering Group / Database Service Engineering / Efficiency & Quality",
        "x": 1.0,
        "y": 2.2659,
        "size": 1,
        "cost": 2.2659
      },
      {
        "team": "TiDB Scalability Service",
        "team_path": "Engineering Group / Database Service Engineering / TiDB Scalability Service",
        "x": 0.0,
        "y": null,
        "size": 1,
        "cost": 1.9688
      },
      {
        "team": "Professional Services",
        "team_path": "APAC Business Group / Customer Success & Alliances / Professional Services",
        "x": 1.0,
        "y": 1.3192,
        "size": 1,
        "cost": 1.3192
      },
      {
        "team": "Observability & Diagnostics Service",
        "team_path": "Engineering Group / Database Service Engineering / Observability & Diagnostics Service",
        "x": 1.0,
        "y": 0.3615,
        "size": 1,
        "cost": 0.3615
      },
      {
        "team": "Intelligent Support",
        "team_path": "Engineering Group / Global Support Intelligence / Intelligent Support",
        "x": 1.0,
        "y": 0.1226,
        "size": 1,
        "cost": 0.1226
      }
    ],
    "message_category_stack": [
      {
        "team": "Efficiency & Quality",
        "category": "Ad hoc 查询",
        "count": 2
      },
      {
        "team": "TiDB Scalability Service",
        "category": "产出物迭代",
        "count": 4
      },
      {
        "team": "TiDB Scalability Service",
        "category": "流程控制/确认",
        "count": 2
      },
      {
        "team": "TiDB Scalability Service",
        "category": "解释追问",
        "count": 2
      },
      {
        "team": "TiDB Scalability Service",
        "category": "诊断启动",
        "count": 2
      },
      {
        "team": "Professional Services",
        "category": "诊断启动",
        "count": 2
      },
      {
        "team": "Observability & Diagnostics Service",
        "category": "产出物迭代",
        "count": 1
      }
    ],
    "user_behavior_quadrant": [
      {
        "user_email": "lingtao.li@pingcap.com",
        "x": 1,
        "y": 1.0,
        "cost": 0.3615,
        "mode": "低频低轮次"
      },
      {
        "user_email": "shaoxiqian@pingcap.com",
        "x": 1,
        "y": 1.0,
        "cost": 2.2659,
        "mode": "低频低轮次"
      },
      {
        "user_email": "wai.ho@pingcap.com",
        "x": 1,
        "y": 1.0,
        "cost": 0.1226,
        "mode": "低频低轮次"
      },
      {
        "user_email": "yuhao.zhang@pingcap.com",
        "x": 1,
        "y": 0.0,
        "cost": 1.9688,
        "mode": "低频低轮次"
      },
      {
        "user_email": "zhi.xie@pingcap.com",
        "x": 1,
        "y": 1.0,
        "cost": 1.3192,
        "mode": "低频低轮次"
      }
    ]
  },
  "workspace_changes_ref": "workspace_changes.json"
}
