{
  "date": "2026-07-26",
  "timezone": "Asia/Shanghai",
  "window_start": "2026-07-26T00:00:00+08:00",
  "window_end": "2026-07-27T00: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": 6.6204,
    "total_acp_interactions": 20,
    "active_users": 3,
    "workspace_count": 8,
    "created_workspace_count": 7,
    "new_workspace_count": 7,
    "updated_existing_workspace_count": 1,
    "changed_workspace_count": 8,
    "message_count": 44,
    "user_message_count": 20,
    "assistant_message_count": 24,
    "unknown_user_count": 0,
    "unknown_cost": 0.0
  },
  "teams": [
    {
      "team_path": "Engineering Group / Global Support Intelligence / Intelligent Support Enablement",
      "team": "Intelligent Support Enablement",
      "cost": 3.856,
      "acp_interactions": 5,
      "workspace_count": 4,
      "active_users": 1,
      "message_count": 14,
      "user_message_count": 5,
      "cost_per_ws": 0.964,
      "cost_per_acp": 0.7712,
      "acp_per_ws": 1.25,
      "message_per_ws": 3.5,
      "message_per_acp": 2.8,
      "correction_message_ratio": null
    },
    {
      "team_path": "Engineering Group / Database Service Engineering / Observability & Diagnostics Service",
      "team": "Observability & Diagnostics Service",
      "cost": 1.6111,
      "acp_interactions": 1,
      "workspace_count": 1,
      "active_users": 1,
      "message_count": 2,
      "user_message_count": 1,
      "cost_per_ws": 1.6111,
      "cost_per_acp": 1.6111,
      "acp_per_ws": 1.0,
      "message_per_ws": 2.0,
      "message_per_acp": 2.0,
      "correction_message_ratio": null
    },
    {
      "team_path": "Engineering Group / Global Support Intelligence / Intelligent Support",
      "team": "Intelligent Support",
      "cost": 1.1533,
      "acp_interactions": 14,
      "workspace_count": 3,
      "active_users": 1,
      "message_count": 28,
      "user_message_count": 14,
      "cost_per_ws": 0.3844,
      "cost_per_acp": 0.0824,
      "acp_per_ws": 4.6667,
      "message_per_ws": 9.3333,
      "message_per_acp": 2.0,
      "correction_message_ratio": null
    }
  ],
  "users": [
    {
      "user_email": "xieyujie@pingcap.com",
      "name": "谢玉洁",
      "en_name": "Yujie Xie",
      "team_path": "Engineering Group / Global Support Intelligence / Intelligent Support Enablement",
      "team": "Intelligent Support Enablement",
      "mapping_source": "investibook-usage-team-overrides.csv",
      "cost": 3.856,
      "acp_interactions": 5,
      "workspace_count": 4,
      "message_count": 14,
      "user_message_count": 5,
      "channel_breakdown": {
        "lark": 4,
        "web": 1
      },
      "frequency_bucket": "高频",
      "depth_bucket": "低轮次",
      "behavior_mode": "高频低轮次",
      "avg_acp_per_ws": 1.25
    },
    {
      "user_email": "lingtao.li@pingcap.com",
      "name": "李凌涛",
      "en_name": "Lingtao Li",
      "team_path": "Engineering Group / Database Service Engineering / Observability & Diagnostics Service",
      "team": "Observability & Diagnostics Service",
      "mapping_source": "pingcap_members_by_team.csv",
      "cost": 1.6111,
      "acp_interactions": 1,
      "workspace_count": 1,
      "message_count": 2,
      "user_message_count": 1,
      "channel_breakdown": {
        "cli": 1
      },
      "frequency_bucket": "低频",
      "depth_bucket": "低轮次",
      "behavior_mode": "低频低轮次",
      "avg_acp_per_ws": 1.0
    },
    {
      "user_email": "yikai.puah@pingcap.com",
      "name": "Puah Yi Kai",
      "en_name": "",
      "team_path": "Engineering Group / Global Support Intelligence / Intelligent Support",
      "team": "Intelligent Support",
      "mapping_source": "investibook-usage-team-overrides.csv",
      "cost": 1.1533,
      "acp_interactions": 14,
      "workspace_count": 3,
      "message_count": 28,
      "user_message_count": 14,
      "channel_breakdown": {
        "web": 14
      },
      "frequency_bucket": "低频",
      "depth_bucket": "高轮次",
      "behavior_mode": "低频高轮次",
      "avg_acp_per_ws": 4.6667
    }
  ],
  "message_categories": [
    {
      "category": "查询纠偏",
      "user_message_count": 2,
      "share": 0.1,
      "estimated_cost_by_turn": 0.662,
      "estimated_cost_by_output_weight": null,
      "avg_user_chars": 3746.5,
      "avg_next_assistant_chars": null,
      "classification_method": "rule_based_keywords_v2"
    },
    {
      "category": "产出物迭代",
      "user_message_count": 2,
      "share": 0.1,
      "estimated_cost_by_turn": 0.662,
      "estimated_cost_by_output_weight": null,
      "avg_user_chars": 1066.5,
      "avg_next_assistant_chars": null,
      "classification_method": "rule_based_keywords_v2"
    },
    {
      "category": "Ad hoc 查询",
      "user_message_count": 7,
      "share": 0.35,
      "estimated_cost_by_turn": 2.3171,
      "estimated_cost_by_output_weight": null,
      "avg_user_chars": 283.29,
      "avg_next_assistant_chars": null,
      "classification_method": "rule_based_keywords_v2"
    },
    {
      "category": "诊断启动",
      "user_message_count": 3,
      "share": 0.15,
      "estimated_cost_by_turn": 0.9931,
      "estimated_cost_by_output_weight": null,
      "avg_user_chars": 49.0,
      "avg_next_assistant_chars": null,
      "classification_method": "rule_based_keywords_v2"
    },
    {
      "category": "解释追问",
      "user_message_count": 2,
      "share": 0.1,
      "estimated_cost_by_turn": 0.662,
      "estimated_cost_by_output_weight": null,
      "avg_user_chars": 44.0,
      "avg_next_assistant_chars": null,
      "classification_method": "rule_based_keywords_v2"
    },
    {
      "category": "背景补充",
      "user_message_count": 1,
      "share": 0.05,
      "estimated_cost_by_turn": 0.331,
      "estimated_cost_by_output_weight": null,
      "avg_user_chars": 94.0,
      "avg_next_assistant_chars": null,
      "classification_method": "rule_based_keywords_v2"
    },
    {
      "category": "未归类",
      "user_message_count": 3,
      "share": 0.15,
      "estimated_cost_by_turn": 0.9931,
      "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-88bdc53f-017c-4d00-86d1-380de389c47e",
      "title": "Lark O11Y-2623717",
      "workspace_lifecycle": "new",
      "user_email": "xieyujie@pingcap.com",
      "team_path": "Engineering Group / Global Support Intelligence / Intelligent Support Enablement",
      "scenario_group": "diagnosis",
      "scenario_category": "backup_or_restore",
      "cost": 1.8892,
      "message_count": 3,
      "user_message_count": 1
    },
    {
      "workspace_id": "ws-1781598701127-da28e5bfa",
      "title": "tikv自动巡检",
      "workspace_lifecycle": "updated_existing",
      "user_email": "lingtao.li@pingcap.com",
      "team_path": "Engineering Group / Database Service Engineering / Observability & Diagnostics Service",
      "scenario_group": "non_diagnosis",
      "scenario_category": "inspection_or_report_generation",
      "cost": 1.6111,
      "message_count": 2,
      "user_message_count": 1
    },
    {
      "workspace_id": "lark-ws-abeccb84-ad81-477d-a9b4-4911411a169b",
      "title": "Lark O11Y-2623513",
      "workspace_lifecycle": "new",
      "user_email": "xieyujie@pingcap.com",
      "team_path": "Engineering Group / Global Support Intelligence / Intelligent Support Enablement",
      "scenario_group": "diagnosis",
      "scenario_category": "backup_or_restore",
      "cost": 1.0163,
      "message_count": 5,
      "user_message_count": 2
    },
    {
      "workspace_id": "ws-1785029467427-239f40d08",
      "title": "以下 3 条慢查询：",
      "workspace_lifecycle": "new",
      "user_email": "yikai.puah@pingcap.com",
      "team_path": "Engineering Group / Global Support Intelligence / Intelligent Support",
      "scenario_group": "diagnosis",
      "scenario_category": "sql_plan_or_query",
      "cost": 0.7516,
      "message_count": 14,
      "user_message_count": 7
    },
    {
      "workspace_id": "lark-ws-56d04e08-8476-4bf7-864a-520c2b811bb7",
      "title": "Lark O11Y-2623789",
      "workspace_lifecycle": "new",
      "user_email": "xieyujie@pingcap.com",
      "team_path": "Engineering Group / Global Support Intelligence / Intelligent Support Enablement",
      "scenario_group": "diagnosis",
      "scenario_category": "backup_or_restore",
      "cost": 0.4972,
      "message_count": 3,
      "user_message_count": 1
    },
    {
      "workspace_id": "lark-ws-ccf9f417-7108-49a1-891d-f20fb0cffd14",
      "title": "Lark O11Y-2623789",
      "workspace_lifecycle": "new",
      "user_email": "xieyujie@pingcap.com",
      "team_path": "Engineering Group / Global Support Intelligence / Intelligent Support Enablement",
      "scenario_group": "diagnosis",
      "scenario_category": "backup_or_restore",
      "cost": 0.4533,
      "message_count": 3,
      "user_message_count": 1
    },
    {
      "workspace_id": "ws-1785038609993-ac05e9ee6",
      "title": "tiup manifest 目录底下的root.json 文件过期，应该怎么解决",
      "workspace_lifecycle": "new",
      "user_email": "yikai.puah@pingcap.com",
      "team_path": "Engineering Group / Global Support Intelligence / Intelligent Support",
      "scenario_group": "diagnosis",
      "scenario_category": "backup_or_restore",
      "cost": 0.3355,
      "message_count": 12,
      "user_message_count": 6
    },
    {
      "workspace_id": "ws-1785031834162-8893a9ab3",
      "title": "为什么analyze操作会 导致tikv cpu 尖刺， unified read pool",
      "workspace_lifecycle": "new",
      "user_email": "yikai.puah@pingcap.com",
      "team_path": "Engineering Group / Global Support Intelligence / Intelligent Support",
      "scenario_group": "diagnosis",
      "scenario_category": "tikv_hotspot_or_coprocessor",
      "cost": 0.0662,
      "message_count": 2,
      "user_message_count": 1
    }
  ],
  "charts": {
    "daily_cost_acp": [
      {
        "date": "2026-07-26",
        "cost": 6.6204,
        "acp_interactions": 20,
        "workspace_count": 8,
        "active_users": 3
      }
    ],
    "team_cost_bar": [
      {
        "team": "Intelligent Support Enablement",
        "team_path": "Engineering Group / Global Support Intelligence / Intelligent Support Enablement",
        "cost": 3.856,
        "acp_interactions": 5,
        "workspace_count": 4,
        "active_users": 1
      },
      {
        "team": "Observability & Diagnostics Service",
        "team_path": "Engineering Group / Database Service Engineering / Observability & Diagnostics Service",
        "cost": 1.6111,
        "acp_interactions": 1,
        "workspace_count": 1,
        "active_users": 1
      },
      {
        "team": "Intelligent Support",
        "team_path": "Engineering Group / Global Support Intelligence / Intelligent Support",
        "cost": 1.1533,
        "acp_interactions": 14,
        "workspace_count": 3,
        "active_users": 1
      }
    ],
    "team_ratio_scatter": [
      {
        "team": "Intelligent Support Enablement",
        "team_path": "Engineering Group / Global Support Intelligence / Intelligent Support Enablement",
        "x": 1.25,
        "y": 0.7712,
        "size": 4,
        "cost": 3.856
      },
      {
        "team": "Observability & Diagnostics Service",
        "team_path": "Engineering Group / Database Service Engineering / Observability & Diagnostics Service",
        "x": 1.0,
        "y": 1.6111,
        "size": 1,
        "cost": 1.6111
      },
      {
        "team": "Intelligent Support",
        "team_path": "Engineering Group / Global Support Intelligence / Intelligent Support",
        "x": 4.6667,
        "y": 0.0824,
        "size": 3,
        "cost": 1.1533
      }
    ],
    "message_category_stack": [
      {
        "team": "Intelligent Support Enablement",
        "category": "Ad hoc 查询",
        "count": 3
      },
      {
        "team": "Intelligent Support Enablement",
        "category": "诊断启动",
        "count": 2
      },
      {
        "team": "Observability & Diagnostics Service",
        "category": "产出物迭代",
        "count": 1
      },
      {
        "team": "Intelligent Support",
        "category": "Ad hoc 查询",
        "count": 4
      },
      {
        "team": "Intelligent Support",
        "category": "产出物迭代",
        "count": 1
      },
      {
        "team": "Intelligent Support",
        "category": "未归类",
        "count": 3
      },
      {
        "team": "Intelligent Support",
        "category": "查询纠偏",
        "count": 2
      },
      {
        "team": "Intelligent Support",
        "category": "背景补充",
        "count": 1
      },
      {
        "team": "Intelligent Support",
        "category": "解释追问",
        "count": 2
      },
      {
        "team": "Intelligent Support",
        "category": "诊断启动",
        "count": 1
      }
    ],
    "user_behavior_quadrant": [
      {
        "user_email": "lingtao.li@pingcap.com",
        "x": 1,
        "y": 1.0,
        "cost": 1.6111,
        "mode": "低频低轮次"
      },
      {
        "user_email": "xieyujie@pingcap.com",
        "x": 4,
        "y": 1.25,
        "cost": 3.856,
        "mode": "高频低轮次"
      },
      {
        "user_email": "yikai.puah@pingcap.com",
        "x": 3,
        "y": 4.6667,
        "cost": 1.1533,
        "mode": "低频高轮次"
      }
    ]
  },
  "workspace_changes_ref": "workspace_changes.json"
}
