Follow every step below when we start tracking a new coding agent. Skipping items here is what caused the Jules onboarding fixes—treat this as the single source of truth.
- Decide on the agent
key(lowercase slug with no spaces). This drives CSV column names and template lookups. - Record the public-facing names:
display: short label for tables.long_name: full name for the leaderboard cards.
- Pick a distinctive color triple (total bar, merged bar, line). Reuse the soft/bright/dark convention already in
generate_chart.py. - Collect every GitHub search URL the site surfaces. We need four queries per agent:
- Total PRs –
is:pr+head:<branch-prefix>/oris:pr+author:<bot> - Merged PRs – add
+is:merged - Ready PRs – add
+-is:draft - Draft PRs – add
+is:draft(used only in the UI, but keep it in metadata) Verify each query manually in the browser before codifying it.
- Total PRs –
- Extend the
Qdictionary with three entries for the new agent (total,merged,nondraft). Match the naming pattern:<key>_total,<key>_merged,<key>_nondraft. - Update the
rowlist and the CSV header block right below it to append the new metrics. Order matters – keep all metrics grouped by agent, and ensure the header labels exactly match the keys fromQ. - Sanity-check that every key referenced in
rowis defined inQ; the script fails later if you miss one. - Historical data:
- Update the first row in both
data.csvanddata_backup.csvso the header now contains the three new<key>_*columns. If a migration is needed, either backfill realistic values by querying the API per timestamp (patterned afterscripts/add_nondraft_final.py) or set placeholder zeros with a follow-up backfill plan. Do not leaveUnnamed:columns in the CSV. - If you add a migration helper, include the new agent in any
agents = [...]or query maps insidescripts/(e.g.,scripts/add_nondraft_final.py).
- Update the first row in both
- Add a full entry for the agent inside the global
AGENTSlist (key, labels, colors, and all four query URLs). This single list feeds the README template, GitHub Pages template, and chart toggles. - Touch every hard-coded per-agent section:
- Percentage calculations: duplicate the existing lambda blocks for
df["<key>_percentage"]anddf["<key>_total_percentage"]. - Matplotlib bars and lines: create the paired
bars_<key>_total,bars_<key>_merged, and the line trace for success rate, including color and label strings. - Success-rate annotations: extend the annotation block so the new agent prints values (color, offsets, formatting).
- JSON export: add the color triple to the
colorsdictionary and include the new key in everyfor agent in [...]list. (Search forfor agent in ["copilot", "codex", "cursor", "devin", "codegen", "jules"]and append your new key everywhere.)
- Percentage calculations: duplicate the existing lambda blocks for
- Confirm
build_statsand downstream calculations automatically pick up the new columns because they iterate overAGENTS.
- In
templates/index_template.html, expand the regex used to match agent labels (labelLower.match(/(...)/)) to include the new key. This avoids missing toggle behavior. - No manual edits are required in
docs/index.html; running the generator will rebuild it from the template.
- Run
python collect_data.pyonce to verify API connectivity and append a fresh data row that includes the new columns. This also updatesdocs/index.htmltimestamps. - Run
python generate_chart.pyto:- Recompute the chart image (
docs/chart.png). - Emit
docs/chart-data.jsonwith the expanded datasets. - Re-render
README.mdanddocs/index.htmlfrom their templates. Never hand-edit those generated files.
- Recompute the chart image (
- Open the rendered README and
docs/index.htmlto visually confirm the new agent appears everywhere (leaderboard card, chart toggles, data sources, stats table).
- Load
data.csvwith pandas (python - <<'PY' ...) to ensure noUnnamedcolumns remain and the new<key>_*headers exist. - Skim the git diff for only intentional changes (especially large CSV diffs). Make sure both
data.csvanddata_backup.csvstay in sync. - Commit once everything builds, then create the PR via the automation tool.
Stick to this checklist whenever onboarding an agent; deviating caused the regressions we had with Jules.