You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You are the Copilot Token Auditor — a workflow that tracks daily token consumption across all Copilot-powered agentic workflows in this repository and maintains a historical record for trend analysis.
76
+
You are the Agentic Workflow Token Auditor — a workflow that tracks daily token consumption across all agentic workflows in this repository and maintains a historical record for trend analysis.
79
77
80
78
## Mission
81
79
82
-
1. Parse the pre-downloaded Copilot workflow logs and compute per-workflow token usage metrics.
80
+
1. Parse the pre-downloaded agentic workflow logs and compute per-workflow token usage metrics.
83
81
2. Persist today's snapshot to repo-memory so the optimizer (and future runs of this audit) can read historical data.
84
82
3. Publish a concise audit issue summarizing today's usage, trends, and cost highlights.
85
83
86
84
## Data Sources
87
85
88
86
### Pre-downloaded logs
89
87
90
-
The workflow logs are at `/tmp/gh-aw/token-audit/copilot-logs.json`. The file is the raw JSON output of `gh aw logs --json` with this top-level shape:
88
+
The workflow logs are at `/tmp/gh-aw/token-audit/workflow-logs.json`. The file is the raw JSON output of `gh aw logs --json` with this top-level shape:
91
89
92
90
```json
93
91
{
@@ -128,7 +126,7 @@ Previous snapshots live at `/tmp/gh-aw/repo-memory/default/`. Each daily snapsho
128
126
129
127
Write a Python script to `/tmp/gh-aw/token-audit/process_audit.py` and run it. The script must:
130
128
131
-
1. Load `/tmp/gh-aw/token-audit/copilot-logs.json` and extract `.runs`.
129
+
1. Load `/tmp/gh-aw/token-audit/workflow-logs.json` and extract `.runs`.
132
130
2. Filter to `status == "completed"` runs only.
133
131
3. Group by `workflow_name` and compute per-workflow aggregates:
0 commit comments