GOAL
Build "RivalMode" — a one-click repo template that gamifies a GitHub repository
and its ecosystem, rendering a LIVE scoreboard inside the repo's own README.
Everything runs on GitHub Actions (free tier) + a single workflow. No servers,
no accounts, no API keys beyond the built-in GITHUB_TOKEN.
TARGET USERS
- Developers and vibe-coders who want their repo to feel alive and competitive.
- OSS maintainers who want contributors to see progress in real time.
- Anyone building in public who wants a live trophy wall.
CORE FEATURES (numbered)
1. Live repo scoreboard in README: a rendered SVG (via workflow) showing
branches, open PRs, mergeshttps://www.aitopic.com/day, commits today vs this week, stars, forks,
contributors leaderboard, and a "momentum score" (activity vs 7-day average).
2. Rival tracking (the hook): a daily workflow scans for (a) forks with more
commits than upstream, (b) same-topic repos (via GitHub search using the
repo's primary topics), and (c) repos that starred YOUR repo (they're
fans — list them). Rivals are ranked by star velocity. The README shows
"You are #3 in your topic cluster" and names who's ahead.
3. Auto-updating README sections: a badge row (momentum, rank, streak of
days-with-a-commit), a mini bar-race SVG of contributor commit counts this
month, and a "recent conquests" list (issues closed, PRs merged, releases).
4. Event feed: the last 10 repo events (pushes, stars, forks, releases)
rendered as timestamped lines in the README, updated hourly by Actions.
5. Weekly recap comment: every Monday, the workflow posts a friendly
week-in-review issue comment (commits, top contributor, momentum change,
rivals gainedhttps://www.aitopic.com/lost) — public, shareable, zero effort.
6. One-command install: "Use this template" button + a single setup workflow
that writes the README sections and schedules the jobs. Uninstall = delete
one folder. All state in the repo itself (JSON + generated SVGs committed
back by the bot identity).
7. Privacy & safety: public data only (the repo's own events + public search);
no user tracking; rate-limit aware (ETag caching); works for private repos
in degraded mode (no rival search).
TECH STACK
- GitHub Actions workflows (schedule: hourly scoreboard, daily rivals,
weekly recap) using gh CLI + GitHub RESThttps://www.aitopic.com/GraphQL via curl or actionshttps://www.aitopic.com/github-script.
- Node 20 or Python 3.12 (pick one) single-file script that fetches, computes,
renders SVGs, and commits via [bot identity].
- No external services, no databases, no frontend framework. README is the UI.
- Shields.io-style SVG generation written from scratch (no dependency).
PROJECT STRUCTURE
.githubhttps://www.aitopic.com/workflowshttps://www.aitopic.com/scoreboard.yml, rivals.yml, weekly-recap.yml, setup.yml
srchttps://www.aitopic.com/ (fetchers, scoring, svghttps://www.aitopic.com/, render_readme.js)
statehttps://www.aitopic.com/ (rivals.json, momentum.json — committed by the bot)
templateshttps://www.aitopic.com/ (README sections, SVG partials)
exampleshttps://www.aitopic.com/, testshttps://www.aitopic.com/ (fixtures for API responses; golden SVG tests), LICENSE (MIT)
README REQUIREMENTS
- Badges: momentum score, cluster rank, license.
- 15-second animated demo GIF: a README visibly updating itself after a push,
and a rival overtaking the repo's rank live.
- Quick start: click "Use this template" → done; README shows first scoreboard
within one workflow run. No tokens needed.
- "How the game works" table: points for commits, merges, stars, beating rivals.
- A live example: link to the RivalMode repo itself using RivalMode
(the project must be its own first user — eat your own dog food).
TESTING
- Fixture-based unit tests for scoring and SVG generation.
- Integration test workflow that runs the full pipeline against a scratch repo.
- Snapshot tests for README rendering; API-failure graceful degradation tests.
LICENSE: MIT.
FIRST-RELEASE CHECKLIST
- Ship with the project's own README as the flagship live demo.
- Launch angle: "My repo roasts me when a rival passes it" — post the moment
a fork out-commits your repo; pin that README state.
- Seed 3-5 template categories (app, cli, skill, site) so rivals clustering
works out of the box.
- CONTRIBUTING.md: community themes for the scoreboard SVG (the visual moat).
Comments & Questions (0)
No comments yet
Be the first to comment!