{
  "date": "2026-08-16",
  "timezone": "Asia/Shanghai",
  "window_start": "2026-08-16T00:00:00+08:00",
  "window_end": "2026-08-17T00: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": 8.578,
    "total_acp_interactions": 13,
    "active_users": 3,
    "workspace_count": 9,
    "created_workspace_count": 7,
    "new_workspace_count": 7,
    "updated_existing_workspace_count": 3,
    "changed_workspace_count": 10,
    "message_count": 34,
    "user_message_count": 13,
    "assistant_message_count": 21,
    "unknown_user_count": 0,
    "unknown_cost": 0.0
  },
  "teams": [
    {
      "team_path": "Engineering Group / Service Orchestration Engineering / Data Integration",
      "team": "Data Integration",
      "cost": 4.7731,
      "acp_interactions": 8,
      "workspace_count": 7,
      "active_users": 1,
      "message_count": 24,
      "user_message_count": 8,
      "cost_per_ws": 0.6819,
      "cost_per_acp": 0.5966,
      "acp_per_ws": 1.1429,
      "message_per_ws": 3.4286,
      "message_per_acp": 3.0,
      "correction_message_ratio": null
    },
    {
      "team_path": "Engineering Group / Service Orchestration Engineering / Global Control",
      "team": "Global Control",
      "cost": 3.0832,
      "acp_interactions": 4,
      "workspace_count": 1,
      "active_users": 1,
      "message_count": 16,
      "user_message_count": 8,
      "cost_per_ws": 3.0832,
      "cost_per_acp": 0.7708,
      "acp_per_ws": 4.0,
      "message_per_ws": 16.0,
      "message_per_acp": 4.0,
      "correction_message_ratio": null
    },
    {
      "team_path": "Engineering Group / Global Support Intelligence / Intelligent Support",
      "team": "Intelligent Support",
      "cost": 0.7217,
      "acp_interactions": 1,
      "workspace_count": 1,
      "active_users": 1,
      "message_count": 2,
      "user_message_count": 1,
      "cost_per_ws": 0.7217,
      "cost_per_acp": 0.7217,
      "acp_per_ws": 1.0,
      "message_per_ws": 2.0,
      "message_per_acp": 2.0,
      "correction_message_ratio": null
    }
  ],
  "users": [
    {
      "user_email": "jiangjianyuan@pingcap.com",
      "name": "蒋建元",
      "en_name": "",
      "team_path": "Engineering Group / Service Orchestration Engineering / Data Integration",
      "team": "Data Integration",
      "mapping_source": "investibook-usage-team-overrides.csv",
      "cost": 4.7731,
      "acp_interactions": 8,
      "workspace_count": 7,
      "message_count": 24,
      "user_message_count": 8,
      "channel_breakdown": {
        "lark": 8
      },
      "frequency_bucket": "高频",
      "depth_bucket": "低轮次",
      "behavior_mode": "高频低轮次",
      "avg_acp_per_ws": 1.1429
    },
    {
      "user_email": "fangdong.jia@pingcap.com",
      "name": "贾仿栋",
      "en_name": "Fangdong Jia",
      "team_path": "Engineering Group / Service Orchestration Engineering / Global Control",
      "team": "Global Control",
      "mapping_source": "pingcap_members_by_team.csv",
      "cost": 3.0832,
      "acp_interactions": 4,
      "workspace_count": 1,
      "message_count": 8,
      "user_message_count": 4,
      "channel_breakdown": {
        "web": 4
      },
      "frequency_bucket": "低频",
      "depth_bucket": "高轮次",
      "behavior_mode": "低频高轮次",
      "avg_acp_per_ws": 4.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.7217,
      "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
    }
  ],
  "message_categories": [
    {
      "category": "Ad hoc 查询",
      "user_message_count": 7,
      "share": 0.538462,
      "estimated_cost_by_turn": 4.6189,
      "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": 6,
      "share": 0.461538,
      "estimated_cost_by_turn": 3.9591,
      "estimated_cost_by_output_weight": null,
      "avg_user_chars": 41.0,
      "avg_next_assistant_chars": null,
      "classification_method": "rule_based_keywords_v2"
    }
  ],
  "unmatched_users": [],
  "top_changed_workspaces": [
    {
      "workspace_id": "ws-1780366521923-9530bc4bb",
      "title": "未命名工作空间",
      "workspace_lifecycle": "updated_existing",
      "user_email": "fangdong.jia@pingcap.com",
      "team_path": "Engineering Group / Service Orchestration Engineering / Global Control",
      "scenario_group": "diagnosis",
      "scenario_category": "storage_or_io_bottleneck",
      "cost": 3.0477,
      "message_count": 8,
      "user_message_count": 4
    },
    {
      "workspace_id": "lark-ws-5b2f701f-41cc-4a76-814f-c2c2a07e0611",
      "title": "Lark O11Y-2639104",
      "workspace_lifecycle": "new",
      "user_email": "jiangjianyuan@pingcap.com",
      "team_path": "Engineering Group / Service Orchestration Engineering / Data Integration",
      "scenario_group": "non_diagnosis",
      "scenario_category": "support_case_triage_or_customer_response",
      "cost": 1.3341,
      "message_count": 6,
      "user_message_count": 2
    },
    {
      "workspace_id": "ws-1786814775867-3c75faec5",
      "title": "APID-29356",
      "workspace_lifecycle": "new",
      "user_email": "wai.ho@pingcap.com",
      "team_path": "Engineering Group / Global Support Intelligence / Intelligent Support",
      "scenario_group": "unknown",
      "scenario_category": null,
      "cost": 0.7217,
      "message_count": 2,
      "user_message_count": 1
    },
    {
      "workspace_id": "lark-ws-668ea23b-f874-44bd-a7f7-92aa5ee98d89",
      "title": "Lark O11Y-2639077",
      "workspace_lifecycle": "new",
      "user_email": "jiangjianyuan@pingcap.com",
      "team_path": "Engineering Group / Service Orchestration Engineering / Data Integration",
      "scenario_group": "non_diagnosis",
      "scenario_category": "support_case_triage_or_customer_response",
      "cost": 0.7051,
      "message_count": 3,
      "user_message_count": 1
    },
    {
      "workspace_id": "lark-ws-0dbcfdc2-f4b7-48d3-8729-2881f91db076",
      "title": "Lark O11Y-2639084",
      "workspace_lifecycle": "new",
      "user_email": "jiangjianyuan@pingcap.com",
      "team_path": "Engineering Group / Service Orchestration Engineering / Data Integration",
      "scenario_group": "non_diagnosis",
      "scenario_category": "support_case_triage_or_customer_response",
      "cost": 0.6965,
      "message_count": 3,
      "user_message_count": 1
    },
    {
      "workspace_id": "lark-ws-f6191b1b-af4e-48ce-8d03-45df966a36f6",
      "title": "Lark O11Y-2639074",
      "workspace_lifecycle": "new",
      "user_email": "jiangjianyuan@pingcap.com",
      "team_path": "Engineering Group / Service Orchestration Engineering / Data Integration",
      "scenario_group": "non_diagnosis",
      "scenario_category": "support_case_triage_or_customer_response",
      "cost": 0.6698,
      "message_count": 3,
      "user_message_count": 1
    },
    {
      "workspace_id": "lark-ws-48fe67df-fdaa-4451-a82c-02a7b37bdeec",
      "title": "Lark O11Y-2639049",
      "workspace_lifecycle": "new",
      "user_email": "jiangjianyuan@pingcap.com",
      "team_path": "Engineering Group / Service Orchestration Engineering / Data Integration",
      "scenario_group": "non_diagnosis",
      "scenario_category": "support_case_triage_or_customer_response",
      "cost": 0.4781,
      "message_count": 3,
      "user_message_count": 1
    },
    {
      "workspace_id": "lark-ws-e23f4c0f-5c26-4947-ae13-f5eb4825cdc6",
      "title": "Lark O11Y-2638724",
      "workspace_lifecycle": "new",
      "user_email": "jiangjianyuan@pingcap.com",
      "team_path": "Engineering Group / Service Orchestration Engineering / Data Integration",
      "scenario_group": "non_diagnosis",
      "scenario_category": "support_case_triage_or_customer_response",
      "cost": 0.4467,
      "message_count": 3,
      "user_message_count": 1
    },
    {
      "workspace_id": "lark-ws-259dd892-5d40-4760-9f0d-76d8ef5a2e25",
      "title": "Lark O11Y-2638451",
      "workspace_lifecycle": "updated_existing",
      "user_email": "jiangjianyuan@pingcap.com",
      "team_path": "Engineering Group / Service Orchestration Engineering / Data Integration",
      "scenario_group": "non_diagnosis",
      "scenario_category": "support_case_triage_or_customer_response",
      "cost": 0.4427,
      "message_count": 3,
      "user_message_count": 1
    },
    {
      "workspace_id": "ws-1780366521923-9530bc4bb",
      "title": "未命名工作空间",
      "workspace_lifecycle": "updated_existing",
      "user_email": "fangdong.jia@pingcap.com",
      "team_path": "Engineering Group / Service Orchestration Engineering / Global Control",
      "scenario_group": "diagnosis",
      "scenario_category": "storage_or_io_bottleneck",
      "cost": 0.0355,
      "message_count": 8,
      "user_message_count": 4
    }
  ],
  "charts": {
    "daily_cost_acp": [
      {
        "date": "2026-08-16",
        "cost": 8.578,
        "acp_interactions": 13,
        "workspace_count": 9,
        "active_users": 3
      }
    ],
    "team_cost_bar": [
      {
        "team": "Data Integration",
        "team_path": "Engineering Group / Service Orchestration Engineering / Data Integration",
        "cost": 4.7731,
        "acp_interactions": 8,
        "workspace_count": 7,
        "active_users": 1
      },
      {
        "team": "Global Control",
        "team_path": "Engineering Group / Service Orchestration Engineering / Global Control",
        "cost": 3.0832,
        "acp_interactions": 4,
        "workspace_count": 1,
        "active_users": 1
      },
      {
        "team": "Intelligent Support",
        "team_path": "Engineering Group / Global Support Intelligence / Intelligent Support",
        "cost": 0.7217,
        "acp_interactions": 1,
        "workspace_count": 1,
        "active_users": 1
      }
    ],
    "team_ratio_scatter": [
      {
        "team": "Data Integration",
        "team_path": "Engineering Group / Service Orchestration Engineering / Data Integration",
        "x": 1.1429,
        "y": 0.5966,
        "size": 7,
        "cost": 4.7731
      },
      {
        "team": "Global Control",
        "team_path": "Engineering Group / Service Orchestration Engineering / Global Control",
        "x": 4.0,
        "y": 0.7708,
        "size": 1,
        "cost": 3.0832
      },
      {
        "team": "Intelligent Support",
        "team_path": "Engineering Group / Global Support Intelligence / Intelligent Support",
        "x": 1.0,
        "y": 0.7217,
        "size": 1,
        "cost": 0.7217
      }
    ],
    "message_category_stack": [
      {
        "team": "Data Integration",
        "category": "Ad hoc 查询",
        "count": 5
      },
      {
        "team": "Data Integration",
        "category": "诊断启动",
        "count": 3
      },
      {
        "team": "Global Control",
        "category": "Ad hoc 查询",
        "count": 4
      },
      {
        "team": "Global Control",
        "category": "诊断启动",
        "count": 4
      },
      {
        "team": "Intelligent Support",
        "category": "诊断启动",
        "count": 1
      }
    ],
    "user_behavior_quadrant": [
      {
        "user_email": "fangdong.jia@pingcap.com",
        "x": 1,
        "y": 4.0,
        "cost": 3.0832,
        "mode": "低频高轮次"
      },
      {
        "user_email": "jiangjianyuan@pingcap.com",
        "x": 7,
        "y": 1.1429,
        "cost": 4.7731,
        "mode": "高频低轮次"
      },
      {
        "user_email": "wai.ho@pingcap.com",
        "x": 1,
        "y": 1.0,
        "cost": 0.7217,
        "mode": "低频低轮次"
      }
    ]
  },
  "workspace_changes_ref": "workspace_changes.json"
}
