{
  "date": "2026-08-15",
  "timezone": "Asia/Shanghai",
  "window_start": "2026-08-15T00:00:00+08:00",
  "window_end": "2026-08-16T00: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.8004,
    "total_acp_interactions": 11,
    "active_users": 2,
    "workspace_count": 8,
    "created_workspace_count": 8,
    "new_workspace_count": 8,
    "updated_existing_workspace_count": 0,
    "changed_workspace_count": 8,
    "message_count": 33,
    "user_message_count": 11,
    "assistant_message_count": 22,
    "unknown_user_count": 0,
    "unknown_cost": 0.0
  },
  "teams": [
    {
      "team_path": "Engineering Group / Service Orchestration Engineering / Data Integration",
      "team": "Data Integration",
      "cost": 2.0326,
      "acp_interactions": 5,
      "workspace_count": 4,
      "active_users": 1,
      "message_count": 15,
      "user_message_count": 5,
      "cost_per_ws": 0.5082,
      "cost_per_acp": 0.4065,
      "acp_per_ws": 1.25,
      "message_per_ws": 3.75,
      "message_per_acp": 3.0,
      "correction_message_ratio": null
    },
    {
      "team_path": "Engineering Group / Global Support Intelligence / Intelligent Support",
      "team": "Intelligent Support",
      "cost": 1.7678,
      "acp_interactions": 6,
      "workspace_count": 4,
      "active_users": 1,
      "message_count": 18,
      "user_message_count": 6,
      "cost_per_ws": 0.442,
      "cost_per_acp": 0.2946,
      "acp_per_ws": 1.5,
      "message_per_ws": 4.5,
      "message_per_acp": 3.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": 2.0326,
      "acp_interactions": 5,
      "workspace_count": 4,
      "message_count": 15,
      "user_message_count": 5,
      "channel_breakdown": {
        "lark": 5
      },
      "frequency_bucket": "高频",
      "depth_bucket": "低轮次",
      "behavior_mode": "高频低轮次",
      "avg_acp_per_ws": 1.25
    },
    {
      "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.7678,
      "acp_interactions": 6,
      "workspace_count": 4,
      "message_count": 18,
      "user_message_count": 6,
      "channel_breakdown": {
        "lark": 6
      },
      "frequency_bucket": "高频",
      "depth_bucket": "低轮次",
      "behavior_mode": "高频低轮次",
      "avg_acp_per_ws": 1.5
    }
  ],
  "message_categories": [
    {
      "category": "Ad hoc 查询",
      "user_message_count": 2,
      "share": 0.181818,
      "estimated_cost_by_turn": 0.691,
      "estimated_cost_by_output_weight": null,
      "avg_user_chars": 16.0,
      "avg_next_assistant_chars": null,
      "classification_method": "rule_based_keywords_v2"
    },
    {
      "category": "诊断启动",
      "user_message_count": 6,
      "share": 0.545455,
      "estimated_cost_by_turn": 2.073,
      "estimated_cost_by_output_weight": null,
      "avg_user_chars": 40.5,
      "avg_next_assistant_chars": null,
      "classification_method": "rule_based_keywords_v2"
    },
    {
      "category": "解释追问",
      "user_message_count": 1,
      "share": 0.090909,
      "estimated_cost_by_turn": 0.3455,
      "estimated_cost_by_output_weight": null,
      "avg_user_chars": 10.0,
      "avg_next_assistant_chars": null,
      "classification_method": "rule_based_keywords_v2"
    },
    {
      "category": "流程控制/确认",
      "user_message_count": 1,
      "share": 0.090909,
      "estimated_cost_by_turn": 0.3455,
      "estimated_cost_by_output_weight": null,
      "avg_user_chars": 75.0,
      "avg_next_assistant_chars": null,
      "classification_method": "rule_based_keywords_v2"
    },
    {
      "category": "未归类",
      "user_message_count": 1,
      "share": 0.090909,
      "estimated_cost_by_turn": 0.3455,
      "estimated_cost_by_output_weight": null,
      "avg_user_chars": 14.0,
      "avg_next_assistant_chars": null,
      "classification_method": "rule_based_keywords_v2"
    }
  ],
  "unmatched_users": [],
  "top_changed_workspaces": [
    {
      "workspace_id": "lark-ws-3e5781b3-ade7-4224-9800-ead38fee322c",
      "title": "Lark APID-29354",
      "workspace_lifecycle": "new",
      "user_email": "cherubin.j@pingcap.com",
      "team_path": "Engineering Group / Global Support Intelligence / Intelligent Support",
      "scenario_group": "diagnosis",
      "scenario_category": "backup_or_restore",
      "cost": 0.628,
      "message_count": 3,
      "user_message_count": 1
    },
    {
      "workspace_id": "lark-ws-1cd5d240-36d0-4c50-86b9-4cc34bffd92f",
      "title": "Lark O11Y-2638492",
      "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.5668,
      "message_count": 3,
      "user_message_count": 1
    },
    {
      "workspace_id": "lark-ws-259dd892-5d40-4760-9f0d-76d8ef5a2e25",
      "title": "Lark O11Y-2638451",
      "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.5435,
      "message_count": 6,
      "user_message_count": 2
    },
    {
      "workspace_id": "lark-ws-1ba0cd3b-ce46-4aa8-8031-12a4ebaddc59",
      "title": "Lark O11Y-2638424",
      "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.4773,
      "message_count": 3,
      "user_message_count": 1
    },
    {
      "workspace_id": "lark-ws-c2be834f-ba07-46eb-a99f-dfdf02eae9e3",
      "title": "Lark O11Y-2638476",
      "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.4451,
      "message_count": 3,
      "user_message_count": 1
    },
    {
      "workspace_id": "lark-ws-6cdfa834-fafc-4435-9d7e-513cea0ee30b",
      "title": "Lark APID-29353",
      "workspace_lifecycle": "new",
      "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.402,
      "message_count": 9,
      "user_message_count": 3
    },
    {
      "workspace_id": "lark-ws-585c7714-4ad2-46e4-876b-9de9780e30be",
      "title": "Lark APID-29349",
      "workspace_lifecycle": "new",
      "user_email": "cherubin.j@pingcap.com",
      "team_path": "Engineering Group / Global Support Intelligence / Intelligent Support",
      "scenario_group": "diagnosis",
      "scenario_category": "backup_or_restore",
      "cost": 0.3839,
      "message_count": 3,
      "user_message_count": 1
    },
    {
      "workspace_id": "lark-ws-66b5991b-7255-47aa-ad2c-b04f69f704f9",
      "title": "Lark APID-29355",
      "workspace_lifecycle": "new",
      "user_email": "cherubin.j@pingcap.com",
      "team_path": "Engineering Group / Global Support Intelligence / Intelligent Support",
      "scenario_group": "diagnosis",
      "scenario_category": "backup_or_restore",
      "cost": 0.3538,
      "message_count": 3,
      "user_message_count": 1
    }
  ],
  "charts": {
    "daily_cost_acp": [
      {
        "date": "2026-08-15",
        "cost": 3.8004,
        "acp_interactions": 11,
        "workspace_count": 8,
        "active_users": 2
      }
    ],
    "team_cost_bar": [
      {
        "team": "Data Integration",
        "team_path": "Engineering Group / Service Orchestration Engineering / Data Integration",
        "cost": 2.0326,
        "acp_interactions": 5,
        "workspace_count": 4,
        "active_users": 1
      },
      {
        "team": "Intelligent Support",
        "team_path": "Engineering Group / Global Support Intelligence / Intelligent Support",
        "cost": 1.7678,
        "acp_interactions": 6,
        "workspace_count": 4,
        "active_users": 1
      }
    ],
    "team_ratio_scatter": [
      {
        "team": "Data Integration",
        "team_path": "Engineering Group / Service Orchestration Engineering / Data Integration",
        "x": 1.25,
        "y": 0.4065,
        "size": 4,
        "cost": 2.0326
      },
      {
        "team": "Intelligent Support",
        "team_path": "Engineering Group / Global Support Intelligence / Intelligent Support",
        "x": 1.5,
        "y": 0.2946,
        "size": 4,
        "cost": 1.7678
      }
    ],
    "message_category_stack": [
      {
        "team": "Data Integration",
        "category": "Ad hoc 查询",
        "count": 2
      },
      {
        "team": "Data Integration",
        "category": "未归类",
        "count": 1
      },
      {
        "team": "Data Integration",
        "category": "诊断启动",
        "count": 2
      },
      {
        "team": "Intelligent Support",
        "category": "流程控制/确认",
        "count": 1
      },
      {
        "team": "Intelligent Support",
        "category": "解释追问",
        "count": 1
      },
      {
        "team": "Intelligent Support",
        "category": "诊断启动",
        "count": 4
      }
    ],
    "user_behavior_quadrant": [
      {
        "user_email": "cherubin.j@pingcap.com",
        "x": 4,
        "y": 1.5,
        "cost": 1.7678,
        "mode": "高频低轮次"
      },
      {
        "user_email": "jiangjianyuan@pingcap.com",
        "x": 4,
        "y": 1.25,
        "cost": 2.0326,
        "mode": "高频低轮次"
      }
    ]
  },
  "workspace_changes_ref": "workspace_changes.json"
}
