Repository navigation
Conversation
Adds bin/agent_activity_index.py, which classifies the pull requests opened in the public mitodl repositories by fingerprint (human, human + agent, agent-authored, bot), counts bot reviews, merge rate and outcomes, and keeps one JSON snapshot per month. A scheduled workflow adds last month, rebuilds the page and deploys it to GitHub Pages. History lives on the deployed site: `update` downloads the earlier months, adds the new one and redeploys. A clean 404 starts empty and backfills from 2026-01; any other download failure aborts so a transient error cannot replace the real history with an empty site. The script declares its dependencies inline (PEP 723), so no pyproject.toml or uv.lock changes and no package release is triggered. Refs #687 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
- Count an agent only from a footer or Co-authored-by trailer, never a bare mention of its name, and only treat an account as an agent when it is a Bot account, so a person named "claude" or a PR documenting the Claude Code skill is not agent work. - Fill every month after the newest published one, so a failed run leaves a gap of one month, not a permanent one. Reject --backfill-from after the month. - Validate month names as YYYY-MM, including those read from the downloaded index, and require each downloaded file to describe the month it is named for. - Scope the workflow's concurrency group to the publish job so a pull request's test run cannot displace a queued publish. - Count commit trailers only from PRs that are not bot-authored. Refs #687 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Summary
Publishes monthly Agent Activity Index snapshots and trends to GitHub Pages.
- Adds: monthly pull request classification, bot review counts, outcomes, and instruction file data.
- Adds: history recovery and gap filling from previously published monthly snapshots.
- Adds: a GitHub Pages report with trend charts, summaries, and monthly data selection.
Details for reviewers
Risks
- A day with more than 1,000 pull requests uses only the first 1,000 results.
- The report depends on live GitHub Pages history, so a successful deploy remains the only durable history copy.
- The page loads fonts from Google Fonts, which can affect appearance or add an external browser request.
Core files: bin/agent_activity_index.py, .github/workflows/agent-activity.yml, bin/agent_activity_report.html
More changes
- Adds: scheduled and manual publishing with pinned GitHub Actions and Pages deployment. (
agent-activity.yml) - Adds: unit coverage for classification, month planning, history download failures, and page building. (
test_agent_activity_index.py,justfile) - Changes: the contributor guidance to include the new activity reporting workflow. (
AGENTS.md)
Unchanged
- The report keeps only aggregate monthly data, not individual pull request records.
- Unfingerprinted agent activity remains excluded, so published figures are lower-bound estimates.
Summary of 240ed82 · React 👍 or 👎 on my comments to tune what I raise · Commands · Review config
There was a problem hiding this comment.
🔵 Needs a closer look
Separate-directory builds omit downloadable history from the deployed site, causing subsequent updates to restart backfills, while overly broad agent detection and period-dependent inventory reporting produce misleading results.
No open issues 🎉
What changed in this PR
Adds a monthly Agent Activity Index for public mitodl repositories, published to GitHub Pages independently of package releases and the documentation site.
Changes:
- Collects PR classifications, outcomes, bot reviews, and instruction-file adoption into monthly JSON snapshots.
- Builds an interactive report with historical trends and period selection.
- Adds scheduled publishing, guarded history downloads, backfill support, and unit tests.
| File | Description |
|---|---|
tests/bin/test_agent_activity_index.py |
Tests classification, aggregation, month planning, history downloads, and page generation. |
justfile |
Adds the standalone test-agent-activity recipe. |
bin/agent_activity_report.html |
Provides the report layout, charts, tables, and period selector. |
bin/agent_activity_index.py |
Implements data collection, classification, snapshot management, and site generation. |
AGENTS.md |
Documents the new test command. |
.github/workflows/agent-activity.yml |
Runs tests and schedules or manually publishes the report to GitHub Pages. |
Review effort: Balanced
… Code match - build_site copies the monthly data into the output directory when it was read from elsewhere, so a page built with the `site` command carries its history and the next run can download it. - A pasted claude.com/claude-code link no longer counts as an agent footer; only the "Generated with Claude Code" footer and Co-Authored-By trailer do. Refs #687 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Status: Needs Changes 🔧
Blocking Issues:
- An older-month rerun can drop newer snapshots when Pages serves a stale index.
📌 Reviewed up to commit 240ed82 · ⏱️ Review completed in 11 minutes
🔄 Newer commits have been pushed since — comment #optibot review to include them.
- 🔄 re-review this PR
Pages serves index.json with max-age=600. A run that started inside that window of the previous publish could read the old index and redeploy without the month the previous publish added, for example an explicit rerun of an older month right after a newer one. The concurrency group already serialises publishes, so the publish job now waits until ten minutes after the last successful run. Refs #687 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…esult cap Refs #687 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Refs #687 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
What are the relevant tickets?
Closes #687
Description (What does it do?)
Adds a monthly report of how agents and bots show up in pull requests across the public mitodl repos, published to GitHub Pages with one JSON snapshot kept per month for trends.
Implementation details
bin/agent_activity_index.pyclassifies each PR as human, human + agent, agent-authored or bot, from fingerprints (author app, body footer, branch prefix, commit trailer), and counts bot reviews, merge rate, outcomes and instruction files. Any GitHub App account counts as a bot.updatedownloads earlier months, adds the new one and redeploys. A clean 404 onindex.jsonstarts empty and backfills from 2026-01. Any other download failure aborts, so the real history is not replaced..github/workflows/agent-activity.ymlruns on the 1st of each month and on manual dispatch. It also runs the tests on pull requests. Actions are pinned by SHA.pyproject.tomloruv.lockchange and no package release.How can this be tested?
just test-agent-activity(30 unit tests: classification, month planning, the download guard, page build)../bin/agent_activity_index.py snapshot --month 2026-10 --repo agent-kit --out /tmp/snap.jsonran against the live API (761 PRs across two repos).workflow_dispatchand checkhttps://mitodl.github.io/agent-kit/agent-activity/.Checklist:
agent-activityworkflow once by hand after merge🤖 Generated with Claude Code