Skip to content

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.

feat: wow-sprint tasks, build hardening, pump + cron + chat improvements

nirholas3731152d9351
diff --git a/agent-payments-sdk/package.json b/agent-payments-sdk/package.json
index f771d6081..99763c91f 100644
--- a/agent-payments-sdk/package.json
+++ b/agent-payments-sdk/package.json
@@ -68,7 +68,6 @@
"@ethereum-attestation-service/eas-sdk": "0.29.1",
"@metaplex-foundation/js": "^0.20.1",
"@pump-fun/pump-sdk": "^1.36.0",
- "@pump-fun/pump-swap-sdk": "1.0.0",
"@solana/spl-token": "^0.4.9",
"@solana/web3.js": "^1.98.0",
"agent0-sdk": "^1.7.1",
diff --git a/api/_lib/pump.js b/api/_lib/pump.js
index 4ae2d8fae..4276ad9fa 100644
--- a/api/_lib/pump.js
+++ b/api/_lib/pump.js
@@ -17,15 +17,9 @@
// SOLANA_RPC_FALLBACK_URLS (comma-separated) enables the multi-endpoint
// RpcFallback wrapper for read-side handlers that opt in via getRpcFallback().
-import { createRequire } from 'node:module';
import { Connection, PublicKey } from '@solana/web3.js';
import { rpcFallbackFromEnv } from './solana/rpc-fallback.js';
-const require = createRequire(import.meta.url);
-function loadPumpSwapSdk() {
- return require('@pump-fun/pump-swap-sdk');
-}
-
// @solana/web3.js calls console.error() on every 429 retry attempt. Those
// retries succeed (callers see a resolved value, not a thrown error), but
// Vercel captures console.error as level:error which pollutes the error log.
@@ -219,15 +213,15 @@ export async function verifySignature({ network, signature }) {
}
// Resolve the canonical pump.fun AMM pool for `mint` (post-graduation). Pass
-// `quoteMint` for USDC-paired coins — uses canonicalPumpPoolPdaWithQuote instead
-// of the default WSOL PDA. Omit (or pass null) for SOL-paired coins.
+// `quoteMint` for USDC-paired coins — derives the PDA with the explicit quote
+// mint instead of the default WSOL PDA. Omit (or pass null) for SOL-paired coins.
// return everything `buyQuoteInput` / `sellBaseInput` need to price a swap.
// Quote currency is WSOL on the canonical pool.
//
// Throws { status: 404, code: 'pool_not_found' } if no pool exists yet.
export async function getAmmPoolState({ network = 'mainnet', mint, quoteMint = null } = {}) {
if (!mint) throw Object.assign(new Error('mint required'), { status: 400 });
- const [{ canonicalPumpPoolPda, canonicalPumpPoolPdaWithQuote, OnlinePumpAmmSdk, PumpAmmSdk }, web3, BN, spl] =
+ const [{ canonicalPumpPoolPda, OnlinePumpAmmSdk, PumpAmmSdk }, web3, BN, spl] =
await Promise.all([
import('@pump-fun/pump-swap-sdk'),
import('@solana/web3.js'),
@@ -238,7 +232,7 @@ export async function getAmmPoolState({ network = 'mainnet', mint, quoteMint = n
const mintPk = mint instanceof PublicKey ? mint : new PublicKey(mint);
const quoteMintPk = quoteMint instanceof PublicKey ? quoteMint : (quoteMint ? new PublicKey(quoteMint) : null);
const poolKey = quoteMintPk
- ? canonicalPumpPoolPdaWithQuote(mintPk, quoteMintPk)
+ ? canonicalPumpPoolPda(mintPk, quoteMintPk)
: canonicalPumpPoolPda(mintPk);
const online = new OnlinePumpAmmSdk(connection);
diff --git a/api/chat.js b/api/chat.js
index c5d31b958..9d93d3efd 100644
--- a/api/chat.js
+++ b/api/chat.js
@@ -315,12 +315,15 @@ export default wrap(async (req, res) => {
let upstream;
let routeIdx = 0;
+ // Tool support varies by model/provider. We always ask with the action tools
+ // first; if a route rejects them we retry that same route without tools.
+ let includeTools = true;
while (true) {
try {
upstream = await fetch(route.url, {
method: 'POST',
headers: route.headers,
- body: JSON.stringify(route.buildPayload({ systemPrompt, history, maxTokens })),
+ body: JSON.stringify(route.buildPayload({ systemPrompt, history, maxTokens, includeTools })),
});
} catch (err) {
captureException(err, { route: 'chat', stage: 'fetch', provider: route.name });
@@ -329,11 +332,37 @@ export default wrap(async (req, res) => {
routeIdx++;
if (routeIdx < fallbackRoutes.length) {
route = fallbackRoutes[routeIdx];
+ includeTools = true;
continue;
}
return error(res, 502, 'upstream_unavailable', 'chat backend unreachable');
}
+ // OpenRouter (and some OpenAI-compatible endpoints) reject tool-augmented
+ // requests for models whose backing provider has no function-calling
+ // support, with a 404 "No endpoints found that support tool use". Retry
+ // once on the same route without the action tools so the chat still
+ // answers — it just can't drive 3D viewer actions for that model.
+ if (upstream.status === 404 && includeTools && route.style === 'openai') {
+ const text = await upstream.text().catch(() => '');
+ if (/tool[\s-]?use|support tools|require_parameters/i.test(text)) {
+ console.warn(`[chat:${route.name}] ${route.model} has no tool-capable endpoint — retrying without action tools`);
+ includeTools = false;
+ continue;
+ }
+ // Not a tool-use rejection: try the next provider, else surface it.
+ if (routeIdx + 1 < fallbackRoutes.length) {
+ console.warn(`[chat:${route.name}] 404 — falling over to ${fallbackRoutes[routeIdx + 1].name}/${fallbackRoutes[routeIdx + 1].model}: ${text.slice(0, 120)}`);
+ routeIdx++;
+ route = fallbackRoutes[routeIdx];
+ includeTools = true;
+ continue;
+ }
+ captureException(new Error(`${route.name} upstream 404`), { route: 'chat', provider: route.name, status: 404, body: text.slice(0, 400) });
+ console.error(`[chat:${route.name}]`, 404, text.slice(0, 400));
+ return error(res, 502, 'chat_failed', 'chat backend returned an error');
+ }
+
// Fall over on rate-limit (429) and transient gateway errors (502/503/504).
// Don't re-fetch on 4xx other than 429 — those are caller mistakes that
// the next provider would also reject.
@@ -342,6 +371,7 @@ export default wrap(async (req, res) => {
console.warn(`[chat:${route.name}] ${upstream.status} — falling over to ${fallbackRoutes[routeIdx + 1].name}/${fallbackRoutes[routeIdx + 1].model}: ${text.slice(0, 120)}`);
routeIdx++;
route = fallbackRoutes[routeIdx];
+ includeTools = true;
continue;
}
break;
@@ -506,12 +536,12 @@ function makeRoute(name, cfg, apiKey, model) {
'anthropic-version': '2023-06-01',
'content-type': 'application/json',
},
- buildPayload: ({ systemPrompt, history, maxTokens }) => ({
+ buildPayload: ({ systemPrompt, history, maxTokens, includeTools = true }) => ({
model,
max_tokens: maxTokens,
system: systemPrompt,
messages: history,
- tools: ACTION_TOOLS,
+ ...(includeTools ? { tools: ACTION_TOOLS } : {}),
stream: true,
}),
};
@@ -526,12 +556,11 @@ function makeRoute(name, cfg, apiKey, model) {
'Content-Type': 'application/json',
...(cfg.extraHeaders || {}),
},
- buildPayload: ({ systemPrompt, history, maxTokens }) => ({
+ buildPayload: ({ systemPrompt, history, maxTokens, includeTools = true }) => ({
model,
max_tokens: maxTokens,
messages: [{ role: 'system', content: systemPrompt }, ...history],
- tools: OPENAI_TOOLS,
- tool_choice: 'auto',
+ ...(includeTools ? { tools: OPENAI_TOOLS, tool_choice: 'auto' } : {}),
stream: true,
}),
};
diff --git a/api/cron/[name].js b/api/cron/[name].js
index c1b222dc9..2971341f3 100644
--- a/api/cron/[name].js
+++ b/api/cron/[name].js
@@ -2951,7 +2951,7 @@ const DRAFT_SYSTEM = `You write tweets for AI agents on three.ws. Tweets must be
- Avoid em-dashes.
Output ONLY the tweet text, nothing else.`;
-async function llmDraft({ system, user, max = 200 }) {
+async function anthropicDraft({ system, user, max }) {
const r = await fetch('https://api.anthropic.com/v1/messages', {
method: 'POST',
headers: {
@@ -2966,9 +2966,55 @@ async function llmDraft({ system, user, max = 200 }) {
messages: [{ role: 'user', content: user }],
}),
});
- if (!r.ok) throw new Error(`llm failed: ${await r.text()}`);
+ if (!r.ok) throw new Error(`anthropic ${r.status}: ${(await r.text()).slice(0, 200)}`);
+ const data = await r.json();
+ return data.content?.[0]?.text || '';
+}
+
+async function openaiCompatDraft({ url, key, model, system, user, max, extraHeaders = {} }) {
+ const r = await fetch(url, {
+ method: 'POST',
+ headers: { 'content-type': 'application/json', authorization: `Bearer ${key}`, ...extraHeaders },
+ body: JSON.stringify({
+ model,
+ max_tokens: max,
+ messages: [
+ { role: 'system', content: system },
+ { role: 'user', content: user },
+ ],
+ }),
+ });
+ if (!r.ok) throw new Error(`${model} ${r.status}: ${(await r.text()).slice(0, 200)}`);
const data = await r.json();
- let text = (data.content?.[0]?.text || '').trim();
+ return data.choices?.[0]?.message?.content || '';
+}
+
+// Draft short post text. Mirrors the documented env.js fallback order: prefer
+// Anthropic, then Groq, then OpenRouter — so persona/digest triggers keep working
+// whenever ANY LLM key is configured rather than hard-depending on ANTHROPIC_API_KEY.
+async function llmDraft({ system, user, max = 200 }) {
+ let text;
+ if (env.ANTHROPIC_API_KEY) {
+ text = await anthropicDraft({ system, user, max });
+ } else if (env.GROQ_API_KEY) {
+ text = await openaiCompatDraft({
+ url: 'https://api.groq.com/openai/v1/chat/completions',
+ key: env.GROQ_API_KEY,
+ model: 'llama-3.3-70b-versatile',
+ system, user, max,
+ });
+ } else if (env.OPENROUTER_API_KEY) {
+ text = await openaiCompatDraft({
+ url: 'https://openrouter.ai/api/v1/chat/completions',
+ key: env.OPENROUTER_API_KEY,
+ model: 'meta-llama/llama-3.3-70b-instruct',
+ system, user, max,
+ extraHeaders: { 'HTTP-Referer': 'https://three.ws', 'X-Title': 'three.ws agent' },
+ });
+ } else {
+ throw new Error('no LLM provider configured (set ANTHROPIC_API_KEY, GROQ_API_KEY, or OPENROUTER_API_KEY)');
+ }
+ text = (text || '').trim();
if (text.startsWith('"') && text.endsWith('"')) text = text.slice(1, -1).trim();
if (text.length > 280) text = text.slice(0, 279) + '…';
return text;
diff --git a/api/marketplace/[action].js b/api/marketplace/[action].js
index 83700a7e0..901fad919 100644
--- a/api/marketplace/[action].js
+++ b/api/marketplace/[action].js
@@ -187,7 +187,8 @@ async function handleTheme(req, res) {
COALESCE((SELECT AVG(rating)::numeric(3,2) FROM agent_reviews r WHERE r.agent_id = a.id), 0) AS rating_avg,
COALESCE((SELECT COUNT(*) FROM agent_reviews r WHERE r.agent_id = a.id), 0) AS rating_count,
a.published_at, a.created_at,
- v.storage_key AS avatar_storage_key, v.is_public AS avatar_public,
+ v.storage_key AS avatar_storage_key,
+ (v.visibility IS NULL OR v.visibility IN ('public', 'unlisted')) AS avatar_public,
v.thumbnail_key
FROM agent_identities a
LEFT JOIN avatars v ON v.id = a.avatar_id AND v.deleted_at IS NULL
@@ -204,7 +205,8 @@ async function handleTheme(req, res) {
a.views_count, a.forks_count,
0::numeric AS rating_avg, 0::int AS rating_count,
a.published_at, a.created_at,
- v.storage_key AS avatar_storage_key, v.is_public AS avatar_public,
+ v.storage_key AS avatar_storage_key,
+ (v.visibility IS NULL OR v.visibility IN ('public', 'unlisted')) AS avatar_public,
v.thumbnail_key
FROM agent_identities a
LEFT JOIN avatars v ON v.id = a.avatar_id AND v.deleted_at IS NULL
diff --git a/api/pump/[action].js b/api/pump/[action].js
index 0d044f2ca..9247e12d8 100644
--- a/api/pump/[action].js
+++ b/api/pump/[action].js
@@ -2876,7 +2876,7 @@ async function handleCreateFeeSharingPrep(req, res) {
if (!mintPk || !creatorPk || !payerPk) return error(res, 400, 'validation_error', 'invalid pubkeys');
try {
- const { canonicalPumpPoolPda, canonicalPumpPoolPdaWithQuote } = await import('@pump-fun/pump-swap-sdk');
+ const { canonicalPumpPoolPda } = await import('@pump-fun/pump-swap-sdk');
const { bondingCurvePda } = await import('@pump-fun/pump-sdk');
const { isLegacyQuoteMint } = await getPumpSdkV2({ network: body.network });
const { sdk, connection } = await getPumpSdk({ network: body.network });
@@ -2887,7 +2887,7 @@ async function handleCreateFeeSharingPrep(req, res) {
let poolPk;
if (bc && bc.quoteMint && !isLegacyQuoteMint(bc.quoteMint)) {
- poolPk = canonicalPumpPoolPdaWithQuote(mintPk, bc.quoteMint);
+ poolPk = canonicalPumpPoolPda(mintPk, bc.quoteMint);
} else {
poolPk = canonicalPumpPoolPda(mintPk);
}
diff --git a/character-studio/package.json b/character-studio/package.json
index f17669dd4..828171bee 100644
--- a/character-studio/package.json
+++ b/character-studio/package.json
@@ -27,7 +27,6 @@
"@metaplex-foundation/umi-serializers": "^1.5.1",
"@pixiv/three-vrm": "^3.5.3",
"@pump-fun/pump-sdk": "1.1.0",
- "@pump-fun/pump-swap-sdk": "1.0.0",
"@solana/actions": "0.0.2",
"@solana/pay": "1.0.16",
"@solana/spl-token": "^0.4.14",
diff --git a/multiplayer/package.json b/multiplayer/package.json
index 8b2723e41..1ca860e16 100644
--- a/multiplayer/package.json
+++ b/multiplayer/package.json
@@ -21,7 +21,6 @@
"@ethereum-attestation-service/eas-sdk": "0.29.1",
"@metaplex-foundation/js": "^0.20.1",
"@pump-fun/pump-sdk": "1.1.0",
- "@pump-fun/pump-swap-sdk": "1.0.0",
"@solana/actions": "0.0.2",
"@solana/pay": "1.0.16",
"agent0-sdk": "^1.7.1",
diff --git a/package-lock.json b/package-lock.json
index 2a2970b2c..e713dc899 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -26,10 +26,10 @@
"@ai-sdk/anthropic": "^3.0.79",
"@ai-sdk/openai": "^3.0.65",
"@avaturn/sdk": "^1.1.4",
- "@aws-sdk/client-marketplace-entitlement-service": "latest",
- "@aws-sdk/client-marketplace-metering": "latest",
- "@aws-sdk/client-s3": "latest",
- "@aws-sdk/s3-request-presigner": "latest",
+ "@aws-sdk/client-marketplace-entitlement-service": "^3.1053.0",
+ "@aws-sdk/client-marketplace-metering": "^3.1053.0",
+ "@aws-sdk/client-s3": "^3.1030.0",
+ "@aws-sdk/s3-request-presigner": "^3.1030.0",
"@bonfida/spl-name-service": "0.1.67",
"@chenglou/pretext": "^0.0.7",
"@coinbase/x402": "^2.1.0",
@@ -53,7 +53,7 @@
"@pixiv/three-vrm": "^3.5.3",
"@pump-fun/agent-payments-sdk": "^3.1.0",
"@pump-fun/pump-sdk": "^1.36.0",
- "@pump-fun/pump-swap-sdk": "^1.0.0",
+ "@pump-fun/pump-swap-sdk": "^1.16.0",
"@pythnetwork/hermes-client": "^3.1.0",
"@recast-navigation/core": "^0.43.1",
"@recast-navigation/three": "^0.43.1",
@@ -66,7 +66,7 @@
"@solana/spl-token": "^0.4.14",
"@solana/wallet-adapter-base": "^0.9.23",
"@solana/wallet-adapter-phantom": "^0.9.24",
- "@solana/web3.js": "latest",
+ "@solana/web3.js": "^1.98.4",
"@sparticuz/chromium-min": "^148.0.0",
"@tetsuo-ai/protocol": "^0.2.0",
"@tetsuo-ai/sdk": "^1.4.0",
@@ -131,16 +131,16 @@
"knip": "^6.14.2",
"playwright": "^1.45.1",
"prettier": "^3.2.5",
- "sharp": "latest",
- "vite": "latest",
+ "sharp": "^0.34.5",
+ "vite": "^7.3.2",
"vite-plugin-node-polyfills": "^0.2.0",
- "vite-plugin-pwa": "latest",
- "vitest": "latest",
+ "vite-plugin-pwa": "^1.2.0",
+ "vitest": "^4.1.4",
"workbox-build": "^7.4.0",
"workbox-window": "^7.4.0"
},
"engines": {
- "node": "24.x"
+ "node": "22.x"
}
},
"agent-payments-sdk": {
@@ -153,7 +153,6 @@
"@ethereum-attestation-service/eas-sdk": "0.29.1",
"@metaplex-foundation/js": "^0.20.1",
"@pump-fun/pump-sdk": "^1.36.0",
- "@pump-fun/pump-swap-sdk": "1.0.0",
"@solana/spl-token": "^0.4.9",
"@solana/web3.js": "^1.98.0",
"agent0-sdk": "^1.7.1",
@@ -306,7 +305,6 @@
"@metaplex-foundation/umi-serializers": "^1.5.1",
"@pixiv/three-vrm": "^3.5.3",
"@pump-fun/pump-sdk": "1.1.0",
- "@pump-fun/pump-swap-sdk": "1.0.0",
"@solana/actions": "0.0.2",
"@solana/pay": "1.0.16",
"@solana/spl-token": "^0.4.14",
@@ -1218,7 +1216,6 @@
"@ethereum-attestation-service/eas-sdk": "0.29.1",
"@metaplex-foundation/js": "^0.20.1",
"@pump-fun/pump-sdk": "1.1.0",
- "@pump-fun/pump-swap-sdk": "1.0.0",
"@solana/actions": "0.0.2",
"@solana/pay": "1.0.16",
"agent0-sdk": "^1.7.1",
@@ -12539,37 +12536,6 @@
"node": ">=17"
}
},
- "node_modules/@nirholas/pump-sdk/node_modules/@pump-fun/pump-swap-sdk": {
- "version": "1.16.0",
- "resolved": "https://registry.npmjs.org/@pump-fun/pump-swap-sdk/-/pump-swap-sdk-1.16.0.tgz",
- "integrity": "sha512-UFj4+c3/TZtZ2eNtzJ2Q9SoBr854nSWNdWexpL8Vt04/RnCZisAAtD4gzQXtvyTjefsrcwZOXZ+9g14QAYJ/HA==",
- "license": "MIT",
- "dependencies": {
- "@coral-xyz/anchor": "^0.31.1",
- "@solana/spl-token": "^0.4.9",
- "@solana/web3.js": "^1.98.2",
- "bn.js": "^5.2.2",
- "bs58": "^6.0.0"
- },
- "engines": {
- "node": ">=16"
- }
- },
- "node_modules/@nirholas/pump-sdk/node_modules/@pump-fun/pump-swap-sdk/node_modules/base-x": {
- "version": "5.0.1",
- "resolved": "https://registry.npmjs.org/base-x/-/base-x-5.0.1.tgz",
- "integrity": "sha512-M7uio8Zt++eg3jPj+rHMfCC+IuygQHHCOU+IYsVtik6FWjuYpVt/+MRKcgsAMHh8mMFAwnB+Bs+mTrFiXjMzKg==",
- "license": "MIT"
- },
- "node_modules/@nirholas/pump-sdk/node_modules/@pump-fun/pump-swap-sdk/node_modules/bs58": {
- "version": "6.0.0",
- "resolved": "https://registry.npmjs.org/bs58/-/bs58-6.0.0.tgz",
- "integrity": "sha512-PD0wEnEYg6ijszw/u8s+iI3H17cTymlrwkKhDhPZq+Sokl3AU4htyBFTjAeNAlCCmg0f53g6ih3jATyCKftTfw==",
- "license": "MIT",
- "dependencies": {
- "base-x": "^5.0.0"
- }
- },
"node_modules/@nirholas/pump-sdk/node_modules/base-x": {
"version": "3.0.11",
"resolved": "https://registry.npmjs.org/base-x/-/base-x-3.0.11.tgz",
@@ -15603,10 +15569,37 @@
"@rollup/rollup-linux-x64-gnu": "*"
}
},
- "node_modules/@pump-fun/pump-sdk/node_modules/@pump-fun/pump-swap-sdk": {
- "version": "1.16.0",
- "resolved": "https://registry.npmjs.org/@pump-fun/pump-swap-sdk/-/pump-swap-sdk-1.16.0.tgz",
- "integrity": "sha512-UFj4+c3/TZtZ2eNtzJ2Q9SoBr854nSWNdWexpL8Vt04/RnCZisAAtD4gzQXtvyTjefsrcwZOXZ+9g14QAYJ/HA==",
+ "node_modules/@pump-fun/pump-sdk/node_modules/base-x": {
+ "version": "3.0.11",
+ "resolved": "https://registry.npmjs.org/base-x/-/base-x-3.0.11.tgz",
+ "integrity": "sha512-xz7wQ8xDhdyP7tQxwdteLYeFfS68tSMNCZ/Y37WJ4bhGfKPpqEIlmIyueQHqOyoPhE6xNUqjzRr8ra0eF9VRvA==",
+ "license": "MIT",
+ "dependencies": {
+ "safe-buffer": "^5.0.1"
+ }
+ },
+ "node_modules/@pump-fun/pump-sdk/node_modules/eventemitter3": {
+ "version": "4.0.7",
+ "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz",
+ "integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==",
+ "license": "MIT"
+ },
+ "node_modules/@pump-fun/pump-sdk/node_modules/superstruct": {
+ "version": "0.15.5",
+ "resolved": "https://registry.npmjs.org/superstruct/-/superstruct-0.15.5.tgz",
+ "integrity": "sha512-4AOeU+P5UuE/4nOUkmcQdW5y7i9ndt1cQd/3iUe+LTz3RxESf/W/5lg4B74HbDMMv8PHnPnGCQFH45kBcrQYoQ==",
+ "license": "MIT"
+ },
+ "node_modules/@pump-fun/pump-sdk/node_modules/undici-types": {
+ "version": "6.25.0",
+ "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.25.0.tgz",
+ "integrity": "sha512-vOw74RVVYFtnooUkZPxsY1GuuNNupSrCcANIAaDekpZ/Dp1sBuLLl5n2UCKpzxgmOwD66S4Jj24MrhmcDG+0vw==",
+ "license": "MIT"
+ },
+ "node_modules/@pump-fun/pump-swap-sdk": {
+ "version": "1.17.0",
+ "resolved": "https://registry.npmjs.org/@pump-fun/pump-swap-sdk/-/pump-swap-sdk-1.17.0.tgz",
+ "integrity": "sha512-8G/rCIzIzt7xdde1Ax+mOIcUZ0p5iC8a9NU0ufMsqeWDSBRy1WjbsaJIfkKbNCrp3nOvDzBFhSo+9LnEy2+12g==",
"license": "MIT",
"dependencies": {
"@coral-xyz/anchor": "^0.31.1",
@@ -15619,7 +15612,40 @@
"node": ">=16"
}
},
- "node_modules/@pump-fun/pump-sdk/node_modules/base-x": {
+ "node_modules/@pump-fun/pump-swap-sdk/node_modules/@coral-xyz/anchor": {
+ "version": "0.31.1",
+ "resolved": "https://registry.npmjs.org/@coral-xyz/anchor/-/anchor-0.31.1.tgz",
+ "integrity": "sha512-QUqpoEK+gi2S6nlYc2atgT2r41TT3caWr/cPUEL8n8Md9437trZ68STknq897b82p5mW0XrTBNOzRbmIRJtfsA==",
+ "license": "(MIT OR Apache-2.0)",
+ "dependencies": {
+ "@coral-xyz/anchor-errors": "^0.31.1",
+ "@coral-xyz/borsh": "^0.31.1",
+ "@noble/hashes": "^1.3.1",
+ "@solana/web3.js": "^1.69.0",
+ "bn.js": "^5.1.2",
+ "bs58": "^4.0.1",
+ "buffer-layout": "^1.2.2",
+ "camelcase": "^6.3.0",
+ "cross-fetch": "^3.1.5",
+ "eventemitter3": "^4.0.7",
+ "pako": "^2.0.3",
+ "superstruct": "^0.15.4",
+ "toml": "^3.0.0"
+ },
+ "engines": {
+ "node": ">=17"
+ }
+ },
+ "node_modules/@pump-fun/pump-swap-sdk/node_modules/@coral-xyz/anchor/node_modules/bs58": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/bs58/-/bs58-4.0.1.tgz",
+ "integrity": "sha512-Ok3Wdf5vOIlBrgCvTq96gBkJw+JUEzdBgyaza5HLtPm7yTHkjRy8+JzNyHF7BHa0bNWOQIp3m5YF0nnFcOIKLw==",
+ "license": "MIT",
+ "dependencies": {
+ "base-x": "^3.0.2"
+ }
+ },
+ "node_modules/@pump-fun/pump-swap-sdk/node_modules/base-x": {
"version": "3.0.11",
"resolved": "https://registry.npmjs.org/base-x/-/base-x-3.0.11.tgz",
"integrity": "sha512-xz7wQ8xDhdyP7tQxwdteLYeFfS68tSMNCZ/Y37WJ4bhGfKPpqEIlmIyueQHqOyoPhE6xNUqjzRr8ra0eF9VRvA==",
@@ -15628,31 +15654,18 @@
"safe-buffer": "^5.0.1"
}
},
- "node_modules/@pump-fun/pump-sdk/node_modules/eventemitter3": {
+ "node_modules/@pump-fun/pump-swap-sdk/node_modules/eventemitter3": {
"version": "4.0.7",
"resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz",
"integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==",
"license": "MIT"
},
- "node_modules/@pump-fun/pump-sdk/node_modules/superstruct": {
+ "node_modules/@pump-fun/pump-swap-sdk/node_modules/superstruct": {
"version": "0.15.5",
"resolved": "https://registry.npmjs.org/superstruct/-/superstruct-0.15.5.tgz",
"integrity": "sha512-4AOeU+P5UuE/4nOUkmcQdW5y7i9ndt1cQd/3iUe+LTz3RxESf/W/5lg4B74HbDMMv8PHnPnGCQFH45kBcrQYoQ==",
"license": "MIT"
},
- "node_modules/@pump-fun/pump-sdk/node_modules/undici-types": {
- "version": "6.25.0",
- "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.25.0.tgz",
- "integrity": "sha512-vOw74RVVYFtnooUkZPxsY1GuuNNupSrCcANIAaDekpZ/Dp1sBuLLl5n2UCKpzxgmOwD66S4Jj24MrhmcDG+0vw==",
- "license": "MIT"
- },
- "node_modules/@pump-fun/pump-swap-sdk": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/@pump-fun/pump-swap-sdk/-/pump-swap-sdk-1.0.0.tgz",
- "integrity": "sha512-96oPKxTX9sa+lDVJGLph9xgrk+T61xA5idXdDlQab6tL+yEtnrbbTLT+pc+tPThFrtjVrAzcVHEnIvKWoyFRTw==",
- "deprecated": "This version is empty",
- "license": "ISC"
- },
"node_modules/@puppeteer/browsers": {
"version": "2.13.0",
"resolved": "https://registry.npmjs.org/@puppeteer/browsers/-/browsers-2.13.0.tgz",
diff --git a/package.json b/package.json
index f0ee2e5db..0ce9de605 100644
--- a/package.json
+++ b/package.json
@@ -135,7 +135,7 @@
"@pixiv/three-vrm": "^3.5.3",
"@pump-fun/agent-payments-sdk": "^3.1.0",
"@pump-fun/pump-sdk": "^1.36.0",
- "@pump-fun/pump-swap-sdk": "^1.0.0",
+ "@pump-fun/pump-swap-sdk": "^1.16.0",
"@pythnetwork/hermes-client": "^3.1.0",
"@recast-navigation/core": "^0.43.1",
"@recast-navigation/three": "^0.43.1",
diff --git a/scripts/build-vercel.mjs b/scripts/build-vercel.mjs
index 583d194a5..972115a75 100644
--- a/scripts/build-vercel.mjs
+++ b/scripts/build-vercel.mjs
@@ -75,15 +75,52 @@ async function buildChat() {
// Guard: agent-payments-sdk/dist/ is gitignored. Vercel caches node_modules/
// across deploys and skips npm install (and therefore postinstall) when
-// package-lock.json is unchanged. If the dist is missing the Vite app build
-// fails trying to resolve the package entry. Rebuild here if needed.
+// package-lock.json is unchanged. Two failure modes follow:
+// 1. The dist is missing entirely → the Vite app build can't resolve the
+// package entry and fails.
+// 2. A stale or corrupt dist survives in the cache → e.g. a malformed ESM
+// entry crashed every cron that imports the SDK at runtime with a
+// SyntaxError ("export{…} = pkg" failing ModuleJob._instantiate).
+// `existsSync` alone misses case 2. Validate that every published entry parses
+// as a real module; rebuild from source if any is missing or syntactically bad.
+const SDK_ENTRIES = [
+ 'agent-payments-sdk/dist/index.js',
+ 'agent-payments-sdk/dist/solana/index.js',
+ 'agent-payments-sdk/dist/x402/index.js',
+ 'agent-payments-sdk/dist/evm/index.js',
+];
+
+function sdkDistIsValid() {
+ for (const rel of SDK_ENTRIES) {
+ const abs = resolve(ROOT, rel);
+ if (!existsSync(abs)) {
+ console.log(`[sdk-dist] ${rel} missing`);
+ return false;
+ }
+ try {
+ // `node --check` parses + statically links-checks the ESM without
+ // executing it. Catches the corrupt-dist case the old existsSync guard
+ // let through.
+ execSync(`node --check ${JSON.stringify(abs)}`, { stdio: 'pipe' });
+ } catch (err) {
+ const msg = (err.stderr?.toString() || err.message || '').split('\n')[0];
+ console.log(`[sdk-dist] ${rel} failed parse check: ${msg}`);
+ return false;
+ }
+ }
+ return true;
+}
+
async function ensureSDKDist() {
- const distIndex = resolve(ROOT, 'agent-payments-sdk/dist/index.js');
- if (existsSync(distIndex)) return;
- console.log('[sdk-dist] agent-payments-sdk/dist/index.js missing — rebuilding');
+ if (sdkDistIsValid()) return;
+ console.log('[sdk-dist] agent-payments-sdk dist missing or invalid — rebuilding from source');
+ execSync('rm -rf dist', { cwd: resolve(ROOT, 'agent-payments-sdk'), stdio: 'inherit' });
await run('sdk-dist', 'npm run build --prefix agent-payments-sdk', {
env: { NODE_OPTIONS: '--no-deprecation' },
});
+ if (!sdkDistIsValid()) {
+ throw new Error('[sdk-dist] rebuild produced an invalid dist — aborting');
+ }
}
async function prebuild() {
diff --git a/scripts/fix-pump-sdk-esm.mjs b/scripts/fix-pump-sdk-esm.mjs
index dd183897c..389eb26fb 100644
--- a/scripts/fix-pump-sdk-esm.mjs
+++ b/scripts/fix-pump-sdk-esm.mjs
@@ -2,11 +2,12 @@
// resolved by esbuild during Vercel API bundling.
//
// 1. @pump-fun/pump-sdk / @pump-fun/pump-swap-sdk:
-// Both ship `dist/esm/index.js` containing ES `import` statements, but
-// neither the package root nor the `dist/esm/` directory declares
-// `"type": "module"`. Node loads those files as CommonJS and throws
+// Both ship ES `import` statements in their dist files, but neither package
+// declares `"type": "module"`. Node loads those files as CommonJS and throws
// "Cannot use import statement outside a module" on first dynamic import.
-// Fix: drop a `{"type":"module"}` package.json into each `dist/esm/` folder.
+// For packages with `dist/esm/`: drop `{"type":"module"}` into that folder.
+// For packages where `dist/index.js` IS the ESM build (no dist/esm/ subdir):
+// patch `"type": "module"` into the root package.json directly.
//
// 2. @nirholas/pump-sdk:
// v1.30.0's package.json `module` and `exports.import` point at
@@ -53,6 +54,53 @@ for (const rel of esmTypeTargets) {
patched++;
}
+// @pump-fun/pump-swap-sdk's layout flipped across versions and needs the inverse
+// fix depending on which it ships:
+//
+// • Old (≤1.0.x): dist/index.js is ESM and root has no "type", so Node loads it
+// as CommonJS and the `import`/`export` syntax throws. Fix: add type:module.
+//
+// • New (1.17.0): root declares "type":"module" AND exports the CJS bundle via
+// the `require` condition (exports["."].require → ./dist/index.js, which is
+// `"use strict"; …require(…)`). Because the root is type:module, a
+// `require('@pump-fun/pump-swap-sdk')` (api/_lib/pump.js uses createRequire)
+// parses that CJS file as ESM and dies with "require is not defined in ES
+// module scope". The ESM entry lives at dist/esm/index.js and already carries
+// its own dist/esm/package.json {"type":"module"} marker (written above), so
+// dropping the root "type":"module" lets BOTH conditions resolve correctly:
+// require→dist/index.js as CJS, import→dist/esm/index.js as ESM.
+const pumpSwapPkgPath = join(repo, 'node_modules/@pump-fun/pump-swap-sdk/package.json');
+let pumpSwapPatched = false;
+if (existsSync(pumpSwapPkgPath)) {
+ const pkg = JSON.parse(readFileSync(pumpSwapPkgPath, 'utf8'));
+ const exp = pkg.exports?.['.'] || {};
+ const requireTargetRel = exp.require || pkg.main || 'dist/index.js';
+ const requireTarget = join(repo, 'node_modules/@pump-fun/pump-swap-sdk', requireTargetRel);
+ const importTargetRel = exp.import || pkg.module;
+ const head = existsSync(requireTarget) ? readFileSync(requireTarget, 'utf8').slice(0, 512) : '';
+ const requireTargetIsCjs = /^\s*["']use strict["']/.test(head) || (head.includes('require(') && !/(^|\n)\s*(export|import)\s/.test(head));
+ const importTargetAbs = importTargetRel ? join(repo, 'node_modules/@pump-fun/pump-swap-sdk', importTargetRel) : null;
+ const importTargetHasMarker =
+ importTargetAbs && existsSync(join(dirname(importTargetAbs), 'package.json')) &&
+ JSON.parse(readFileSync(join(dirname(importTargetAbs), 'package.json'), 'utf8')).type === 'module';
+
+ if (pkg.type === 'module' && requireTargetIsCjs && importTargetHasMarker) {
+ // New layout: root type:module collides with the CJS require target.
+ delete pkg.type;
+ writeFileSync(pumpSwapPkgPath, JSON.stringify(pkg, null, 2) + '\n');
+ pumpSwapPatched = true;
+ patched++;
+ } else if (pkg.type !== 'module' && (head.includes('export ') || head.includes('import '))) {
+ // Old layout: ESM main entry needs the module flag.
+ pkg.type = 'module';
+ writeFileSync(pumpSwapPkgPath, JSON.stringify(pkg, null, 2) + '\n');
+ pumpSwapPatched = true;
+ patched++;
+ } else {
+ skipped++;
+ }
+}
+
// Rewrite @nirholas/pump-sdk's exports/module to point at the real .mjs file.
const nirholasPkgPath = join(repo, 'node_modules/@nirholas/pump-sdk/package.json');
let nirholasPatched = false;
diff --git a/tasks/wow-sprint/00-START-HERE.md b/tasks/wow-sprint/00-START-HERE.md
new file mode 100644
index 000000000..1473b93a5
--- /dev/null
+++ b/tasks/wow-sprint/00-START-HERE.md
@@ -0,0 +1,56 @@
+# WOW Sprint — 20 parallel task prompts for three.ws
+
+Goal: ship a wave of fixes + features that make $three holders proud again. Each
+file in this folder is a **complete, self-contained prompt**. Open a fresh Claude
+Code session at repo root, paste the contents of one file, and let it run. Twenty
+files → twenty parallel chats.
+
+CLAUDE.md auto-loads in every session, so each prompt assumes those rules
+(no mocks, no stubs, real APIs, every state designed, push to both remotes).
+
+## The 20 tasks
+
+**Audit & quality (do these first — diagnosis feeds the rest)**
+1. `01-bug-and-lazy-code-audit.md` — prioritized report of bugs + lazy code (no fixes)
+2. `02-mock-and-stub-eradication.md` — enforce the no-mocks/no-stubs hard rules
+3. `03-dead-path-and-broken-link-audit.md` — every button works, every link resolves
+4. `04-console-errors-cleanup.md` — zero console errors/warnings across key pages
+5. `05-performance-pass.md` — bundle split, lazy 3D, no jank
+6. `06-accessibility-pass.md` — semantic HTML, keyboard nav, focus, contrast
+
+**Design & polish**
+7. `07-home-page-overhaul.md` — fix the broken `home.html`, ship a signature hero
+8. `08-design-system-tokens.md` — consolidate CSS variables into one design system
+9. `09-empty-loading-error-states.md` — design every state on key pages
+10. `10-mobile-responsive-pass.md` — flawless at 320 / 768 / 1440
+11. `11-microinteractions-motion.md` — hover/active/focus + intentional transitions
+
+**$three holder "wow" features**
+12. `12-reactive-3d-hero.md` — landing hero that reacts to live $three data
+13. `13-onchain-activity-visualization.md` — real-time 3D scene of $three trades
+14. `14-holder-dashboard.md` — real Solana/Helius holder dashboard
+15. `15-holder-leaderboard-and-badges.md` — leaderboard + gated 3D badge/PFP
+16. `16-token-page-upgrade.md` — real bonding curve + live trades on the coin page
+17. `17-holder-rewards-surface.md` — real onchain rewards/staking surface
+
+**Growth & integration**
+18. `18-marketplace-crosslinking.md` — wire marketplace ↔ agent profiles + sorting
+19. `19-shareable-og-cards.md` — screenshot-worthy share/OG image generation
+20. `20-analytics-instrumentation.md` — real event tracking + conversion funnel
+
+## Running them in parallel — avoid collisions
+
+Some tasks touch the same files. Run conflicting ones **sequentially**, or assign
+them to the same chat. Known overlaps:
+
+- `home.html` / `src/home-v4-hero.js`: tasks **04, 07, 12** → run 07 first, then 12, then 04.
+- Token data (`api/three-token`, `api/pump`, `src/pump`): tasks **13, 14, 16, 17** share data plumbing → have 14 build the shared data hook first.
+- Global CSS tokens: task **08** should land before **09, 10, 11** so they consume the tokens.
+
+Safe to run fully in parallel anytime: **01, 02, 03, 05, 06, 18, 19, 20**.
+
+## After each task
+
+Each prompt ends by asking the agent to run the **completionist** audit and to
+report what it changed. Review the diff, then push to BOTH remotes (`threeD`,
+`threews`) per CLAUDE.md — only when you approve.
diff --git a/tasks/wow-sprint/01-bug-and-lazy-code-audit.md b/tasks/wow-sprint/01-bug-and-lazy-code-audit.md
new file mode 100644
index 000000000..a52eedb56
--- /dev/null
+++ b/tasks/wow-sprint/01-bug-and-lazy-code-audit.md
@@ -0,0 +1,38 @@
+# Task: Codebase bug & lazy-code audit (diagnosis only)
+
+You are a senior engineer doing a cold-eyed audit of the three.ws codebase. Your
+job is **diagnosis, not repair** — produce a prioritized, actionable report. Do
+not change application code.
+
+## Scope
+Focus on the live frontend and API surface:
+- `src/**/*.js` (the app modules — `viewer.js`, `home-v4-hero.js`, `agent-home.js`, `pump/**`, `wallet*.js`, etc.)
+- `api/**/*.js` (Vercel functions)
+- `pages/**/*.html` (entry points wired in `vite.config.js`)
+
+Skip `node_modules`, `dist`, `dist-lib`, `vendor`, and third-party SDK folders.
+
+## What to hunt for
+1. **Real bugs** — logic errors, race conditions, unhandled promise rejections, off-by-one, wrong variable, missing `await`, broken conditionals, incorrect API contracts between frontend and `api/`.
+2. **Lazy code** — mocks, fake/sample data arrays shipped to prod, hardcoded values that should be dynamic, `setTimeout` fake-loading, stub functions, `throw new Error('not implemented')`, empty `catch {}`, commented-out code, `TODO`/`FIXME`/`// implement later`.
+3. **Broken boundaries** — network calls with no error handling at the boundary, user input not validated, missing loading/empty/error states.
+4. **Dead code** — run `npx knip` (config at `knip.config.js`) and fold its findings in.
+
+## Method
+- Grep for smells: `grep -rn "TODO\|FIXME\|not implemented\|sampleData\|mockData\|fake\|placeholder\|setTimeout(" src api pages --include=*.js --include=*.html`.
+- Read the highest-traffic modules in full: `src/home-v4-hero.js`, `src/agent-home.js`, `src/wallet.js`, `src/pump/dashboard.js`, `api/three-token/[action].js`, `api/pump/dashboard.js`.
+- Cross-check the existing `ISSUES.md` — note which listed issues are still unfixed.
+
+## Output
+Write `tasks/wow-sprint/REPORT-01-audit.md` with a table:
+
+| # | Severity (P0–P3) | File:line | Category | What's wrong | Suggested fix | Effort |
+
+Sort by severity, then by user impact. P0 = users hit it now. End with a
+"Top 10 fix-first" shortlist and a one-paragraph health summary.
+
+## Definition of done
+- Report file written, every finding has a real `file:line`.
+- No application code changed.
+- knip output incorporated.
+- You'd be comfortable handing this report to the team as the sprint backlog.
diff --git a/tasks/wow-sprint/02-mock-and-stub-eradication.md b/tasks/wow-sprint/02-mock-and-stub-eradication.md
new file mode 100644
index 000000000..a314f2394
--- /dev/null
+++ b/tasks/wow-sprint/02-mock-and-stub-eradication.md
@@ -0,0 +1,35 @@
+# Task: Eradicate mocks, fake data, and stubs (enforce the hard rules)
+
+CLAUDE.md forbids mocks, fake data, placeholders, stub functions, fake-loading,
+and fallback sample arrays in shipped code. Find every violation in the live app
+and replace it with a real implementation.
+
+## Scope
+`src/**/*.js`, `api/**/*.js`, `pages/**/*.html`. Skip `node_modules`, `dist*`,
+`vendor`, `tests/**`, and `*.test.js` / `*.spec.js` (test fixtures are allowed to
+use fakes).
+
+## Find the violations
+```
+grep -rn "sampleAgents\|sampleData\|mockData\|MOCK\|fakeData\|placeholder\|DUMMY\|hardcoded\|TODO\|FIXME\|not implemented" src api pages --include=*.js --include=*.html
+grep -rn "setTimeout(.*\(loading\|progress\|fake\)" src --include=*.js
+grep -rn "throw new Error(['\"]not implemented" src api --include=*.js
+```
+
+## Fix each one properly
+- **Sample/fallback arrays** → real `fetch` from the correct `api/` endpoint with loading + error states. The token data lives behind `api/three-token/[action].js` (stats/burns/activity, Birdeye + Pump.fun) and `api/pump/*`. The $THREE mint is `FeMbDoX7R1Psc4GEcvJdsbNbZA3bfztcyDCatJVJpump`.
+- **Fake loading (`setTimeout`)** → wire to the real async operation; show a skeleton until it resolves.
+- **Stub functions / `not implemented`** → implement fully, or delete if genuinely unreachable (confirm with grep first).
+- **Hardcoded values that should be dynamic** → source them from config/env/API.
+- **Empty `catch {}`** → handle at the boundary (surface a real error state) or let it throw if internal.
+
+## Constraints
+- Never introduce a new mock to "fix" a mock. Real APIs only.
+- If a real endpoint is missing for some data, build the endpoint in `api/` — don't fake it.
+- If credentials are missing, check `.env.example` and `.env`; proceed with what exists.
+
+## Definition of done
+- The grep patterns above return zero shipped-code hits (test fixtures excluded).
+- `npm run dev` (port 3000): every touched view loads real data, no console errors.
+- Run the **completionist** subagent on your changed files; fix everything it flags.
+- Report the list of violations found and how each was resolved.
diff --git a/tasks/wow-sprint/03-dead-path-and-broken-link-audit.md b/tasks/wow-sprint/03-dead-path-and-broken-link-audit.md
new file mode 100644
index 000000000..de50abe4b
--- /dev/null
+++ b/tasks/wow-sprint/03-dead-path-and-broken-link-audit.md
@@ -0,0 +1,27 @@
+# Task: Dead path, broken link & non-working button audit + fix
+
+CLAUDE.md: "If a button exists, it must work. If a link exists, it must go
+somewhere. If a state exists, there must be a way to reach it." Make that true.
+
+## Scope
+All entry points in `pages/**/*.html` and `public/**/*.html` that are wired in
+`vite.config.js` (see the `input` map and the dev `/route` map around lines
+160–520), plus their `src/*.js` controllers.
+
+## Method
+1. Enumerate every `<a href>`, `<button>`, and click handler in the page set. Build a list of every navigation target and action.
+2. For each link: confirm the target route/file exists (cross-reference `vite.config.js` inputs and `pages/`/`public/`). Flag 404s, `href="#"` with no handler, and dangling anchors.
+3. For each button/handler: confirm it's wired to a real function that does something. Flag no-op handlers, handlers that reference undefined functions, and disabled controls with no path to enable.
+4. For each declared UI state (modals, tabs, panels): confirm there's a user path to reach it.
+5. Start `npm run dev` and click through the top pages: `home`, `marketplace`, `agent-home`, `dashboard`, `pump-dashboard`, `pricing`, `skills`.
+
+## Fix
+- Broken internal link → point it at the correct existing route, or remove the link if the destination shouldn't exist.
+- Dead button → wire it to the real action. If the action belongs to an unbuilt feature, implement the minimal real version (no stubs) or remove the control.
+- Unreachable state → add the trigger, or delete the dead state.
+
+## Definition of done
+- Every link on the audited pages resolves; every button does real work.
+- `npm run dev`: clicked through all top pages, no console errors, no dead clicks.
+- Run the **completionist** subagent on changed files.
+- Report: list of dead paths found and the resolution for each.
diff --git a/tasks/wow-sprint/04-console-errors-cleanup.md b/tasks/wow-sprint/04-console-errors-cleanup.md
new file mode 100644
index 000000000..ffa71a428
--- /dev/null
+++ b/tasks/wow-sprint/04-console-errors-cleanup.md
@@ -0,0 +1,32 @@
+# Task: Zero console errors & warnings across key pages
+
+Ship-quality apps have a clean console. Drive the real app and eliminate every
+error and warning that originates from our code.
+
+## Scope
+Run `npm run dev` (port 3000) and exercise these routes in a real browser:
+`/`, `/marketplace`, `/agent-home`, `/dashboard`, `/pump-dashboard`,
+`/pricing`, `/skills`, `/walk`, `/club`.
+
+## Method
+1. Open each route, watch the console and network tab through a normal interaction (load, scroll, click primary CTAs).
+2. Catalogue every error and warning. For each, find the source `file:line`.
+3. Fix the root cause, not the symptom:
+ - Failed `fetch` → handle the boundary, fix the endpoint path, or add the missing param. Real API only.
+ - Undefined variable / null deref → guard correctly or fix the data flow.
+ - Three.js warnings (deprecated APIs, missing textures, NaN geometry) → update to current API, fix the asset path.
+ - 404s on assets → fix the path or add the asset under `public/`.
+ - Hydration/duplicate-id/invalid-nesting HTML warnings → fix the markup.
+4. Ignore warnings that provably originate from third-party libs you can't change — but list them.
+
+## Constraints
+- Do not silence errors by wrapping in empty `try/catch`. Fix the cause.
+- Do not remove features to remove warnings.
+
+## Definition of done
+- Each audited route loads and runs with zero console errors and zero warnings from our code.
+- Network tab: real API calls succeed (or show a designed error state on failure).
+- Run the **completionist** subagent on changed files.
+- Report: before/after console inventory per route.
+
+> Note: this task edits `home.html` / hero code. If running task 07 or 12 in parallel, run this one AFTER them.
diff --git a/tasks/wow-sprint/05-performance-pass.md b/tasks/wow-sprint/05-performance-pass.md
new file mode 100644
index 000000000..cf5407727
--- /dev/null
+++ b/tasks/wow-sprint/05-performance-pass.md
@@ -0,0 +1,27 @@
+# Task: Performance pass — bundle, 3D, and runtime jank
+
+Make three.ws feel instant. Target: fast first paint, lazy-loaded 3D, no main-
+thread jank, good Lighthouse scores (`.lighthouserc.json` defines the budget).
+
+## Scope
+`vite.config.js` (build/rollup config), `src/viewer.js` and the Three.js modules,
+the home hero (`src/home-v4-hero.js`, `src/home-v4-scroll.js`, `src/home-act2-viewer.js`),
+and any route that imports Three.js eagerly.
+
+## Method
+1. **Measure first.** `npm run build`, inspect the rollup output for the largest chunks. Run Lighthouse against `npm run dev` for `/` and `/marketplace`. Record baseline numbers.
+2. **Code-split heavy modules.** Three.js, GLTF loaders, draco/ktx2 decoders, and the club/walk scenes should be dynamically `import()`-ed only when their view is active — never in the initial home bundle.
+3. **Lazy-load 3D assets.** Defer GLB loads until the canvas is in view (IntersectionObserver). Show a skeleton/poster until ready.
+4. **Kill jank.** Debounce resize/scroll/input handlers. Use `transform`/`opacity` for animation (not layout-triggering props). Add `will-change` only where it pays. Cap devicePixelRatio on the renderer for high-DPI phones.
+5. **Trim the critical path.** Preconnect fonts (already partially done in `home.html`), defer non-critical scripts, remove unused imports (`npx knip`).
+
+## Constraints
+- No visual regressions — the page must look identical or better.
+- No fake/skeleton-only "perf" — the underlying load must actually be deferred.
+
+## Definition of done
+- Largest initial chunk meaningfully smaller; Three.js no longer in the home critical bundle.
+- Lighthouse performance improved vs baseline (report both numbers); within `.lighthouserc.json` budgets where possible.
+- 60fps scroll on the home hero; no long tasks > 50ms during load on a mid-tier profile.
+- `npm run dev` + `npm run build` both clean. Run the **completionist** subagent.
+- Report: baseline vs after metrics, and what changed.
diff --git a/tasks/wow-sprint/06-accessibility-pass.md b/tasks/wow-sprint/06-accessibility-pass.md
new file mode 100644
index 000000000..9f2d10c73
--- /dev/null
+++ b/tasks/wow-sprint/06-accessibility-pass.md
@@ -0,0 +1,27 @@
+# Task: Accessibility pass — semantic HTML, keyboard, focus, contrast
+
+CLAUDE.md: "Accessibility is not optional." Bring the core pages to WCAG AA.
+
+## Scope
+`pages/home.html`, `pages/marketplace.html`, `pages/agent-home.html`,
+`pages/dashboard/`, `pages/pricing.html`, `pages/skills.html`, and their `src/*.js`
+controllers. Plus shared components in `src/components/`.
+
+## Checklist (apply to each page)
+1. **Semantic structure** — real `<nav> <main> <header> <footer> <button> <a>` instead of `<div onclick>`. One `<h1>`, logical heading order.
+2. **Keyboard nav** — every interactive element reachable and operable by Tab/Enter/Space/Escape. Modals trap focus and restore it on close. No keyboard traps.
+3. **Focus indicators** — visible focus ring on every focusable element (don't `outline: none` without a replacement). Respect `:focus-visible`.
+4. **ARIA** — labels on icon-only buttons, `aria-expanded` on toggles, `role="dialog"` + `aria-modal` on modals, `aria-live` on async status regions, `alt` on meaningful images (empty `alt` on decorative).
+5. **Color contrast** — verify text vs background meets AA (4.5:1 body, 3:1 large). The dark theme tokens are in `home.html :root` (`--text`, `--text-2`, `--text-3`…); check the low-contrast greys against their surfaces and fix the failing ones.
+6. **Motion** — respect `prefers-reduced-motion`: gate non-essential animation behind it.
+7. **Forms** — every input has an associated `<label>`; errors announced.
+
+## Method
+- Tab through each page manually (`npm run dev`). Run an axe-core pass if available (`npx @axe-core/cli` or inject axe in the console).
+- Fix violations at the source. Add a skip-to-content link on the main pages.
+
+## Definition of done
+- Keyboard-only operation works end-to-end on every audited page.
+- No axe-core critical/serious violations remaining (list any intentionally deferred).
+- Contrast failures fixed; `prefers-reduced-motion` honored.
+- Run the **completionist** subagent. Report violations found + fixes.
diff --git a/tasks/wow-sprint/07-home-page-overhaul.md b/tasks/wow-sprint/07-home-page-overhaul.md
new file mode 100644
index 000000000..e82a0cd3b
--- /dev/null
+++ b/tasks/wow-sprint/07-home-page-overhaul.md
@@ -0,0 +1,28 @@
+# Task: Home page overhaul — a landing that makes holders proud
+
+`pages/home.html` is the front door. Make it world-class: clear value prop,
+a signature visual moment, real data, flawless polish. Bar = Vercel / Linear / Stripe.
+
+## Current state
+- Entry: `pages/home.html` (route `/` per `vite.config.js`). Hero logic in `src/home-v4-hero.js`, scroll in `src/home-v4-scroll.js`, 3D in `src/home-act2-viewer.js`.
+- Design tokens already defined in `home.html :root` (dark theme: `--bg`, `--surface-*`, `--text-*`, `--accent`). Reuse them — don't invent new ones.
+- There are stale variants (`home-v2/v3/v4`, `home-classic`). Don't touch those; ship on `home.html`.
+
+## What to build
+1. **Hero** — sharp one-line value prop ("The 3D agent layer of the internet"), a real primary CTA, and a live 3D centerpiece that loads fast (lazy, with poster/skeleton). It should feel alive on first paint.
+2. **Live $three signal** — surface one real stat from `api/three-token/[action].js?action=stats` (price / holders / volume / burns) in the hero or just below it, with a graceful loading + error state. Mint: `FeMbDoX7R1Psc4GEcvJdsbNbZA3bfztcyDCatJVJpump`. (If task 12 is building the reactive hero, coordinate — this task owns layout/content, 12 owns the reactive 3D.)
+3. **Proof sections** — what the platform does (create → embed → monetize), with real screenshots/components, not lorem.
+4. **Every state designed** — loading skeleton, error fallback, and the populated state all polished. Responsive at 320 / 768 / 1440.
+5. **Microinteractions** — hover/active/focus on every interactive element, intentional enter transitions, no jarring pops.
+
+## Constraints
+- No fake data, no placeholder copy, no `setTimeout` fake-loading.
+- Real fetches only; handle the boundary.
+
+## Definition of done
+- `npm run dev` → `/` loads fast, 3D lazy-loads, real $three stat renders.
+- Zero console errors. Responsive at all three breakpoints. A11y basics (semantic, focusable, labelled).
+- `npm run build` clean. Run the **completionist** subagent.
+- You'd screenshot this and post it. Report what changed and include the reasoning for the hero design.
+
+> Run this BEFORE tasks 12 and 04 if running in parallel (they touch the same files).
diff --git a/tasks/wow-sprint/08-design-system-tokens.md b/tasks/wow-sprint/08-design-system-tokens.md
new file mode 100644
index 000000000..6b75eb5e5
--- /dev/null
+++ b/tasks/wow-sprint/08-design-system-tokens.md
@@ -0,0 +1,33 @@
+# Task: Consolidate a real design system (tokens)
+
+Many pages redefine the same colors, spacing, and type inline. Extract one
+canonical design-token layer and adopt it across the core pages so the product
+feels coherent.
+
+## Source of truth
+`pages/home.html :root` already defines a clean dark palette (`--bg`,
+`--surface-0..3`, `--hairline*`, `--text..text-4`, `--accent`) plus the Inter /
+Inter Tight / JetBrains Mono type stack. Promote this into a shared stylesheet.
+
+## What to build
+1. Create `src/styles/tokens.css` (or extend an existing shared CSS entry if one is already imported globally — check `vite.config.js` and existing `<link>`s first; reuse, don't duplicate). Define:
+ - **Color**: the existing palette + semantic aliases (`--color-bg`, `--color-text`, `--color-accent`, `--color-danger`, `--color-success`, `--color-warning`, border/hairline).
+ - **Spacing scale**: `--space-1..8` (4px base).
+ - **Radius**: `--radius-sm/md/lg/full`.
+ - **Type scale**: font families, sizes, weights, line-heights as tokens.
+ - **Elevation/shadow** and **motion** tokens (`--ease-out`, `--dur-fast/med`).
+2. Import the token sheet into the core pages (`home`, `marketplace`, `agent-home`, `dashboard`, `pricing`, `skills`).
+3. Replace inline literal colors/spacing/type on those pages with the tokens. Keep the visual result identical (this is a refactor, not a redesign).
+4. Document the tokens at the top of the file with a short comment block.
+
+## Constraints
+- No visual regression — diff each page before/after; pixels should match.
+- Don't fork tokens per page. One source.
+
+## Definition of done
+- `src/styles/tokens.css` exists, imported by the core pages, documented.
+- Inline color/spacing literals on those pages replaced with tokens.
+- `npm run dev`: pages look identical to before. `npm run build` clean.
+- Run the **completionist** subagent. Report the token set and which pages adopted it.
+
+> Land this BEFORE tasks 09, 10, 11 so they consume the tokens.
diff --git a/tasks/wow-sprint/09-empty-loading-error-states.md b/tasks/wow-sprint/09-empty-loading-error-states.md
new file mode 100644
index 000000000..633b05208
--- /dev/null
+++ b/tasks/wow-sprint/09-empty-loading-error-states.md
@@ -0,0 +1,29 @@
+# Task: Design every empty, loading, and error state
+
+CLAUDE.md: "Every state is designed." Audit the data-driven views and make their
+loading, empty, and error states intentional and helpful.
+
+## Scope
+The views that fetch real data: `pages/marketplace.html` (`src/marketplace.js`,
+`src/marketplace-lobby.js`), `pages/agent-home.html` (`src/agent-home.js`),
+`pages/dashboard/` (`src/dashboard/`), `pages/pump-dashboard.html`
+(`src/pump/dashboard.js`), `pages/skills.html` (`src/skills.js`).
+
+## For each view, deliver three designed states
+1. **Loading** — skeleton screens that mirror the final layout (preferred over spinners). No layout shift when data arrives.
+2. **Empty** — when the fetch succeeds but returns nothing: explain what this view is and give the user a next action (a CTA), not a blank void. E.g. marketplace with no results → "No agents match — clear filters / create one".
+3. **Error** — when the fetch fails: say what went wrong in human terms and offer recovery (Retry button that re-runs the fetch). Never a blank screen or a raw stack trace.
+
+## Method
+- Trace each view's data flow to its `api/` endpoint. Confirm the three branches exist and are reachable.
+- Test empty by querying a filter with no matches; test error by pointing at a failing endpoint or going offline in devtools.
+- Reuse the design tokens (from task 08 / `home.html :root`). Build a small reusable skeleton + empty-state + error component if one doesn't exist; check `src/components/` first.
+
+## Constraints
+- Real async only — no `setTimeout` fake loaders.
+- Retry must actually re-fetch.
+
+## Definition of done
+- All three states designed and reachable on every audited view.
+- Verified in `npm run dev` (force each state via devtools). No console errors.
+- Run the **completionist** subagent. Report the states added per view, with screenshots described.
diff --git a/tasks/wow-sprint/10-mobile-responsive-pass.md b/tasks/wow-sprint/10-mobile-responsive-pass.md
new file mode 100644
index 000000000..682880104
--- /dev/null
+++ b/tasks/wow-sprint/10-mobile-responsive-pass.md
@@ -0,0 +1,28 @@
+# Task: Mobile responsiveness pass — flawless at 320 / 768 / 1440
+
+The core pages must be excellent on phones, tablets, and desktop. No horizontal
+scroll, no overlap, no tiny tap targets.
+
+## Scope
+`pages/home.html`, `pages/marketplace.html`, `pages/agent-home.html`,
+`pages/dashboard/`, `pages/pricing.html`, `pages/skills.html`, the global nav
+(`public/nav.html`) and footer (`public/footer.html` / `src/components/footer.jsx`).
+
+## Checklist per page (test at 320, 768, 1440)
+1. **No horizontal overflow** at 320px. Find the offender (fixed widths, long unbreakable strings, oversized media) and fix with relative units / `min-width: 0` / `overflow-wrap`.
+2. **Layout reflows sensibly** — multi-column grids collapse to single column; flex wraps. Use `clamp()` for fluid type and spacing.
+3. **Tap targets ≥ 44×44px** on mobile. Space out dense controls.
+4. **Nav** — works as a real mobile menu (hamburger/drawer) with keyboard + focus handling, not a desktop bar crammed onto a phone.
+5. **3D canvases** — fit the viewport, cap devicePixelRatio on mobile, don't blow the layout. Consider a static poster on very small screens if perf demands.
+6. **Modals/sheets** — full-height bottom sheets on mobile rather than tiny centered dialogs.
+7. **Images/media** — responsive (`max-width: 100%`, correct `sizes`).
+
+## Method
+- `npm run dev`, use devtools device toolbar at each width. Walk every page.
+- Prefer the design tokens (task 08) for spacing/type. Use `flex`/`grid`, avoid fixed px widths.
+
+## Definition of done
+- Every audited page is clean at 320 / 768 / 1440 — no overflow, overlap, or unreadable text.
+- Mobile nav works with keyboard + focus.
+- No console errors. `npm run build` clean. Run the **completionist** subagent.
+- Report: issues found per breakpoint and the fixes.
diff --git a/tasks/wow-sprint/11-microinteractions-motion.md b/tasks/wow-sprint/11-microinteractions-motion.md
new file mode 100644
index 000000000..e98cf8536
--- /dev/null
+++ b/tasks/wow-sprint/11-microinteractions-motion.md
@@ -0,0 +1,29 @@
+# Task: Microinteractions & motion pass
+
+CLAUDE.md: "Microinteractions signal quality." Add the layer of hover/active/
+focus feedback and intentional motion that separates great products from adequate
+ones — across the core pages.
+
+## Scope
+`pages/home.html`, `pages/marketplace.html`, `pages/agent-home.html`,
+`pages/dashboard/`, `pages/pricing.html`, shared components in `src/components/`.
+Use the motion tokens from task 08 (or `home.html :root`) — `--ease-out`, durations.
+
+## What to add (tastefully — restraint over flash)
+1. **Interactive feedback** — every button, link, card, and input gets hover, active, and `:focus-visible` states. Subtle: a lift, a tint, a border brighten. Consistent across the app.
+2. **Enter/exit transitions** — lists and cards fade/slide in on load (staggered, short). Modals/sheets animate in and out, never pop. Use `opacity` + `transform` only.
+3. **State-change motion** — toggles, tabs, accordions animate between states. Numbers that update (prices, counts) tween rather than snap.
+4. **Loading → loaded** — skeleton crossfades to content; no hard swap.
+5. **Scroll cues** — reveal-on-scroll for sections (IntersectionObserver), with a sensible threshold. Don't animate everything; pick the moments.
+6. **Pointer affordances** — correct `cursor`, disabled states visibly disabled.
+
+## Constraints
+- Respect `prefers-reduced-motion`: disable non-essential motion when set.
+- Performance: animate only `transform`/`opacity`; no layout thrash; 60fps.
+- No gratuitous animation — if it doesn't aid comprehension or delight, cut it.
+
+## Definition of done
+- Every interactive element on the audited pages has hover/active/focus states.
+- Key transitions feel intentional; reduced-motion respected; 60fps.
+- No console errors. `npm run build` clean. Run the **completionist** subagent.
+- Report: the interactions added per page.
diff --git a/tasks/wow-sprint/12-reactive-3d-hero.md b/tasks/wow-sprint/12-reactive-3d-hero.md
new file mode 100644
index 000000000..dafa5977f
--- /dev/null
+++ b/tasks/wow-sprint/12-reactive-3d-hero.md
@@ -0,0 +1,39 @@
+# Task: Signature reactive 3D hero tied to live $three data
+
+Build the screenshot-worthy centerpiece: a Three.js hero on the home page whose
+visuals **react to live $three market data**. This is the "wow" that gives bored
+holders a reason to care again.
+
+## Anchor files
+- Home: `pages/home.html` (route `/`), hero module `src/home-v4-hero.js`, 3D `src/home-act2-viewer.js`.
+- Live data: `api/three-token/[action].js?action=stats` (price, holders, volume, burns — Birdeye + Pump.fun). Activity feed: `?action=activity`. Burns: `?action=burns`.
+- $THREE mint: `FeMbDoX7R1Psc4GEcvJdsbNbZA3bfztcyDCatJVJpump`.
+- Reuse design tokens from `home.html :root`.
+
+## Concept (pick the strongest interpretation and ship it)
+A living 3D object/field that maps real metrics to motion and form:
+- **Price momentum** → rotation speed / energy / color temperature.
+- **Volume** → particle density or emissive intensity.
+- **Recent trades** (poll `activity`) → a pulse/ripple per trade, green for buy / red for sell.
+- **Burns** → a visible "burn" effect when a burn event appears.
+It should look intentional and premium — not a tech demo. Think a slowly rotating
+faceted "$three" crystal/orb in a particle field that breathes with the market.
+
+## Requirements
+1. **Real data, polled** — fetch stats on an interval (e.g. 15–30s), diff against last value, drive the visuals from the delta. Handle fetch failure gracefully (freeze last-known state, show a subtle "reconnecting" hint — never crash the canvas).
+2. **Fast & lazy** — dynamic-`import()` Three.js; load the scene only when the hero is in view; poster/skeleton until ready; cap DPR on mobile.
+3. **A readable data overlay** — small, elegant live readout (price, 24h change, holders) anchored to the hero with designed loading/error states.
+4. **Reduced motion** — provide a calm static fallback when `prefers-reduced-motion` is set.
+5. **Responsive** — looks great and performs at 320 / 768 / 1440; 60fps target.
+
+## Constraints
+- No simulated/fake market data. If the API is down, show the reconnecting state — do not invent numbers.
+- No jank: animate on the GPU, throttle the data loop, don't block the main thread on fetches.
+
+## Definition of done
+- `npm run dev` → `/`: hero loads lazily, reacts to real $three data, trades pulse, burns show.
+- Zero console errors; 60fps; reduced-motion fallback works; responsive.
+- `npm run build` clean. Run the **completionist** subagent.
+- Report the data→visual mapping and why it reads as premium.
+
+> Run AFTER task 07 (home overhaul) if both are queued — they share `home.html`/hero files.
diff --git a/tasks/wow-sprint/13-onchain-activity-visualization.md b/tasks/wow-sprint/13-onchain-activity-visualization.md
new file mode 100644
index 000000000..e88ab04f4
--- /dev/null
+++ b/tasks/wow-sprint/13-onchain-activity-visualization.md
@@ -0,0 +1,33 @@
+# Task: Real-time 3D visualization of $three on-chain activity
+
+Turn the $three trade/holder flow into a live 3D scene holders will want to watch
+and share. A "living ecosystem" view, not a table.
+
+## Anchor files
+- Trades stream: `api/pump/trades-stream.js`, curve `api/pump/curve.js`, stats `api/pump/helius-stats.js`, dashboard `api/pump/dashboard.js`.
+- Token protocol: `api/three-token/[action].js` (`activity`, `burns`, `stats`).
+- Existing client plumbing: `src/pump/channel-feed.js`, `src/pump/trade-reactions.js`, `src/pump/dashboard.js`, `src/pump/wallet-monitor.js`.
+- $THREE mint: `FeMbDoX7R1Psc4GEcvJdsbNbZA3bfztcyDCatJVJpump`.
+- Create a new page `pages/pump-visualizer.html` already exists — build into it (check current contents first; replace placeholder content, keep the route wiring in `vite.config.js`).
+
+## What to build
+A real-time 3D scene where:
+- **Each trade** spawns a visual event — a node/orb flying in, sized by trade value, colored buy/sell, labeled with the (truncated) wallet.
+- **Whales** (large trades) get a distinct, bigger, louder treatment (reuse logic/thresholds from `src/pump/pumpkit-whale.js` if present).
+- **The bonding curve / price** is represented spatially (e.g. a 3D curve or a central mass that grows with market cap).
+- **Burns** trigger a dedicated effect.
+- A clean HUD overlays live totals (24h volume, holders, last price) with designed loading/empty/error states.
+
+## Requirements
+1. **Real streaming data** — consume `api/pump/trades-stream.js` (SSE/poll as it's implemented; read the endpoint to see). Reconnect with backoff on disconnect; show connection status.
+2. **Performance** — pool/recycle objects so a burst of trades doesn't allocate-thrash; cap particle count; 60fps; lazy-load Three.js; cap DPR on mobile.
+3. **Empty state** — when there's no recent activity, the scene idles elegantly and says so.
+4. **Responsive** + reduced-motion fallback.
+
+## Constraints
+- No replayed/fake trades. Only real stream data. If the stream is down, show the reconnecting state.
+
+## Definition of done
+- `npm run dev` → `/pump-visualizer`: real trades render in 3D in real time; whales + burns distinct; HUD shows real totals.
+- Reconnect works; 60fps under load; responsive; zero console errors.
+- `npm run build` clean. Run the **completionist** subagent. Report the architecture + data flow.
diff --git a/tasks/wow-sprint/14-holder-dashboard.md b/tasks/wow-sprint/14-holder-dashboard.md
new file mode 100644
index 000000000..8c55e9fa0
--- /dev/null
+++ b/tasks/wow-sprint/14-holder-dashboard.md
@@ -0,0 +1,32 @@
+# Task: $three holder dashboard (real Solana / Helius data)
+
+Give holders a reason to log in: a dashboard that shows their real $three position
+and the protocol's real health — all live, no fake numbers.
+
+## Anchor files & data
+- Token protocol API: `api/three-token/[action].js` — `stats`, `revenue-share` (per-user, authed), `burns`, `activity`.
+- Pump data: `api/pump/balances.js`, `api/pump/helius-stats.js`, `api/pump/dashboard.js`, `api/pump/curve.js`.
+- Wallet/auth: `src/wallet.js`, `src/wallet-auth.js`, `src/account.js`. Helius webhook ingestion at `api/pump/helius-webhook.js`.
+- $THREE mint: `FeMbDoX7R1Psc4GEcvJdsbNbZA3bfztcyDCatJVJpump`.
+- Pages: there's `pages/dashboard/` and `pages/pump-dashboard.html`. Build the holder view into the most appropriate one (read both first; don't fork a third dashboard).
+
+## Build a shared data hook FIRST
+Create one reusable client module (e.g. `src/pump/three-token-data.js`) that fetches + caches $three protocol stats and the connected wallet's position, with subscribe/refresh. Tasks 13/16/17 should reuse it. Single source of truth.
+
+## What to show (each with loading/empty/error states)
+1. **Your position** — connected wallet's $three balance, USD value, % of supply, unrealized PnL if cost basis is derivable; "connect wallet" empty state when not signed in (use `authenticate-wallet` flow).
+2. **Your revenue share** — from `?action=revenue-share` (authed). Show claimable/earned if present.
+3. **Protocol health** — price, market cap, holders, 24h volume, total burned (from `stats` + `burns`).
+4. **Recent activity** — your transactions + protocol activity (`?action=activity`), most recent first, paginated.
+5. **Quick actions** — links to trade ($three), the visualizer, and the token page.
+
+## Constraints
+- Real on-chain / API data only. Never fabricate balances or PnL — if a value isn't derivable, omit it, don't guess.
+- Handle the not-connected and zero-balance cases as designed empty states.
+
+## Definition of done
+- `npm run dev`: connect a wallet → real position + protocol data render; all states designed.
+- Shared data hook created and used. Zero console errors. `npm run build` clean.
+- Run the **completionist** subagent. Report the data sources per widget.
+
+> Build the shared data hook here FIRST if running 13/16/17 in parallel.
diff --git a/tasks/wow-sprint/15-holder-leaderboard-and-badges.md b/tasks/wow-sprint/15-holder-leaderboard-and-badges.md
new file mode 100644
index 000000000..6e659363d
--- /dev/null
+++ b/tasks/wow-sprint/15-holder-leaderboard-and-badges.md
@@ -0,0 +1,24 @@
+# Task: Holder leaderboard + gated 3D badge / PFP generator
+
+Add status and identity for $three holders: a live leaderboard and a 3D badge/PFP
+that holders can mint/export — gated by their on-chain holdings. Shareable = growth.
+
+## Anchor files & data
+- Holders/balances: `api/pump/balances.js`, `api/pump/helius-stats.js`. Token stats: `api/three-token/[action].js?action=stats`.
+- Holder enrichment: Helius (see `api/pump/helius-webhook.js`, `api/pump/helius-stats.js`) — use the real holder set for the token mint `FeMbDoX7R1Psc4GEcvJdsbNbZA3bfztcyDCatJVJpump`.
+- Wallet/auth: `src/wallet.js`, `src/wallet-auth.js`. SNS names for display: `src/solana/sns.js` / `src/sns/`.
+- 3D + export: `src/viewer.js`, avatar/badge export utilities in `src/avatar-export.js`; existing badge HTML at `public/agent-badge.html` / `public/agent-passport.html` — reuse patterns.
+
+## What to build
+1. **Leaderboard** — top $three holders by balance, ranked, with truncated address or resolved SNS/handle, balance, % supply, and rank movement if derivable. Real data, paginated, with loading/empty/error states. Add an API endpoint if one doesn't exist (e.g. `api/three-token` `?action=leaderboard`) sourcing the real holder list — do not hardcode.
+2. **Holder tier** — derive a tier from balance (e.g. thresholds → tiers). Show the connected user's rank + tier.
+3. **Gated 3D badge / PFP** — a Three.js badge whose look reflects the holder's tier (materials/effects scale with tier). Only generatable when the connected wallet holds $three (verify on-chain balance; show a "hold $three to unlock" state otherwise). Let the user export it as a PNG (and/or GLB) to share.
+
+## Constraints
+- Real holder data + real on-chain balance gating. No fake leaderboard rows, no bypassing the hold check client-side only — verify balance server-side for the gate.
+- Respect privacy: show truncated addresses / opt-in handles.
+
+## Definition of done
+- `npm run dev`: leaderboard renders real holders; connected holder sees rank/tier; badge generates + exports only when holding $three.
+- All states designed; zero console errors; responsive. `npm run build` clean.
+- Run the **completionist** subagent. Report the gating logic and data sources.
diff --git a/tasks/wow-sprint/16-token-page-upgrade.md b/tasks/wow-sprint/16-token-page-upgrade.md
new file mode 100644
index 000000000..3180b0ee8
--- /dev/null
+++ b/tasks/wow-sprint/16-token-page-upgrade.md
@@ -0,0 +1,28 @@
+# Task: $three token page upgrade — real bonding curve + live trades
+
+Make the coin page the definitive place to understand $three: real-time price,
+real bonding curve, live trade tape, holders, burns — premium and trustworthy.
+
+## Anchor files & data
+- Pages: `pages/pump-coin-page.html`, `pages/pump-live.html`, `pages/pumpfun-buy.html` (read all; build the canonical coin page — likely `pump-coin-page.html` — and link the others).
+- Data: `api/pump/curve.js` (bonding curve), `api/pump/trades-stream.js` (live tape), `api/pump/helius-stats.js`, `api/pump/dashboard.js`, `api/three-token/[action].js` (`stats`, `burns`, `activity`).
+- Client: `src/pump/bonding-curve-chart.js`, `src/components/bonding-curve.js`, `src/pump/pump-swap-quote.js`, `src/pump/dashboard.js`, `src/components/PriceBadge.js`.
+- $THREE mint: `FeMbDoX7R1Psc4GEcvJdsbNbZA3bfztcyDCatJVJpump`. Reuse the shared data hook from task 14 if present (`src/pump/three-token-data.js`).
+
+## What to build (every widget with loading/empty/error states)
+1. **Price header** — live price, 24h change, market cap, holders, total burned. Updates in real time.
+2. **Bonding curve chart** — render the REAL curve from `api/pump/curve.js` (reserves/progress to graduation). Show current position on the curve and % to graduation. No mock curve.
+3. **Live trade tape** — stream from `api/pump/trades-stream.js`: time, side, size, price, wallet (truncated). Auto-scrolls, reconnects with backoff, shows connection status.
+4. **Buy/sell entry** — wire to the real swap path (`src/pump/pump-swap-quote.js` / `swap-jupiter.js` / the `trade` skill). Show a real quote before confirm. If wallet not connected, prompt connect.
+5. **Burns + activity** — recent burns and protocol activity feeds.
+
+## Constraints
+- 100% real data and real quotes. No fabricated price history — if historical candles aren't available from an endpoint, build/serve them from real trade data, don't fake them.
+- Handle stream disconnects and failed quotes as designed states.
+
+## Definition of done
+- `npm run dev`: coin page shows live price, real bonding curve, streaming trades, working quote.
+- Reconnect + error states work; responsive; zero console errors. `npm run build` clean.
+- Run the **completionist** subagent. Report data sources per widget and the swap path used.
+
+> Shares token data plumbing with 13/14/17 — let task 14 land the shared hook first.
diff --git a/tasks/wow-sprint/17-holder-rewards-surface.md b/tasks/wow-sprint/17-holder-rewards-surface.md
new file mode 100644
index 000000000..bb3f2dbaf
--- /dev/null
+++ b/tasks/wow-sprint/17-holder-rewards-surface.md
@@ -0,0 +1,33 @@
+# Task: $three holder rewards / revenue-share surface (real on-chain)
+
+Give holders tangible upside they can see and act on: surface the real
+revenue-share / rewards the protocol already tracks, and make claiming (if
+supported) a first-class flow. This directly answers "what do I get for holding?"
+
+## Anchor files & data
+- Revenue share: `api/three-token/[action].js?action=revenue-share` (authenticated, per-user) and `?action=stats` for protocol totals; `?action=burns` for buyback/burn history.
+- Staking primitive if present: `src/solana-stake.js`. Wallet/auth: `src/wallet.js`, `src/wallet-auth.js`, `src/account.js`.
+- Contracts: check `contracts/` for any rewards/distribution program before assuming none exists.
+- $THREE mint: `FeMbDoX7R1Psc4GEcvJdsbNbZA3bfztcyDCatJVJpump`. Reuse `src/pump/three-token-data.js` (task 14) if present.
+
+## First: establish what's real
+Read the revenue-share endpoint and any rewards contract to determine what
+actually exists (accrued share, claimable amount, distribution cadence, burn-as-
+reward). Build the UI around the real mechanism. **Do not invent a rewards model
+that the backend doesn't support** — if claiming isn't on-chain yet, present the
+accrued/earned view and clearly label what's live vs coming, sourced from real data.
+
+## What to build (with loading/empty/error states)
+1. **Your rewards** — connected wallet's accrued/earned revenue share from `revenue-share`. USD value. History if available.
+2. **Protocol distribution** — total distributed, total burned (buyback-and-burn is a real holder benefit), cadence — from `stats` + `burns`.
+3. **Claim flow** — IF an on-chain claim exists: a real, wired claim transaction with confirmation + tx link. If not, a clear accrual view (no fake "claim" button).
+4. **Connect-wallet** empty state when not signed in (`authenticate-wallet`).
+
+## Constraints
+- Real data and real transactions only. No fabricated APRs or projected yields presented as fact.
+- Server-verify any claim eligibility.
+
+## Definition of done
+- `npm run dev`: connected holder sees real accrued revenue share + protocol distribution/burn data; claim flow works if supported, else honest accrual view.
+- All states designed; zero console errors; responsive. `npm run build` clean.
+- Run the **completionist** subagent. Report exactly what's live vs labeled-coming and the data sources.
diff --git a/tasks/wow-sprint/18-marketplace-crosslinking.md b/tasks/wow-sprint/18-marketplace-crosslinking.md
new file mode 100644
index 000000000..a1afece41
--- /dev/null
+++ b/tasks/wow-sprint/18-marketplace-crosslinking.md
@@ -0,0 +1,25 @@
+# Task: Wire the marketplace ↔ agent profiles + add sorting/filtering
+
+CLAUDE.md: "A marketplace that doesn't link to agent profiles is half-built."
+Make the marketplace a connected, navigable system.
+
+## Anchor files
+- Marketplace: `pages/marketplace.html`, `src/marketplace.js`, `src/marketplace-lobby.js`, `src/marketplace-detail.js`. API: `api/marketplace/`, `api/agents/`, `api/agent-3d/`.
+- Agent profiles: `pages/agent-detail.html` / `pages/agent-home.html`, `src/agent-detail.js`, `src/agent-home.js`, `src/agents-directory.js`.
+
+## What to build
+1. **Bidirectional links** — every marketplace card links to the real agent profile/detail; every agent profile links back to its marketplace listing and to related agents (same creator / category). No dead cards.
+2. **Sorting** — sort by recent, popularity/usage, price, name. Real fields from the API; persist the choice in the URL query so it's shareable and survives reload.
+3. **Filtering** — by category/capability/price range, driven by real data. Combine with sort. Reflect active filters in the URL.
+4. **Search** — debounced text search over real listings.
+5. **Cross-pollination** — on an agent profile, surface "more from this creator" and "similar agents" using real data relationships.
+6. **States** — loading skeletons, empty (no results → clear filters / create CTA), error (retry). Reuse design tokens.
+
+## Constraints
+- Real API data only — no sample agent arrays. If the marketplace API lacks a sort/filter field, add it to the endpoint rather than faking client-side on fake data.
+- URL is the source of truth for sort/filter/search (back button works).
+
+## Definition of done
+- `npm run dev` → `/marketplace`: sort + filter + search work on real data, reflected in URL; every card navigates to a real profile; profiles link back + show related agents.
+- All states designed; zero console errors; responsive. `npm run build` clean.
+- Run the **completionist** subagent. Report the new links, sort/filter fields, and any API changes.
diff --git a/tasks/wow-sprint/19-shareable-og-cards.md b/tasks/wow-sprint/19-shareable-og-cards.md
new file mode 100644
index 000000000..b59df9aa2
--- /dev/null
+++ b/tasks/wow-sprint/19-shareable-og-cards.md
@@ -0,0 +1,25 @@
+# Task: Screenshot-worthy share / OG image generation
+
+Make every important page shareable: dynamic Open Graph images and in-app share
+cards that look premium when posted to X/Discord/Telegram. Shareability = the
+distribution flywheel for $three.
+
+## Anchor files
+- Existing share UI: `src/share-panel.js`, `src/share-panel-builders.js`. Screenshot: `src/components/screenshot-modal.js`. Badge/passport HTML: `public/agent-badge.html`, `public/agent-passport.html`.
+- API: `api/` — add an OG image endpoint (e.g. `api/og/[type].js`) if none exists. Check `api/render/`, `api/embed/`, and existing `og-image.png` usage in `pages/home.html` first.
+- Token data for dynamic stats: `api/three-token/[action].js?action=stats` (mint `FeMbDoX7R1Psc4GEcvJdsbNbZA3bfztcyDCatJVJpump`).
+
+## What to build
+1. **Dynamic OG images** — generate per-entity OG images (agent profile, marketplace listing, $three token page, holder badge). Use a real image-generation path (e.g. `@vercel/og` / Satori if available, or a server-rendered canvas) — server-side, cached. Embed real data (agent name + avatar, live $three price/stats, holder rank).
+2. **Correct meta tags** — each page sets `og:title`, `og:description`, `og:image` (pointing at the dynamic endpoint), and full `twitter:card` tags with real per-page content. Audit the core pages; `home.html` already has a baseline — extend the pattern.
+3. **In-app share card** — a polished share action that produces a downloadable/shareable image (reuse `screenshot-modal.js` / `share-panel.js`) with a deep link back.
+4. **Validate** — the generated images render correctly at 1200×630; test the cards in a link-preview validator mentally / via the endpoint directly.
+
+## Constraints
+- Real data baked into images — no placeholder names/prices.
+- Cache generated images; don't regenerate per request unnecessarily.
+
+## Definition of done
+- `npm run dev`: hitting the OG endpoint returns a correct 1200×630 image with real data for each entity type; core pages emit correct meta tags; in-app share produces a real shareable image.
+- Zero console errors. `npm run build` clean. Run the **completionist** subagent.
+- Report: entity types covered, the generation method, and caching strategy.
diff --git a/tasks/wow-sprint/20-analytics-instrumentation.md b/tasks/wow-sprint/20-analytics-instrumentation.md
new file mode 100644
index 000000000..959aa92c6
--- /dev/null
+++ b/tasks/wow-sprint/20-analytics-instrumentation.md
@@ -0,0 +1,30 @@
+# Task: Real analytics instrumentation + conversion funnel
+
+You can't improve what you don't measure. Instrument the key user journeys with
+real event tracking so the team can see the funnel and where holders/users drop.
+
+## Anchor files
+- Existing analytics: `src/analytics.js` (read it first — extend, don't replace). Confirm what provider/sink it targets (check `.env.example` for keys: PostHog/GA/Segment/custom `api/`).
+- If events currently go nowhere real, wire them to a real sink: a provider already configured in env, or a real `api/` collector endpoint that persists to the DB (`api/_lib/db.js`). No console-only "analytics".
+
+## What to instrument (real events, consistent naming)
+1. **Acquisition** — landing view, CTA clicks on `home`, source/referrer capture.
+2. **Activation** — wallet connect started/succeeded/failed, agent created, first embed generated.
+3. **$three funnel** — token page view → buy clicked → quote shown → swap confirmed → success. This is the holder funnel; capture each step with the outcome.
+4. **Engagement** — marketplace search/filter use, agent profile views, visualizer/dashboard opens.
+5. **Errors** — client errors and failed API calls (the boundary failures), so reliability is visible.
+
+## Requirements
+- One typed `track(event, props)` helper in `src/analytics.js` with a documented event taxonomy (names + props) at the top of the file. Every call site uses it.
+- Respect privacy/consent: no PII beyond what's necessary; honor any existing consent gate; truncate wallet addresses.
+- Batch/queue events; never block the UI on a tracking call; fail silently at the boundary (analytics must never break the app).
+
+## Constraints
+- Real sink only — events must actually arrive somewhere queryable. Verify in the network tab / sink.
+- No double-firing; no tracking in obvious dev/test loops.
+
+## Definition of done
+- `npm run dev`: performing each journey fires the documented events to a real sink (shown in network tab / provider).
+- Event taxonomy documented in `src/analytics.js`. Zero console errors; no UI blocking.
+- `npm run build` clean. Run the **completionist** subagent.
+- Report: the event taxonomy, the sink used, and the funnel it now captures.