Gamified AI-adoption leaderboard
Automatically measures AI-assistant usage with no effort from staff and turns it into friendly recognition through a leaderboard and chat highlights, with company-only sign-in and role-protected data.
Problem
A company rolling out AI coding assistants across several departments had no visibility into who was using them or how much, and no light-touch way to encourage adoption. Asking staff to self-report would not have worked.
Goal
Automatically measure AI-assistant usage with zero effort from staff, and turn it into friendly, visible recognition through a leaderboard and chat highlights, with sign-in restricted to the company and data protected by role.
My role
Sole engineer. I conceived the concept and the gamification design, and built the workstation hook and installer, the backend, the dashboard, the chat bot and the deploy tooling.
Solution
A zero-touch telemetry and gamification pipeline: a session-end hook on each workstation, an authenticated serverless API, a document database guarded by security rules, a static real-time dashboard and a scheduled chat bot.
How it works
A cross-platform installer sets up a dependency-free Python hook and runs a one-time installed-app OAuth sign-in through a local callback. The resulting refresh token is stored with owner-only file permissions.
When each coding session ends, the hook reads the local session logs for token usage by model and posts a submission with an ID token. Failed posts go to a retry queue, and an import mode brings in earlier history.
A cloud function verifies the token and the company domain and writes the per-session record. Then, inside one transaction so concurrent submissions cannot corrupt totals, it updates the user's totals and tier; advances, resets or keeps the streak using the user's own local calendar date, validated on the server so a streak never breaks at midnight UTC; and only then evaluates badges, so a streak badge fires on the day it is earned. Imported history counts toward totals and tiers but never toward streaks, so importing old sessions cannot fake consistency.
A trigger on each new user sends a welcome card to the team chat.
A static dashboard reads the database directly under role-based security rules: personal stats and progress, team standings, achievements and an admin tab.
A scheduled script posts daily and weekly leaderboard cards and rotating tips.
A deploy script pulls configuration from a secret manager, injects it into placeholders, deploys and restores the placeholders, and a guard run before each deploy fails it if a placeholder or a real value would end up in the wrong place.
Technical challenges
Zero-effort collection on macOS, Windows and Linux with no extra dependencies.
Desktop sign-in for a command-line hook without a browser session to lean on.
Consistent totals, streaks and badges under concurrent submissions.
Fair streaks across time zones, and a history import that cannot inflate streaks.
Ordering badge evaluation after state changes inside one transaction.
A static dashboard that reads the database directly while each person sees only what their role allows.
Capabilities
- Automatic usage capture per session and per model
- Company-restricted sign-in
- Tiers, streaks and badges
- Personal and team dashboards
- Admin view
- Chat welcome cards and daily and weekly highlights
- Import of earlier history
- Retry queue for failed submissions
Technology
Impact
Automatic visibility of AI-tool adoption with no manual reporting, turned into a visible, friendly team game. No usage figures are claimed.
Skills demonstrated
- Full-stack serverless development
- Authentication for desktop tools
- Data modelling and security rules
- Transactional consistency
- Gamification and product design
- Developer-experience tooling
- Secret handling in deployment
Demo
PlannedA dashboard seeded with synthetic users and teams under a neutral theme (fictional teams and made-up people with generated avatars): tier progress, streaks, badges, team standings, a sample daily-highlight card, and an animated flow diagram from session end to hook, API, database, dashboard and chat. No real staff, logos, departments or internal theme names.
Not built yet. A demo here uses only invented names and data.