{
  "date": "2026-08-02",
  "timezone": "Asia/Shanghai",
  "window_start": "2026-08-02T00:00:00+08:00",
  "window_end": "2026-08-03T00: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": 3.3296,
    "total_acp_interactions": 10,
    "active_users": 4,
    "workspace_count": 4,
    "created_workspace_count": 3,
    "new_workspace_count": 4,
    "updated_existing_workspace_count": 1,
    "changed_workspace_count": 5,
    "message_count": 34,
    "user_message_count": 16,
    "assistant_message_count": 18,
    "unknown_user_count": 0,
    "unknown_cost": 0.0
  },
  "teams": [
    {
      "team_path": "Engineering Group / Global Support Intelligence / Intelligent Support Enablement",
      "team": "Intelligent Support Enablement",
      "cost": 1.2133,
      "acp_interactions": 0,
      "workspace_count": 1,
      "active_users": 1,
      "message_count": 4,
      "user_message_count": 2,
      "cost_per_ws": 1.2133,
      "cost_per_acp": null,
      "acp_per_ws": 0.0,
      "message_per_ws": 4.0,
      "message_per_acp": null,
      "correction_message_ratio": null
    },
    {
      "team_path": "Engineering Group / Global Support Intelligence / Intelligent Support",
      "team": "Intelligent Support",
      "cost": 1.1343,
      "acp_interactions": 11,
      "workspace_count": 1,
      "active_users": 1,
      "message_count": 46,
      "user_message_count": 22,
      "cost_per_ws": 1.1343,
      "cost_per_acp": 0.1031,
      "acp_per_ws": 11.0,
      "message_per_ws": 46.0,
      "message_per_acp": 4.1818,
      "correction_message_ratio": null
    },
    {
      "team_path": "Product / TiDB X Core Product",
      "team": "TiDB X Core Product",
      "cost": 0.808,
      "acp_interactions": 0,
      "workspace_count": 1,
      "active_users": 1,
      "message_count": 4,
      "user_message_count": 2,
      "cost_per_ws": 0.808,
      "cost_per_acp": null,
      "acp_per_ws": 0.0,
      "message_per_ws": 4.0,
      "message_per_acp": null,
      "correction_message_ratio": null
    },
    {
      "team_path": "Engineering Group / Service Orchestration Engineering / Data Integration",
      "team": "Data Integration",
      "cost": 0.1741,
      "acp_interactions": 1,
      "workspace_count": 1,
      "active_users": 1,
      "message_count": 3,
      "user_message_count": 1,
      "cost_per_ws": 0.1741,
      "cost_per_acp": 0.1741,
      "acp_per_ws": 1.0,
      "message_per_ws": 3.0,
      "message_per_acp": 3.0,
      "correction_message_ratio": null
    }
  ],
  "users": [
    {
      "user_email": "sihao.yu@pingcap.com",
      "name": "俞锶浩",
      "en_name": "Shiori Yu",
      "team_path": "Engineering Group / Global Support Intelligence / Intelligent Support Enablement",
      "team": "Intelligent Support Enablement",
      "mapping_source": "investibook-usage-team-overrides.csv",
      "cost": 1.2133,
      "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
    },
    {
      "user_email": "looperth.wong@pingcap.com",
      "name": "Wong Loo Perth",
      "en_name": "",
      "team_path": "Engineering Group / Global Support Intelligence / Intelligent Support",
      "team": "Intelligent Support",
      "mapping_source": "investibook-usage-team-overrides.csv",
      "cost": 1.1343,
      "acp_interactions": 11,
      "workspace_count": 1,
      "message_count": 23,
      "user_message_count": 11,
      "channel_breakdown": {
        "lark": 1,
        "web": 10
      },
      "frequency_bucket": "低频",
      "depth_bucket": "高轮次",
      "behavior_mode": "低频高轮次",
      "avg_acp_per_ws": 11.0
    },
    {
      "user_email": "qi.qi@pingcap.com",
      "name": "祁琦",
      "en_name": "Qiqi",
      "team_path": "Product / TiDB X Core Product",
      "team": "TiDB X Core Product",
      "mapping_source": "investibook-usage-team-overrides.csv",
      "cost": 0.808,
      "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
    },
    {
      "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": 0.1741,
      "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
    }
  ],
  "message_categories": [
    {
      "category": "产出物迭代",
      "user_message_count": 3,
      "share": 0.1875,
      "estimated_cost_by_turn": 0.6243,
      "estimated_cost_by_output_weight": null,
      "avg_user_chars": 112.33,
      "avg_next_assistant_chars": null,
      "classification_method": "rule_based_keywords_v2"
    },
    {
      "category": "Ad hoc 查询",
      "user_message_count": 6,
      "share": 0.375,
      "estimated_cost_by_turn": 1.2486,
      "estimated_cost_by_output_weight": null,
      "avg_user_chars": 134.17,
      "avg_next_assistant_chars": null,
      "classification_method": "rule_based_keywords_v2"
    },
    {
      "category": "解释追问",
      "user_message_count": 4,
      "share": 0.25,
      "estimated_cost_by_turn": 0.8324,
      "estimated_cost_by_output_weight": null,
      "avg_user_chars": 116.25,
      "avg_next_assistant_chars": null,
      "classification_method": "rule_based_keywords_v2"
    },
    {
      "category": "流程控制/确认",
      "user_message_count": 3,
      "share": 0.1875,
      "estimated_cost_by_turn": 0.6243,
      "estimated_cost_by_output_weight": null,
      "avg_user_chars": 90.67,
      "avg_next_assistant_chars": null,
      "classification_method": "rule_based_keywords_v2"
    }
  ],
  "unmatched_users": [],
  "top_changed_workspaces": [
    {
      "workspace_id": "ws-1785648147897-dc7d473cd",
      "title": "O11Y-2628892 investigation",
      "workspace_lifecycle": "new",
      "user_email": "sihao.yu@pingcap.com",
      "team_path": "Engineering Group / Global Support Intelligence / Intelligent Support Enablement",
      "scenario_group": "diagnosis",
      "scenario_category": "storage_or_io_bottleneck",
      "cost": 1.2133,
      "message_count": 4,
      "user_message_count": 2
    },
    {
      "workspace_id": "lark-ws-e9d92fb0-663b-458c-8cbe-0802db7cfabf",
      "title": "Lark chat",
      "workspace_lifecycle": "new",
      "user_email": "looperth.wong@pingcap.com",
      "team_path": "Engineering Group / Global Support Intelligence / Intelligent Support",
      "scenario_group": "diagnosis",
      "scenario_category": "sql_plan_or_query",
      "cost": 1.1046,
      "message_count": 23,
      "user_message_count": 11
    },
    {
      "workspace_id": "ws-1781134148752-f131d7c90",
      "title": "未命名工作空间",
      "workspace_lifecycle": "updated_existing",
      "user_email": "qi.qi@pingcap.com",
      "team_path": "Product / TiDB X Core Product",
      "scenario_group": "non_diagnosis",
      "scenario_category": "fleet_inventory_or_capacity_analysis",
      "cost": 0.808,
      "message_count": 4,
      "user_message_count": 2
    },
    {
      "workspace_id": "lark-ws-a1b07f1b-9c78-48a1-aece-6c9954337aac",
      "title": "Lark chat",
      "workspace_lifecycle": "new",
      "user_email": "jiangjianyuan@pingcap.com",
      "team_path": "Engineering Group / Service Orchestration Engineering / Data Integration",
      "scenario_group": "unknown",
      "scenario_category": null,
      "cost": 0.1741,
      "message_count": 3,
      "user_message_count": 1
    },
    {
      "workspace_id": "lark-ws-e9d92fb0-663b-458c-8cbe-0802db7cfabf",
      "title": "Lark chat",
      "workspace_lifecycle": "new",
      "user_email": "looperth.wong@pingcap.com",
      "team_path": "Engineering Group / Global Support Intelligence / Intelligent Support",
      "scenario_group": "diagnosis",
      "scenario_category": "sql_plan_or_query",
      "cost": 0.0296,
      "message_count": 23,
      "user_message_count": 11
    }
  ],
  "charts": {
    "daily_cost_acp": [
      {
        "date": "2026-08-02",
        "cost": 3.3296,
        "acp_interactions": 10,
        "workspace_count": 4,
        "active_users": 4
      }
    ],
    "team_cost_bar": [
      {
        "team": "Intelligent Support Enablement",
        "team_path": "Engineering Group / Global Support Intelligence / Intelligent Support Enablement",
        "cost": 1.2133,
        "acp_interactions": 0,
        "workspace_count": 1,
        "active_users": 1
      },
      {
        "team": "Intelligent Support",
        "team_path": "Engineering Group / Global Support Intelligence / Intelligent Support",
        "cost": 1.1343,
        "acp_interactions": 11,
        "workspace_count": 1,
        "active_users": 1
      },
      {
        "team": "TiDB X Core Product",
        "team_path": "Product / TiDB X Core Product",
        "cost": 0.808,
        "acp_interactions": 0,
        "workspace_count": 1,
        "active_users": 1
      },
      {
        "team": "Data Integration",
        "team_path": "Engineering Group / Service Orchestration Engineering / Data Integration",
        "cost": 0.1741,
        "acp_interactions": 1,
        "workspace_count": 1,
        "active_users": 1
      }
    ],
    "team_ratio_scatter": [
      {
        "team": "Intelligent Support Enablement",
        "team_path": "Engineering Group / Global Support Intelligence / Intelligent Support Enablement",
        "x": 0.0,
        "y": null,
        "size": 1,
        "cost": 1.2133
      },
      {
        "team": "Intelligent Support",
        "team_path": "Engineering Group / Global Support Intelligence / Intelligent Support",
        "x": 11.0,
        "y": 0.1031,
        "size": 1,
        "cost": 1.1343
      },
      {
        "team": "TiDB X Core Product",
        "team_path": "Product / TiDB X Core Product",
        "x": 0.0,
        "y": null,
        "size": 1,
        "cost": 0.808
      },
      {
        "team": "Data Integration",
        "team_path": "Engineering Group / Service Orchestration Engineering / Data Integration",
        "x": 1.0,
        "y": 0.1741,
        "size": 1,
        "cost": 0.1741
      }
    ],
    "message_category_stack": [
      {
        "team": "Intelligent Support Enablement",
        "category": "产出物迭代",
        "count": 2
      },
      {
        "team": "Intelligent Support",
        "category": "Ad hoc 查询",
        "count": 10
      },
      {
        "team": "Intelligent Support",
        "category": "产出物迭代",
        "count": 2
      },
      {
        "team": "Intelligent Support",
        "category": "流程控制/确认",
        "count": 2
      },
      {
        "team": "Intelligent Support",
        "category": "解释追问",
        "count": 8
      },
      {
        "team": "TiDB X Core Product",
        "category": "流程控制/确认",
        "count": 2
      },
      {
        "team": "Data Integration",
        "category": "Ad hoc 查询",
        "count": 1
      }
    ],
    "user_behavior_quadrant": [
      {
        "user_email": "jiangjianyuan@pingcap.com",
        "x": 1,
        "y": 1.0,
        "cost": 0.1741,
        "mode": "低频低轮次"
      },
      {
        "user_email": "looperth.wong@pingcap.com",
        "x": 1,
        "y": 11.0,
        "cost": 1.1343,
        "mode": "低频高轮次"
      },
      {
        "user_email": "qi.qi@pingcap.com",
        "x": 1,
        "y": 0.0,
        "cost": 0.808,
        "mode": "低频低轮次"
      },
      {
        "user_email": "sihao.yu@pingcap.com",
        "x": 1,
        "y": 0.0,
        "cost": 1.2133,
        "mode": "低频低轮次"
      }
    ]
  },
  "workspace_changes_ref": "workspace_changes.json"
}
