{
  "date": "2026-08-22",
  "timezone": "Asia/Shanghai",
  "window_start": "2026-08-22T00:00:00+08:00",
  "window_end": "2026-08-23T00: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": 2.3169,
    "total_acp_interactions": 8,
    "active_users": 4,
    "workspace_count": 5,
    "created_workspace_count": 3,
    "new_workspace_count": 3,
    "updated_existing_workspace_count": 3,
    "changed_workspace_count": 6,
    "message_count": 23,
    "user_message_count": 8,
    "assistant_message_count": 15,
    "unknown_user_count": 0,
    "unknown_cost": 0.0
  },
  "teams": [
    {
      "team_path": "Engineering Group / Global Support Intelligence / Intelligent Support",
      "team": "Intelligent Support",
      "cost": 1.3894,
      "acp_interactions": 5,
      "workspace_count": 3,
      "active_users": 1,
      "message_count": 15,
      "user_message_count": 5,
      "cost_per_ws": 0.4631,
      "cost_per_acp": 0.2779,
      "acp_per_ws": 1.6667,
      "message_per_ws": 5.0,
      "message_per_acp": 3.0,
      "correction_message_ratio": null
    },
    {
      "team_path": "Engineering Group / Service Orchestration Engineering / Data Integration",
      "team": "Data Integration",
      "cost": 0.7995,
      "acp_interactions": 1,
      "workspace_count": 1,
      "active_users": 1,
      "message_count": 3,
      "user_message_count": 1,
      "cost_per_ws": 0.7995,
      "cost_per_acp": 0.7995,
      "acp_per_ws": 1.0,
      "message_per_ws": 3.0,
      "message_per_acp": 3.0,
      "correction_message_ratio": null
    },
    {
      "team_path": "Engineering Group / Service Orchestration Engineering / Global Control",
      "team": "Global Control",
      "cost": 0.128,
      "acp_interactions": 1,
      "workspace_count": 1,
      "active_users": 1,
      "message_count": 3,
      "user_message_count": 1,
      "cost_per_ws": 0.128,
      "cost_per_acp": 0.128,
      "acp_per_ws": 1.0,
      "message_per_ws": 3.0,
      "message_per_acp": 3.0,
      "correction_message_ratio": null
    },
    {
      "team_path": "Product / Enterprise & Partner Product",
      "team": "Enterprise & Partner Product",
      "cost": 0.0,
      "acp_interactions": 1,
      "workspace_count": 1,
      "active_users": 1,
      "message_count": 2,
      "user_message_count": 1,
      "cost_per_ws": 0.0,
      "cost_per_acp": 0.0,
      "acp_per_ws": 1.0,
      "message_per_ws": 2.0,
      "message_per_acp": 2.0,
      "correction_message_ratio": null
    }
  ],
  "users": [
    {
      "user_email": "cherubin.j@pingcap.com",
      "name": "Cherubin John",
      "en_name": "",
      "team_path": "Engineering Group / Global Support Intelligence / Intelligent Support",
      "team": "Intelligent Support",
      "mapping_source": "investibook-usage-team-overrides.csv",
      "cost": 1.3894,
      "acp_interactions": 5,
      "workspace_count": 3,
      "message_count": 15,
      "user_message_count": 5,
      "channel_breakdown": {
        "lark": 5
      },
      "frequency_bucket": "高频",
      "depth_bucket": "低轮次",
      "behavior_mode": "高频低轮次",
      "avg_acp_per_ws": 1.6667
    },
    {
      "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.7995,
      "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": "zhitao.chen@pingcap.com",
      "name": "陈志涛",
      "en_name": "Theo Chen",
      "team_path": "Engineering Group / Service Orchestration Engineering / Global Control",
      "team": "Global Control",
      "mapping_source": "investibook-usage-team-overrides.csv",
      "cost": 0.128,
      "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": "nicole.li@pingcap.com",
      "name": "Li Yao",
      "en_name": "Nicole Li",
      "team_path": "Product / Enterprise & Partner Product",
      "team": "Enterprise & Partner Product",
      "mapping_source": "investibook-usage-team-overrides.csv",
      "cost": 0.0,
      "acp_interactions": 1,
      "workspace_count": 0,
      "message_count": 0,
      "user_message_count": 0,
      "channel_breakdown": {
        "web": 1
      },
      "frequency_bucket": "低频",
      "depth_bucket": "低轮次",
      "behavior_mode": "低频低轮次",
      "avg_acp_per_ws": 0.0
    }
  ],
  "message_categories": [
    {
      "category": "查询纠偏",
      "user_message_count": 1,
      "share": 0.125,
      "estimated_cost_by_turn": 0.2896,
      "estimated_cost_by_output_weight": null,
      "avg_user_chars": 4035.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.2896,
      "estimated_cost_by_output_weight": null,
      "avg_user_chars": 137.0,
      "avg_next_assistant_chars": null,
      "classification_method": "rule_based_keywords_v2"
    },
    {
      "category": "Ad hoc 查询",
      "user_message_count": 4,
      "share": 0.5,
      "estimated_cost_by_turn": 1.1584,
      "estimated_cost_by_output_weight": null,
      "avg_user_chars": 49.25,
      "avg_next_assistant_chars": null,
      "classification_method": "rule_based_keywords_v2"
    },
    {
      "category": "流程控制/确认",
      "user_message_count": 2,
      "share": 0.25,
      "estimated_cost_by_turn": 0.5792,
      "estimated_cost_by_output_weight": null,
      "avg_user_chars": 135.5,
      "avg_next_assistant_chars": null,
      "classification_method": "rule_based_keywords_v2"
    }
  ],
  "unmatched_users": [],
  "top_changed_workspaces": [
    {
      "workspace_id": "lark-ws-48eccf4d-4096-4a0a-853d-ca3b4023e18e",
      "title": "Lark APID-29362",
      "workspace_lifecycle": "updated_existing",
      "user_email": "cherubin.j@pingcap.com",
      "team_path": "Engineering Group / Global Support Intelligence / Intelligent Support",
      "scenario_group": "diagnosis",
      "scenario_category": "storage_or_io_bottleneck",
      "cost": 0.8631,
      "message_count": 3,
      "user_message_count": 1
    },
    {
      "workspace_id": "lark-ws-8e9469fc-4fc2-40b2-9fad-41bf35fcb979",
      "title": "Lark O11Y-2644059",
      "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.7995,
      "message_count": 3,
      "user_message_count": 1
    },
    {
      "workspace_id": "lark-ws-6cdfa834-fafc-4435-9d7e-513cea0ee30b",
      "title": "Lark APID-29353",
      "workspace_lifecycle": "updated_existing",
      "user_email": "cherubin.j@pingcap.com",
      "team_path": "Engineering Group / Global Support Intelligence / Intelligent Support",
      "scenario_group": "diagnosis",
      "scenario_category": "sql_plan_or_query",
      "cost": 0.3851,
      "message_count": 6,
      "user_message_count": 2
    },
    {
      "workspace_id": "lark-ws-f78ea403-5699-4ddb-8e47-b8fe2fac9e50",
      "title": "Lark chat",
      "workspace_lifecycle": "new",
      "user_email": "cherubin.j@pingcap.com",
      "team_path": "Engineering Group / Global Support Intelligence / Intelligent Support",
      "scenario_group": "diagnosis",
      "scenario_category": "ddl_or_schema_change",
      "cost": 0.1413,
      "message_count": 6,
      "user_message_count": 2
    },
    {
      "workspace_id": "lark-ws-c0c6f077-f1a0-4093-908a-0fd57a80be3c",
      "title": "Lark O11Y-2644575",
      "workspace_lifecycle": "new",
      "user_email": "zhitao.chen@pingcap.com",
      "team_path": "Engineering Group / Service Orchestration Engineering / Global Control",
      "scenario_group": "diagnosis",
      "scenario_category": "backup_or_restore",
      "cost": 0.128,
      "message_count": 3,
      "user_message_count": 1
    },
    {
      "workspace_id": "ws-1785722207473-c2eb87161",
      "title": "查一下 1372813089209061633 这个 org 下，有多少集群使用",
      "workspace_lifecycle": "updated_existing",
      "user_email": "nicole.li@pingcap.com",
      "team_path": "Product / Enterprise & Partner Product",
      "scenario_group": "diagnosis",
      "scenario_category": "storage_or_io_bottleneck",
      "cost": 0,
      "message_count": 2,
      "user_message_count": 1
    }
  ],
  "charts": {
    "daily_cost_acp": [
      {
        "date": "2026-08-22",
        "cost": 2.3169,
        "acp_interactions": 8,
        "workspace_count": 5,
        "active_users": 4
      }
    ],
    "team_cost_bar": [
      {
        "team": "Intelligent Support",
        "team_path": "Engineering Group / Global Support Intelligence / Intelligent Support",
        "cost": 1.3894,
        "acp_interactions": 5,
        "workspace_count": 3,
        "active_users": 1
      },
      {
        "team": "Data Integration",
        "team_path": "Engineering Group / Service Orchestration Engineering / Data Integration",
        "cost": 0.7995,
        "acp_interactions": 1,
        "workspace_count": 1,
        "active_users": 1
      },
      {
        "team": "Global Control",
        "team_path": "Engineering Group / Service Orchestration Engineering / Global Control",
        "cost": 0.128,
        "acp_interactions": 1,
        "workspace_count": 1,
        "active_users": 1
      },
      {
        "team": "Enterprise & Partner Product",
        "team_path": "Product / Enterprise & Partner Product",
        "cost": 0.0,
        "acp_interactions": 1,
        "workspace_count": 1,
        "active_users": 1
      }
    ],
    "team_ratio_scatter": [
      {
        "team": "Intelligent Support",
        "team_path": "Engineering Group / Global Support Intelligence / Intelligent Support",
        "x": 1.6667,
        "y": 0.2779,
        "size": 3,
        "cost": 1.3894
      },
      {
        "team": "Data Integration",
        "team_path": "Engineering Group / Service Orchestration Engineering / Data Integration",
        "x": 1.0,
        "y": 0.7995,
        "size": 1,
        "cost": 0.7995
      },
      {
        "team": "Global Control",
        "team_path": "Engineering Group / Service Orchestration Engineering / Global Control",
        "x": 1.0,
        "y": 0.128,
        "size": 1,
        "cost": 0.128
      },
      {
        "team": "Enterprise & Partner Product",
        "team_path": "Product / Enterprise & Partner Product",
        "x": 1.0,
        "y": 0.0,
        "size": 1,
        "cost": 0.0
      }
    ],
    "message_category_stack": [
      {
        "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": 2
      },
      {
        "team": "Data Integration",
        "category": "Ad hoc 查询",
        "count": 1
      },
      {
        "team": "Global Control",
        "category": "Ad hoc 查询",
        "count": 1
      },
      {
        "team": "Enterprise & Partner Product",
        "category": "Ad hoc 查询",
        "count": 1
      }
    ],
    "user_behavior_quadrant": [
      {
        "user_email": "cherubin.j@pingcap.com",
        "x": 3,
        "y": 1.6667,
        "cost": 1.3894,
        "mode": "高频低轮次"
      },
      {
        "user_email": "jiangjianyuan@pingcap.com",
        "x": 1,
        "y": 1.0,
        "cost": 0.7995,
        "mode": "低频低轮次"
      },
      {
        "user_email": "nicole.li@pingcap.com",
        "x": 0,
        "y": 0.0,
        "cost": 0.0,
        "mode": "低频低轮次"
      },
      {
        "user_email": "zhitao.chen@pingcap.com",
        "x": 1,
        "y": 1.0,
        "cost": 0.128,
        "mode": "低频低轮次"
      }
    ]
  },
  "workspace_changes_ref": "workspace_changes.json"
}
