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
Copy file name to clipboardExpand all lines: .github/workflows/agentic-token-audit.md
+5-3Lines changed: 5 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -171,7 +171,7 @@ Handle null/missing `ai_credits` and `token_usage` by treating them as 0.
171
171
2. Copy it to `/tmp/gh-aw/repo-memory/default/YYYY-MM-DD.json` (today's UTC date).
172
172
3. This file is what the optimizer workflow reads to identify high-usage workflows.
173
173
174
-
Also maintain a rolling summary file at `/tmp/gh-aw/repo-memory/default/rolling-summary.json` that contains an array of daily overall totals (date, total_ai_credits, total_tokens, total_runs, total_action_minutes) for the last 90 entries. Load the existing file, append today's entry, trim to 90, and save.
174
+
Also maintain a rolling summary file at `/tmp/gh-aw/repo-memory/default/rolling-summary.json` that contains an array of daily overall totals (date, total_ai_credits, total_tokens, total_runs, total_action_minutes, active_workflows) for the last 90 entries. `active_workflows` must be the count of distinct workflows with `run_count >= 1` in that day's snapshot. Load the existing file, append today's entry, trim to 90, and save.
175
175
176
176
Do not append a synthetic zero-valued entry to `rolling-summary.json` when either of these conditions is true:
177
177
@@ -185,14 +185,16 @@ Report those two cases differently in the issue as described below so the empty-
185
185
Create up to two chart images in `/tmp/gh-aw/token-audit/charts/` using Python, `matplotlib`, and `seaborn` with `whitegrid` styling:
186
186
187
187
1.**AI credit spend by workflow** (`ai_credits_by_workflow.png`): a horizontal bar chart of the top 15 workflows by total AI credits from `audit_snapshot.json`.
188
-
2.**Historical AI credit trend** (`ai_credits_trend.png`): a line chart from `rolling-summary.json`.
188
+
2.**Historical AI credit trend** (`ai_credits_trend.png`): a dual-axis line chart from `rolling-summary.json` with total AI credits on the primary y-axis and active workflows/day on the secondary y-axis.
189
189
190
190
Chart requirements:
191
191
192
192
- The preinstalled Python packages live in `/tmp/gh-aw/token-audit/site-packages`. Set `PYTHONPATH=/tmp/gh-aw/token-audit/site-packages${PYTHONPATH:+:$PYTHONPATH}` for every Python command that imports `pandas`, `matplotlib`, or `seaborn`, for example: `PYTHONPATH=/tmp/gh-aw/token-audit/site-packages${PYTHONPATH:+:$PYTHONPATH} python3 /tmp/gh-aw/token-audit/process_audit.py`.
193
193
- Use 300 DPI and a white background.
194
194
- Add clear axis labels and titles.
195
195
- Save only PNG files.
196
+
- For `ai_credits_trend.png`, label the secondary y-axis as `Active workflows/day` (or `Distinct workflows executed`) and plot daily distinct executed workflows from `active_workflows`.
197
+
- Do not plot the total number of workflows defined in the repository.
196
198
- If there are fewer than 2 rolling-summary points, skip the trend chart and explain why in the issue.
197
199
- After generating each chart, call `upload_asset` with its file path.
198
200
- In the issue template below, replace `UPLOAD_URL_WORKFLOW_PLACEHOLDER` with the URL returned for `ai_credits_by_workflow.png`.
@@ -236,7 +238,7 @@ Embed chart images using uploaded asset URLs when available:
236
238
237
239

238
240
239
-
Summarize AI creditand token changes from `rolling-summary.json` when historical data is available.
241
+
Summarize AI credit, token, and active-workflow changes from `rolling-summary.json` when historical data is available.
0 commit comments