Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.
JavaScript 3d-generationai-agentsanimationavatardigital-humangenerative-aiglbgltfimage-to-3dllmmcpmcp-servermodel-context-protocolsolanatext-to-3dthreejsweb-componentswebglwebxrx402
docs(prompts): retire parity order 017 now that the earnings leaderboard is verified end to end
nirholas12df77518587
diff --git a/prompts/finish/017-parity-03-earnings-leaderboard.md b/prompts/finish/017-parity-03-earnings-leaderboard.mddeleted file mode 100644index ab51d910a..000000000--- a/prompts/finish/017-parity-03-earnings-leaderboard.md+++ /dev/null@@ -1,59 +0,0 @@-# parity 03: agents ranked by what they earned, on /leaderboard--How to run: paste this file's repo path into a fresh Claude Code chat in this repository and say "run this work order". Runnable after order 015 (per-agent earnings) has shipped; step 0 checks.--## Operating clause (binding)--- Read CLAUDE.md first, then [_context/parity-00-CONTEXT.md](_context/parity-00-CONTEXT.md). CLAUDE.md overrides everything, including this file.-- Finish 100% in this session. Never end the turn with a question, an option list, or an unexecuted plan. A judgment call goes in one line of the final report; it never becomes a question that halts work.-- The only permitted stops are the CLAUDE.md stop-and-ask gates: spending real funds or any irreversible on-chain write, git push or a production deploy, committing content that names a crypto project other than $THREE, and destroying unrecoverable data. Where this order hits one, it says so, and you batch every such ask into ONE message after everything else is done.-- Never name Competitor X in anything you commit. If a reference is unavoidable, write "Competitor X".-- No mocks, no fake data, no placeholder stubs, no unfinished-work markers, no commented-out code. Real APIs and real integrations only.-- The em-dash and en-dash characters are banned in everything you write.-- Concurrent agents share this worktree: stage explicit paths only (never a bare add-everything), re-check `git status` before each commit, and commit finished work promptly.-- Before committing, run `npm run check:rules -- --paths <files you touched>`. It must exit 0.--## Why this matters--Competitor X's leaderboard ranks agents by what they earned and brings builders back to watch their rank. three.ws's `/leaderboard` (`pages/leaderboard.html` + `src/leaderboard.js`, data from `/api/sniper/leaderboard` via `getLeaderboard` in `api/_lib/trader-stats.js`) ranks trading agents only, by score, realized P&L, win rate or ROI. Nothing ranks agents by creator fees or service income. `/economy`'s "Agents earning" section ranks by rating and buyer count, not money.--Also found on 2026-09-30: two launch counts disagree. `api/leaderboard/unified.js` and `api/cron/leaderboard-rollup.js` count launches from `agent_identities.meta->'token'->>'mint'`, which agent-wallet launches leave empty (as `src/avatar-page.js` itself warns), while `daily-match` and `pulse` use `pump_agent_mints`. The `launches` board undercounts.--## Step 0: re-derive the current state-- ls prompts/finish/015-parity-01-creator-earnings.md 2>/dev/null && echo "015 still open: run it first"- grep -rn "agent_coin_earnings\|/earnings" api/agents api/_lib --include=*.js | head- sed -n 880,980p api/_lib/trader-stats.js- grep -n "meta->'token'->>'mint'" api/leaderboard/unified.js api/cron/leaderboard-rollup.js- grep -n "window\|sort" src/leaderboard.js | head -30--If 015 has not shipped, stop here, run 015, and come back: this board has no data without it.--## Tasks--1. **An "Earned" board.** A new tab on `/leaderboard` (the page keeps its trading boards): agents ranked by earnings in the selected window (24h, 7d, 30d, all), where earnings are creator fees (015's snapshot) plus service income (x402 skill sales and hires: `agent_revenue_events`, `agent_hires`), each column shown separately with the total. Row: rank, agent name and portrait linking to `/agents/:id`, total in SOL with USD, the split, and the agent's coin if any. Rank movement versus the previous window when the data supports it.-2. **API.** `GET /api/leaderboard/earnings?window=&limit=&offset=` with the same caching pattern as the sniper board (`public, max-age=10, s-maxage=20` or longer if the data refreshes slower), paginated, with a `method` string.-3. **Fix the launch count** in `unified.js` and `leaderboard-rollup.js` to count from `pump_agent_mints` (plus `fixed_supply_launches`), with a test that fails on the old query.-4. **Share and link.** The board's current window and tab live in the URL. Link the Earned tab from order 015's "Earned" card on agent pages ("#12 this week"). Add an OG image variant if `api/og-leaderboard.js` supports tabs.-5. **Docs.** API reference entry, `STRUCTURE.md` row update, changelog entry.--## Definition of done--- [ ] `/leaderboard` has an Earned tab showing real agents with real figures for each window, browser-verified at 375, 768 and 1440 px, both themes, zero console errors, empty window state designed.-- [ ] `GET /api/leaderboard/earnings` returns ranked rows whose totals equal the sum of their per-agent `/api/agents/:id/earnings` figures for the same window (a test or a scripted cross-check on real data).-- [ ] The launches count fix has a failing-then-passing test.-- [ ] `npm test` passes for touched suites; docs and changelog updated.--## Never blocked--| Blocker | Resolution (act, do not ask) |-|---|---|-| Few agents have earned anything | Ship the board with what exists and a strong empty-window state ("be the first: launch a coin" linking to `/launch`). Never pad with test agents. |-| Service income and creator fees are in different currencies | Convert both to SOL and USD at the price used for the window (`api/_lib/sol-price.js`) and state it in `method`. |--## Close out (required)--1. Verify every Definition of done line with the actual command output in front of you. Never claim a line you did not verify.-2. Commit with explicit paths and a subject that describes the diff (house style: `type(scope): what changed and why a reader cares`).-3. If every Definition of done line passes, delete this file in that same commit (`git rm prompts/finish/017-parity-03-earnings-leaderboard.md`) and append a dated entry to [_context/parity-PROGRESS.md](_context/parity-PROGRESS.md) with the commit SHAs. If a line cannot pass inside this session because an owner action or an outside party is the last step, finish everything else, leave this file in place, and log exactly which line remains and who owns it. Never delete this file on a partial.-4. Final report, in this order: what step 0 measured; what changed (file list with commit SHAs); evidence for each Definition of done line; the single batched owner message, if the order has a gate; one-line judgment calls. No trailing questions.diff --git a/prompts/finish/_context/parity-00-CONTEXT.md b/prompts/finish/_context/parity-00-CONTEXT.mdindex 5ceb99fef..7fe7226ec 100644--- a/prompts/finish/_context/parity-00-CONTEXT.md+++ b/prompts/finish/_context/parity-00-CONTEXT.md@@ -48,7 +48,7 @@ Verify in a real browser: `npm run dev` (port 3000; reuse it if another agent is|---|---|---|| [015](../015-parity-01-creator-earnings.md) | Public per-agent creator earnings (API, agent page, coin page) | none || [016](../016-parity-02-analytics.md) | `/analytics`: one page of live platform totals and growth | none |-| [017](../017-parity-03-earnings-leaderboard.md) | Agents ranked by SOL earned on `/leaderboard` | needs 015 |+| 017 (retired 2026-10-08) | Agents ranked by SOL earned on `/leaderboard` | needs 015 || [018](../018-parity-04-agent-as-paid-api.md) | Sell a whole agent as a paid x402 endpoint | none (buyers pay; test with the spend gate) || [019](../019-parity-05-experiments.md) | `/experiments`: public write-ups of what we tried and what the numbers said | none || [020](../020-parity-06-success-stories.md) | `/stories`: opt-in case studies with verifiable on-chain metrics | none |diff --git a/prompts/finish/_context/parity-PROGRESS.md b/prompts/finish/_context/parity-PROGRESS.mdindex 1190ce6cd..1a3ac93d4 100644--- a/prompts/finish/_context/parity-PROGRESS.md+++ b/prompts/finish/_context/parity-PROGRESS.md@@ -46,3 +46,13 @@ Cross-session handoff for the `parity-` orders ([parity-00-CONTEXT.md](parity-00- Verified: red run on the old two lines (2 tests fail), green now; 54 tests across the launcher, claimer, earnings and MCP suites pass, plus the rewritten `tests/pump-creator-fees.test.js`. Production `GET /api/agents/<id>/earnings` returns real figures for Orion #27 (0.00485 SOL) and a clean `has_coins: false` for the QA agent. Browser: the Earned card on `/agents/:id` and `/agents/:id/profile` and the Economics block on `/launches/:mint` render at 375, 768 and 1440 px in both themes with no horizontal overflow; the no-coin empty state and the forced-500 error state ("Couldn't load earnings ... Try again") render.- Not from the earnings code but seen on the same pages: `/api/pump/coin` answers 404 `coin_not_found` for a coin pump.fun no longer indexes, which the browser logs as a console error on the agent and coin pages.- Follow-up for the owner (out of scope by the order's own rule): automatic claiming for user-launched coins.++## 2026-10-08: order 017, earnings leaderboard on /leaderboard (closed)++- Step 0: 015 had shipped. The API and the launch-count fix were already in (`2be894e19`: `GET /api/leaderboard/earnings`, shared `api/_lib/launch-counts.js` for `unified.js` and `leaderboard-rollup.js`, PGlite test), and so was the Earned tab (`c703afead`: `src/leaderboard-earned.js`, `?tab=earned&window=` in the URL). The agent page's Earned card already linked its rank ("#1 this week") to `/leaderboard?tab=earned&window=7d`. Missing: the cross-check, docs, a STRUCTURE row, the changelog entry, browser verification. A red suite was also found.+- Shipped this session: `9135bc579` (PGlite test `tests/agent-earnings-board.test.js`, which holds every board row to the agent's own earnings for all four windows, plus the live cross-check `scripts/check-earnings-board.mjs`), `09898e6f9` (API reference "Earnings leaderboard" section, the unified board's launches source, STRUCTURE row for `/leaderboard`, changelog entry, and the empty window no longer claiming a refresh time), `664f3da0f` (`tests/api/leaderboard-rollup-cron.test.js` had been red since `2be894e19`: its sql mock let the new LIMIT fragment consume a queued result).+- Measured on the production database through a local API server (read-only): 24h 0 ranked agents, 7d 1, 30d 9, all-time 46 (2.895 SOL total). `node scripts/check-earnings-board.mjs --base http://localhost:3108` reported every row equal to its agent page in all four windows. Launch-count test: 2 of 3 fail on the old `unified.js`, 3 of 3 pass now. 37 related suites, 420 tests green.+- Browser: `/leaderboard?tab=earned` at 375, 768 and 1440 px, dark and light, all four windows. Zero console errors or warnings, no horizontal overflow. The 24h empty state ("Launch a coin" to `/launch`, "See all-time earnings"), the forced-503 error state with a working "Try again", and the "#1 this week" link on an agent page were all exercised.+- Not live: production answers 404 for `/api/leaderboard/earnings` until the next deploy (order 919 / the owner). The snapshot behind the board was last refreshed at 04:36 UTC, so the page currently shows its stale notice. The fee-client port `233305db1` from order 015 ships in the same deploy and lets the cron refresh again.+- Judgment calls: no OG variant, because `api/og-leaderboard.js` renders the $THREE holder card and has no tabs (the page uses `/api/page-og`). The regenerated feeds from `npm run build:pages` (CHANGELOG.md, public/changelog*.json/xml, features, llms, sitemap) were not committed: they also pull in other sessions' page entries that name a third-party crypto platform, which falls under the coin commit gate. The next build regenerates them from `data/changelog.json`.+- Seen but out of scope: an agent page logs a console 404 from `/api/pump/coin` for a coin pump.fun no longer indexes (already noted under order 015).