{
  "date": "2026-06-07",
  "timezone": "Asia/Shanghai",
  "window_start": "2026-06-07T00:00:00+08:00",
  "window_end": "2026-06-08T00: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": 0.7355,
    "total_acp_interactions": 2,
    "active_users": 2,
    "workspace_count": 2,
    "created_workspace_count": 2,
    "new_workspace_count": 3,
    "updated_existing_workspace_count": 0,
    "changed_workspace_count": 3,
    "message_count": 6,
    "user_message_count": 2,
    "assistant_message_count": 3,
    "unknown_user_count": 0,
    "unknown_cost": 0.0
  },
  "teams": [
    {
      "team_path": "Engineering Group / Global Support Intelligence / Intelligent Support Enablement",
      "team": "Intelligent Support Enablement",
      "cost": 0.5907,
      "acp_interactions": 1,
      "workspace_count": 1,
      "active_users": 1,
      "message_count": 6,
      "user_message_count": 2,
      "cost_per_ws": 0.5907,
      "cost_per_acp": 0.5907,
      "acp_per_ws": 1.0,
      "message_per_ws": 6.0,
      "message_per_acp": 6.0,
      "correction_message_ratio": null
    },
    {
      "team_path": "Engineering Group / Service Orchestration Engineering / Global Control",
      "team": "Global Control",
      "cost": 0.1448,
      "acp_interactions": 1,
      "workspace_count": 1,
      "active_users": 1,
      "message_count": 3,
      "user_message_count": 1,
      "cost_per_ws": 0.1448,
      "cost_per_acp": 0.1448,
      "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": 0.5907,
      "acp_interactions": 1,
      "workspace_count": 1,
      "message_count": 3,
      "user_message_count": 1,
      "channel_breakdown": {
        "web": 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.1448,
      "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": "Ad hoc 查询",
      "user_message_count": 2,
      "share": 1.0,
      "estimated_cost_by_turn": 0.7355,
      "estimated_cost_by_output_weight": null,
      "avg_user_chars": 31.5,
      "avg_next_assistant_chars": null,
      "classification_method": "rule_based_keywords_v2"
    }
  ],
  "unmatched_users": [],
  "top_changed_workspaces": [
    {
      "workspace_id": "ws-1780810396179-65fee711a",
      "title": "O11Y-2583625",
      "workspace_lifecycle": "new",
      "user_email": "sihao.yu@pingcap.com",
      "team_path": "Engineering Group / Global Support Intelligence / Intelligent Support Enablement",
      "scenario_group": "diagnosis",
      "scenario_category": "component_failure_or_bug",
      "cost": 0.5833,
      "message_count": 3,
      "user_message_count": 1
    },
    {
      "workspace_id": "lark-ws-c2a53ac5-2247-479f-84f4-09ed32c95837",
      "title": "Lark O11Y-2583623",
      "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.1448,
      "message_count": 3,
      "user_message_count": 1
    },
    {
      "workspace_id": "ws-1780810396179-65fee711a",
      "title": "O11Y-2583625",
      "workspace_lifecycle": "new",
      "user_email": "sihao.yu@pingcap.com",
      "team_path": "Engineering Group / Global Support Intelligence / Intelligent Support Enablement",
      "scenario_group": "diagnosis",
      "scenario_category": "component_failure_or_bug",
      "cost": 0.0074,
      "message_count": 3,
      "user_message_count": 1
    }
  ],
  "charts": {
    "daily_cost_acp": [
      {
        "date": "2026-06-07",
        "cost": 0.7355,
        "acp_interactions": 2,
        "workspace_count": 2,
        "active_users": 2
      }
    ],
    "team_cost_bar": [
      {
        "team": "Intelligent Support Enablement",
        "team_path": "Engineering Group / Global Support Intelligence / Intelligent Support Enablement",
        "cost": 0.5907,
        "acp_interactions": 1,
        "workspace_count": 1,
        "active_users": 1
      },
      {
        "team": "Global Control",
        "team_path": "Engineering Group / Service Orchestration Engineering / Global Control",
        "cost": 0.1448,
        "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": 1.0,
        "y": 0.5907,
        "size": 1,
        "cost": 0.5907
      },
      {
        "team": "Global Control",
        "team_path": "Engineering Group / Service Orchestration Engineering / Global Control",
        "x": 1.0,
        "y": 0.1448,
        "size": 1,
        "cost": 0.1448
      }
    ],
    "message_category_stack": [
      {
        "team": "Intelligent Support Enablement",
        "category": "Ad hoc 查询",
        "count": 2
      },
      {
        "team": "Global Control",
        "category": "Ad hoc 查询",
        "count": 1
      }
    ],
    "user_behavior_quadrant": [
      {
        "user_email": "sihao.yu@pingcap.com",
        "x": 1,
        "y": 1.0,
        "cost": 0.5907,
        "mode": "低频低轮次"
      },
      {
        "user_email": "zhitao.chen@pingcap.com",
        "x": 1,
        "y": 1.0,
        "cost": 0.1448,
        "mode": "低频低轮次"
      }
    ]
  },
  "workspace_changes_ref": "workspace_changes.json"
}
