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
feat: surface badge-adoption tag for repos embedding their AFC badge (#8)
Detect when a repo embeds its own Agent Friendly Code badge in the README
(`/api/badge/<slug>`) and show a "Badge" tag on the leaderboard and the repo
detail page. Dashboard-only social-proof metadata — not a scored signal, and
never vendored to the sibling scorers.
- lib/badge-adoption.ts: host-agnostic detectBadgeEmbed over README candidates
- lib/db.ts: badge_embedded column + in-place migration for pre-existing DBs
- scripts/score.ts: detect on every score; seed flows through score
- components/BadgeAdoptedTag.tsx + RepoHero/leaderboard render the tag
- tests/badge-adoption.test.ts: 6 cases (match, host-agnostic, wrong-slug, …)
- scripts/seed-list.ts: ~30 new curated seed repos
- re-seeded data/rank.db
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
badge-adoption.ts # detectBadgeEmbed — reads the cloned README for an embedded AFC badge (dashboard metadata, NOT a scored signal; never vendored to siblings)
96
97
db.ts # better-sqlite3 schema + queries
97
98
version.ts # APP_NAME, APP_VERSION, IS_PRE_RELEASE, APP_URL, APP_DESCRIPTION, REPO_URL, SIBLING_VERSION, ACTION_REPO_URL, ACTION_USES, SKILL_REPO_URL, SKILL_INSTALL_CMD, OG_DEFAULTS, TWITTER_DEFAULTS (spread into per-page openGraph / twitter — Next.js shallow-merges these objects so defaults must be re-spread on every page)
0 commit comments