Skip to content

feat(bridge): tool call statistics from transcript parsing #160

@fagemx

Description

@fagemx

Context

Chronicle 模型效能分析需要知道代理的工具調用分布。
edda-transcript 已能解析 transcript,但不統計 tool calls。

數據需求

每個 session 的工具調用統計:

{
  "session_id": "...",
  "tool_calls": {
    "Read": 15,
    "Edit": 8,
    "Bash": 12,
    "Grep": 6,
    "Glob": 3,
    "Write": 2,
    "Agent": 4
  },
  "total": 50,
  "edit_ratio": 0.20,
  "search_ratio": 0.48
}

用途

  • 模型行為 pattern(Opus vs Sonnet 的工具偏好)
  • 效率分析(search_ratio 高 = 在探索,edit_ratio 高 = 在產出)
  • 活動分類輔助(search 多 = research,edit 多 = implement)

實作方向

  • edda-transcript 的 delta 處理中加入 tool call 計數
  • session 結束時寫入 summary event
  • 或在 AssistantResponse hook 中累加

驗收標準

  • session summary 包含 tool call breakdown
  • edda log --type session 顯示工具調用數
  • 可按 tool 類型查詢

Phase

Phase 1.5 — enrichment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions