{
  "date": "2026-08-08",
  "timezone": "Asia/Shanghai",
  "window_start": "2026-08-08T00:00:00+08:00",
  "window_end": "2026-08-09T00: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": 15.8766,
    "total_acp_interactions": 14,
    "active_users": 4,
    "workspace_count": 9,
    "created_workspace_count": 7,
    "new_workspace_count": 8,
    "updated_existing_workspace_count": 2,
    "changed_workspace_count": 10,
    "message_count": 41,
    "user_message_count": 18,
    "assistant_message_count": 23,
    "unknown_user_count": 0,
    "unknown_cost": 0.0
  },
  "teams": [
    {
      "team_path": "Engineering Group / Service Orchestration Engineering / Global Control",
      "team": "Global Control",
      "cost": 9.8452,
      "acp_interactions": 10,
      "workspace_count": 4,
      "active_users": 1,
      "message_count": 25,
      "user_message_count": 11,
      "cost_per_ws": 2.4613,
      "cost_per_acp": 0.9845,
      "acp_per_ws": 2.5,
      "message_per_ws": 6.25,
      "message_per_acp": 2.5,
      "correction_message_ratio": null
    },
    {
      "team_path": "Engineering Group / Global Support Intelligence / Intelligent Support",
      "team": "Intelligent Support",
      "cost": 4.3427,
      "acp_interactions": 6,
      "workspace_count": 4,
      "active_users": 2,
      "message_count": 16,
      "user_message_count": 7,
      "cost_per_ws": 1.0857,
      "cost_per_acp": 0.7238,
      "acp_per_ws": 1.5,
      "message_per_ws": 4.0,
      "message_per_acp": 2.6667,
      "correction_message_ratio": null
    },
    {
      "team_path": "Engineering Group / Global Support Intelligence / Intelligent Support Enablement",
      "team": "Intelligent Support Enablement",
      "cost": 1.6887,
      "acp_interactions": 1,
      "workspace_count": 1,
      "active_users": 1,
      "message_count": 4,
      "user_message_count": 2,
      "cost_per_ws": 1.6887,
      "cost_per_acp": 1.6887,
      "acp_per_ws": 1.0,
      "message_per_ws": 4.0,
      "message_per_acp": 4.0,
      "correction_message_ratio": null
    }
  ],
  "users": [
    {
      "user_email": "xuyifan02@pingcap.com",
      "name": "徐一帆",
      "en_name": "Yifan Xu",
      "team_path": "Engineering Group / Service Orchestration Engineering / Global Control",
      "team": "Global Control",
      "mapping_source": "investibook-usage-team-overrides.csv",
      "cost": 9.8452,
      "acp_interactions": 10,
      "workspace_count": 4,
      "message_count": 25,
      "user_message_count": 11,
      "channel_breakdown": {
        "web": 7
      },
      "frequency_bucket": "高频",
      "depth_bucket": "低轮次",
      "behavior_mode": "高频低轮次",
      "avg_acp_per_ws": 2.5
    },
    {
      "user_email": "weizhin.lim@pingcap.com",
      "name": "Lim Wei Zhin",
      "en_name": "Lim Wei Zhin",
      "team_path": "Engineering Group / Global Support Intelligence / Intelligent Support",
      "team": "Intelligent Support",
      "mapping_source": "pingcap_members_by_team.csv",
      "cost": 4.1222,
      "acp_interactions": 3,
      "workspace_count": 3,
      "message_count": 12,
      "user_message_count": 5,
      "channel_breakdown": {
        "lark": 2,
        "web": 1
      },
      "frequency_bucket": "高频",
      "depth_bucket": "低轮次",
      "behavior_mode": "高频低轮次",
      "avg_acp_per_ws": 1.0
    },
    {
      "user_email": "charles.m@pingcap.com",
      "name": "Charles Zhu",
      "en_name": "",
      "team_path": "Engineering Group / Global Support Intelligence / Intelligent Support Enablement",
      "team": "Intelligent Support Enablement",
      "mapping_source": "investibook-usage-team-overrides.csv",
      "cost": 1.6887,
      "acp_interactions": 1,
      "workspace_count": 1,
      "message_count": 4,
      "user_message_count": 2,
      "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.2205,
      "acp_interactions": 3,
      "workspace_count": 1,
      "message_count": 0,
      "user_message_count": 0,
      "channel_breakdown": {
        "web": 3
      },
      "frequency_bucket": "低频",
      "depth_bucket": "低轮次",
      "behavior_mode": "低频低轮次",
      "avg_acp_per_ws": 3.0
    }
  ],
  "message_categories": [
    {
      "category": "产出物迭代",
      "user_message_count": 4,
      "share": 0.222222,
      "estimated_cost_by_turn": 3.5281,
      "estimated_cost_by_output_weight": null,
      "avg_user_chars": 255.25,
      "avg_next_assistant_chars": null,
      "classification_method": "rule_based_keywords_v2"
    },
    {
      "category": "Ad hoc 查询",
      "user_message_count": 9,
      "share": 0.5,
      "estimated_cost_by_turn": 7.9383,
      "estimated_cost_by_output_weight": null,
      "avg_user_chars": 1429.33,
      "avg_next_assistant_chars": null,
      "classification_method": "rule_based_keywords_v2"
    },
    {
      "category": "诊断启动",
      "user_message_count": 2,
      "share": 0.111111,
      "estimated_cost_by_turn": 1.7641,
      "estimated_cost_by_output_weight": null,
      "avg_user_chars": 102.0,
      "avg_next_assistant_chars": null,
      "classification_method": "rule_based_keywords_v2"
    },
    {
      "category": "解释追问",
      "user_message_count": 2,
      "share": 0.111111,
      "estimated_cost_by_turn": 1.7641,
      "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": 1,
      "share": 0.055556,
      "estimated_cost_by_turn": 0.882,
      "estimated_cost_by_output_weight": null,
      "avg_user_chars": 2835.0,
      "avg_next_assistant_chars": null,
      "classification_method": "rule_based_keywords_v2"
    }
  ],
  "unmatched_users": [],
  "top_changed_workspaces": [
    {
      "workspace_id": "lark-ws-85c8ce8f-e0cc-45b1-81f3-22d36e149ade",
      "title": "Lark O11Y-2633543",
      "workspace_lifecycle": "new",
      "user_email": "xuyifan02@pingcap.com",
      "team_path": "Engineering Group / Service Orchestration Engineering / Global Control",
      "scenario_group": "diagnosis",
      "scenario_category": "memory_or_oom_pressure",
      "cost": 7.9403,
      "message_count": 15,
      "user_message_count": 7
    },
    {
      "workspace_id": "ws-1786192234695-6cef7aa76",
      "title": "https://tidb.atlassian.net/browse/APID-29317",
      "workspace_lifecycle": "new",
      "user_email": "weizhin.lim@pingcap.com",
      "team_path": "Engineering Group / Global Support Intelligence / Intelligent Support",
      "scenario_group": "diagnosis",
      "scenario_category": "backup_or_restore",
      "cost": 2.3345,
      "message_count": 2,
      "user_message_count": 1
    },
    {
      "workspace_id": "ws-1786170872662-84cbb34c8",
      "title": "O11Y-2633529 TiDB downtime investigation",
      "workspace_lifecycle": "new",
      "user_email": "charles.m@pingcap.com",
      "team_path": "Engineering Group / Global Support Intelligence / Intelligent Support Enablement",
      "scenario_group": "diagnosis",
      "scenario_category": "storage_or_io_bottleneck",
      "cost": 1.6887,
      "message_count": 4,
      "user_message_count": 2
    },
    {
      "workspace_id": "ws-1786163932421-e9f620baa",
      "title": "https://tidb.atlassian.net/browse/ST-2877 tidb",
      "workspace_lifecycle": "new",
      "user_email": "weizhin.lim@pingcap.com",
      "team_path": "Engineering Group / Global Support Intelligence / Intelligent Support",
      "scenario_group": "diagnosis",
      "scenario_category": "backup_or_restore",
      "cost": 1.5757,
      "message_count": 4,
      "user_message_count": 2
    },
    {
      "workspace_id": "lark-ws-d8080775-fb12-4db6-9b81-829558710b58",
      "title": "Lark O11Y-2633349",
      "workspace_lifecycle": "new",
      "user_email": "xuyifan02@pingcap.com",
      "team_path": "Engineering Group / Service Orchestration Engineering / Global Control",
      "scenario_group": "diagnosis",
      "scenario_category": "backup_or_restore",
      "cost": 1.1419,
      "message_count": 3,
      "user_message_count": 1
    },
    {
      "workspace_id": "lark-ws-b8c85eae-4b42-4f9c-950a-279be8204896",
      "title": "Lark O11Y-2633075",
      "workspace_lifecycle": "updated_existing",
      "user_email": "xuyifan02@pingcap.com",
      "team_path": "Engineering Group / Service Orchestration Engineering / Global Control",
      "scenario_group": "diagnosis",
      "scenario_category": "sql_plan_or_query",
      "cost": 0.4817,
      "message_count": 2,
      "user_message_count": 1
    },
    {
      "workspace_id": "lark-ws-f51cf208-18d4-4234-981c-f3e592ff983c",
      "title": "Lark O11Y-2633484",
      "workspace_lifecycle": "new",
      "user_email": "xuyifan02@pingcap.com",
      "team_path": "Engineering Group / Service Orchestration Engineering / Global Control",
      "scenario_group": "diagnosis",
      "scenario_category": "backup_or_restore",
      "cost": 0.2813,
      "message_count": 5,
      "user_message_count": 2
    },
    {
      "workspace_id": "ws-1786135271866-672e87580",
      "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.2205,
      "message_count": 0,
      "user_message_count": 0
    },
    {
      "workspace_id": "lark-ws-eec0c3d6-8d0e-451c-a03e-fdefe2b0c5fb",
      "title": "Lark APID-29316",
      "workspace_lifecycle": "new",
      "user_email": "weizhin.lim@pingcap.com",
      "team_path": "Engineering Group / Global Support Intelligence / Intelligent Support",
      "scenario_group": "diagnosis",
      "scenario_category": "cdc_or_replication_lag",
      "cost": 0.2013,
      "message_count": 6,
      "user_message_count": 2
    },
    {
      "workspace_id": "ws-1786163932421-e9f620baa",
      "title": "https://tidb.atlassian.net/browse/ST-2877 tidb",
      "workspace_lifecycle": "new",
      "user_email": "weizhin.lim@pingcap.com",
      "team_path": "Engineering Group / Global Support Intelligence / Intelligent Support",
      "scenario_group": "diagnosis",
      "scenario_category": "backup_or_restore",
      "cost": 0.0108,
      "message_count": 4,
      "user_message_count": 2
    }
  ],
  "charts": {
    "daily_cost_acp": [
      {
        "date": "2026-08-08",
        "cost": 15.8766,
        "acp_interactions": 14,
        "workspace_count": 9,
        "active_users": 4
      }
    ],
    "team_cost_bar": [
      {
        "team": "Global Control",
        "team_path": "Engineering Group / Service Orchestration Engineering / Global Control",
        "cost": 9.8452,
        "acp_interactions": 10,
        "workspace_count": 4,
        "active_users": 1
      },
      {
        "team": "Intelligent Support",
        "team_path": "Engineering Group / Global Support Intelligence / Intelligent Support",
        "cost": 4.3427,
        "acp_interactions": 6,
        "workspace_count": 4,
        "active_users": 2
      },
      {
        "team": "Intelligent Support Enablement",
        "team_path": "Engineering Group / Global Support Intelligence / Intelligent Support Enablement",
        "cost": 1.6887,
        "acp_interactions": 1,
        "workspace_count": 1,
        "active_users": 1
      }
    ],
    "team_ratio_scatter": [
      {
        "team": "Global Control",
        "team_path": "Engineering Group / Service Orchestration Engineering / Global Control",
        "x": 2.5,
        "y": 0.9845,
        "size": 4,
        "cost": 9.8452
      },
      {
        "team": "Intelligent Support",
        "team_path": "Engineering Group / Global Support Intelligence / Intelligent Support",
        "x": 1.5,
        "y": 0.7238,
        "size": 4,
        "cost": 4.3427
      },
      {
        "team": "Intelligent Support Enablement",
        "team_path": "Engineering Group / Global Support Intelligence / Intelligent Support Enablement",
        "x": 1.0,
        "y": 1.6887,
        "size": 1,
        "cost": 1.6887
      }
    ],
    "message_category_stack": [
      {
        "team": "Global Control",
        "category": "Ad hoc 查询",
        "count": 6
      },
      {
        "team": "Global Control",
        "category": "产出物迭代",
        "count": 3
      },
      {
        "team": "Global Control",
        "category": "背景补充",
        "count": 1
      },
      {
        "team": "Global Control",
        "category": "解释追问",
        "count": 1
      },
      {
        "team": "Intelligent Support",
        "category": "Ad hoc 查询",
        "count": 1
      },
      {
        "team": "Intelligent Support",
        "category": "产出物迭代",
        "count": 1
      },
      {
        "team": "Intelligent Support",
        "category": "解释追问",
        "count": 1
      },
      {
        "team": "Intelligent Support",
        "category": "诊断启动",
        "count": 4
      },
      {
        "team": "Intelligent Support Enablement",
        "category": "Ad hoc 查询",
        "count": 2
      }
    ],
    "user_behavior_quadrant": [
      {
        "user_email": "charles.m@pingcap.com",
        "x": 1,
        "y": 1.0,
        "cost": 1.6887,
        "mode": "低频低轮次"
      },
      {
        "user_email": "wai.ho@pingcap.com",
        "x": 1,
        "y": 3.0,
        "cost": 0.2205,
        "mode": "低频低轮次"
      },
      {
        "user_email": "weizhin.lim@pingcap.com",
        "x": 3,
        "y": 1.0,
        "cost": 4.1222,
        "mode": "高频低轮次"
      },
      {
        "user_email": "xuyifan02@pingcap.com",
        "x": 4,
        "y": 2.5,
        "cost": 9.8452,
        "mode": "高频低轮次"
      }
    ]
  },
  "workspace_changes_ref": "workspace_changes.json"
}
