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
Refactor and deprecate various endpoints in the x402 overhaul, including removal of dead endpoints, unifying service catalog, and enhancing product listings for Forge, Vanity, and Pump Launcher. Introduce new free APIs for crypto data and 3D generation, while improving documentation and server profile for better agent usability. Ensure all changes are reflected in the changelog and maintain integrity of existing functionality.
fudjia32796756d6e0
diff --git a/prompts/bnb-chain/01-bnb-chains-lib.md b/prompts/bnb-chain/01-bnb-chains-lib.mddeleted file mode 100644index 1915173cc..000000000--- a/prompts/bnb-chain/01-bnb-chains-lib.md+++ /dev/null@@ -1,31 +0,0 @@-# 01 — BNB chain constants + RPC failover lib--Read `prompts/bnb-chain/00-CONTEXT.md` first, then `/workspaces/three.ws/CLAUDE.md`.-**Prereqs: none.** This is the foundation every other prompt imports.--## Why-Every BNB prompt needs the same chain metadata, a resilient RPC client, and a way to prove-the 0.45s block claim. Centralize it once so no prompt hand-rolls RPC URLs or hardcodes the-hub addresses from 00-CONTEXT.--## Build — `api/_lib/bnb/chains.js`-Small, dependency-light module (viem preferred; it's installed). Export:-- `BNB_CHAINS` — `{ bscMainnet: {id:56, rpcs:[...], explorer, greenfieldHubs:{crossChain,tokenHub,bucketHub,objectHub,groupHub,multiMessage}}, bscTestnet: {id:97, rpcs:[...], explorer}, }`. Copy the mainnet hub addresses **verbatim from 00-CONTEXT** (do not invent). Include ≥2 public RPC URLs per network for failover.-- `getPublicClient(network)` — returns a viem public client with RPC failover: try each RPC in order, cache the first healthy one, re-probe on failure. Default network `bscTestnet`.-- `probeBlockTime(network, sampleBlocks = 200)` — fetch `latest` and `latest - sampleBlocks`, return `{ avgBlockTimeMs, latestBlock, target: network==='bscMainnet' ? 450 : null, measuredAt }`. This is what the latency-proof surfaces (14–17) consume.-- `isEvmAddress(s)` / `assertBscAddress(s)` helpers.--## States / robustness-All RPCs down → throw a typed `BnbRpcError` with the list of URLs tried (callers surface 503).-Never hang: per-RPC timeout (default 5s). No secrets in this file — RPC URLs are public.--## Tests (`tests/bnb-chains.test.js`)-- `BNB_CHAINS.bscMainnet.greenfieldHubs.crossChain` equals the exact 00-CONTEXT address.-- `isEvmAddress` accepts a checksummed 0x40-hex, rejects Solana base58 + junk.-- `getPublicClient` failover: mock first RPC throwing → second used (inject a fake transport).-- `probeBlockTime` shape asserted against a mocked block pair (numbers, not live) so the test is deterministic; ALSO include one `it.skip`-able live-RPC smoke test guarded by `process.env.BNB_LIVE_RPC` that asserts mainnet avg < 700ms.--## Definition of done-Inherit 00-CONTEXT DoD. Additionally:-- [ ] Run `probeBlockTime('bscMainnet')` live once; paste the real `{avgBlockTimeMs, latestBlock}` into PROGRESS (this is our own proof the 0.45s claim holds today).-- [ ] `docs/` not required yet (internal lib) — but add a one-line JSDoc header on each export.diff --git a/prompts/bnb-chain/02-megafuel-client.md b/prompts/bnb-chain/02-megafuel-client.mddeleted file mode 100644index eee54dffc..000000000--- a/prompts/bnb-chain/02-megafuel-client.md+++ /dev/null@@ -1,36 +0,0 @@-# 02 — MegaFuel gasless-send client (with self-pay fallback)--Read `prompts/bnb-chain/00-CONTEXT.md` first, then `/workspaces/three.ws/CLAUDE.md`.-**Prereqs: 01** (`api/_lib/bnb/chains.js`). If missing, run prompt 01 first.--## Why-This is the crown-jewel capability: send a transaction from a plain private-key EOA that-pays ZERO gas, sponsored at the block-building layer. No smart account, no delegation —-impossible on Ethereum L1/Base. Wrap MegaFuel's API cleanly so every downstream prompt-(03 registration, 15 world-moves) gets gasless sends for free, with an automatic self-pay-fallback so nothing ever hard-fails.--## Build — `api/_lib/bnb/megafuel.js`-Use `megafuel-js-sdk` if it cleanly wraps the two RPC methods; otherwise call them directly-via viem/fetch (document the choice). Endpoints in 00-CONTEXT (testnet default). Export:-- `isSponsorable(network, txRequest)` → calls `pm_isSponsorable`; returns `{ sponsorable:boolean, sponsorInfo|null, reason }`. Never throws on a policy "no" — that's a normal answer.-- `sendGasless(network, { account, tx })` → builds the tx with `gasPrice: 0`, checks `isSponsorable`; if yes, signs + submits via MegaFuel's `eth_sendRawTransaction`; returns `{ hash, mode:'sponsored', sponsor }`. **If not sponsorable OR MegaFuel errors/times out → automatically self-pay**: resubmit via the standard `getPublicClient` (prompt 01) with normal gas, return `{ hash, mode:'self-pay', reason }`. This dual path is mandatory (00-CONTEXT: outage → self-pay).-- `sendGasless` accepts an injected signer (viem account) — never read a private key inside this file; caller passes it.--## States-Policy declines sponsorship → self-pay silently, surface `mode`. MegaFuel 5xx/timeout →-self-pay. Self-pay also fails (no gas, revert) → typed error with the on-chain reason.-Malformed tx → 400-style typed error before any network call.--## Tests (`tests/bnb-megafuel.test.js`)-- `isSponsorable` maps a mocked `{sponsorable:true}` and `{sponsorable:false,reason}` correctly.-- `sendGasless` sponsored path: mock `pm_isSponsorable=true` + raw send → `mode:'sponsored'`.-- **Fallback path** (the important one): mock `pm_isSponsorable=false` → asserts a self-pay submit happened and `mode:'self-pay'`. Also mock MegaFuel throwing → still self-pays.-- No private key ever appears in the module (grep-style assertion in test or code review note).-- Use a synthetic/testnet throwaway account; never a real third-party key.--## Definition of done-Inherit 00-CONTEXT DoD. Additionally:-- [ ] Live probe `pm_isSponsorable` against the public testnet MegaFuel endpoint with a real sample tx; paste the raw JSON reply in PROGRESS (even a policy "no" is valid proof the wire works).-- [ ] If a real sponsored send succeeds on testnet, paste the tx hash + BscScan link showing `gasPrice 0`. If sponsorship is gated behind a NodeReal account we lack, prove the self-pay path with a real testnet tx hash and record the exact policy-signup step in PROGRESS.-- [ ] `.env.example`: add `NODEREAL_MEGAFUEL_KEY=` (commented, optional) — code must work without it.diff --git a/prompts/bnb-chain/03-gasless-agent-registration.md b/prompts/bnb-chain/03-gasless-agent-registration.mddeleted file mode 100644index d8074b5ab..000000000--- a/prompts/bnb-chain/03-gasless-agent-registration.md+++ /dev/null@@ -1,42 +0,0 @@-# 03 — Gas-free ERC-8004 agent registration on BSC--Read `prompts/bnb-chain/00-CONTEXT.md` first, then `/workspaces/three.ws/CLAUDE.md`.-**Prereqs: 02** (`api/_lib/bnb/megafuel.js`), which needs 01. Run them first if missing.--## Why-ERC-8004 identity registry is ALREADY live on BSC(56) at our CREATE2 address-(`contracts/DEPLOYMENTS.md`, `src/erc8004/abi.js`). Right now a new agent needs BNB for gas-to register. Make **registration gasless** via MegaFuel — a brand-new empty wallet mints its-agent identity from the first click. This is the single most demo-able "only on BNB Chain"-flow: zero-balance wallet → on-chain identity, no faucet, no funding. (bnb-chain's own-`bnbagent-sdk` does exactly this — we're matching it natively in our stack.)--## Build — `api/bnb/register-agent.js` (server endpoint) + wire to existing identity UI-- Free plain-handler endpoint (00-CONTEXT free pattern). `POST` body: `{ signedRegisterTx }`- OR `{ agentMeta, accountAddress }` depending on where signing happens — prefer the client- signs (never take a raw private key server-side), server relays via `sendGasless`.-- Flow: accept the user's signed ERC-8004 `register` tx (gasPrice 0), call- `megafuel.sendGasless('bscTestnet', ...)`, return `{ hash, mode, agentId?, explorerUrl }`.- Reuse the ERC-8004 ABI from `src/erc8004/abi.js` — do NOT redefine it.-- On sponsorship decline, self-pay path still completes (prompt 02 guarantees it) — surface- `mode` so the UI can say "sponsored" vs "you paid gas".-- Wire a "Register on BNB (gasless)" affordance into the existing ERC-8004 identity surface- (find it: grep `erc8004` under `src/` and `pages/`; add the button where identity is- created, network-selectable to BSC testnet). Show the resulting agentId + BscScan link.--## States-Empty wallet, no BNB → sponsored path mints anyway (the whole point; prove it). Sponsorship-unavailable → clear "you'll pay ~$0.001 gas" prompt, then self-pay. Already-registered-address → surface existing agentId, don't double-mint. Tx revert → decode + show reason.--## Tests (`tests/bnb-register-agent.test.js`)-- Endpoint relays a signed tx through `sendGasless` (mocked) and returns the hash + mode.-- Rejects a request missing the signed tx / address with 400.-- Parses `agentId` from a mocked `Transfer`/`Registered` receipt log.-- Uses synthetic addresses only.--## Definition of done-Inherit 00-CONTEXT DoD. Additionally:-- [ ] REAL testnet proof: register an agent from a freshly-created wallet; paste the tx hash, the minted `agentId`, and the BscScan link. If sponsored, note `gasPrice 0` and that the wallet held 0 tBNB before the tx — that screenshot is the campaign's headline.-- [ ] `docs/`: add a "Gasless agent registration on BNB" section to the ERC-8004 / identity doc (find the existing one under `docs/`), with the named use-case and a runnable example.-- [ ] `data/changelog.json`: entry (tags `feature`, `sdk`) — "Register your agent identity on BNB Chain with zero gas".diff --git a/prompts/bnb-chain/04-mpp-server-adapter.md b/prompts/bnb-chain/04-mpp-server-adapter.mddeleted file mode 100644index 8fe943d87..000000000--- a/prompts/bnb-chain/04-mpp-server-adapter.md+++ /dev/null@@ -1,43 +0,0 @@-# 04 — Accept MPP payments on a pilot endpoint--Read `prompts/bnb-chain/00-CONTEXT.md` first, then `/workspaces/three.ws/CLAUDE.md`.-**Prereqs: 01** (`api/_lib/bnb/chains.js`). Run it first if missing.--## Why-`@bnb-chain/mpp` is BNB Chain's Machine Payments Protocol — their answer to x402, with 402-flows over `permit2` / EIP-3009 / EIP-1559, spanning BSC + opBNB + the wider EVM (incl.-Base). We already run an x402 catalog. Making ONE of our paid endpoints ALSO speak MPP means-BNB-ecosystem agents (which reach for MPP, not x402) can pay us. First-mover: an-x402↔MPP-bilingual endpoint is likely novel. Keep it surgical — one pilot endpoint, real.--## Build-- `api/_lib/bnb/mpp-server.js` — wrap `@bnb-chain/mpp` server (`chargeAsync` / `Mppx.create`- per its README: `mpp-sdk` supports `authorization`/`permit2`/`transaction`/`hash`- credentials with a replay store). Provide `mppChallenge(routeMeta)` and- `mppVerifyAndSettle(req)` helpers mirroring our x402 dance shape. Use a durable replay- store if one exists in our stack (grep for redis/kv usage); else the SDK's memory store with- a `// replace with durable store in prod` note is NOT allowed — wire the real KV we already- use, or document precisely which env var enables it.-- Pick ONE existing paid endpoint as the pilot (recommend `api/x402/three-intel.js` — clean,- read-only). Add MPP as an ALTERNATE payment path: if the request carries an MPP- `PAYMENT`/402 credential header, settle via `mpp-server.js`; otherwise the existing x402- path is untouched. Do not break the x402 flow — additive only.-- Advertise MPP support in the endpoint's response headers / discovery metadata so MPP- clients know they can pay here.--## States-No payment → return BOTH an x402 402 challenge and an MPP `402` challenge (content-negotiated-or dual-header, per MPP spec). Bad MPP signature → MPP-spec error, not a generic 500. Replay-→ rejected by the replay store. Settlement fails on-chain → typed error with reason.--## Tests (`tests/bnb-mpp-server.test.js`)-- `mppChallenge` emits a spec-shaped 402 for the pilot route.-- A mocked valid `authorization` (EIP-3009) credential verifies + would-settle.-- Replay: same credential twice → second rejected.-- The existing x402 path on the pilot endpoint still passes its current tests (run them).--## Definition of done-Inherit 00-CONTEXT DoD. Additionally:-- [ ] Real proof: drive the pilot endpoint with an MPP client (prompt 05's buyer, or the SDK's example client) on testnet; paste the 402 challenge JSON and a successful settlement receipt.-- [ ] Docs handled in prompt 06 — but leave a `docs/bnb-payments.md` stub section header for the server side so 06 can fill it, OR note in PROGRESS that 06 owns it.-- [ ] `data/changelog.json`: entry (tags `feature`, `sdk`) — "three.ws now accepts BNB Chain MPP payments".diff --git a/prompts/bnb-chain/05-mpp-buyer-client.md b/prompts/bnb-chain/05-mpp-buyer-client.mddeleted file mode 100644index 34e0090ef..000000000--- a/prompts/bnb-chain/05-mpp-buyer-client.md+++ /dev/null@@ -1,41 +0,0 @@-# 05 — MPP buyer client (our agents pay MPP endpoints)--Read `prompts/bnb-chain/00-CONTEXT.md` first, then `/workspaces/three.ws/CLAUDE.md`.-**Prereqs: 01** (`api/_lib/bnb/chains.js`). Run it first if missing.--## Why-The mirror of prompt 04. Our platform's agents should be able to PAY any MPP-protected-endpoint in the BNB ecosystem, the same way they already pay x402 endpoints via-`api/_lib/x402-buyer-fetch.js`. This unlocks the whole BNB agent economy as callable-services for our agents. Model on the existing x402 buyer so the ergonomics match.--## Build — `api/_lib/bnb/mpp-buyer.js`-- Read `api/_lib/x402-buyer-fetch.js` first — match its interface shape (a fetch-like wrapper- that transparently handles the 402 → pay → retry loop).-- Export `mppFetch(url, opts, { account, maxSpend })` using `@bnb-chain/mpp` client:- on a `402`, parse the MPP challenge, construct the appropriate credential- (`authorization` EIP-3009 or `permit2`, per what the challenge accepts), attach it, retry.- Enforce a **hard `maxSpend` cap** (atomic units) — never pay above it; return a typed- "over budget" error instead. Caller injects the signing account; never read keys here.-- Support BSC testnet by default; parameterize network.--## States-Endpoint quotes above `maxSpend` → refuse, typed error, no payment sent. Challenge in an-unsupported credential type → clear error naming what's supported. Settlement broadcast fails-→ surface the on-chain reason, do not silently retry-forever (bounded retries).--## Tests (`tests/bnb-mpp-buyer.test.js`)-- Happy path: mock a server that 402s then 200s → `mppFetch` pays and returns the body.-- `maxSpend` enforcement: challenge above cap → refused, zero payment attempted.-- Unsupported credential type → typed error.-- Uses a synthetic testnet account.--## Definition of done-Inherit 00-CONTEXT DoD. Additionally:-- [ ] Real proof: point `mppFetch` at prompt 04's pilot endpoint (or the `@bnb-chain/mpp`- example server) on testnet; paste the full round-trip — 402 challenge, the credential- sent, and the 200 body with the settlement receipt.-- [ ] Wire it where our agents already select a payment method (grep for- `x402-buyer-fetch` usages) so MPP endpoints become callable — at minimum expose it from- the same module surface agents already import, with a short JSDoc example.-- [ ] Docs owned by prompt 06 (buyer side) — note readiness in PROGRESS.diff --git a/prompts/bnb-chain/06-payments-bridge-docs.md b/prompts/bnb-chain/06-payments-bridge-docs.mddeleted file mode 100644index 1875acfea..000000000--- a/prompts/bnb-chain/06-payments-bridge-docs.md+++ /dev/null@@ -1,34 +0,0 @@-# 06 — BNB payments docs + x402↔MPP bridge spec--Read `prompts/bnb-chain/00-CONTEXT.md` first, then `/workspaces/three.ws/CLAUDE.md`.-**Prereqs: 04 and 05** (server + buyer must exist to document them truthfully). If either is-missing, run it first — do NOT document unbuilt behavior.--## Why-Track A ships two halves (we accept MPP; we pay MPP) plus gasless rails. A developer needs-one page that explains the whole BNB payments story and one spec that pins the wire-level-relationship between our x402 usage and MPP so future code has a contract to build against.--## Build-1. `docs/bnb-payments.md` — zero-context reader. Cover: (a) what MPP is and how it relates to- x402; (b) how to PAY our endpoints with MPP (buyer POV, runnable example against the pilot- endpoint from 04); (c) how OUR agents pay MPP endpoints via `mpp-buyer.js` (runnable- example); (d) gasless sends via MegaFuel (`megafuel.js`) with the self-pay fallback- explained honestly; (e) the honest caveats from 00-CONTEXT (MegaFuel is one operator,- BEP-414 Draft). Every code sample must actually run. Link it from `docs/start-here.md`.-2. `specs/x402-mpp-bridge.md` — the load-bearing contract: which credential types map across- x402 and MPP, how a dual-protocol endpoint advertises both, the header precedence rules,- and the replay-store guarantees. This is a spec (contract), not a tutorial — precise, no- fluff. Reference the exact code paths in `api/_lib/bnb/mpp-server.js` and `mpp-buyer.js`.--## States-N/A (docs) — but every claim must be consistent with 00-CONTEXT's verified/refuted lists and-with the actual code. If the code and a draft sentence disagree, the CODE wins; fix the doc.--## Definition of done-Inherit 00-CONTEXT DoD. Additionally:-- [ ] Every `curl`/code sample in `docs/bnb-payments.md` executed once against testnet; paste one real run in PROGRESS.-- [ ] `data/pages.json`: if `docs/bnb-payments.md` is served as a public route, register it.-- [ ] `STRUCTURE.md`: add or update a row for the BNB payments surface.-- [ ] `data/changelog.json`: entry (tag `docs`) — "BNB Chain payments guide (MPP + gasless)".-- [ ] Links resolve to live paths; no "see the code" hand-waves.diff --git a/prompts/bnb-chain/07-greenfield-read-client.md b/prompts/bnb-chain/07-greenfield-read-client.mddeleted file mode 100644index b91b42ea1..000000000--- a/prompts/bnb-chain/07-greenfield-read-client.md+++ /dev/null@@ -1,38 +0,0 @@-# 07 — Greenfield read client (SP + chain reads)--Read `prompts/bnb-chain/00-CONTEXT.md` first, then `/workspaces/three.ws/CLAUDE.md`.-**Prereqs: 01** (`api/_lib/bnb/chains.js`). Run it first if missing.--## Why-Track B (pay-to-unlock 3D vault) needs to read Greenfield: list buckets/objects, fetch object-metadata, check permissions, and download bytes from a Storage Provider. Build the read layer-first, in isolation, against Greenfield testnet — so upload (09) and unlock (11) compose it.--## Build — `api/_lib/bnb/greenfield.js`-- Use `@bnb-chain/greenfield-js-sdk` (open-source-first). Read Greenfield testnet- chain/SP/RPC endpoints from the SDK docs or `bnb-chain/greenfield-contracts` — never invent.-- Export read-only helpers: `listObjects(bucket)`, `getObjectMeta(bucket, object)`,- `headBucket(bucket)`, `getObjectPermissions(bucket, object, principal)` (does this account- or group have read access?), and `downloadObject(bucket, object, { authForPrivate })` which- streams bytes from an SP. `authForPrivate` carries the signature/permission proof for- private objects (public objects need none).-- All reads default to Greenfield testnet; parameterize network.--## States-Object doesn't exist → typed not-found. Private object, no permission → typed-`forbidden` (this is the expected "locked" state the vault relies on — surface it cleanly,-don't treat as an error). SP unreachable → try the next SP if the SDK exposes a list, else-typed 503. Async-mirror lag → callers may see `pending`; expose it, don't mask.--## Tests (`tests/bnb-greenfield-read.test.js`)-- `getObjectMeta` shape asserted against a mocked SP response.-- `getObjectPermissions` returns `false` for a principal not in the policy (mocked).-- `downloadObject` on a forbidden private object → typed `forbidden`, not a throw-500.-- No real third-party bucket names in fixtures — synthetic.--## Definition of done-Inherit 00-CONTEXT DoD. Additionally:-- [ ] Real proof: against Greenfield testnet, read a public object's metadata you created (or- any public testnet object) and paste the real JSON. Prove the `forbidden` path by- reading a private object without permission and pasting the typed error.-- [ ] Internal lib — JSDoc on each export; docs deferred to prompt 13.diff --git a/prompts/bnb-chain/08-vault-crypto-format.md b/prompts/bnb-chain/08-vault-crypto-format.mddeleted file mode 100644index 9707dffee..000000000--- a/prompts/bnb-chain/08-vault-crypto-format.md+++ /dev/null@@ -1,43 +0,0 @@-# 08 — Encrypted-GLB envelope + vault manifest spec--Read `prompts/bnb-chain/00-CONTEXT.md` first, then `/workspaces/three.ws/CLAUDE.md`.-**Prereqs: none.** Pure crypto + spec work; runs fully standalone.--## Why-The vault stores 3D models (GLB) so that even though bytes live on a public-ish Storage-Provider, only a paying/authorized buyer can decrypt them. We need a portable encryption-envelope + a manifest format, decided ONCE and specced, so the upload (09), contract (10),-and unlock (11) prompts all agree. Keeping this backend-agnostic hedges the Greenfield-platform-risk from 00-CONTEXT.--## Build-1. `api/_lib/bnb/vault-crypto.js` — real crypto, no hand-rolled primitives (CLAUDE.md: never- reinvent crypto). Use Node `crypto` (AES-256-GCM) + an established lib for key wrapping if- needed. Export:- - `encryptGlb(glbBytes) → { ciphertext, contentKey, iv, authTag, sha256OfPlaintext }` —- AES-256-GCM with a random per-object content key.- - `wrapKey(contentKey, recipientPubKey)` / `unwrapKey(wrapped, recipientPrivKey)` — so the- content key can be delivered to an authorized buyer without exposing it publicly (ECIES- over secp256k1 to match EVM keys — use a vetted lib, e.g. `eciesjs`, if present/addable).- - `decryptGlb({ ciphertext, contentKey, iv, authTag }) → glbBytes`, verifying the auth tag- and the plaintext sha256.-2. `specs/vault-manifest.md` — the wire contract: the JSON manifest stored alongside each- vault object `{ version, glbObjectRef:{bucket,object}, encryption:{alg:'AES-256-GCM',iv,authTag}, sha256, priceAtomic, sellerAddress, contract:{address,chainId}, createdAt }`, the- key-delivery flow, and the exact byte layout of the envelope. This is a contract other- code depends on — precise, versioned.--## States-Tampered ciphertext / wrong key → GCM auth-tag failure surfaces as a typed decrypt error,-never silent garbage. Wrong-size key → reject before use.--## Tests (`tests/bnb-vault-crypto.test.js`)-- Round-trip: `encryptGlb` → `decryptGlb` returns identical bytes; sha256 matches.-- Tamper one ciphertext byte → decrypt throws typed auth error.-- `wrapKey`/`unwrapKey` round-trips with a secp256k1 keypair; wrong key fails.-- Use a tiny synthetic GLB fixture (a few bytes is fine).--## Definition of done-Inherit 00-CONTEXT DoD. Additionally:-- [ ] Paste a real round-trip proof (encrypt→upload-agnostic→decrypt of a real small GLB) in PROGRESS with the sha256 matching.-- [ ] `specs/vault-manifest.md` complete and referenced by name from prompts 09/10/11 expectations.-- [ ] Dependency check: if you add `eciesjs` (or similar), pin `^` semver, justify in commit msg (CLAUDE.md open-source-first + pinning rule).diff --git a/prompts/bnb-chain/09-vault-upload-pipeline.md b/prompts/bnb-chain/09-vault-upload-pipeline.mddeleted file mode 100644index aa550f681..000000000--- a/prompts/bnb-chain/09-vault-upload-pipeline.md+++ /dev/null@@ -1,47 +0,0 @@-# 09 — Vault upload pipeline (encrypt → Greenfield)--Read `prompts/bnb-chain/00-CONTEXT.md` first, then `/workspaces/three.ws/CLAUDE.md`.-**Prereqs: 07** (`greenfield.js` read client) and **08** (`vault-crypto.js` + manifest spec).-Run whichever is missing first.--## Why-A seller lists a 3D model: we encrypt it (08), create/ensure a Greenfield bucket, upload the-ciphertext object via a Storage Provider, write the manifest, and return refs the vault-contract (10) will gate. This is where the "storage you control from a contract" story-becomes real bytes on Greenfield testnet.--## Build-- Extend `api/_lib/bnb/greenfield.js` (or a sibling `greenfield-write.js`) with write helpers- using `@bnb-chain/greenfield-js-sdk`: `ensureBucket(name)`, `createObject(bucket, name, bytes, { contentType, visibility:'private' })` (uploads via SP; remember from 00-CONTEXT that- object CREATE from BSC is pending — creation goes through the Greenfield SDK/SP path, not a- BSC contract, and settles async: poll for the object to become readable).-- `api/bnb/vault-upload.js` — server endpoint. Input: a GLB (multipart or a URL to one of our- own generated GLBs — reuse `api/forge*.js` outputs), plus `{ priceAtomic, sellerAddress }`.- Steps: fetch GLB → `encryptGlb` (08) → `ensureBucket` → `createObject(ciphertext)` → build- the manifest per `specs/vault-manifest.md` → store the manifest (as its own small Greenfield- object or in our existing DB/KV — pick what the codebase already uses and say which) →- return `{ manifestRef, glbObjectRef, sha256, status:'stored'|'pending' }`.-- The wrapped content key is NOT uploaded in the clear — it's released only at unlock (11).- Store the seller-side key material so 11 can re-wrap it to the buyer (or use a- deterministic re-encryption the contract authorizes — document the exact choice).--## States-Bucket already exists → reuse, don't fail. SP upload interrupted → resumable or clean retry;-never leave a half-object referenced by a manifest. Object still mirroring → return-`status:'pending'` with a poll hint, not a lie that it's ready. Oversized GLB → enforce a-sane max, typed 413.--## Tests (`tests/bnb-vault-upload.test.js`)-- End-to-end with mocked SP: GLB in → manifest out matching the spec, ciphertext object- referenced, key NOT present in the manifest.-- `ensureBucket` idempotent (second call no-ops).-- `pending` surfaced when the mocked mirror hasn't settled.-- Synthetic GLB + synthetic addresses.--## Definition of done-Inherit 00-CONTEXT DoD. Additionally:-- [ ] REAL testnet proof: upload one encrypted GLB to a Greenfield testnet bucket; paste the- bucket name, object name, the GreenfieldScan link, and the manifest JSON. Confirm the- object is NOT publicly decryptable (download ciphertext, show it's not a valid GLB- without the key).-- [ ] Docs deferred to 13; note the manifest-storage choice you made in PROGRESS.diff --git a/prompts/bnb-chain/10-vault-contract.md b/prompts/bnb-chain/10-vault-contract.mddeleted file mode 100644index bc7d5d8f9..000000000--- a/prompts/bnb-chain/10-vault-contract.md+++ /dev/null@@ -1,50 +0,0 @@-# 10 — GreenfieldVault.sol (pay → PermissionHub grant)--Read `prompts/bnb-chain/00-CONTEXT.md` first, then `/workspaces/three.ws/CLAUDE.md`.-**Prereqs: 01** (chain constants for hub addresses). Run it first if missing. Independent of-07–09 at the contract level (they meet at prompt 11).--## Why-The heart of the "only on BNB Chain" claim: a BSC smart contract that, on payment, grants the-buyer a Greenfield **object permission** cross-chain via PermissionHub — on-chain logic gating-decentralized storage. No equivalent on Ethereum/Base/Solana. Build + deploy the contract to-BSC testnet.--## Build — `contracts/GreenfieldVault.sol` (Foundry; see `contracts/README.md`)-- Uses the live Greenfield hub interfaces. Reference `bnb-chain/greenfield-contracts` for the- `PermissionHub`, `IGnfdAccessControl`, and cross-chain interfaces (add them under- `contracts/lib/` or interface stubs — real ABIs, not invented). Hub addresses per network:- mainnet from 00-CONTEXT; testnet from the greenfield-contracts README (read it).-- Functions:- - `list(bytes32 objectId, uint256 price, address seller)` — seller registers a for-sale- encrypted object (the one uploaded in 09), the vault must control its permissions.- - `buy(bytes32 objectId)` payable / or pull-payment in a token — on sufficient payment,- call `PermissionHub.createPolicy(...)` granting the buyer read permission on that object,- and record the sale. Handle the PermissionHub cross-chain **relayer fee** (these calls- require paying the cross-chain fee — read the interface; get it right).- - `revoke` path for refunds/expiry via `deletePolicy` (design a sane policy: e.g. grants are- permanent on purchase; if you add expiry, make it explicit).- - Emit `Listed`, `Purchased(objectId, buyer, policyId)` events the API (11) indexes.-- Follow `contracts/README.md` build/test/deploy conventions; add a deploy script- `contracts/script/DeployGreenfieldVault.s.sol`.--## States-Underpayment → revert with reason. Buying an unlisted object → revert. Cross-chain fee not-covered → revert clearly (don't half-execute). Double-buy → idempotent or explicit re-grant,-your choice, documented. Re-entrancy → guarded.--## Tests (`contracts/test/GreenfieldVault.t.sol`, `forge test -vv`)-- `list` then `buy` with exact payment emits `Purchased` and calls `createPolicy` (mock the- hub in-test via a mock PermissionHub).-- Underpayment reverts; unlisted reverts; missing cross-chain fee reverts.-- Re-entrancy attempt blocked.--## Definition of done-Inherit 00-CONTEXT DoD. Additionally:-- [ ] `forge test -vv` green; paste output.-- [ ] REAL deploy to BSC testnet; record address in `contracts/DEPLOYMENTS.md` (bytecode-- verified style with today's date). Paste the deploy tx hash + BscScan link in PROGRESS.-- [ ] Execute one real `buy` on testnet that triggers a real `PermissionHub.createPolicy`- cross-chain call; paste the BSC tx hash AND the resulting Greenfield permission change- (GreenfieldScan) once it settles. This cross-chain grant IS the campaign's signature proof.-- [ ] `data/changelog.json`: entry (tags `feature`, `infra`) — "On-chain gated 3D asset vault on BNB Chain".diff --git a/prompts/bnb-chain/11-vault-unlock-api.md b/prompts/bnb-chain/11-vault-unlock-api.mddeleted file mode 100644index d1dac667e..000000000--- a/prompts/bnb-chain/11-vault-unlock-api.md+++ /dev/null@@ -1,46 +0,0 @@-# 11 — Vault API: list, status, unlock--Read `prompts/bnb-chain/00-CONTEXT.md` first, then `/workspaces/three.ws/CLAUDE.md`.-**Prereqs: 09** (upload pipeline + manifests) and **10** (deployed vault contract). Run-whichever is missing first — this prompt wires them together and must not stub either.--## Why-The API layer the vault UI (12) calls: browse listings, check a buyer's access, and — after-an on-chain purchase — deliver the decryption key so the buyer can download + decrypt the GLB.-This is where payment (contract), storage (Greenfield), and crypto (envelope) meet.--## Build — `api/vault/[action].js` (or discrete files under `api/vault/`)-Free plain-handler pattern for reads; the unlock step verifies on-chain state, not a paywall.-- `GET /api/vault/list` — enumerate listed objects from the contract's `Listed`/`Purchased`- events (index via viem `getLogs` through `chains.js`) joined with manifest metadata- (name, price, seller, thumbnail if any). Handle 0 listings (empty state data).-- `GET /api/vault/status?objectId=&buyer=` — is this buyer's purchase on-chain? Is the- Greenfield permission grant settled yet? Return `{ purchased, policySettled, state:- 'unlisted'|'available'|'pending-grant'|'unlocked' }`. The `pending-grant` state (cross-chain- async from 00-CONTEXT) MUST be represented honestly.-- `POST /api/vault/unlock` — body proves the caller controls `buyer` (a signed message) AND- the contract shows they purchased + the Greenfield policy is settled. Only then release the- content key: re-wrap it to the buyer's pubkey (`vault-crypto.wrapKey`) and return- `{ wrappedKey, glbObjectRef, manifest }`. The buyer downloads ciphertext via 07's- `downloadObject` (their granted permission authorizes the SP fetch) and decrypts locally.- NEVER return the raw content key or the plaintext GLB from the server.--## States-Not purchased → 403 with "purchase required" + the buy call info. Purchased but grant still-mirroring → 200 `state:'pending-grant'` + poll hint (not an error). Bad signature → 401.-Object delisted → 410. Every state distinct and honest.--## Tests (`tests/bnb-vault-api.test.js`)-- `list` builds entries from mocked logs + manifests; empty → `[]` with empty-state shape.-- `status` returns `pending-grant` when purchase log present but mocked policy unsettled.-- `unlock` refuses without a valid purchase (403) and without a valid signature (401);- succeeds only when both hold, returning a wrapped (not raw) key.-- Synthetic addresses/objects.--## Definition of done-Inherit 00-CONTEXT DoD. Additionally:-- [ ] REAL end-to-end slice on testnet: an address that actually bought via prompt 10 calls- `unlock`, receives the wrapped key, downloads ciphertext from Greenfield, decrypts to a- valid GLB. Paste each step's real output (tx hash, status JSON, sha256 of decrypted GLB- matching the manifest). Prove a NON-buyer gets 403.-- [ ] Docs deferred to 13; note any manifest/keystore assumptions in PROGRESS.diff --git a/prompts/bnb-chain/12-vault-ui.md b/prompts/bnb-chain/12-vault-ui.mddeleted file mode 100644index 6c74c5af2..000000000--- a/prompts/bnb-chain/12-vault-ui.md+++ /dev/null@@ -1,47 +0,0 @@-# 12 — Vault UI (/vault): browse, buy, unlock, view in 3D--Read `prompts/bnb-chain/00-CONTEXT.md` first, then `/workspaces/three.ws/CLAUDE.md`.-**Prereqs: 11** (vault API). Run it first if missing. Do not build UI against unbuilt APIs.--## Why-The face of Track B. A polished page where anyone browses encrypted 3D listings, buys one-(BSC testnet), watches the cross-chain grant settle, unlocks, and sees the model render in-our existing Three.js viewer. This is the screenshot-worthy artifact. Hold the CLAUDE.md-UI/UX bar: every state designed, transitions, responsive, a11y, microinteractions.--## Build — `/vault` page-- New page wired into the Vite app + nav (find how existing pages register: `data/pages.json`,- the router, and the nav component — match them). Reuse the existing GLB viewer component- (grep for the Three.js viewer used by forge/marketplace) — do NOT build a new viewer.-- Flow UI:- 1. **Browse** — grid of listings from `GET /api/vault/list`. Each card: name, price,- seller, locked-state badge. Skeleton loading, designed empty state ("No models listed- yet — list yours"), error state.- 2. **Buy** — connect wallet (reuse existing wallet connect; BSC testnet), call the vault- contract `buy`. Show tx pending → confirmed. If gasless is available (prompt 02), offer- the sponsored path and label it.- 3. **Settling** — after purchase, poll `GET /api/vault/status`; show an honest- "granting access on Greenfield…" state for `pending-grant` (this async step is a feature- to surface, not hide — it's the cross-chain magic).- 4. **Unlock + view** — on `unlocked`, call `POST /api/vault/unlock`, decrypt client-side- (`vault-crypto` browser build), load the GLB into the viewer. Download button for the GLB.-- Every interactive element: hover/active/focus states. Responsive at 320/768/1440.--## States-0 listings, 1 listing, many (paginate/virtualize if needed). Wallet not connected. Wrong-network (prompt to switch to BSC testnet). Purchase rejected in wallet. Grant stuck pending-(bounded poll → "still settling, check back" with a manual refresh). Decrypt failure (show a-real recovery message). Non-buyer viewing a locked card (clear CTA).--## Tests-- Logic tests for any pure helpers (state machine: purchase→pending→unlocked) in `tests/`.-- Manual browser exercise is REQUIRED (CLAUDE.md DoD): run `npm run dev`, drive the full flow,- confirm zero console errors and real network calls. Capture what you saw in PROGRESS.--## Definition of done-Inherit 00-CONTEXT DoD (incl. the UI-specific items: all states designed, no console errors,-real API calls in network tab). Additionally:-- [ ] `data/pages.json`: register `/vault` (path, title, description, `added` date).-- [ ] `STRUCTURE.md`: add a row for the vault surface.-- [ ] `data/changelog.json`: entry (tag `feature`) — "Vault: buy & unlock encrypted 3D models on BNB Chain".-- [ ] Real browser proof in PROGRESS: the full buy→settle→unlock→render flow on testnet, with the tx hash and a note that the GLB rendered.diff --git a/prompts/bnb-chain/13-vault-e2e-proof.md b/prompts/bnb-chain/13-vault-e2e-proof.mddeleted file mode 100644index 85c0429c1..000000000--- a/prompts/bnb-chain/13-vault-e2e-proof.md+++ /dev/null@@ -1,38 +0,0 @@-# 13 — Vault end-to-end proof + final docs--Read `prompts/bnb-chain/00-CONTEXT.md` first, then `/workspaces/three.ws/CLAUDE.md`.-**Prereqs: 12** (and transitively 07–11). This prompt proves the whole track works together-and writes the definitive docs. If any prereq is incomplete, finish it first — this prompt-exists to catch exactly that.--## Why-Tracks that ship in pieces drift. One agent runs the entire vault flow on real BSC/Greenfield-testnet, captures immutable proof, and writes the doc + spec that let anyone reproduce it.--## Do — full E2E on testnet (no mocks)-1. Generate a real GLB (reuse our free forge lane — `api/forge*.js` / the `generate-3d-model`- flow) so the asset is genuinely ours.-2. Upload+encrypt it (09) → Greenfield testnet. Record bucket/object/manifest.-3. List it on the vault contract (10) from a seller wallet.-4. From a SECOND wallet, buy it (12/contract) — use the gasless path if available.-5. Watch the cross-chain PermissionHub grant settle; unlock (11); decrypt; render.-6. Confirm a THIRD wallet (no purchase) is correctly denied.-Capture every tx hash, object ref, and status transition.--## Build — `docs/bnb-vault.md`-Zero-context reader. What the vault is, the exact "only on BNB Chain" mechanism (BSC contract-→ cross-chain PermissionHub grant on Greenfield, per 00-CONTEXT verified facts), the full-architecture (encrypt→store→gate→unlock), a reproducible walkthrough with the real testnet-addresses from the E2E run, and the honest caveats (Greenfield deprioritized; content bytes-off-chain via SPs; grants async). Link from `docs/start-here.md`. Update `specs/vault-manifest.md`-if the E2E surfaced any drift from prompt 08's draft.--## Definition of done-Inherit 00-CONTEXT DoD. Additionally:-- [ ] PROGRESS entry with the COMPLETE captured E2E trail: seller tx, buyer tx (with mode- sponsored/self-pay), Greenfield object + manifest refs, the PermissionHub policyId, the- unlock response, the decrypted-GLB sha256 matching the manifest, and the denied-third-- wallet 403. This is the campaign's Track-B proof-of-life — make it airtight.-- [ ] `docs/bnb-vault.md` complete; every address/hash in it is real and from your run.-- [ ] `data/changelog.json`: entry (tag `feature`) — "Encrypted 3D vault live end-to-end on BNB Chain testnet".-- [ ] If ANY step couldn't complete on real testnet, say exactly which and why — do not paper over it.diff --git a/prompts/bnb-chain/14-world-moves-contract.md b/prompts/bnb-chain/14-world-moves-contract.mddeleted file mode 100644index 327afa41f..000000000--- a/prompts/bnb-chain/14-world-moves-contract.md+++ /dev/null@@ -1,37 +0,0 @@-# 14 — WorldMoves.sol (on-chain move commits)--Read `prompts/bnb-chain/00-CONTEXT.md` first, then `/workspaces/three.ws/CLAUDE.md`.-**Prereqs: 01** (chain constants). Run it first if missing.--## Why-Track C's core: a contract that records player moves/state transitions as events, cheap and-tiny, designed to be written every ~0.45s (BSC's live block time) and read back as a-real-time on-chain presence feed. The point is to feel Solana-class latency with full EVM-tooling — 0.45s blocks + gasless moves make fully-on-chain movement actually usable.--## Build — `contracts/WorldMoves.sol` (Foundry)-- Minimal gas per move (this is written constantly). Design:- - `move(uint32 worldId, int32 x, int32 y, int32 z, uint16 facing)` — emits- `Moved(worldId, msg.sender, x, y, z, facing, block.number, block.timestamp)`. Prefer- event-only (no SSTORE) for the movement stream to keep gas minimal; keep optional current-- position storage behind a separate `checkpoint()` if a prompt needs queryable latest state.- - Optional `join(worldId)` / `leave(worldId)` presence events.-- No admin, no upgradeability needed (keep it trivially auditable). Bound coordinates sanely.-- Deploy script `contracts/script/DeployWorldMoves.s.sol`. Follow `contracts/README.md`.--## States-Out-of-bounds coords → revert or clamp (pick one, document). Spam is expected — that's the-use case; ensure gas stays flat (no unbounded loops, no growing storage per move).--## Tests (`contracts/test/WorldMoves.t.sol`, `forge test -vv`)-- `move` emits `Moved` with the exact args + block metadata.-- Gas per `move` measured and asserted under a tight bound (paste the gas number).-- `join`/`leave` emit presence events.--## Definition of done-Inherit 00-CONTEXT DoD. Additionally:-- [ ] `forge test -vv` green; paste output INCLUDING the measured gas-per-move.-- [ ] REAL deploy to BSC testnet; record in `contracts/DEPLOYMENTS.md`; paste deploy tx +- BscScan link. Fire ~10 real `move` txs in a row and paste the block numbers/timestamps- showing sub-second spacing (this doubles as live 0.45s-block proof).-- [ ] Internal — docs deferred to prompt 18.diff --git a/prompts/bnb-chain/15-gasless-move-sender.md b/prompts/bnb-chain/15-gasless-move-sender.mddeleted file mode 100644index 46b213362..000000000--- a/prompts/bnb-chain/15-gasless-move-sender.md+++ /dev/null@@ -1,40 +0,0 @@-# 15 — Gasless move sender (sponsored move txs)--Read `prompts/bnb-chain/00-CONTEXT.md` first, then `/workspaces/three.ws/CLAUDE.md`.-**Prereqs: 02** (`megafuel.js`) and **14** (`WorldMoves.sol` deployed). Run whichever is-missing first.--## Why-Moving on-chain is only magical if it's FREE and instant. This layer turns a player's-intended move into a gasless MegaFuel-sponsored `move()` tx (self-pay fallback), so a plain-empty wallet can walk around a world writing to chain every ~0.45s with no gas. Combines the-two headline capabilities into one felt experience.--## Build — `api/_lib/bnb/world-moves.js` + a thin browser sender-- `buildMoveTx(worldId, pos, facing)` — encodes a `WorldMoves.move` call via viem + the- deployed address (from `chains.js`/config).-- `sendMove({ account, worldId, pos, facing })` — routes through `megafuel.sendGasless`- (prompt 02); returns `{ hash, mode }`. Rate-limit/coalesce: if the player moves faster than- blocks confirm, debounce to at most one in-flight tx + latest-wins queue (don't spam- hundreds of pending txs). This coalescing logic must be pure + tested.-- Browser entry: a small module the presence mode (16) imports — takes the player's local- position stream, emits sponsored move txs at a sane cadence (target ~1 per block).--## States-Sponsorship unavailable → self-pay (still works, label it). Tx pending longer than a block →-skip intermediate positions, send only the latest (latest-wins). Wallet has no funds AND-sponsorship down → surface "moves can't be recorded on-chain right now" gracefully; local-movement still works (never freeze the game).--## Tests (`tests/bnb-world-moves.test.js`)-- `buildMoveTx` encodes the right calldata for known args.-- Coalescing: feed a burst of positions faster than confirmations → asserts only latest-wins- txs are emitted, in-flight cap respected (pure-logic test, no network).-- `sendMove` sponsored + self-pay fallback paths (mock prompt 02).--## Definition of done-Inherit 00-CONTEXT DoD. Additionally:-- [ ] REAL testnet proof: send a stream of ~20 gasless moves from a single wallet; paste a- few tx hashes, their `mode` (ideally `sponsored` with gasPrice 0), and the block spacing.- If sponsored, note the wallet's tBNB balance stayed flat — that's the wow.-- [ ] Docs deferred to 18.diff --git a/prompts/bnb-chain/16-onchain-presence-mode.md b/prompts/bnb-chain/16-onchain-presence-mode.mddeleted file mode 100644index d57d9e0d8..000000000--- a/prompts/bnb-chain/16-onchain-presence-mode.md+++ /dev/null@@ -1,42 +0,0 @@-# 16 — On-chain presence mode in explore/platformer--Read `prompts/bnb-chain/00-CONTEXT.md` first, then `/workspaces/three.ws/CLAUDE.md`.-**Prereqs: 15** (gasless move sender). Run it (and its chain) first if missing.--## Why-Wire the on-chain movement into a real, existing 3D surface so people can actually feel it.-We shipped platformer mode + Agora player-mode (`src/agora/player-mode.js`) on 2026-07-07.-Add an opt-in "On-chain (BNB)" toggle: when on, the local avatar's moves are also written to-`WorldMoves` gaslessly, and OTHER players' on-chain moves are read back and rendered — a-fully-on-chain presence layer riding 0.45s blocks.--## Build-- Find the existing explore/platformer/player-mode entry (grep `player-mode`, `platformer`,- the explore surface from `git log`). Add a clearly-labeled opt-in toggle "Record on-chain- (BNB testnet)" — OFF by default (don't surprise users with wallet prompts).-- When ON: feed local position into prompt 15's sender (gasless moves). Read remote presence- by subscribing to `Moved` events (viem `watchContractEvent` / polling every block via- `chains.js`) and render lightweight ghosts/markers for other on-chain players in the same- `worldId`. Interpolate between the ~0.45s updates so motion is smooth.-- Keep it additive: with the toggle OFF, the existing experience is byte-for-byte unchanged.- Never regress the current explore/platformer behavior.--## States-Toggle OFF → zero BNB code runs, no wallet prompt. ON but no wallet → prompt to connect (BSC-testnet), gracefully cancelable. ON, sponsorship down → self-pay note or "local-only" degrade;-never freeze movement. No other on-chain players → your own ghost only + a subtle "you're the-first one here" hint. Event backfill on join (show recent movers, bounded lookback).--## Tests-- Pure interpolation/ghost-state logic in `tests/` (feed timestamped positions → smooth- intermediate frames; stale players time out).-- Manual browser exercise REQUIRED: `npm run dev`, toggle on with a testnet wallet, walk- around, confirm real `move` txs fire and a second browser/wallet shows up as a ghost.- Capture observations + zero console errors in PROGRESS.--## Definition of done-Inherit 00-CONTEXT DoD (UI items included). Additionally:-- [ ] Real proof: two sessions (two wallets) see each other move on-chain; paste tx hashes and- a note that ghost rendering tracked them at sub-second latency.-- [ ] `data/changelog.json`: entry (tag `feature`) — "Walk on-chain: gasless real-time presence on BNB Chain".-- [ ] `STRUCTURE.md`: update the explore/platformer row to mention the on-chain mode.diff --git a/prompts/bnb-chain/17-latency-proof-page.md b/prompts/bnb-chain/17-latency-proof-page.mddeleted file mode 100644index e9a585322..000000000--- a/prompts/bnb-chain/17-latency-proof-page.md+++ /dev/null@@ -1,43 +0,0 @@-# 17 — /bnb-latency live block-race proof page--Read `prompts/bnb-chain/00-CONTEXT.md` first, then `/workspaces/three.ws/CLAUDE.md`.-**Prereqs: none** (uses public RPCs; `chains.js` from 01 if present, else inline the public-RPC — but prefer 01's `probeBlockTime`). Standalone, high-shareability.--## Why-A single page that VIEWERS find fascinating and screenshot: a live, honest race showing BNB-Chain confirming blocks at ~0.45s next to Base (2s) and Ethereum (12s). No wallet, no-payment — pure proof of the speed claim, driven by real public RPCs. This is marketing that-is also true (00-CONTEXT verified fact #3).--## Build — `/bnb-latency` page-- Three (or four) live lanes: BNB Chain (56), Base (8453), Ethereum (1), optionally Solana- (slot cadence via its RPC). Each lane subscribes to new blocks via public RPC and animates a- tick every time a block lands, with a running measured average interval. Use- `probeBlockTime` (01) for BNB where possible; other chains via their public RPCs.-- Headline number: BNB Chain's live measured avg (should read ~0.45s), updated continuously.- Show a rolling sparkline of block intervals per chain.-- Honesty guardrails: label everything "measured live from public RPC", show the last-updated- timestamp, and DON'T claim 250ms/20k TPS (refuted/roadmap per 00-CONTEXT). Compare only what- you measure.-- CLAUDE.md UI bar: designed loading (before first blocks arrive), error (RPC down → show the- others, mark the dead lane), responsive, a11y, tasteful motion (respect- `prefers-reduced-motion`). Use existing design tokens.--## States-RPC for one chain down → that lane shows "reconnecting", others keep racing. All down →-designed error with retry. First few seconds before enough samples → "measuring…" not a-fake number. Reduced-motion → static bars with numbers.--## Tests-- Pure interval-averaging + sparkline math in `tests/` (feed block timestamps → correct- rolling average).-- Manual browser exercise: `npm run dev`, open `/bnb-latency`, confirm BNB lane reads ~0.45s- live and others match expectations; zero console errors. Capture the observed BNB average.--## Definition of done-Inherit 00-CONTEXT DoD (UI items). Additionally:-- [ ] `data/pages.json`: register `/bnb-latency`.-- [ ] `STRUCTURE.md`: add a row.-- [ ] `data/changelog.json`: entry (tag `feature`) — "Live block-speed race: watch BNB Chain confirm in ~0.45s".-- [ ] PROGRESS: paste the live BNB average you observed + a note the page renders cleanly.diff --git a/prompts/bnb-chain/18-world-e2e-demo.md b/prompts/bnb-chain/18-world-e2e-demo.mddeleted file mode 100644index 636412cf9..000000000--- a/prompts/bnb-chain/18-world-e2e-demo.md+++ /dev/null@@ -1,32 +0,0 @@-# 18 — World E2E demo + docs--Read `prompts/bnb-chain/00-CONTEXT.md` first, then `/workspaces/three.ws/CLAUDE.md`.-**Prereqs: 16** (and transitively 14, 15). Finish them first if incomplete — this prompt-proves the track end-to-end and documents it.--## Why-Prove the real-time on-chain world works with two real participants on testnet, and write the-doc that explains the mechanism and lets anyone reproduce it.--## Do — full E2E on BSC testnet (no mocks)-1. Two wallets join the same `worldId` in on-chain presence mode (16).-2. Both walk; confirm gasless `move` txs fire (15) and each sees the other's ghost update at- sub-second latency (14's 0.45s blocks).-3. Capture: a sequence of real `move` tx hashes from both wallets with block timestamps- showing ~0.45s spacing, and the `mode` (sponsored ideally) proving gas-free movement.--## Build — `docs/bnb-world.md`-Zero-context reader: what the on-chain world is, exactly why it's only practical on BNB Chain-(0.45s blocks + gasless EOA sends, both verified in 00-CONTEXT), the architecture-(`WorldMoves.sol` events + MegaFuel sponsorship + event-subscription presence), the reproducible-walkthrough with the real deployed testnet address, and the honest caveats (MegaFuel is one-operator; sponsorship policy-gated; self-pay fallback). Link from `docs/start-here.md`.--## Definition of done-Inherit 00-CONTEXT DoD. Additionally:-- [ ] PROGRESS: the full two-wallet trail — deployed `WorldMoves` address, move tx hashes from- both wallets with block timestamps (sub-second spacing shown), `mode` per tx, and a note- that ghosts tracked live. Track-C proof-of-life.-- [ ] `docs/bnb-world.md` complete; every address/hash real and from your run.-- [ ] `data/changelog.json`: entry (tag `feature`) — "Real-time on-chain 3D world live on BNB Chain testnet".-- [ ] Any step that couldn't run on real testnet is named explicitly with the reason.diff --git a/prompts/bnb-chain/19-bnb-hub-page.md b/prompts/bnb-chain/19-bnb-hub-page.mddeleted file mode 100644index 230b08d90..000000000--- a/prompts/bnb-chain/19-bnb-hub-page.md+++ /dev/null@@ -1,40 +0,0 @@-# 19 — /bnb hub page (the campaign's front door)--Read `prompts/bnb-chain/00-CONTEXT.md` first, then `/workspaces/three.ws/CLAUDE.md`.-**Prereqs: none** to build the shell; it LINKS to the three tracks and degrades gracefully if-a track isn't live yet. Best run last, but can ship early with "coming soon" states that-auto-light-up as tracks land.--## Why-One landing page that tells the whole BNB Chain story and routes to each track. It's the-narrative wrapper: three genuinely-unique capabilities, each with a live demo. This is where a-visitor (or BNB Chain / a grant committee) lands and immediately gets why we built on BNB.--## Build — `/bnb` page-- Three feature cards, each stating the capability HONESTLY (trace every claim to 00-CONTEXT's- verified list — no 20k TPS, no 250ms):- 1. **Gasless agent onboarding** → links to gasless registration (03) + payments doc (06).- 2. **On-chain-gated 3D vault** → links to `/vault` (12).- 3. **Real-time on-chain world** → links to the on-chain mode (16) + `/bnb-latency` (17).-- Live proof widgets where cheap: embed the BNB live block-average from `probeBlockTime` (01)- so the page itself demonstrates 0.45s. Show real counts if easy (agents registered, vault- listings, moves recorded) pulled from the respective APIs — real data only, no vanity fakes.-- Each card: if its track's API/route isn't live yet, a designed "coming soon" state (not a- broken link). CLAUDE.md UI bar throughout.--## States-Track live → card shows the real demo link + a live stat. Track not yet deployed → "coming-soon" state, no dead link. A stat API down → hide that stat gracefully, keep the card.-Responsive, a11y, motion-tasteful.--## Tests-- Pure helpers (stat formatting, track-availability gating) in `tests/`.-- Manual browser exercise: `npm run dev`, open `/bnb`, confirm the live block-average renders- and links resolve (or show coming-soon). Zero console errors. Capture in PROGRESS.--## Definition of done-Inherit 00-CONTEXT DoD (UI items). Additionally:-- [ ] `data/pages.json`: register `/bnb` (this feeds sitemap/llms.txt/changelog).-- [ ] `STRUCTURE.md`: add the BNB hub row (and link the three track surfaces under it).-- [ ] `data/changelog.json`: entry (tag `feature`) — "BNB Chain hub: three uniquely-BNB demos in one place".-- [ ] Every capability claim on the page is checked against 00-CONTEXT's verified/refuted lists.diff --git a/prompts/bnb-chain/20-babt-verification-spike.md b/prompts/bnb-chain/20-babt-verification-spike.mddeleted file mode 100644index ff6ddc0a3..000000000--- a/prompts/bnb-chain/20-babt-verification-spike.md+++ /dev/null@@ -1,45 +0,0 @@-# 20 — BABT sybil-gating verification spike (settle the open question)--Read `prompts/bnb-chain/00-CONTEXT.md` first, then `/workspaces/three.ws/CLAUDE.md`.-**Prereqs: none.** Research-first spike; ships a feature ONLY if the capability verifies real.--## Why-BABT (Binance Account Bound Token) — a non-transferable on-chain token tied to a KYC'd Binance-account — was a headline "unique to BNB" candidate that our research could NOT confirm-(00-CONTEXT refuted/unverified list). Before anyone builds sybil-resistance on it, settle-whether it's real, live, and queryable by a third-party BSC contract in 2026. Truth first;-code only if warranted.--## Do — verify (this half is mandatory)-1. Find the real BABT contract on BSC mainnet (SBT-706 / "Binance Account Bound"). Confirm the- deployed address via BscScan + an `eth_getCode` check (use `chains.js`). Record the address- and the interface (is it ERC-721-ish? a `balanceOf`/`tokenIdOf` gate? non-transferable?).-2. Determine, concretely: can an arbitrary third-party BSC contract read "does address X hold a- BABT?" on-chain, cheaply, today? Is there a testnet deployment (for our normal testnet-first- flow) or is it mainnet-only? Any usage terms/restrictions from Binance?-3. Write the finding into `prompts/bnb-chain/PROGRESS.md` AND a short- `docs/bnb-babt-findings.md`: real / not-real, live address, how to gate on it, limitations,- and whether it beats Base/Ethereum/Solana sybil-resistance options (Gitcoin Passport, World- ID, etc.) — honest comparison.--## Build — ONLY if step 1–2 confirm it's real and third-party-queryable-- `api/_lib/bnb/babt.js` — `hasBabt(address)` reading the real contract via `chains.js`- (mainnet read; note if no testnet exists). Typed result `{ address, holdsBabt, tokenId?, source }`.-- `GET /api/bnb/babt-check?address=` — free endpoint exposing it, for agents/apps that want a- KYC-backed uniqueness signal. Handle unknown/invalid address, contract-unreachable, and the- "no testnet" caveat honestly in the response.-- Tests (`tests/bnb-babt.test.js`): `hasBabt` maps a mocked `balanceOf>0` → true, `=0` → false;- endpoint validates input; graceful when the contract read fails.--## If NOT real / not third-party-queryable-Do NOT build a fake. Ship only the `docs/bnb-babt-findings.md` verdict + PROGRESS note closing-the open question, and update `00-CONTEXT.md`'s refuted list with the confirmed reason. That-is a complete, valuable outcome.--## Definition of done-Inherit 00-CONTEXT DoD. Additionally:-- [ ] The open question is definitively answered with a real on-chain check (paste the address- + `eth_getCode`/`balanceOf` probe result), regardless of whether code shipped.-- [ ] If shipped: real proof of `hasBabt` against a known BABT holder address (paste it).-- [ ] If not shipped: `docs/bnb-babt-findings.md` explains exactly why, with sources.-- [ ] `data/changelog.json`: entry ONLY if a user-visible endpoint shipped (tag `feature`, `security`).diff --git a/prompts/gcp-credits/01-gcp-foundation.md b/prompts/gcp-credits/01-gcp-foundation.mddeleted file mode 100644index 9487c722b..000000000--- a/prompts/gcp-credits/01-gcp-foundation.md+++ /dev/null@@ -1,96 +0,0 @@-# 01 — GCP Foundation: project, auth, quotas, Claude Code on Vertex--## Mission--We have ~$100k of Google Cloud credits expiring in ~1 year. This prompt sets up the GCP-foundation everything else builds on: verified billing/credits, enabled APIs, service accounts,-Claude enabled in Vertex Model Garden with quota headroom, credentials wired into Vercel, and-Claude Code dev sessions routable through Vertex. Later prompts (02–08) depend on the outputs of-this one. Do the work end to end — where a step genuinely requires the human (console-only terms-acceptance), do everything around it, verify after, and list exactly what the owner must click.--## Context--- This repo (three.ws) already uses GCP in places: `api/_mcp3d/vertex-imagen.js` is a working- Vertex Imagen client with service-account JWT→OAuth exchange (env:- `GOOGLE_CLOUD_PROJECT`, `GOOGLE_CLOUD_LOCATION`, `GCP_SERVICE_ACCOUNT_JSON`), and- `workers/model-*/cloudbuild.yaml` deploy GPU workers to Cloud Run. `.gcloudignore` exists at- repo root. GCS buckets referenced: `three-ws-model-weights`, `three-ws-avatar-reconstructions`.-- Deployment platform for `api/` is Vercel (use the `vercel` CLI; `vercel env ls` to inspect).-- Claude models are served on Vertex AI as partner models under publisher `anthropic`, billed- through the GCP project. Current-generation model IDs on Vertex are the bare first-party IDs- (e.g. `claude-sonnet-4-6`, `claude-opus-4-8`); dated snapshots use `@` (e.g.- `claude-haiku-4-5@20251001` — note the repo's default model string is- `claude-haiku-4-5-20251001`, which must map to the `@` form on Vertex).--## Tasks--1. **CLI + auth.** Ensure `gcloud` is installed and authenticated (install if missing). Identify- the target project (check existing env/`vercel env ls`/`workers/deploy/*.sh` for a project ID- already in use; if ambiguous, list projects and pick the one holding the existing buckets).- Set it as default.-2. **Credits & partner-model coverage (go/no-go).** Via `gcloud billing` (and the Cloud Billing- API), confirm: the active billing account, that credits are applied, remaining balance, and- expiry date. **Critical check:** determine whether the credit grant covers Vertex AI *partner- models* (Anthropic). Google-for-Startups credits do; some grants exclude third-party models.- If this cannot be confirmed programmatically, produce a precise console path + question for- the owner and continue with the rest of the setup (the check gates prompt 02's chain- inversion, not this prompt).-3. **Enable APIs:** `aiplatform.googleapis.com`, `run.googleapis.com`,- `cloudbuild.googleapis.com`, `storage.googleapis.com`, `compute.googleapis.com`,- `bigquery.googleapis.com`, `cloudbilling.googleapis.com`, `monitoring.googleapis.com`.-4. **Service accounts** (create only if no suitable one exists — check first):- - `vercel-inference@…` with `roles/aiplatform.user` — used by Vercel functions for- Vertex Claude + Imagen.- - Confirm the existing worker deploy flow's SA still works (used by- `workers/deploy/*.sh` / cloudbuild).- Mint a JSON key for the Vercel SA and set it in Vercel as `GCP_SERVICE_ACCOUNT_JSON`- (all environments), plus `GOOGLE_CLOUD_PROJECT` and `GOOGLE_CLOUD_LOCATION` (default- `us-central1`; also set `GOOGLE_CLOUD_LOCATION_CLAUDE=global` for the Claude global- endpoint). Never write the key into the repo.-5. **Enable Claude in Model Garden.** Attempt via gcloud/API; Model Garden partner-model- enablement usually requires a one-time console acceptance — if so, give the owner the exact- console URL and model list to enable: `claude-haiku-4-5`, `claude-sonnet-4-6`,- `claude-opus-4-8`, `claude-fable-5` (if available), plus `claude-sonnet-5`.-6. **Quota.** Check current Vertex quotas for those models (QPM/TPM per region). File quota- increase requests sized for production chat traffic (start: 300 QPM / 2M TPM on Haiku and- Sonnet tiers, region `global` and `us-central1`). Document what was requested and current- values.-7. **Smoke test.** Once enablement is confirmed, verify with a raw call (no SDK needed):- `POST https://aiplatform.googleapis.com/v1/projects/{P}/locations/global/publishers/anthropic/models/claude-haiku-4-5@20251001:streamRawPredict`- with body `{"anthropic_version":"vertex-2023-10-16","max_tokens":64,"messages":[{"role":"user","content":"ping"}]}`- and an OAuth Bearer token from the Vercel SA key. A 200 with streamed content = pass. If- enablement is pending human console action, write this smoke test as- `scripts/gcp/vertex-smoke.mjs` (runnable, reading `GCP_SERVICE_ACCOUNT_JSON` from env) so it- can be run the moment enablement lands.-8. **Claude Code on Vertex (dev spend → credits).** Create `scripts/gcp/claude-code-vertex.sh`- that exports `CLAUDE_CODE_USE_VERTEX=1`, `ANTHROPIC_VERTEX_PROJECT_ID=<project>`,- `CLOUD_ML_REGION=global`, and points ADC at a dev credential (document- `gcloud auth application-default login` as the auth step). Opt-in by `source`-ing — do NOT- set these globally in the devcontainer (sessions must be able to choose billing lane).- Document usage in the runbook.-9. **Runbook.** Create `docs/gcp-credits.md`: project ID, billing account, credit balance +- expiry date, what's enabled, SA inventory, env vars set (names only, no values), quota state,- smoke-test instructions, and a "pending human actions" checklist. Later prompts append to- this file.--## Acceptance criteria--- [ ] `gcloud` authenticated against the right project; project ID recorded in the runbook.-- [ ] Credit balance + expiry confirmed and recorded; partner-model coverage confirmed or- escalated with an exact console path.-- [ ] All listed APIs enabled (verify with `gcloud services list --enabled`).-- [ ] Vercel envs set: `GCP_SERVICE_ACCOUNT_JSON`, `GOOGLE_CLOUD_PROJECT`,- `GOOGLE_CLOUD_LOCATION`, `GOOGLE_CLOUD_LOCATION_CLAUDE` (verify `vercel env ls`).-- [ ] `scripts/gcp/vertex-smoke.mjs` exists and passes (or is ready + blocked only on the- documented console enablement).-- [ ] `scripts/gcp/claude-code-vertex.sh` exists and works when sourced.-- [ ] `docs/gcp-credits.md` written.-- [ ] No secret material anywhere in the working tree (`git diff` audited before commit).--## Wrap-up--Add a `data/changelog.json` entry only if something user-visible shipped (this prompt is-infra — likely no entry). Commit with explicit paths (`scripts/gcp/`, `docs/gcp-credits.md`),-push to `threews` and attempt `threeD` (known flaky mirror — report failure, don't block).-Report: credit balance, expiry date, what's live, what's blocked on the owner.diff --git a/prompts/gcp-credits/02-vertex-claude-provider.md b/prompts/gcp-credits/02-vertex-claude-provider.mddeleted file mode 100644index 8d4c2ecb5..000000000--- a/prompts/gcp-credits/02-vertex-claude-provider.md+++ /dev/null@@ -1,137 +0,0 @@-# 02 — Vertex Claude provider: route all platform LLM traffic through GCP credits--## Mission--Add Google Vertex AI as a first-class Claude provider across every LLM path in this codebase,-behind env flags, with automatic fallthrough to the existing chain. When-`VERTEX_CLAUDE_PRIMARY=1` is set, the platform's *default* brain becomes real Claude on Vertex-(billed to our ~$100k GCP credits) instead of the current free-first Groq/OpenRouter/NIM-scavenging — a product-quality upgrade paid for by Google. When the flag is off, behavior is-byte-identical to today. No mocks, no partial wiring: streaming and non-streaming, every entry-point.--## Prerequisites (verify before starting; stop and report if missing)--- Prompt 01 ran: Vercel envs `GCP_SERVICE_ACCOUNT_JSON`, `GOOGLE_CLOUD_PROJECT`,- `GOOGLE_CLOUD_LOCATION_CLAUDE` exist (`vercel env ls`), and `scripts/gcp/vertex-smoke.mjs`- passes (Claude enabled in Model Garden).--## Context — the exact call surfaces (from prior code audit; re-verify line numbers)--All text inference is **raw `fetch`** (no Anthropic SDK in the hot path). Four surfaces:--1. **`api/_lib/llm.js`** — `llmComplete()`, the server-side one-shot completion helper used by- ~35 call sites (agent `talk`/delegation — which the MCP `agent_hire` tools bottom out in —- personas, x402 paid endpoints, crons, vision fallbacks). `anthropicProvider()` around line- 95 does a raw POST to `api.anthropic.com/v1/messages` with `x-api-key`. The chain is built- in `providerChain()` (~lines 145–207), currently free-first: NIM/BYOK/Groq/OpenRouter first,- paid Anthropic (`ANTHROPIC_MODEL = 'claude-haiku-4-5-20251001'`) and OpenAI as the tail.-2. **`api/llm/anthropic.js`** — the streaming SSE proxy behind **every embedded avatar/agent- chat widget** (`POST /api/llm/anthropic?agent=<id>`). `MODELS` table (~lines 41–90) maps- Anthropic model IDs → `envKey: 'ANTHROPIC_API_KEY'`; `UPSTREAM_URL.anthropic` ~line 93.- Browser client (`src/runtime/providers.js` `AnthropicProvider`) only talks to this proxy —- zero client changes needed.-3. **`api/chat.js`** — the main viewer/agent chat SSE endpoint with its own inline provider- ladder mirroring the above (7 providers incl. watsonx). Highest-volume endpoint.-4. **`api/brain/chat.js`** — the `/brain` comparison page, the only SDK user- (`@ai-sdk/anthropic` via Vercel AI SDK).--Reusable auth already in-repo: `api/_mcp3d/vertex-imagen.js` (~lines 55–217) implements-service-account JWT→OAuth token exchange via `crypto.subtle` with caching + metadata-server-fallback.--## Vertex wire format (differences from first-party Anthropic API)--- URL: `https://aiplatform.googleapis.com/v1/projects/{P}/locations/global/publishers/anthropic/models/{MODEL}:streamRawPredict`- (non-streaming: `:rawPredict`; regional endpoints prefix the host with `{region}-`).-- Model ID goes **in the URL, not the body**. Body gains `"anthropic_version": "vertex-2023-10-16"`- and drops `"model"`.-- Auth: `Authorization: Bearer <oauth token>` — no `x-api-key`, no `anthropic-version` header.-- Model ID mapping: bare IDs pass through (`claude-sonnet-4-6`); dated first-party IDs convert- to `@` form (`claude-haiku-4-5-20251001` → `claude-haiku-4-5@20251001`). Write one shared- mapping helper; do not scatter string surgery.-- SSE event shapes in the response are identical to first-party — existing parsers work.--## Tasks--1. **Extract shared GCP auth.** Pull the token-exchange logic out of- `api/_mcp3d/vertex-imagen.js` into `api/_lib/gcp-auth.js` (`getGcpAccessToken()` with- caching). Refactor `vertex-imagen.js` to use it. No behavior change to Imagen.-2. **`api/_lib/vertex-claude.js`** — a provider module exporting the model-ID mapper and- `vertexAnthropicMessages(body, {stream})` returning the raw Response, using `gcp-auth.js`.- Config from env: `GOOGLE_CLOUD_PROJECT`, `GOOGLE_CLOUD_LOCATION_CLAUDE` (default `global`).-3. **Flags** (document in `docs/gcp-credits.md`):- - `VERTEX_CLAUDE_ENABLED=1` — Vertex becomes an available Anthropic transport.- - `VERTEX_CLAUDE_PRIMARY=1` — chain inversion: Vertex Claude is tried **first** in- `providerChain()` (with a sensible default model, e.g. Sonnet for chat-grade calls, Haiku- for utility calls — follow each call site's existing model intent), before the free lanes.- - Both off → zero code path change (prove it: diff behavior in a local run).-4. **Wire all four surfaces:**- - `llm.js`: add `vertexAnthropicProvider()`; insert into `providerChain()` per the flags.- On Vertex 429/5xx/quota errors, fall through to the rest of the chain exactly like any- other failed provider.- - `api/llm/anthropic.js`: when `VERTEX_CLAUDE_ENABLED=1`, route `provider: anthropic`- models through Vertex streaming (`streamRawPredict`), passing SSE through unchanged;- on failure fall back to first-party Anthropic if `ANTHROPIC_API_KEY` exists.- - `api/chat.js`: add the Vertex lane to the inline ladder under the same flags, mirroring- how the Anthropic lane sits today.- - `api/brain/chat.js`: use `@ai-sdk/google-vertex`'s Anthropic support (or a custom fetch- into the same provider module) so `/brain` can compare Vertex-served Claude too. If the- AI-SDK route fights you, a thin custom provider over `vertex-claude.js` is acceptable —- but it must actually work, not be stubbed.- - `api/_lib/chat-models.js`: catalog entries so Vertex-served models are selectable and- the routing brain knows about the transport (follow existing catalog conventions).-5. **Attribution/telemetry.** Whatever per-request logging exists for provider selection must- record `vertex-anthropic` distinctly (so prompt 07's spend/usage reporting can attribute- traffic). If provider health tracking exists (`api/_lib/provider-health.js`), register the- new lane so circuit-breaking works.-6. **Tests + smoke.**- - Unit-test the model-ID mapper and chain ordering under the four flag combinations- (framework: whatever `npm test` already runs — match existing test conventions).- - `scripts/gcp/vertex-llm-smoke.mjs`: hits a local `npm run dev` server on (a) `llmComplete`- via an API route that uses it, (b) `/api/llm/anthropic` streaming, (c) `/api/chat`- streaming — with flags on, asserting the response came from Vertex (via the telemetry- marker or a debug header you add).-7. **Real-browser verification** (definition of done requires it): `npm run dev`, open an- embedded agent widget page and the main chat, send messages with `VERTEX_CLAUDE_ENABLED=1- VERTEX_CLAUDE_PRIMARY=1`, confirm streamed replies, no console errors, and Vertex attribution- in server logs. Then flip flags off and confirm today's behavior is intact.-8. **Deploy config:** set both flags in Vercel **preview** env only. Production flip is the- owner's call (it changes the billing lane) — leave production flags unset and say so in- your report.--## Guardrails--- Fail-safe is non-negotiable: any Vertex error falls through to the existing chain. A GCP- outage must never break chat.-- Don't touch the free-lane providers' logic or ordering relative to each other.-- No new npm dependency for auth (reuse `gcp-auth.js`); `@ai-sdk/google-vertex` for- `/brain` only if it earns its keep.-- Never log token contents or SA material.--## Acceptance criteria--- [ ] `api/_lib/gcp-auth.js` extracted; `vertex-imagen.js` refactored onto it with no Imagen- behavior change.-- [ ] `api/_lib/vertex-claude.js` exists: model-ID mapper + streaming/non-streaming message call.-- [ ] All four surfaces wired: `llm.js`, `api/llm/anthropic.js`, `api/chat.js`, `api/brain/chat.js`- (+ `chat-models.js` catalog entries).-- [ ] Both flags off ⇒ byte-identical current behavior (proven in a local run, not assumed).-- [ ] Any Vertex error (429/5xx/quota) falls through to the existing chain — proven by forcing a- failure locally and confirming the feature still responds.-- [ ] `vertex-anthropic` recorded distinctly in provider telemetry/health.-- [ ] Unit tests for the model-ID mapper and chain ordering under all four flag combinations.-- [ ] `scripts/gcp/vertex-llm-smoke.mjs` passes against `npm run dev` for `llmComplete`,- `/api/llm/anthropic` streaming, and `/api/chat` streaming.-- [ ] Real-browser check done: embedded agent widget + main chat stream from Vertex with flags on,- no console errors; flags off restores today's behavior.-- [ ] Flags set in Vercel **preview only**; production left unset.-- [ ] `npm test` green; `git diff` reviewed (no esbuild-mangled `api/*.js`).--## Wrap-up--Update `docs/gcp-credits.md` (flags, model mapping, rollback = unset flags). Changelog entry-per CLAUDE.md rules — the *code* is infra, but if you flip preview to Claude-primary that's-user-noticeable in previews only; use judgment. `npm test` green. Review `git diff` fully,-commit explicit paths, push `threews` (+ attempt `threeD`). Report token/latency observations-from the smoke runs and the exact env-flip needed to invert production.diff --git a/prompts/gcp-credits/03-imagen-activation.md b/prompts/gcp-credits/03-imagen-activation.mddeleted file mode 100644index 2133e54d4..000000000--- a/prompts/gcp-credits/03-imagen-activation.md+++ /dev/null@@ -1,75 +0,0 @@-# 03 — Activate the dormant Vertex Imagen lane--## Mission--The repo already contains a complete Vertex AI Imagen client that nobody turned on. Activate it-so the image-generation legs of the forge pipeline bill to our GCP credits instead of NVIDIA-NIM FLUX / Replicate, verify quality end to end, and keep automatic fallback intact. This is-the smallest prompt in the pack — its value is in *verification*, not code volume. Do not stop-at "env var set"; prove the pixels.--## Prerequisites--- Prompt 01 ran: `GCP_SERVICE_ACCOUNT_JSON`, `GOOGLE_CLOUD_PROJECT`, `GOOGLE_CLOUD_LOCATION`- set in Vercel (`vercel env ls`). If prompt 02 already ran, `api/_lib/gcp-auth.js` exists —- use it (see task 2).--## Context (from prior code audit; re-verify)--- `api/_mcp3d/vertex-imagen.js` — full Imagen client: SA JWT→OAuth exchange (~lines 55–217),- endpoint `https://{location}-aiplatform.googleapis.com/v1/projects/{P}/locations/{L}/publishers/google/models/{MODEL}:predict`,- env `VERTEX_IMAGEN_MODEL` / `VERTEX_IMAGEN_EDIT_MODEL`. Its header comment explicitly frames- it as the $100k-credit burner.-- `api/_mcp3d/text-to-image.js` — provider selector: **prefers Vertex Imagen whenever- `GOOGLE_CLOUD_PROJECT` is set**, else NVIDIA NIM FLUX, else Replicate.-- Consumers: `api/x402/forge.js` and the paid text→3D chain (Granite prompt director →- reference image → TRELLIS/Hunyuan3D reconstruction). The reference image drives 3D quality,- so image quality directly affects the paid product.--## Tasks--1. **Audit the dormant client.** Read `vertex-imagen.js` fully. Check the model IDs it defaults- to against currently-available Imagen models on Vertex (`gcloud ai models` / Model Garden —- Imagen versions rotate; older IDs 404). Update defaults if stale. Confirm the request shape- (aspect ratio, safety settings, person generation params) matches the current `:predict`- schema.-2. **Deduplicate auth** if prompt 02 landed: refactor `vertex-imagen.js` onto- `api/_lib/gcp-auth.js`. If 02 hasn't run, leave auth in place (02 will extract it) — note- which order happened in your report.-3. **Flag it like everything else in this program.** `GOOGLE_CLOUD_PROJECT` being set is too- blunt an activation switch (it's also needed for Vertex Claude and workers). Add- `VERTEX_IMAGEN_ENABLED=1` as the explicit gate in `text-to-image.js`'s selector, defaulting- to today's behavior when unset. Keep the fallback ladder (Imagen → NIM FLUX → Replicate) on- any error.-4. **Telemetry.** Ensure whichever provider actually served an image is recorded (log line or- existing provider-health mechanism) so spend attribution and debugging work.-5. **End-to-end verification (required):**- - Direct: script or curl the text-to-image path with the flag on; save an output image and- look at it (Read tool renders images) — confirm it's a real, on-prompt image.- - Pipeline: run the paid-lane forge chain locally (`npm run dev`, drive- `/api/forge` the way `mesh_forge` does per `mcp-server/src/tools/_studio-core.js`) with- Imagen active; confirm the reference image comes from Imagen (telemetry) and the resulting- GLB is sane.- - Quality gate: generate the same 3–4 prompts via Imagen and via the current FLUX lane;- compare side by side. If Imagen's output is clearly worse for this use case (stylized 3D- reference images), say so honestly in the report and recommend scope (e.g. Imagen for- seed/draft lanes only) — do not silently ship a quality regression on the paid lane.- - Fallback: break the Imagen call (bogus model ID locally), confirm clean fallthrough to- FLUX with no user-visible error.-6. **Deploy:** set `VERTEX_IMAGEN_ENABLED=1` in Vercel preview; production only if the quality- gate passed cleanly — otherwise leave to the owner with your recommendation.--## Acceptance criteria--- [ ] Imagen model IDs verified current; client request shape verified against live API.-- [ ] `VERTEX_IMAGEN_ENABLED` gate added; unset ⇒ byte-identical current behavior.-- [ ] Real generated image inspected; paid-lane E2E run served by Imagen; fallback proven.-- [ ] Quality comparison done and reported with an honest recommendation.-- [ ] Provider attribution visible in logs.-- [ ] `npm test` green; `git diff` reviewed.--## Wrap-up--Update `docs/gcp-credits.md` (flag, models, rollback). Changelog entry only if user-visible-(likely not — infra swap). Commit explicit paths, push `threews` (+ attempt `threeD`). Report-quality verdict + which env is live where.diff --git a/prompts/gcp-credits/06-vanity-inventory.md b/prompts/gcp-credits/06-vanity-inventory.mddeleted file mode 100644index f925f1f87..000000000--- a/prompts/gcp-credits/06-vanity-inventory.md+++ /dev/null@@ -1,92 +0,0 @@-# 06 — Premium vanity-address inventory on spot CPU--## Mission--The platform's `vanity_grinder` MCP tool grinds Solana vanity addresses **in-process**, capped-at 1.5M iterations, $0.05/call — so 4–5+ character prefixes are unreachable. Build a batch-grinding pipeline on cheap GCP spot CPU (credits), an encrypted inventory store, and a-"premium vanity" product tier that sells from inventory instantly. Durable, sellable asset;-near-zero credit cost. This handles **private keys** — security is the hard part of this-prompt, not the grinding.--## Prerequisites--- Prompt 01 ran (project, `gcloud`, Compute API enabled).--## Context (from prior code audit; re-verify)--- MCP tool: `mcp-server/src/tools/vanity-grinder.js`; grind routines- `mcp-server/src/lib/pump-vanity.js` (raw keypair) and `mcp-server/src/lib/mnemonic-vanity.js`- (BIP-39). `MAX_ITERATIONS_CAP` ≈ 1.5M with an up-front difficulty guard. Price env- `MCP_VANITY_PRICE_USD` ($0.05, x402 `exact` on Solana).-- **A Rust implementation exists:** `crates/vanity-grinder/` (+ WASM build under- `src/solana/vanity/`). Rust grinds orders of magnitude faster than the JS loop — use it for- the batch pipeline.-- x402 payment plumbing and USDC settlement already exist platform-wide (see other- `api/x402/*` endpoints for the pattern).-- Study how the platform handles secrets/wallet keys today (search `api/_lib/` for encryption- patterns, KMS usage, env-key encryption) and match the strongest existing pattern; if none is- strong enough for stored private keys, use GCP KMS envelope encryption and justify it.--## Tasks--1. **Batch grinder job.** Package `crates/vanity-grinder` as a container (Cloud Run **Jobs**,- CPU-only, or a GCE spot MIG — pick per cost/simplicity and justify). Input: a target list of- prefixes/suffixes (case-sensitive and insensitive variants). Output: found keypairs written- **directly in encrypted form** (never plaintext at rest, never in logs — encrypt in-process- before any write). Compute a target list worth grinding: 3–4 char brandable prefixes- (`SOL…`, `PUMP…`, `AGNT…`, `MOON…`, common names), plus `pump`-suffix addresses if the- pump.fun mint flow can consume supplied keypairs (check the existing launcher plumbing —- generic mint-at-runtime plumbing is fine; do not hardcode third-party coin references).-2. **Inventory store.** A table (follow the platform's existing DB conventions/migrations in- `api/_lib/migrations/`) holding: address (public), pattern, difficulty score, KMS-encrypted- secret payload, status (`available`/`reserved`/`sold`/`revealed`), price, timestamps,- purchaser identity. Decryption only at the moment of delivery.-3. **Product surface:**- - Extend the `vanity_grinder` MCP tool (and/or a new `api/x402/vanity-premium.js` endpoint)- with an inventory tier: list available patterns + prices, purchase via x402 (price scaled- by difficulty — derive a curve from grind cost, e.g. $1–$50), deliver the key **once**,- mark `revealed`, and never serve it again. Keep the existing $0.05 live-grind tier- untouched.- - A browsable listing page/endpoint consistent with existing marketplace patterns so the- inventory is discoverable (wire navigation — no orphan pages).-4. **Custody honesty (required product copy):** the platform generated these keys, so a buyer- must be told plainly: "this key was generated by three.ws; for high-value use, transfer- assets to a self-generated wallet or use it as a token mint address, not a treasury."- Put this in the delivery payload and the listing UI. Also implement post-delivery secret- destruction as an option (delete ciphertext after reveal + configurable retention),- defaulting to delete-after-reveal.-5. **Run a real batch.** Grind an initial inventory (e.g. 100–300 addresses across the target- list) on spot instances. Record throughput (keys/sec/vCPU), $/address at each difficulty,- and load the inventory.-6. **E2E verification:** buy one from inventory through the real x402 flow on a test wallet;- confirm single delivery, `revealed` state, ciphertext destruction, and that the address- works (sign a transaction with the delivered key on devnet or verify keypair→address- locally).-7. **Security self-review** (write it up): threat model — DB dump (keys are KMS-encrypted),- log leakage (grep the pipeline for any secret logging), replay of delivery endpoint- (single-use enforced server-side), insider access (KMS IAM restricted to the delivery- service identity). Fix anything found.--## Guardrails--- Plaintext secrets: never at rest, never in logs, never in git, never in analytics.-- The commit gate: address patterns and copy must not reference third-party crypto projects.- Brandable generic prefixes only; `$THREE`-related patterns welcome.-- Spot instances get preempted — the grinder must checkpoint its target list and be re-runnable.--## Acceptance criteria--- [ ] Batch pipeline runs on spot CPU, resumable, secrets encrypted end to end.-- [ ] Inventory table + migration; listing + purchase + one-time delivery wired via real x402.-- [ ] Real purchase E2E test passed (devnet-verified key, single reveal, destruction).-- [ ] Initial inventory loaded; throughput + $/address table in `docs/gcp-credits.md`.-- [ ] Security review written into the PR/commit description or docs; issues fixed.-- [ ] Existing $0.05 grind tier unchanged; `npm test` green; `git diff` reviewed.--## Wrap-up--Changelog entry (new premium vanity tier — user-visible feature). Doc: extend the MCP/tool docs-where `vanity_grinder` is documented (check `docs/` and the tool description) and-`docs/gcp-credits.md`. `data/pages.json` if a new public page landed. Commit explicit paths,-push `threews` (+ attempt `threeD`). Report inventory size, price curve, and revenue potential.diff --git a/prompts/gcp-credits/07-spend-observability.md b/prompts/gcp-credits/07-spend-observability.mddeleted file mode 100644index 31a24b81d..000000000--- a/prompts/gcp-credits/07-spend-observability.md+++ /dev/null@@ -1,80 +0,0 @@-# 07 — Spend observability & burn-rate control--## Mission--$100k over ~1 year is ~$275/day. We need to see the burn in real time, attribute it to each-lane (Vertex Claude, Imagen, GPU workers, spot CPU), and get alerted before any lane runs away —-especially the GPU fleet (a stuck min-instances service or a runaway batch can burn hundreds/day-silently) and Vertex Claude if production gets flipped to primary. Build the dashboard + alerts-+ a kill-switch story. Also guard against the *opposite* failure: credits sitting unused because-we're too timid.--## Prerequisites--- Prompt 01 ran (billing/monitoring APIs enabled, project set). Most useful after 02/03/04 so- there's real traffic to attribute, but the alerting scaffold can be built anytime.--## Context--- Billing export: enable BigQuery billing export (Cloud Billing → export) for line-item,- label-attributable cost data. Credit balance/expiry recorded in `docs/gcp-credits.md` (prompt 01).-- App-side attribution: prompts 02–04 add provider/lane telemetry markers- (`vertex-anthropic`, Imagen provider, self-host forge backends,- `GCP_RECONSTRUCTION_KEY`-authed worker calls). Use those.-- Existing platform surfaces for dashboards: check `api/insights/`, `api/admin/` (if present),- and how existing internal dashboards are built/authed before inventing a new pattern.--## Tasks--1. **Billing export → BigQuery.** Enable it (console step if needed — document exactly).- Write `scripts/gcp/burn-report.mjs` that queries the billing dataset for: total credit spend- to date, spend by service (Vertex AI, Cloud Run, Compute, Storage, BigQuery), spend by label- (label the resources — Cloud Run services, SA, etc. — so lanes are attributable), daily burn- rate, and **projected exhaustion date vs credit expiry date**. Human-readable output.-2. **Resource labeling.** Ensure every credit-consuming resource created in prompts 02–06- carries a consistent label (e.g. `program=gcp-credits`, `lane=vertex-claude|imagen|forge-gpu|vanity`).- Retro-label existing ones. This is what makes attribution work — don't skip it.-3. **Budgets & alerts.** Create GCP Budget alerts (Cloud Billing Budgets API): overall program- budget with alerts at 25/50/75/90%, plus per-service thresholds where possible. Route alerts- somewhere the team sees them — reuse the platform's existing notification path if there is- one (the changelog pushes to a Telegram channel via `TELEGRAM_BOT_TOKEN` /- `TELEGRAM_CHANGELOG_CHAT_ID` — consider a separate ops chat, don't spam the holder channel).- Implement the webhook/handler that turns a budget pub/sub notification into a team ping.-4. **App-side spend dashboard.** An internal (auth-gated — match existing admin auth) page/endpoint- that shows, from app telemetry: requests/tokens per lane per day, Vertex Claude token spend- estimate, forge generations per backend, and cross-references the BigQuery burn number.- Wire it into existing internal navigation — no orphan page. Design all states (loading/empty/error)- per CLAUDE.md.-5. **Runaway kill-switches (document + implement the mechanism):**- - Vertex Claude: the `VERTEX_CLAUDE_PRIMARY` flag (prompt 02) — unset to fall back to free- lanes instantly. Verify it's a true kill switch (no deploy needed — env flip + effect).- - GPU workers: `gcloud run services update … --min-instances 0` and the- `FORGE_SELFHOST_PRIMARY` flag (prompt 04). Script it: `scripts/gcp/emergency-stop.sh` that- drops all worker min-instances to 0 and prints the flags to unset.- - Spot batch jobs: documented stop command.-6. **Under-utilization guard.** The report should also flag if projected spend at current burn- will leave >30% of credits unused at expiry — with a prompt to scale up (more seed batches,- flip production to Vertex primary, bigger vanity runs). Wasting credits is a failure mode too.-7. **Cron the report.** Daily burn report to the ops channel (reuse the platform's cron pattern- in `api/cron/` or a scheduled GCP job). Include days-of-runway and unused-credit projection.--## Acceptance criteria--- [ ] BigQuery billing export live; `scripts/gcp/burn-report.mjs` produces attributed spend +- projection vs expiry.-- [ ] All program resources labeled; attribution verified in the report.-- [ ] Budget alerts at 25/50/75/90% routed to a team channel; alert handler tested (trigger a- test notification).-- [ ] Internal spend dashboard live, auth-gated, wired into nav, all states designed.-- [ ] `scripts/gcp/emergency-stop.sh` works (dry-run verified); kill-switch flags confirmed as- no-deploy env flips.-- [ ] Under-utilization guard implemented; daily report cron scheduled.-- [ ] `npm test` green; `git diff` reviewed.--## Wrap-up--Update `docs/gcp-credits.md` with the ops section (dashboards, alert thresholds, kill-switch-commands, how to read the burn report). Changelog only if the internal dashboard counts as-user-visible (it's admin — likely not). Commit explicit paths, push `threews` (+ attempt-`threeD`). Report current burn rate, projected exhaustion vs expiry, and whether we're on-track to use the credits fully.diff --git a/prompts/gcp-credits/08-expiry-revert-runbook.md b/prompts/gcp-credits/08-expiry-revert-runbook.mddeleted file mode 100644index c33049bc8..000000000--- a/prompts/gcp-credits/08-expiry-revert-runbook.md+++ /dev/null@@ -1,73 +0,0 @@-# 08 — Expiry revert & keep/kill decision runbook--## Mission--The credits expire in ~1 year. This prompt makes expiry a non-event: produce a single,-tested runbook that reverts every credit-funded reroute back to the pre-program state by-flipping env vars (never migrating code), plus a data-driven keep/kill recommendation for each-lane based on the spend/usage numbers gathered along the way. Run this near the end of the-window — but write it now so the revert path is proven, not improvised under a dead-credits-fire drill.--## Prerequisites--- Prompts 01–07 (or whichever shipped). Reads `docs/gcp-credits.md` for all flags, URLs, and- cost tables, and the burn report from prompt 07.--## Context — the flags/vars each lane reverts by (verify against what actually shipped)--- Vertex Claude: `VERTEX_CLAUDE_PRIMARY`, `VERTEX_CLAUDE_ENABLED` (prompt 02).-- Imagen: `VERTEX_IMAGEN_ENABLED` (prompt 03).-- Forge GPU: `FORGE_SELFHOST_PRIMARY` + `MODEL_TRELLIS_URL` / `GCP_HUNYUAN3D_URL` /- `GCP_TRIPOSG_URL` / `GCP_RECONSTRUCTION_URL` / `GCP_TEXT2MOTION_URL`; Cloud Run min-instances- (prompt 04).-- Vanity: batch pipeline is one-shot; inventory persists (prompt 06) — sells down naturally.-- Observability: budget alerts, dashboards (prompt 07).-- Claude Code dev: `scripts/gcp/claude-code-vertex.sh` (just stop sourcing it).--## Tasks--1. **Revert script + runbook.** `scripts/gcp/revert-to-free.sh` (idempotent, dry-run flag) that:- unsets/turns off every primary flag so all lanes fall back to their pre-program providers- (free LLM lanes, hosted NIM/Replicate forge, NIM FLUX imagen), drops all Cloud Run worker- min-instances to 0, and prints a checklist of Vercel env changes to apply (with the exact- `vercel env rm/add` commands). Document in a new `docs/gcp-credits-revert.md` (or a section- of the main doc) as a step-by-step a tired human can follow at 2am.-2. **Prove the revert.** In preview: flip everything to program-on, confirm lanes use GCP;- run the revert; confirm every feature still works on the free/original providers with no- user-visible breakage. This is the whole point — a revert that hasn't been run is not done.-3. **Data-driven keep/kill table.** For each lane, pull actual spend (prompt 07 report) and- usage, and recommend post-expiry disposition:- - **Vertex Claude:** keep on Vertex (paid, if quality/cost beat first-party Anthropic) vs- revert to free lanes vs first-party Anthropic — with the token-cost comparison.- - **Forge paid lane:** the GPU self-host made it ~100% margin on credits; post-expiry L4- Cloud Run costs real money. Compute the per-asset cost vs the $0.25/$0.45 price — is it- profitable to keep self-hosting, or revert to Replicate/hosted-NIM? Show the math.- - **Imagen / seed cron / text2motion / vanity:** keep, pause, or one-shot-done.- Each recommendation cites numbers, not vibes.-4. **Preserve the durable assets.** Confirm everything meant to outlive the credits is on R2 and- independent of GCP: the seeded avatar catalog, generated animation library, vanity inventory,- any BigQuery-derived snapshots baked to static. Nothing user-facing may depend on a- GCP resource that dies with the credits — audit and list any that do, with a fix.-5. **Weights/artifacts cleanup plan.** Document what to delete at expiry (GCS weights buckets,- Cloud Run services, spot images) to stop any post-credit billing, and what to keep. Do NOT- delete anything now — just the documented plan + a `scripts/gcp/teardown.sh` (dry-run- default) for the owner to run when they decide.-6. **Final report to owner.** A one-page summary: total credits used, per-lane spend, what- shipped that's permanent, keep/kill recommendations with the cost math, and the exact- env-flip list for the day-of revert.--## Acceptance criteria--- [ ] `scripts/gcp/revert-to-free.sh` exists, idempotent, dry-run tested.-- [ ] Full revert executed in preview and every feature verified working on original providers.-- [ ] Keep/kill table with real spend/usage numbers and cost math per lane.-- [ ] Durable-asset audit: nothing user-facing depends on a dying GCP resource (or fixes filed).-- [ ] `scripts/gcp/teardown.sh` (dry-run default) + deletion plan documented.-- [ ] Owner one-pager written into `docs/gcp-credits.md`.-- [ ] `npm test` green; `git diff` reviewed.--## Wrap-up--No changelog needed (internal). Commit explicit paths, push `threews` (+ attempt `threeD`).-Report the keep/kill recommendations and confirm the revert path is proven, not theoretical.diff --git a/prompts/okx-ai/01-protocol-research.md b/prompts/okx-ai/01-protocol-research.mddeleted file mode 100644index adca11276..000000000--- a/prompts/okx-ai/01-protocol-research.md+++ /dev/null@@ -1,106 +0,0 @@-# Work Order 01 — Pin down the OKX Agent Payments Protocol SELLER-side spec--Read `prompts/okx-ai/00-CONTEXT.md` first. Then read `/workspaces/three.ws/CLAUDE.md`. Both bind you.--## Mission--Our listing was rejected because our A2MCP endpoint doesn't speak the OKX Agent Payments-Protocol. Before we write a line of integration code, we need the **exact seller-side-contract**, from primary sources — not inference. Your deliverable is a spec document that-Work Order 02 can implement against without opening a browser.--**Do not guess. Every claim in the spec must cite where it came from** (URL, repo file, CLI-output, or a captured wire payload). If two sources disagree, capture both and flag it.--## What must be answered (the spec is incomplete until every row is filled)--| # | Question |-|---|---|-| 1 | Exact 402 challenge shape OKX's listing validator accepts from an A2MCP seller: header (`PAYMENT-REQUIRED`? `WWW-Authenticate: Payment`?), body, required fields per `accepts[]` entry. |-| 2 | Which scheme(s) a seller must offer: `exact`? `upto`? `aggr_deferred`? Is one mandatory for listing approval? |-| 3 | The fee token at `0x779ded0c9e1022225f8e0630b35a9b54be713736` on X Layer: symbol, decimals, is it EIP-3009 capable or Permit2-only? (Read the contract on the X Layer explorer — https://www.oklink.com/xlayer — and cite the contract page.) |-| 4 | OKX facilitator: verify/settle endpoint URLs, request/response shapes, auth requirements (API key? none?), and the `extra.facilitatorAddress` value for `upto` if applicable. |-| 5 | The official OKX Payment SDK the rejection email refers to: package name (npm? GitHub?), version, what it does for the seller (challenge building? verification? settlement?), license. Evaluate per CLAUDE.md "Open source first" — we prefer adopting their SDK over hand-rolling, if it's usable in Vercel functions. |-| 6 | How the payment interacts with MCP transport: does OKX expect HTTP-level 402 on the MCP endpoint URL, or MCP-level PaymentRequired structuredContent, or both? (Our endpoint currently does MCP-level via `_meta` — see api/mcp-3d.js.) |-| 7 | How listing review validates the endpoint: does the validator call the endpoint? What does it send, what must it see? Any registered-endpoint URL format constraints? |-| 8 | Settlement finality: how does the seller confirm it was actually paid before doing the work (verify response? on-chain check? `PAYMENT-RESPONSE` header contract)? |--## How to get answers (do ALL of these, in this order)--### A. Reverse-engineer a LIVE approved seller (highest-value evidence)--An approved A2MCP seller's wire behavior is, by definition, what passes review.--1. Session preflight (00-CONTEXT). Then find approved A2MCP sellers with real endpoints:- ```bash- onchainos agent search --query "health check API service data" --status active- onchainos agent service-list --agent-id 2087 # XBubbleAI — has a $0.000001 Health Check A2MCP service- onchainos agent service-list --agent-id 2023 # Onchain Data Explorer — 174 sales, 19 A2MCP services- ```-2. `curl -i` each endpoint with no payment. Capture the full 402 response — status, every- header, body. Decode `PAYMENT-REQUIRED` (base64 → JSON). Save every capture verbatim into- the spec's appendix.-3. **Pay one for real.** XBubbleAI's Health Check costs $0.000001 — effectively free evidence.- Run the buyer flow end to end: `onchainos payment pay --payload '<raw 402>'`, replay with- the returned header, capture the success response including any `PAYMENT-RESPONSE` header.- This gives us a complete, real request/response pair for both legs. If wallet lacks the- dust + gas, compute what's needed and ask the owner to fund (00-CONTEXT rule 3).-4. Diff at least TWO approved sellers' 402 challenges. Fields present in both = required.- Fields differing = optional. Record the matrix.--### B. Primary documentation--1. `gh repo view okx/onchainos-skills`; clone/read it — the seller-side docs or examples may- live next to the CLI. Also `onchainos payment --help` and every subcommand's `--help`.-2. OKX Developer Portal: https://web3.okx.com/onchain-os/dev-portal — find the Agent Payments- Protocol / Payment SDK docs. WebFetch the relevant pages; quote exact field tables.-3. Search GitHub org `okx` for payment SDK repos (`gh search repos --owner okx payment`,- also npm: `npm search okx payment`, check `@okx-dex/…`, `@okxweb3/…` scopes).-4. x402 baseline: https://x402.org — note where OKX's dialect EXTENDS or DIVERGES from- vanilla x402 v2 (that delta is exactly what our existing code doesn't emit).--### C. Interrogate our own client-side skills--`.claude/skills/okx-agent-payments-protocol/` + `references/*.md` describe what OKX buyers-can sign. Anything a buyer CAN'T sign, a seller must not require. Extract constraints-(e.g. `upto` requires `extra.facilitatorAddress`; `exact`+EIP-3009 requires `extra.name`).--## Deliverable--Write **`specs/okx-agent-payments.md`** (specs/ is our load-bearing-contract directory — match-neighboring specs' structure):--1. **Seller contract** — exact challenge our endpoint must emit (concrete JSON example with- OUR values: X Layer 196, fee token, our payTo `0x75d0…cf69`), verify/settle call contract,- paid-replay handling, `PAYMENT-RESPONSE` emission.-2. **Answer table** — all 8 questions above, each with its citation.-3. **SDK decision** — adopt OKX's SDK vs. extend our `api/_lib/x402-spec.js`, with rationale- per CLAUDE.md Open-source-first rules (weekly downloads / maintenance / license / Vercel- compatibility all checked, not assumed).-4. **Gap analysis** — field-by-field diff: what `paymentRequirements()` in- `api/_lib/x402-spec.js` emits today vs. what OKX requires. This is 02's work list.-5. **Appendix** — raw captures: every 402 challenge captured, the paid Health Check- request/response pair, CLI outputs. Verbatim, labeled, dated.--## Definition of done--- [ ] All 8 questions answered with citations; unknowns explicitly marked UNRESOLVED with- what was tried (an honest UNRESOLVED beats a confident guess — 02 will treat any- UNRESOLVED row as a blocker to raise, not a detail to improvise)-- [ ] At least one real 402 challenge from an approved seller captured verbatim-- [ ] At least one real micro-payment executed and both legs captured (or funding requested- and the exact blocker documented)-- [ ] `specs/okx-agent-payments.md` written; every code sample real, every link live-- [ ] `data/changelog.json`: no entry (internal research — per CLAUDE.md, internal work gets none)-- [ ] `prompts/okx-ai/PROGRESS.md` appended: findings summary, unresolved items, green-light- status for Work Order 02-- [ ] Committed (explicit paths: `specs/okx-agent-payments.md`, `prompts/okx-ai/PROGRESS.md`)- and pushed to both remotes (threeD failure = report, not block)--## Anti-laziness gates--- "The docs probably say X" is not a citation. Fetch it or mark UNRESOLVED.-- Do not write the spec from the client-side skill files alone — they describe the buyer.- The live-seller captures (section A) are mandatory, not optional color.-- If the dev portal requires an account/login you can't complete, say exactly what's needed- from the owner and continue with every other source in parallel.diff --git a/prompts/okx-ai/02-payments-integration.md b/prompts/okx-ai/02-payments-integration.mddeleted file mode 100644index a4c9207f3..000000000--- a/prompts/okx-ai/02-payments-integration.md+++ /dev/null@@ -1,98 +0,0 @@-# Work Order 02 — Integrate the OKX Agent Payments Protocol into our A2MCP endpoint--Read `prompts/okx-ai/00-CONTEXT.md`, then `specs/okx-agent-payments.md` (produced by Work-Order 01 — if it doesn't exist or has UNRESOLVED rows in the seller contract, STOP and tell-the owner to run/finish 01 first). Read `/workspaces/three.ws/CLAUDE.md`. All three bind you.--## Mission--Make our A2MCP endpoint a **first-class OKX Agent Payments Protocol seller**: an OKX agent-following the standard buyer flow (`onchainos payment pay`) can discover the price, pay on-X Layer in the marketplace fee token, and get the tool result — with real verification and-real settlement on our side. This unblocks the #2632 relisting.--This is an ADDITION, not a replacement: our existing rails (Solana/Base/BSC via-Coinbase/PayAI facilitators) keep working for existing customers. One challenge, multiple-`accepts` entries; the OKX/X Layer entry added per the spec.--## Scope of change (read all of these files before editing any)--- `api/_lib/x402-spec.js` — `paymentRequirements()` gains the X Layer/OKX entry (or an- OKX-specific builder if the dialect diverges too far to share one). `settlePayment` /- verify flow gains the OKX facilitator route, selected by the network of the presented payment.-- `api/_mcp/payments.js` — `send402` / challenge emission updated per spec (header vs body,- HTTP-level vs MCP-level — implement exactly what 01 determined the validator needs; if it- needs both, emit both).-- `api/mcp-3d.js` — wire through; per-tool pricing via `studioX402Amount` stays authoritative.-- If 01's SDK decision was "adopt OKX's SDK": add it (pinned `^x.y.0`), wrap it behind our- existing seams (`paymentRequirements`, `settlePayment`) so callers don't change. If "extend- our own": implement the facilitator client in `api/_lib/` following the existing- facilitator-client patterns in x402-spec.js.-- Config: new env vars (facilitator URL, X Layer payTo, token address, any API key) go- through the existing `env` pattern in `api/_lib/`. Document each in the deployment steps.- Never hardcode secrets. `payTo` on X Layer = owner wallet `0x75d0…cf69` unless the owner- says otherwise.--## Requirements (each one is checked in 04 and 07 — cutting one WILL surface)--1. **Challenge**: unpaid call to the endpoint returns the OKX-valid 402 exactly per spec —- X Layer `eip155:196`, fee token, correct decimals-scaled amounts from our real per-tool- pricing, our payTo, all required `extra` fields.-2. **Verification before work**: a presented payment is verified with the OKX facilitator- BEFORE tool execution, mirroring how `x402Ctx.verified` gates execution today. Invalid /- underpaid / expired → correct error + fresh challenge, and the tool does NOT run.-3. **Settlement after success**: settle only after the tool succeeds (same- pay-only-on-success semantics mcp-3d.js has today). Settlement failure after work- delivered → log + surface per existing `sendX402Error` pattern; emit `PAYMENT-RESPONSE`- per spec.-4. **Multi-rail coexistence**: paying via an existing rail (e.g. Base USDC through CDP) still- works — prove it with the existing tests.-5. **Free lane intact**: `getting_started`, discovery batches (initialize / tools/list /- ping) stay free, per the current allFree/discovery logic.-6. **Amounts are consistent**: advertised amount == verified amount == settled amount, all- derived from `priceBatch`. One source of truth, as today.--## Testing (real, not theatrical)--- **Unit**: challenge-shape tests asserting every spec-required field, byte-exact header- names, correct base-unit scaling for the fee token's actual decimals. Extend the existing- test suite (`tests/`) following its patterns; `npm test` green.-- **Local integration**: run the endpoint locally (`vercel dev` or the project's dev route- harness — check package.json scripts), `curl -i` it unpaid, decode the challenge, and- validate it against the spec's concrete example field-by-field. Paste the capture in your- report.-- **Buyer's-eye check**: feed the captured challenge to `onchainos payment pay --payload`- with a logged-in session. It must ACCEPT the challenge and produce an authorization header- (whether you then replay is 04's job — but the CLI rejecting our challenge = our bug; fix- it now). Requires session preflight per 00-CONTEXT.-- Deploy to preview (`npx vercel` — NOT `vercel build`; see 00-CONTEXT trap #6), re-run the- unpaid-challenge check against the deployed URL.--## Definition of done--- [ ] All 6 requirements implemented; no TODOs, no stubs, no commented-out code-- [ ] `npm test` green including new tests; test output pasted in your report-- [ ] Local + preview-deploy challenge captures pasted and field-validated against spec-- [ ] `onchainos payment pay` accepts our challenge (output pasted)-- [ ] Env vars documented; owner told exactly what to set in `vercel env` if anything new-- [ ] Docs: update `specs/okx-agent-payments.md` with an "Implementation" section mapping- spec → code (file:line); update `docs/api-reference.md` if the public endpoint- contract changed-- [ ] `data/changelog.json` entry (tags: `feature`,`infra`; holder-readable: e.g. "3D Studio- tools can now be paid on X Layer via the OKX Agent Payments Protocol")-- [ ] `prompts/okx-ai/PROGRESS.md` appended: what changed, captures, what 04 must verify-- [ ] `git diff` self-reviewed line-by-line; committed (explicit paths) + pushed to both- remotes (threeD failure = report, not block)--## Anti-laziness gates--- Getting the 402 to *look* right is half the job. Verify + settle against the real OKX- facilitator is the other half — no `if (network === XLAYER) return {verified:true}`.- If the facilitator can't be exercised without a funded buyer, implement fully, prove the- request is well-formed (capture the facilitator's actual error response to an unfunded/- unsigned attempt), and hand the funded run to 04 explicitly in PROGRESS.md.-- Don't fork a parallel payment stack. Extend the seams the codebase already has. If the- OKX dialect genuinely can't share `paymentRequirements()`, write down why in the spec's- Implementation section before diverging.-- Every constant (chainId, token address, facilitator URL) traced to the spec, which traces- to a citation. No constants from memory.diff --git a/prompts/okx-ai/03-service-decomposition.md b/prompts/okx-ai/03-service-decomposition.mddeleted file mode 100644index 19b4afd9d..000000000--- a/prompts/okx-ai/03-service-decomposition.md+++ /dev/null@@ -1,99 +0,0 @@-# Work Order 03 — Decompose the 3D Studio into micro-priced A2MCP services--Read `prompts/okx-ai/00-CONTEXT.md`, `specs/okx-agent-payments.md`, and-`prompts/okx-ai/PROGRESS.md` (02 must be done — OKX rail live on the endpoint). Read-`/workspaces/three.ws/CLAUDE.md`. All bind you.--## Mission--The marketplace evidence is unambiguous: the top seller (174 sales) wins with **many tiny,-sharply-named, individually-priced A2MCP endpoints + free discovery**; the mega-catalog-seller (100+ services, one price) has zero. Our current listing is one mega-endpoint.-Restructure our offering into discrete services — each with its own URL, price, and-one-sentence-clear purpose — while keeping ONE implementation underneath.--## Target service catalog--Each row becomes: a distinct routable endpoint URL + a service entry for the #2632 listing-(the listing update itself is Work Order 05 — you build and document; 05 lists).--| Service | Backing capability (verify each in code first) | Price target |-|---|---|---|-| 3D Health & Catalog | free discovery: live status + machine-readable service index | free |-| Text → 3D Model (GLB) | free NIM/TRELLIS lane (`forge_free` path) | $0.01 |-| Text → 3D Model (Pro) | quality-tier generation (`mesh_forge` chain) | $0.30 |-| Image → 3D Model | image lane of mesh generation | $0.30 |-| Auto-Rig a GLB | rig pipeline (`rig_mesh`: skeleton + skinning, humanoid gate) | $0.25 |-| Text → Rigged Avatar | full chain (`forge_avatar`) | $0.50 |-| Animation Retarget | clip retargeting onto arbitrary humanoid rigs | $0.10 |-| Pose Seed | `get_pose_seed` | $0.02 |-| FBX Export (rig-preserving) | export path (Unity/Unreal-ready) | $0.10 |--Before building: open the MCP server code and confirm what each service maps to. If a row-has no real backing capability, CUT THE ROW and record why in PROGRESS.md — never ship a-service whose backend doesn't exist (CLAUDE.md hard rule). If a capability exists that isn't-listed here and fits the pattern, add it. Sanity-check prices against unit cost (GPU lane-cost per call — check the worker/proxy code) so no service sells below cost; adjust and-record the math.--## Architecture requirements--1. **One implementation, many fronts.** Routes like `/api/okx/3d/<service>` (follow existing- `api/` routing conventions — read vercel.json and neighboring routes first) that map onto- the existing MCP tool implementations. No logic duplication: thin routing + per-service- pricing over the same engine mcp-3d.js uses.-2. **Per-service 402.** Each paid endpoint advertises ITS OWN price (via 02's OKX challenge- builder) — one service, one price, no batch ambiguity. The paid replay executes exactly- that service.-3. **Free lane is a real product.** Health returns live subsystem status (real checks against- the actual GPU/proxy lanes, not `{ok:true}` hardcoded); Catalog returns the full service- index — names, descriptions, prices, endpoint URLs, input schemas — generated FROM the- catalog source-of-truth, so it can never drift from the listing.-4. **Catalog as data.** One module (e.g. `api/_lib/okx-catalog.js`) defines the catalog:- name, 2-part description (① capability ② what the caller must provide — OKX's required- format, ≤200 display-width chars each part), price string, endpoint URL, input schema.- Endpoints, the free catalog service, tests, AND Work Order 05's listing update all read- from this one module.-5. **Async jobs handled honestly.** Generation can take minutes. Follow the pay→job→poll- pattern the existing forge endpoints use (status/preview polling free, per our listing- description promise: "you pay only after a job succeeds; discovery, status, preview free").- Verify how the existing pipeline sequences payment vs job completion and keep that- contract.--## Testing (every service, no sampling)--- Unit tests: catalog integrity (every entry has all fields, prices parse, descriptions- within length limits measured in East-Asian display width per the OKX rule), route→tool- mapping, per-service 402 amounts.-- Integration, per service: unpaid call → correct 402 with correct price; paid path → real- output (run the cheap/free lanes for real; for expensive GPU lanes run at least one real- generation and verify the returned GLB parses — three.js loader or existing test utils).-- Free lane: health reflects a real dependency check; catalog validates against the catalog- module 1:1.-- `npm test` green. Deploy to preview, re-verify one paid 402 + the full free lane against- the deployed URLs.--## Definition of done--- [ ] Catalog module = single source of truth; all endpoints live on preview; zero stubs-- [ ] Every service backed by a verified-real capability; cut/added rows documented-- [ ] Per-service integration test evidence pasted (curl captures) in PROGRESS.md-- [ ] `npm test` green, output pasted-- [ ] Docs: `docs/okx-marketplace.md` — what each service does, pricing, one runnable curl- example per service (real URLs); linked from `docs/start-here.md`; `STRUCTURE.md` row- added for the new surface-- [ ] `data/changelog.json` entry (tags: `feature`; e.g. "3D generation, rigging, and export- now available as individually-priced services for AI agents")-- [ ] `prompts/okx-ai/PROGRESS.md` appended incl. the FINAL catalog table (names, 2-part- descriptions, prices, URLs) that 05 will submit verbatim-- [ ] Self-reviewed diff; committed (explicit paths) + pushed to both remotes--## Anti-laziness gates--- "The route exists and returns 402" is not done — the PAID path must produce the real- artifact for every service you ship.-- Don't skip the display-width validation on descriptions (CJK=2, ASCII=1). OKX rejects- over-length listings; catching it at review costs a week — 05 depends on these strings- being submittable as-is.-- If GPU-lane funding/credits block a real generation test, run every lane that IS free,- document exactly which paid lane needs what, and ask the owner — don't mark the row done.diff --git a/prompts/roadmap/01-regression-safety-net.md b/prompts/roadmap/01-regression-safety-net.mddeleted file mode 100644index da5948fc0..000000000--- a/prompts/roadmap/01-regression-safety-net.md+++ /dev/null@@ -1,32 +0,0 @@-# Prompt 01 — Regression & architecture safety net (do this first)--> Paste into a fresh Claude Code chat in the three.ws repo. Follow CLAUDE.md and `prompts/roadmap/00-README.md`. Use TodoWrite. This prompt is **purely additive test/infrastructure** — it must not change any product behavior.--## Why-Every later roadmap prompt promises "don't break the current architecture." That promise is only real if we can *detect* breakage. This prompt hardens the regression gate so subsequent work has a trustworthy green baseline to protect.--## Objective-Extend the existing test/audit suite with **golden, fast, deterministic** checks across the highest-risk shared surfaces, and wire them into one `npm run gate` command.--## Tasks (additive only)-1. **Inventory the current gate.** Run each script in the 00-README gate; record which exist, pass, or are missing. Document in `prompts/roadmap/_generated/01/gate-inventory.md`.-2. **MCP `tools/list` golden snapshots.** For every hosted MCP endpoint (`api/_mcp/`, `api/_mcp3d/`, `api/_mcpagent/`, `api/_mcpbazaar/`, `api/_mcpibm/`) and the key `packages/*-mcp`, snapshot the `tools/list` output (names, titles, annotations, input schemas) into committed fixtures, and add a test that fails if a tool's public contract changes unexpectedly. This is the tripwire that catches accidental tool-contract breakage.-3. **Route + handler audit coverage.** Ensure `audit:routes` / `audit:handlers` / `audit:pages` actually cover all live `api/` and `pages/` entries; extend if gaps exist. A new endpoint added later with no handler/route should fail the audit.-4. **Headless viewer render smoke.** Add a deterministic headless check that loads the `@three-ws/avatar` viewer / `<agent-3d>` with a known GLB and asserts it renders without throwing (no WebGL context errors, model bounds non-empty). Use the existing test harness/runtime; keep it fast and CI-safe. If full WebGL isn't available in CI, assert the loader + scene-graph path up to the draw call.-5. **`glb-canonicalize` + `animation-retarget` contract tests.** These are universal shared cores. Add/strengthen tests asserting every supported rig convention still maps to the canonical skeleton and that the canonical-clip fallback gate behaves. (Extend `tests/glb-canonicalize.test.js`.)-6. **One command.** Add `npm run gate` to `package.json` that runs the full sequence, and document it in `prompts/roadmap/00-README.md` (replace the inline list with `npm run gate` if cleaner).--## Non-negotiables-- Zero product behavior changes. Only tests, fixtures, audit coverage, and a script alias.-- Tests must be deterministic and fast (no live-network flakiness; stub at the network boundary only, never fake product logic).--## Verification-- `npm run gate` runs green on a clean tree.-- Deliberately introduce a temporary breaking change to one tool's title, confirm the snapshot test catches it, then revert. Document that the tripwire works.--## Definition of done-- `npm run gate` exists and green; new golden snapshots + viewer smoke + canonicalize contract tests committed.-- Inventory + tripwire-proof documented in `_generated/01/`.--## Hand-off-Report what the gate now covers and any pre-existing red checks you found (do not fix product code here — just report). Every later prompt will run `npm run gate`. Commit/push only if asked.diff --git a/prompts/roadmap/02-forge-generation-quality.md b/prompts/roadmap/02-forge-generation-quality.mddeleted file mode 100644index 9a2aecabe..000000000--- a/prompts/roadmap/02-forge-generation-quality.md+++ /dev/null@@ -1,33 +0,0 @@-# Prompt 02 — Forge generation: quality, reliability, speed (additive)--> Paste into a fresh Claude Code chat. Follow CLAUDE.md + `prompts/roadmap/00-README.md`. Run `npm run gate` before and after. Prereq: 01 recommended.--## Context-The Forge pipeline (`packages/forge/`, `api/forge*.js`, `api/mcp-3d.js`) turns text/image/sketch into textured, rig-ready GLBs — free TRELLIS lane + paid tiers + auto-rig, with an IBM Granite prompt director. It's the heart of the platform. Improve it **without** changing existing tool names, default behavior, or response shapes.--## Objective-Make Forge generations **higher quality, more reliable, faster, and more useful** through additive options and internal hardening.--## Tasks (additive / back-compatible)-1. **Prompt-director upgrade.** Improve the Granite-directed prompt expansion (better geometry/material cues, negative prompts, style consistency). Keep the raw user prompt path intact; the director is an enhancement, not a replacement. Measure quality on a fixed prompt set before/after.-2. **Reliability & fallbacks.** Audit each provider call (TRELLIS/Hunyuan3D/Replicate). Add real retries with backoff, lane failover (free NIM lane cold-start handling), and a clear, actionable error at the boundary when all lanes fail. No silent failures, no fake progress. (CLAUDE.md: "No errors without solutions.")-3. **Result caching.** Add content-addressed caching keyed on (normalized prompt + params) so identical requests don't re-pay/re-compute. Cache GLB URLs with sane TTL. Opt-out param for force-regenerate. Must not serve a different user's private asset.-4. **Output options (new params, default off).** Add optional: polycount/quality tier, format (GLB default; optional Draco/meshopt-compressed variant), texture resolution, and a `seed` for reproducibility. Document them; old calls behave identically.-5. **Quality scoring.** Add an internal post-generation check (valid glTF, non-degenerate mesh, has textures, watertight-ish) that flags low-quality outputs and auto-retries once before returning. Return a quality signal in metadata.-6. **Speed.** Profile the path; parallelize independent steps (e.g. texture + rig prep), lazy-load heavy deps, stream where the provider supports it.--## Non-negotiables-- Existing Forge tool names, default params, and response shapes unchanged. New params optional, defaulting to current behavior.-- Real generation only; no canned/sample GLBs.--## Verification-- Run a fixed 10-prompt benchmark before/after; save GLB URLs + the quality signal to `prompts/roadmap/_generated/02/benchmark.md`. Demonstrate measurable improvement (quality flag rate down, success rate up, latency same-or-better).-- Force a provider failure and confirm graceful failover + actionable error.-- Cache hit path returns instantly and never crosses user boundaries.-- `npm run gate` green. Changelog entry added; `npm run build:pages` passes.--## Definition of done-- Better, more reliable, optionally-tunable Forge output with caching and real failover — fully backward compatible.--## Hand-off-Report the benchmark delta, new optional params, and cache/failover behavior. Commit/push only if asked; both remotes.diff --git a/prompts/roadmap/03-embodiment-animation-lipsync.md b/prompts/roadmap/03-embodiment-animation-lipsync.mddeleted file mode 100644index f5eebce28..000000000--- a/prompts/roadmap/03-embodiment-animation-lipsync.md+++ /dev/null@@ -1,31 +0,0 @@-# Prompt 03 — Embodiment: animation library, expressions, audio lipsync (additive)--> Paste into a fresh Claude Code chat. Follow CLAUDE.md + `prompts/roadmap/00-README.md`. Run `npm run gate` before and after.--## Context-Avatar animation is universal here (CLAUDE.md): `src/glb-canonicalize.js` maps arbitrary humanoid rigs to a canonical skeleton, `src/animation-retarget.js` retargets the baked clip library, driven by `src/animation-manager.js` / `animation-library.js` / `animation-state-machine.js`. `packages/audio-mcp/` already does TTS, STT, and audio-to-face lipsync. The animation build is `scripts/build-animations.mjs` over `public/animations/`.--## Objective-Make avatars feel **alive**: richer clip library, emotion/expression states, and audio-driven lipsync — all reusing existing pipelines, all backward compatible.--## Tasks (additive)-1. **Expand the clip library.** Add new baked clips (emotes: wave, nod, shrug, point, cheer; locomotion: turn, jog, sit; reactions: think, listen, celebrate) through the existing `build-animations.mjs` pipeline. Keep current clip names/IDs stable; new clips are additions. Cover new clips in tests.-2. **Expression / emotion layer.** Add a facial-expression system driven by blendshapes/morph targets when present (happy, sad, surprised, angry, neutral) with graceful fallback to bone-driven brows/mouth when a rig lacks visemes/morphs. Add an emotion → (expression + body gesture) mapping. Default state unchanged for existing consumers.-3. **Audio-driven lipsync.** Wire `audio-mcp` lipsync into the viewer: given TTS audio (or text), drive visemes in real time, synced to playback. Reuse `src/avatar-face-capture.js` patterns where relevant. Falls back to amplitude-driven jaw motion if no viseme rig.-4. **New rig conventions.** If you find any humanoid skeleton convention not yet mapped, add its bone-name mapping to `glb-canonicalize.js` with a covering case in `tests/glb-canonicalize.test.js` (per CLAUDE.md — never a curated allowlist).-5. **State machine polish.** Smooth cross-fades between idle/listen/think/speak/emote states; no T-pose pops; respect reduced-motion; dispose resources on unmount.--## Non-negotiables-- Existing clip IDs, `AnimationManager` API, and `glb-canonicalize` outputs stay backward compatible (golden tests from prompt 01 must stay green).-- A rig that can't be skeleton-driven still falls back to the default rig — never a bind-pose T-pose.--## Verification-- In a browser, load 3 different rigs (e.g. Mixamo, VRM, a simple `shoulderL` rig); each plays new emotes, shows distinct expressions, and lipsyncs to a spoken sentence. Screenshots/clip to `prompts/roadmap/_generated/03/`.-- A non-viseme rig lipsyncs via jaw fallback; a non-humanoid GLB falls back gracefully.-- No console errors/warnings. `npm run gate` green. Changelog + `npm run build:pages`.--## Definition of done-- Larger clip library, working expression layer, real audio lipsync across diverse rigs, with fallbacks and zero regressions.--## Hand-off-Report new clips, the emotion mapping, the lipsync wiring, and any new rig conventions added. Feeds the agent-embodiment work (prompt 10). Commit/push only if asked; both remotes.diff --git a/prompts/roadmap/04-viewer-scene-studio-perf-ar.md b/prompts/roadmap/04-viewer-scene-studio-perf-ar.mddeleted file mode 100644index 36d765e96..000000000--- a/prompts/roadmap/04-viewer-scene-studio-perf-ar.md+++ /dev/null@@ -1,32 +0,0 @@-# Prompt 04 — Viewer + Scene Studio: performance, mobile, AR (additive)--> Paste into a fresh Claude Code chat. Follow CLAUDE.md + `prompts/roadmap/00-README.md`. Run `npm run gate` before and after.--## Context-Viewer surfaces: `avatar-sdk/` → `@three-ws/avatar` (`<agent-3d>` web component), `walk-sdk/`, `page-agent-sdk/`. Scene Studio: `src/scene-studio/` → `/scene` (vendored three.js r184 editor — do NOT fork the vendor; layer on top). These are published/depended-on; **API stability is critical.**--## Objective-Make every viewer faster, smoother on mobile, accessible, and AR-capable — without changing public component APIs.--## Tasks (additive / back-compatible)-1. **Asset performance.** Add Draco/meshopt decompression support to the viewer and an optional `npm run optimize:glb`/`compress:glbs`-backed serving path so large GLBs load fast. Cap pixel ratio, frustum-cull, lazy-load heavy modules, reuse loaders. Measure load time + FPS before/after on a heavy model.-2. **Mobile + responsive.** Verify and fix touch controls, viewport sizing, and performance at 320/768/1440px. Add quality auto-degrade on low-end devices (lower DPR, simpler lighting). Default desktop behavior unchanged.-3. **Accessibility.** Semantic markup around canvases, ARIA labels on controls, keyboard orbit/zoom, focus indicators, reduced-motion support, sufficient contrast in UI chrome.-4. **AR / USDZ Quick Look (new, opt-in).** Add a "View in AR" affordance: generate/serve a USDZ alongside GLB for iOS Quick Look and use `<model-viewer>`-style or WebXR AR on Android. Reuse existing export (`src/avatar-export.js`); add USDZ conversion in the build/serve path. Opt-in attribute on the component; absent by default.-5. **Scene Studio UX (layered).** Add quality-of-life on top of the vendored editor without modifying vendor files: import-from-Forge button (pull a generated GLB straight in), one-click export presets, and a share/embed action. Keep the vendor upgrade-clean.-6. **Embeddable share.** Improve `src/avatar-embed.js` so any model/scene yields a copy-paste `<agent-3d>` embed snippet + share URL.--## Non-negotiables-- `@three-ws/avatar` and other published component APIs unchanged (golden/snapshot tests stay green). New behavior via new opt-in attributes/params only.-- Do not edit `src/scene-studio/vendor/**`; add sibling modules.--## Verification-- Heavy-model load-time + FPS before/after captured to `prompts/roadmap/_generated/04/perf.md` (show improvement).-- AR launches on a real iOS (USDZ Quick Look) and Android (WebXR) path, or document the served USDZ + the exact client trigger if no device available.-- Keyboard-only operation works; no console errors. `npm run gate` green. Changelog + `npm run build:pages`.--## Definition of done-- Faster, mobile-solid, accessible, AR-capable viewers + a friendlier Scene Studio — all backward compatible.--## Hand-off-Report perf deltas, the AR path, and new opt-in attributes. Commit/push only if asked; both remotes.diff --git a/prompts/roadmap/05-text-to-world-scenes.md b/prompts/roadmap/05-text-to-world-scenes.mddeleted file mode 100644index 76ff5e63e..000000000--- a/prompts/roadmap/05-text-to-world-scenes.md+++ /dev/null@@ -1,31 +0,0 @@-# Prompt 05 — Text → world: compositional scene & environment generation (new)--> Paste into a fresh Claude Code chat. Follow CLAUDE.md + `prompts/roadmap/00-README.md`. Run `npm run gate` before and after.--## Context-`packages/scene-mcp/` already does text→3D dioramas; `src/scene-studio/` is a full 3D scene editor; Forge generates individual GLBs. The gap: **composing multiple objects into coherent, editable scenes/worlds** from natural language, then handing off to the editor.--## Objective-A new creation capability: describe a scene ("a neon alley with a food cart and two streetlights") → get a composed, navigable 3D scene with placed objects, environment, and lighting — exportable and editable in Scene Studio.--## Tasks (new surface; reuse generation primitives)-1. **Scene-graph planner.** An AI step that decomposes a scene prompt into objects + spatial layout + environment + lighting (a structured scene graph). Reuse the Granite/brain router for planning.-2. **Object sourcing.** For each object, generate via Forge (or reuse cached/library assets) and place per the layout. Real generation; dedupe identical objects via the prompt-02 cache.-3. **Environment + lighting.** Add ground/sky/HDRI and a lighting rig matching the described mood. Reuse any existing HDRI/venue build assets (`build:club-hdri`, environment builders) where sensible.-4. **Export + editability.** Output a single GLB/scene that imports cleanly into Scene Studio (`/scene`) with objects as named, selectable nodes. Add an MCP tool (extend `scene-mcp`) and a web entry so both agents and humans can use it.-5. **Designed states.** Loading shows real progress per object; partial failures degrade gracefully (place what succeeded, report what didn't); empty/error states designed.--## Non-negotiables-- New tool/route; do not change `scene-mcp`'s existing tool contracts (snapshot tests from prompt 01 stay green).-- Real assets only — no placeholder primitives standing in for "generation."--## Verification-- Generate 3 distinct scene prompts; each yields a coherent multi-object scene that opens in Scene Studio with selectable named nodes. Screenshots + GLB URLs to `prompts/roadmap/_generated/05/`.-- A forced single-object failure still returns a usable scene with a clear report.-- `npm run gate` green. Changelog + `npm run build:pages`.--## Definition of done-- Natural-language → composed, editable, exportable 3D scenes, usable from both an MCP tool and the web, with graceful partial-failure handling.--## Hand-off-Report the scene-graph format, the new tool/route, and example outputs. Pairs well with marketplace (09) and agent-native (10). Commit/push only if asked; both remotes.diff --git a/prompts/roadmap/06-material-restyle-variants.md b/prompts/roadmap/06-material-restyle-variants.mddeleted file mode 100644index 4bc667b38..000000000--- a/prompts/roadmap/06-material-restyle-variants.md+++ /dev/null@@ -1,31 +0,0 @@-# Prompt 06 — Material, restyle & variant tools for existing 3D (new)--> Paste into a fresh Claude Code chat. Follow CLAUDE.md + `prompts/roadmap/00-README.md`. Run `npm run gate` before and after.--## Context-Forge makes models; once made, users can't easily *re-skin* or *re-style* them. Avatar Studio already has `avatar-studio-colorpicker.js`, `avatar-wardrobe.js`, `avatar-sculpt.js`, `avatar-studio-optimize.js`. Extend this idea to general GLBs: edit materials and generate stylistic variants of any model.--## Objective-New tools to transform an existing GLB without regenerating from scratch: re-texture, edit PBR materials, and produce style variants.--## Tasks (new, additive)-1. **Material editor (web + tool).** Given a GLB, expose its materials and allow editing base color, metalness, roughness, emissive, and texture swaps — live in the viewer. Reuse Avatar Studio color/optimize patterns; generalize beyond avatars. Export the edited GLB.-2. **AI re-texture / restyle.** "Make it chrome", "wooden", "cyberpunk" → generate new textures/materials for the existing geometry (preserve mesh + UVs). Use the generation stack for texture synthesis; apply to the model. Real output, real UV handling.-3. **Variant generation.** From one model, produce N controlled variants (color ways, material families, minor style shifts) for the user to pick. Seeded + reproducible (reuse prompt-02 `seed`).-4. **Material library.** A reusable PBR material/preset library users can apply with one click (extend `packages/viewer-presets/`).-5. **Non-destructive editing.** Edits produce a new asset + keep the original; track parent→child so the user can revert (this lineage also feeds prompt 09 remixing).--## Non-negotiables-- New tools/routes; do not change Avatar Studio's existing public behavior. Reuse, generalize, don't fork.-- Preserve mesh integrity and UVs through restyle — validate the output is a valid glTF.--## Verification-- Re-texture one model 3 ways and edit materials on another, live in the browser, then export valid GLBs. Screenshots + URLs to `prompts/roadmap/_generated/06/`.-- Variant generation returns N distinct, valid models from one seed set.-- Original is preserved; lineage recorded. `npm run gate` green. Changelog + `npm run build:pages`.--## Definition of done-- Working material editor + AI restyle + seeded variants + preset library, non-destructive with lineage, producing valid GLBs.--## Hand-off-Report the new tools, the lineage format (align with prompt 09), and example transforms. Commit/push only if asked; both remotes.diff --git a/prompts/roadmap/07-new-input-modalities.md b/prompts/roadmap/07-new-input-modalities.mddeleted file mode 100644index b1602f7d0..000000000--- a/prompts/roadmap/07-new-input-modalities.md+++ /dev/null@@ -1,31 +0,0 @@-# Prompt 07 — New input modalities into 3D: sketch, photo, multi-image, voice (new)--> Paste into a fresh Claude Code chat. Follow CLAUDE.md + `prompts/roadmap/00-README.md`. Run `npm run gate` before and after.--## Context-Today most creation starts from a text prompt. More on-ramps = more people creating. The platform already has `src/avatar-face-capture.js` (face capture), `packages/vision-mcp/` (image understanding), `packages/audio-mcp/` (STT), and Forge's image input lane.--## Objective-Add new ways to start a 3D creation: a sketch, a photo, several photos, or your voice.--## Tasks (new on-ramps; reuse generation + vision + audio)-1. **Sketch → 3D.** A simple in-browser drawing canvas; the sketch becomes a Forge image-conditioned generation. Designed empty/loading/error states. Reuse `forge-prompt-studio.js` / `forge-studio` patterns.-2. **Photo → avatar.** Wire `avatar-face-capture.js` + Forge so a single selfie/photo yields a rigged avatar likeness. Privacy: process transiently, don't retain the source image beyond the request unless the user opts in; document this.-3. **Multi-image → 3D.** Accept several photos of an object from different angles → a higher-fidelity reconstruction via the multi-view path. Use `vision-mcp` to validate/normalize inputs.-4. **Voice → scene/avatar.** Use `audio-mcp` STT so a spoken description drives generation (and pairs with prompt 05 scenes). Push-to-talk in the web UI.-5. **Unified entry.** A single "Create" surface that offers text / sketch / photo / multi-image / voice, all funneling into the same generation + viewer flow. Each modality is opt-in; nothing replaces the existing text path.--## Non-negotiables-- Additive UI + new endpoints; existing Forge/text flow untouched.-- Handle PII (faces, photos) carefully at the boundary — transient by default, clear disclosure, no leaking into responses or logs.--## Verification-- Each modality produces a real 3D result in the browser: sketch→model, photo→avatar, 3 photos→object, voice→scene. Evidence to `prompts/roadmap/_generated/07/`.-- Bad inputs (blank sketch, non-face photo, silent audio) hit designed error states with guidance.-- Confirm source images aren't retained beyond the request (unless opted in). `npm run gate` green. Changelog + `npm run build:pages`.--## Definition of done-- Four working new input modalities feeding the existing generation pipeline through one unified Create surface, with privacy-safe handling and designed states.--## Hand-off-Report each modality's endpoint + flow and the privacy handling. Commit/push only if asked; both remotes.diff --git a/prompts/roadmap/09-creator-marketplace-remix.md b/prompts/roadmap/09-creator-marketplace-remix.mddeleted file mode 100644index f62504dc6..000000000--- a/prompts/roadmap/09-creator-marketplace-remix.md+++ /dev/null@@ -1,30 +0,0 @@-# Prompt 09 — Creator marketplace, gallery & remix economy (new)--> Paste into a fresh Claude Code chat. Follow CLAUDE.md + `prompts/roadmap/00-README.md`. Run `npm run gate` before and after.--## Context-`packages/loom-mcp/` is a Loom 3D-creation gallery (browse/fetch/submit). The launches feed + agent profiles already render platform-created records at runtime. `marketplace/` and `packages/marketplace-mcp/` exist for the agent marketplace. The gap: a polished **creator-facing** place to publish, discover, and remix 3D creations.--## Objective-A discovery + remix surface where people browse 3D creations, view creators, and remix any published asset — closing the create → share → remix → earn loop (royalties from prompt 08).--## Tasks (new web surface; reuse Loom gallery + launches records)-1. **Gallery + discovery.** A web gallery of published 3D creations (reuse `loom-mcp` data + the launches-records pattern) with search, filters (style, type, creator), sorting (new, trending, most-remixed), and a live 3D preview per item via `<agent-3d>`. Designed empty/loading/error states; paginate.-2. **Creator profiles.** Per-creator pages: their creations, lineage/remix tree, on-chain identity (ERC-8004) and reputation, and a follow action. Link from existing agent profiles where the creator is an agent.-3. **Remix flow.** "Remix this" on any published asset opens it in the material/restyle tools (prompt 06) or refinement, records parent→child lineage, and (opt-in) routes royalties on mint (prompt 08). One-click from gallery to creating.-4. **Trending + leaderboards.** Surface most-remixed assets and top creators (reuse `activity-mcp` trending patterns). Make discovery feel alive.-5. **Submit flow.** Polished publish path from any creation (Forge result, edited model, scene) into the gallery with title, tags, license terms, and provenance attached.--## Non-negotiables-- New routes/pages; reuse `loom-mcp`, launches records, marketplace data — don't fork them. Existing tool contracts unchanged.-- Only $THREE referenced for any value/coin display; USDC settlement only. Render only platform-created records (allowed product feature), never hardcode external mints.--## Verification-- Browse, filter, sort, and live-preview a populated gallery; open a creator profile with a real remix tree; remix an asset end-to-end and see lineage recorded. Screenshots to `prompts/roadmap/_generated/09/`.-- 0-item, 1-item, and large-list states all designed. `npm run gate` green. Changelog + `npm run build:pages`.--## Definition of done-- A live creator gallery + profiles + remix flow + trending, wired to existing data and the royalty/provenance system, with every state designed.--## Hand-off-Report the new routes, how lineage/remix and royalties connect (prompts 06/08), and discovery surfaces. Commit/push only if asked; both remotes.diff --git a/prompts/roadmap/10-agent-native-3d-and-embed.md b/prompts/roadmap/10-agent-native-3d-and-embed.mddeleted file mode 100644index 087fc425f..000000000--- a/prompts/roadmap/10-agent-native-3d-and-embed.md+++ /dev/null@@ -1,35 +0,0 @@-# Prompt 10 — Agent-native 3D + embeddable distribution (new)--> Paste into a fresh Claude Code chat. Follow CLAUDE.md + `prompts/roadmap/00-README.md`. Run `npm run gate` before and after.--## Context-three.ws's edge is generation + agent rails + embodiment in one place. Agents should be able to **create and use 3D autonomously**, and any creation should be trivially **embeddable** anywhere — so the platform spreads. Surfaces: the MCP servers, `src/agent-avatar.js` / `attach-avatar-to-agent.js`, `page-agent-sdk/`, `walk-sdk/`, `src/avatar-embed.js`, `examples/`.--## Objective-Two linked capabilities: (A) agents that autonomously create + use 3D via MCP, and (B) one-line embeds that put any creation on any site/app/agent.--## Tasks (additive)-### A. Agent-native 3D-1. **Composable MCP tools.** Ensure the generation/scene/restyle/embodiment capabilities (prompts 02/05/06/03) are exposed as clean MCP tools an agent can chain: "design a character → rig it → give it an idle → place it in a scene." Verify the chain works tool-to-tool with correct titles/annotations (golden tests from prompt 01).-2. **Give an agent a body.** A one-call flow that attaches a generated, rigged, animated avatar to a registered agent (`attach-avatar-to-agent.js`), so the agent has a persistent visual identity tied to its on-chain identity (ERC-8004) and provenance (prompt 08).-3. **Autonomous create-and-use demo.** A real example (in `examples/`) where an agent, given a goal, generates the 3D assets it needs and uses them (e.g. builds a scene, embodies itself). No mocks — real tool calls end to end.--### B. Embeddable distribution-4. **One-line embed.** Extend `src/avatar-embed.js` so any creation yields a copy-paste `<agent-3d>` snippet + hosted share URL + oEmbed support, working on any site. Lazy-loads, sandbox-safe.-5. **Social + AR share.** Share cards (OG image of the 3D model) and "View in AR" (reuse prompt 04 USDZ/WebXR) from any share URL.-6. **"Add to your agent/site."** A small flow that takes a creation and produces drop-in snippets for the web component, the page-agent, and the walk companion — turning a creation into distribution.--## Non-negotiables-- Reuse existing SDKs/components; keep their public APIs stable (snapshot tests green). New behavior is additive/opt-in.-- Embeds must be sandbox-safe and performant (lazy-load, dispose, capped DPR). $THREE-only for any coin reference.--## Verification-- Run the autonomous agent example end-to-end; it generates and uses real 3D. Transcript + assets to `prompts/roadmap/_generated/10/`.-- Paste an embed snippet into a blank HTML page (`examples/`) and confirm it renders + AR-launches. Screenshot.-- An agent gets a persistent body tied to its identity; reload shows the same body. `npm run gate` green. Changelog + `npm run build:pages`.--## Definition of done-- Agents autonomously create + use 3D via chained MCP tools and can wear a persistent embodied identity; any creation embeds anywhere in one line with social/AR share.--## Hand-off-Report the composable tool chain, the agent-body flow, and the embed/share surfaces. This closes the loop: create (02/05/06/07) → own (08) → discover/remix (09) → use everywhere (10). Commit/push only if asked; both remotes.diff --git a/prompts/store-submissions/04-openai-free-3d-endpoint.md b/prompts/store-submissions/04-openai-free-3d-endpoint.mddeleted file mode 100644index d0d27607d..000000000--- a/prompts/store-submissions/04-openai-free-3d-endpoint.md+++ /dev/null@@ -1,45 +0,0 @@-# Prompt 04 — OpenAI free, non-crypto 3D-generation MCP endpoint--> Paste into a fresh Claude Code chat in the three.ws repo. Follow CLAUDE.md. Use TodoWrite. Prereq: prompt 01 (tool inventory) helpful.--## Context-OpenAI's ChatGPT App Directory will **reject** our current MCP servers: their policy prohibits "tokens or credits," "embedded third-party payment solutions," and "crypto speculation schemes." So x402-per-call and every token/pump.fun tool are disqualifying.--The way in is a **separate, free, non-crypto app**: a clean MCP endpoint exposing only 3D-generation tools, with **zero** payment surface and **zero** token/crypto surface. This is a genuinely strong ChatGPT app — "turn a text prompt into a rigged 3D avatar" is real utility ChatGPT can't do natively.--Re-read the guidelines first: https://developers.openai.com/apps-sdk/app-submission-guidelines--## Scope — tools to expose (and ONLY these)-- `forge_free` — text → textured 3D GLB (free NVIDIA NIM / TRELLIS lane).-- `text_to_avatar` — text/image → 3D avatar GLB.-- `mesh_forge` — text/image → 3D mesh GLB.-- `rig_mesh` — static GLB → animation-ready rigged GLB.-- `forge_avatar` — one-call text → rigged avatar.--**Explicitly excluded:** every token/market/wallet/agent tool (`pump_snapshot`, `sentiment_pulse`, `vanity_grinder`, `aixbt_*`, `agenc_*`, `agent_*`, `ens_sns_resolve`, `get_pose_seed` is borderline—include only if it has no crypto framing). No `$THREE` or any coin mention anywhere in this endpoint, its descriptions, or its responses.--## Objective-Ship a new remote MCP endpoint `api/mcp-studio.js` (route `/api/mcp-studio`, e.g. branded "three.ws 3D Studio") that serves the five tools above **for free** — no x402, no `PaymentRequired`, no wallet — reusing the existing generation handlers.--## Tasks-1. **Create the endpoint** mirroring the structure of `api/_mcp3d/` but with the payment middleware removed. Reuse the real generation handlers — do not fork or mock them. The free NVIDIA NIM lane backs `forge_free`; for `text_to_avatar`/`mesh_forge`/`forge_avatar`/`rig_mesh`, the underlying providers (Replicate/TRELLIS/UniRig) currently sit behind x402. Decide the funding model and implement it for real:- - Server-side API keys cover the provider cost (the app is free to the ChatGPT user). Add sane **rate limiting / abuse protection** (per-session or per-IP quota) since it's unauthenticated and costs us money. Implement real limits, not a comment.-2. **Tool definitions:** copy/trim from the inventory, ensure each has `title` + correct annotations. These are generation tools → `readOnlyHint: false`, `destructiveHint: false`, `openWorldHint: true` (external model APIs), `idempotentHint: false`. Inputs minimal and task-specific (a prompt, optional image, optional style) — no "just in case" fields, no chat-history requests (OpenAI checks this).-3. **Responses return only what's needed:** the GLB URL, a viewer link, and minimal metadata. **Strip** internal identifiers (session IDs, trace IDs, wallet addresses, x402 fields, pricing) — OpenAI rejects responses leaking internal/PII/auth data. Add structured content the Apps SDK component (prompt 05) can render: the GLB URL under a documented key.-4. **Register the route** in `vercel.json` with an appropriate `maxDuration` (generation is slow). Add `/.well-known` OAuth only if you choose authenticated mode — for a free app, no-auth is acceptable and simpler; confirm the Apps SDK supports the chosen auth mode.-5. **Manifest:** add `server-studio.json` describing this endpoint (no coin references, free, the five tools). Keep schema URL current.-6. **Docs + changelog:** add `docs/mcp-studio.md` (how to connect the free 3D Studio MCP) and a `data/changelog.json` entry; run `npm run build:pages`.--## Verification (must actually run)-- `npm run dev`, then `tools/list` on `/api/mcp-studio` returns exactly the five tools with titles + annotations and **no** payment/token fields anywhere.-- Call `forge_free` and `text_to_avatar` through the new endpoint with **no auth and no payment** — both return a real GLB URL you can open. Paste the URLs.-- Rate limiting demonstrably triggers after the configured quota.-- `grep` the new endpoint + manifest + docs for any coin/token/x402/wallet string — must be clean.-- `npm test` green (add a test asserting the studio endpoint exposes only the allowed tools and no payment surface).--## Definition of done-- `/api/mcp-studio` serves five generation tools, free, no crypto/payment surface, with real abuse protection and clean responses.-- Manifest + docs + changelog done. Tests green. Zero coin references.--## Hand-off-Report the endpoint URL, the funding/rate-limit approach, sample GLB URLs, and the structured-content key the component should read. Feeds prompt 05 (UI) and 06 (submission). Commit/push only if asked; stage touched paths; both remotes.diff --git a/prompts/store-submissions/06-openai-submission-package.md b/prompts/store-submissions/06-openai-submission-package.mddeleted file mode 100644index 953adedf5..000000000--- a/prompts/store-submissions/06-openai-submission-package.md+++ /dev/null@@ -1,43 +0,0 @@-# Prompt 06 — OpenAI ChatGPT App Directory submission package--> Paste into a fresh Claude Code chat in the three.ws repo. Follow CLAUDE.md. Use TodoWrite. Prereqs: prompts 04 + 05 done (`/api/mcp-studio` live, component renders real GLBs).--## Context-The free, non-crypto 3D Studio app exists and works. This chat does the **policy-compliance audit** and assembles the **submission answer sheet**. OpenAI's review is strict; re-fetch the live rules first:-- https://developers.openai.com/apps-sdk/app-submission-guidelines-- https://developers.openai.com/apps-sdk/deploy/submission--Reject triggers we must clear: incomplete/demo status, missing/incorrect tool annotations, crypto-speculation or token/credit surface, embedded third-party payments, responses leaking PII/internal IDs, unclear tool behavior, missing test credentials, content unsuitable for ages 13–17.--## Objective-Produce `prompts/store-submissions/_generated/openai-submission.md` — a copy-paste-ready submission sheet — and a documented **compliance audit** proving the app passes each policy.--## Tasks-1. **Compliance audit (write it down, item by item with a pass verdict + evidence):**- - **No crypto/token surface.** `grep -ri` the studio endpoint, component, manifest, and listing copy for any coin/token/wallet/x402/pump/aixbt/$THREE string → must be zero. Document the clean result.- - **No payments.** Confirm the app charges nothing and embeds no checkout. (Monetization is out of scope; if ever added, only physical goods via external checkout are allowed.)- - **Tool annotations** correct on all five tools (`openWorldHint: true`, generation = non-destructive). Pull from prompt 01/04.- - **Data minimization.** Re-audit each tool response: only GLB URL + minimal metadata; no session/trace IDs, no PII, no auth secrets. Run realistic requests and paste the actual responses as evidence.- - **Inputs minimal** — no chat-history or "just in case" fields.- - **Age-appropriate.** Generation prompts can produce arbitrary content; document any safety filter on the generation lane (NSFW/abuse) and add one if absent — the app must be suitable for ages 13–17.- - **Clear utility not native to ChatGPT.** State the value prop crisply.-2. **Listing metadata:** app name (descriptive, not a generic dictionary word, IP we own), tagline, description, category, country availability, 3–5 example prompts, and the tool list with titles.-3. **Screenshots:** required dimensions, showing the component rendering a real generated 3D model (reuse prompt 05's screenshot; capture more at the required sizes). Save under `_generated/openai-screenshots/`.-4. **MCP connectivity details:** the production `/api/mcp-studio` URL, transport, auth mode (likely none/optional), and reviewer testing guidelines (example prompts that reliably produce a model; expected render behavior).-5. **Developer verification + support:** note that the human must complete identity verification on platform.openai.com and provide a current support contact; list what they need to do as `[HUMAN: ...]` items.-6. **Changelog:** add a `data/changelog.json` entry for the 3D Studio ChatGPT app submission; `npm run build:pages`.--## Verification-- The `grep` compliance sweep returns zero crypto/token hits — paste the command + empty output.-- Real tool-call responses captured show no internal IDs/PII.-- Production `/api/mcp-studio` URL resolves and `tools/list` works.-- Screenshots exist at required dimensions.-- `npm run build:pages` passes.--## Definition of done-- `openai-submission.md` is complete with no blank required field except `[HUMAN: ...]` items (identity verification, support contact, final submit).-- A written, evidence-backed compliance audit shows the app clears every known reject trigger.-- Screenshots ready. Changelog validated.--## Hand-off-Report the compliance verdict (pass/fail per item), the submission doc path, the screenshots path, and the exact `[HUMAN: ...]` actions left. Commit/push only if asked; stage touched paths; both remotes.diff --git a/prompts/store-submissions/07-embodied-agent-live-avatar.md b/prompts/store-submissions/07-embodied-agent-live-avatar.mddeleted file mode 100644index f1c3a693d..000000000--- a/prompts/store-submissions/07-embodied-agent-live-avatar.md+++ /dev/null@@ -1,35 +0,0 @@-# Prompt 07 — Embodiment: a live agent body in the conversation (10x differentiator)--> Paste into a fresh Claude Code chat in the three.ws repo. Follow CLAUDE.md. Use TodoWrite. Prereqs: prompts 04 (free studio endpoint) + 05 (GLB viewer component) done. This LAYERS on top of the baseline app — it's the thing that makes people screenshot it.--## The thesis-Every assistant in every store is faceless text. three.ws uniquely owns text→3D→rig→animate, so we can give an agent a **persistent, living 3D body that renders inline in ChatGPT/Claude, lip-syncs to its replies, emotes, idles, and remembers its identity across sessions.** No competitor in either directory can do this. This is the consumer hook.--## Objective-Extend the 3D Studio app so a generated avatar becomes a **live conversational presence**: it speaks (lip-sync/visemes), expresses (emotion blendshapes/animation), idles between turns, and persists as a named identity the user can return to.--## What to build (all real — no fake loops, no canned animation stand-ins)-1. **Persistent agent identity.** A tool `create_agent_persona` (or extend `forge_avatar`) that mints a named, persistent avatar tied to the session/account, returns a stable persona id, and stores the rigged GLB + identity so later turns reuse the same body. Reuse existing avatar storage; do not mock persistence.-2. **Speech-driven animation in the component.** In the Apps SDK component (from prompt 05):- - Drive **visemes/lip-sync** from the assistant's reply. Use the existing blendshape/morph-target path if the rig has visemes; otherwise drive jaw/mouth bones from an amplitude/phoneme envelope. If TTS audio is available, sync to it; otherwise animate from the text timing. Real implementation.- - Map **emotion → expression**: detect sentiment/intent of the reply and blend the matching facial expression + body gesture (reuse `src/animation-retarget.js` clip library + `src/glb-canonicalize.js` canonical bones).- - **Idle loop** between turns (breathing/weight-shift), and a "listening"/"thinking" state while a tool runs.-3. **Turn wiring.** When the host model produces a reply that should be "spoken" by the persona, the tool result references the component with the persona id + the text/emotion payload so the body animates that turn. Designed loading/error states (per CLAUDE.md) — never a frozen T-pose; fall back to default rig per `AnimationManager.supportsCanonicalClips()`.-4. **Continuity.** Returning to the same persona id reloads the same body + accumulated identity (name, look). One persona, many sessions.--## Why only three.ws-The universal rig retarget + canonicalization pipeline already maps arbitrary humanoid rigs to a canonical skeleton and drives the baked clip library (see CLAUDE.md "Avatar animation is universal"). Embodiment is the payoff of infrastructure you already built — competitors would have to build that pipeline first.--## Verification (must actually run)-- Generate a persona, send 3 replies of different sentiment — the body lip-syncs and shows 3 distinct, correct expressions. Record a short screen capture / sequence of screenshots to `prompts/store-submissions/_generated/embodiment/`.-- Reload the persona id in a new session — same body returns. Demonstrate it.-- A rig with no visemes still animates mouth from bones (no frozen face). A non-humanoid GLB falls back gracefully.-- No console errors/warnings. No crypto/token surface anywhere in this feature.-- `npm test` green; add a test for persona persistence + the canonical-clip fallback gate.--## Definition of done-- A named avatar persists across sessions, renders inline, lip-syncs, emotes per reply, and idles between turns — all from real pipelines, with designed states and graceful fallbacks.-- Capture evidence saved. Zero coin references.--## Hand-off-Report the persona tool name, how speech/emotion are driven, the persistence path, and the evidence path. This becomes the headline screenshot for BOTH store listings (prompts 03 + 06). Commit/push only if asked; stage touched paths; both remotes.diff --git a/prompts/store-submissions/08-live-agent-commerce.md b/prompts/store-submissions/08-live-agent-commerce.mddeleted file mode 100644index 69f923f82..000000000--- a/prompts/store-submissions/08-live-agent-commerce.md+++ /dev/null@@ -1,32 +0,0 @@-# Prompt 08 — Live agent-to-agent commerce as a first-class experience (10x differentiator)--> Paste into a fresh Claude Code chat in the three.ws repo. Follow CLAUDE.md. Use TodoWrite. Builds on existing x402 + `agent_delegate_action` + AgenC tooling. NOTE: this is for the **Claude / paid MCP server** track, NOT the OpenAI free app (OpenAI prohibits crypto/payment surface — keep this out of `/api/mcp-studio`).--## The thesis-The agentic-commerce narrative is the story of 2026: agents that discover, hire, and pay other agents autonomously with real money. three.ws already has the rails — x402 USDC settlement, an agent registry, ERC-8004 reputation, and `agent_delegate_action`. Nobody in the directory has packaged this as a **visible, trustable, screenshot-worthy experience** instead of buried plumbing. Make agents transacting *legible*.--## Objective-A flagship capability where the host model can **autonomously discover a specialized agent, check its reputation, pay it via x402, delegate a task, and return the result — with the full transaction + provenance surfaced** so the user sees exactly what happened and what it cost.--## What to build (all real settlements — no simulated payments)-1. **Discovery + reputation gate.** A tool that, given a task description, finds candidate agents (AgenC registry / three.ws agent registry) ranked by ERC-8004 reputation and capability bitmask. Reuse `agent_reputation`, `agenc_list_tasks`, `agenc_get_agent`. Return a ranked shortlist with reputation evidence.-2. **Delegate-with-payment, transparently.** Extend/wrap `agent_delegate_action` so a delegation: (a) quotes the price up front, (b) settles real USDC via the existing x402 facilitator, (c) runs the remote agent, (d) returns the result **plus a provenance block**: which agent, its reputation, amount paid, settlement reference, latency. No mock settlement — use the live Solana x402 path already in `api/_mcp/`.-3. **Make it legible (the innovation).** Return structured content the component can render as a **transaction receipt / provenance card**: "Hired `agent X` (rep 0.94) · paid $0.15 USDC · settled `<tx>` · 3.2s." Build a small Apps-SDK/MCP-Apps component card for this (reuse patterns from prompt 05). The point is *trust through visibility*.-4. **Guardrails.** Hard spend cap per call + per session, confirmation semantics for anything above a threshold, and a clean `PaymentRequired`/insufficient-funds path. Errors handled at the boundary; never a crash-shaped failure.--## Why only three.ws-The registry + reputation + x402 facilitator + delegation primitives already exist and interoperate. The moat isn't any one piece — it's that you have the **whole loop** wired end to end. This demo *is* the agent economy, running live, with real money.--## Verification (must actually run)-- Drive a real end-to-end delegation: discover → reputation-rank → pay (real USDC on the existing facilitator) → get result → render the provenance card. Capture the transcript + settlement reference to `prompts/store-submissions/_generated/commerce/`.-- Spend caps demonstrably block an over-threshold call.-- Insufficient funds / no-payment returns the clean `PaymentRequired`, not an error.-- `$THREE` remains the only coin referenced; USDC is settlement only. No other token anywhere.-- `npm test` green; add tests for the spend-cap and provenance-shape invariants.--## Definition of done-- The host model can autonomously and *visibly* hire + pay + delegate to a reputation-ranked agent, with real settlement and a provenance receipt, plus spend guardrails.-- Evidence (with a real settlement reference) saved. Coin policy clean.--## Hand-off-Report the tool name(s), the provenance-card component, the guardrail config, and the evidence path. This is a flagship use case for the Claude submission (prompt 03) and a category-defining demo. Commit/push only if asked; stage touched paths; both remotes.diff --git a/prompts/store-submissions/09-conversational-remixable-3d.md b/prompts/store-submissions/09-conversational-remixable-3d.mddeleted file mode 100644index c9b7f93a1..000000000--- a/prompts/store-submissions/09-conversational-remixable-3d.md+++ /dev/null@@ -1,39 +0,0 @@-# Prompt 09 — Conversational, remixable 3D with provenance + royalties (10x differentiator)--> Paste into a fresh Claude Code chat in the three.ws repo. Follow CLAUDE.md. Use TodoWrite. Prereqs: 04 + 05 (and 07 if personas are in play).--## The thesis-Today's in-chat generators are one-shot: prompt in, asset out, dead end. The frontier nobody has nailed is **conversational, iterative 3D** ("make the helmet bigger" → regenerate the diff, live) plus **composability**: every asset has provenance and a remixable license, and when someone builds on yours, value routes back to you. This turns three.ws from a generator into a *creative economy* — Sketchfab/Figma for the agent era.--## Objective-Two linked capabilities:-- **(A) Conversational iteration** on a generated model within the conversation.-- **(B) Remixable assets** with provenance and automatic creator royalties (Claude/paid track only — keep royalty/payment surface OUT of the OpenAI free app).--## What to build-### A. Conversational iteration (works in BOTH free + paid tracks; no payment surface needed)-1. A tool `refine_model(persona_or_asset_id, instruction)` that takes a prior asset + a natural-language change ("bigger helmet", "make it metallic", "add wings") and produces a new version, **anchored to the previous result** (re-use seed/reference image / mesh where the provider supports it; otherwise a guided re-generation that carries forward the prior prompt + adjustments). Real generation — no faked diffing.-2. **Version lineage:** each refinement records parent → child so the user can branch/revert. Return the lineage so the component can show a version strip.-3. **Live/progressive render** in the component if the provider exposes intermediates (TRELLIS/diffusion staged output); otherwise a designed "regenerating" state that swaps in the new GLB smoothly (cross-fade, not a pop). No fake progress bars — real async only.--### B. Remixable assets + provenance + royalties (PAID/Claude track only)-4. **Provenance record** per asset: creator (account/wallet), parent lineage, prompt, license terms. Store it with the existing asset/launch records — reuse, don't invent a parallel store.-5. **Remix economics:** when an asset is generated *from* another creator's published asset, x402 routes a royalty split to the original creator via the existing facilitator. Real settlement, real split logic, hard caps. Keep $THREE the only coin referenced; USDC for settlement only.-6. **A composable feed/tool:** browse published, remixable assets (reuse the `/launches`-style platform-records pattern) and remix one. Provenance and royalty terms visible before remixing.--## Why only three.ws-Generation + asset storage + Solana x402 rails already coexist here. Conversational iteration leverages the generation pipeline; royalties leverage the payment rails; provenance leverages the existing platform launch-records pattern. The composition is the moat.--## Verification (must actually run)-- Generate a model, issue 2 refinements; each is a real, visibly-different model anchored to the prior; version lineage is correct and revertable. Evidence to `prompts/store-submissions/_generated/iteration/`.-- Remix a published asset from a *different* test creator; confirm a real royalty settlement to the original creator (paste the settlement reference) and that the split math + caps are correct.-- The free-app path (`/api/mcp-studio`) exposes refinement but **zero** payment/royalty/token surface — grep to prove it.-- No console errors. `npm test` green; add tests for lineage integrity and royalty-split math.--## Definition of done-- Conversational refinement with correct version lineage and smooth re-render, available in the free app (no payment surface) and the paid server.-- Provenance + automatic creator royalties working with real settlement on the paid track, with caps. Coin policy clean.-- Evidence saved.--## Hand-off-Report the refine tool, lineage model, the royalty-split logic + caps, and evidence paths. Conversational iteration is a strong OpenAI listing differentiator; royalties are a Claude/agent-economy differentiator. Commit/push only if asked; stage touched paths; both remotes.diff --git a/prompts/store-submissions/11-claude-agent-skills-pack.md b/prompts/store-submissions/11-claude-agent-skills-pack.mddeleted file mode 100644index 3f846cf22..000000000--- a/prompts/store-submissions/11-claude-agent-skills-pack.md+++ /dev/null@@ -1,39 +0,0 @@-# Prompt 11 — Anthropic Agent Skills pack (distributable & registry-ready)--> Paste into a fresh Claude Code chat in the three.ws repo. Follow CLAUDE.md. Use TodoWrite. Pairs with 10 (the plugin marketplace bundles these skills).--## Context-Agent Skills are portable folders (`SKILL.md` + optional scripts/assets) that any Claude surface — Claude Code, the Claude apps, the Agent SDK — can load. They are the most reusable unit we publish: the same skill works in a plugin, in a `.claude/skills` dir, and uploaded to a Claude project. We already have real skills under `.agents/skills/` (authenticate-wallet, fund, send-usdc, trade, search-for-service, pay-for-service, monetize-service, query-onchain-data, x402, metamask-agent-*). This chat **hardens them into a distributable pack** and adds the 3D-creation skills that don't exist yet.--Re-fetch the live skill authoring spec first — frontmatter fields and limits change:-- Agent Skills: https://docs.claude.com/en/docs/claude-code/skills-- Skill authoring best practices: https://docs.claude.com/en/docs/agents-and-tools/agent-skills--## Objective-A clean, versioned **three.ws Skills pack**: every skill has a precise trigger description, real runnable content (no stubs), progressive-disclosure structure, and a manifest so the pack is installable as a unit and listable wherever skills are indexed.--## Tasks-1. **Inventory + audit existing skills.** List every skill under `.agents/skills/`. For each, open `SKILL.md` and verify:- - Frontmatter `name` + `description` per spec. The `description` is the *only* thing the model sees when deciding to load the skill — make it a crisp trigger ("Use when the user wants to …"), not a summary.- - Body uses progressive disclosure: short overview, then steps; heavy reference/scripts split into linked files loaded on demand, not inlined.- - Any referenced script actually exists and runs. No `not implemented`, no fake output.-2. **Add the 3D-creation skills** (the platform's signature, currently absent from the skill set): `generate-3d-model` (text→GLB via the free `forge_free` lane), `create-3d-avatar` (text→rigged avatar), `rig-a-model` (auto-rig a GLB). Each `SKILL.md` documents the real endpoint/MCP tool, the free vs paid lane, inputs, and the GLB URL + viewer-link output. Use real API shapes from `api/forge*.js` / `mcp-server/src/tools/`. No mock responses.-3. **Normalize structure.** Ensure every skill folder is self-contained and portable (no import from app internals it can't reach when copied out). Shared helper text → a linked reference file, not duplicated.-4. **Pack manifest + versioning.** Create a pack-level index (`.agents/skills/SKILLS.md` or `skills-pack.json`) listing every skill with its trigger and a pack `version`. This is what a registry or a teammate reads to understand the set.-5. **Categorize for two audiences.** Tag each skill: `wallet/payments` (the x402 economy set) vs `3d/creative` (generation set) vs `intel/trading`. The OpenAI track must never bundle the crypto set; the 3d/creative set is the cross-platform-safe subset — mark it explicitly so prompt 12/04 can reuse it.-6. **Install paths documented.** Document the three ways to use the pack: (a) via the Claude Code plugin (prompt 10), (b) dropped into a project `.claude/skills/`, (c) uploaded to a Claude project/app. One short section each in a `docs/skills.md` (create it).-7. **Changelog.** Add a `data/changelog.json` entry ("three.ws Agent Skills pack — wallet, x402, and 3D-creation skills for any Claude surface", tag `sdk`/`feature`) and run `npm run build:pages`.--## Verification (must actually run)-- Every `SKILL.md` parses (valid frontmatter) and has a trigger-style `description`.-- Each referenced script runs without error; no stub/placeholder strings anywhere in the pack.-- The 3d/creative subset contains **zero** coin/token/wallet/x402 strings (so it's reusable on the OpenAI track) — paste the grep.-- Loading a skill in a fresh Claude Code session triggers on its description and produces real output (test `generate-3d-model` end to end against the free lane).-- `npm run build:pages` passes.--## Definition of done-- All existing skills hardened; three real 3D-creation skills added; pack manifest + `docs/skills.md` written.-- Crypto vs creative subsets clearly tagged. Changelog validated.--## Hand-off-Report the full skill list with triggers and category tags, the pack manifest path, and the `generate-3d-model` end-to-end test result. Name the exact creative-subset skills the OpenAI track can reuse. Commit/push only if asked; stage touched paths; both remotes.diff --git a/prompts/store-submissions/12-openai-gpt-store-actions.md b/prompts/store-submissions/12-openai-gpt-store-actions.mddeleted file mode 100644index 33c2b067b..000000000--- a/prompts/store-submissions/12-openai-gpt-store-actions.md+++ /dev/null@@ -1,52 +0,0 @@-# Prompt 12 — OpenAI GPT Store (Custom GPT + Actions over the free 3D endpoints)--> Paste into a fresh Claude Code chat in the three.ws repo. Follow CLAUDE.md. Use TodoWrite. Reuses the free, non-crypto generation lane from prompt 04 and the creative skill subset from prompt 11.--## Context-The GPT Store is a **separate, lower-effort** OpenAI marketplace from the Apps SDK directory (04–06). A Custom GPT calls external **Actions** defined by an OpenAPI 3.1 schema — no embedded component, no SDK build. This is the fastest way to a live OpenAI listing, and it shares the same policy constraints as the Apps directory: **no crypto, no tokens/credits, no embedded third-party payments, age-appropriate, no PII leakage.** So Actions must hit only the **free, non-crypto 3D-generation REST endpoints**.--Re-fetch the live rules first (they move):-- Custom GPTs + Actions: https://platform.openai.com/docs/actions-- GPT Store policies: https://openai.com/policies/usage-policies + the GPT Store content policy-- Action auth + OpenAPI: https://platform.openai.com/docs/actions/authentication--## Objective-A submittable Custom GPT ("three.ws 3D Studio" or similar) backed by a clean OpenAPI 3.1 Actions schema over free REST endpoints that generate real GLB models, plus the GPT instructions, conversation starters, and a policy-compliance audit.--## Tasks-1. **Confirm a free REST surface exists.** Actions need plain HTTPS REST (not MCP/JSON-RPC). Identify or add thin REST endpoints that wrap the free generation lane: text→3D (`forge_free` → `/api/forge` nvidia backend), and optionally text→avatar / rig. They must:- - Require **no** API key for the free lane (or a simple optional key documented for the human), return a public GLB URL + a `https://three.ws/viewer?...` link.- - Return **only** GLB URL + minimal metadata — no internal IDs, no PII, no wallet/x402/token fields.- - Have a real async/poll or sync contract that completes to a usable GLB. No fake progress.- If a suitable REST endpoint already exists, reuse it; do not duplicate. If only MCP exists, add the minimal REST wrapper.-2. **Write the OpenAPI 3.1 schema.** Create `prompts/store-submissions/_generated/openai-actions.yaml`:- - `servers` = production `https://three.ws`.- - One operation per generation action, with `operationId`, summary/description tuned for the model, typed request/response, and examples.- - Privacy/data note in the schema description. No crypto fields anywhere.- - Validate it (swagger/redocly or `npx @redocly/cli lint`). Paste the clean output.-3. **GPT configuration (write it as a doc the human pastes into the GPT builder):** `prompts/store-submissions/_generated/openai-gpt-config.md` with:- - Name, description, profile-picture spec (reuse the asset kit, prompt 14).- - **Instructions**: how the GPT should call each action, how to show the viewer link, how to handle generation failures gracefully, and a safety clause refusing disallowed/NSFW generation prompts (must suit ages 13–17).- - 4 conversation starters that reliably produce a model ("Make me a low-poly fox", etc.).- - The Actions schema reference + auth setting (None for free lane, or API key as `[HUMAN: ...]`).-4. **Compliance audit (item-by-item, written down with evidence):**- - grep the REST endpoints, schema, and all GPT copy for any coin/token/wallet/x402/pump/aixbt/$THREE string → must be zero. Paste the command + empty output.- - Confirm no payment/checkout surface.- - Run a real generation through the action and paste the actual JSON response showing no internal IDs/PII.- - Document the NSFW/abuse safety handling on the generation lane (add a filter if absent — same requirement as prompt 06).-5. **Privacy policy URL.** GPT Actions require a privacy policy link. Confirm `public/legal/privacy.html` covers the free 3D action's data handling; add a short section if needed. Provide the stable HTTPS URL.-6. **Changelog.** Add a `data/changelog.json` entry ("three.ws 3D Studio for the GPT Store — generate 3D models in ChatGPT, free", tag `feature`) and run `npm run build:pages`.--## Verification (must actually run)-- The OpenAPI schema lints clean (paste output) and every operation maps to a live endpoint that returns a real GLB.-- A real Action call returns a working GLB URL + viewer link with no crypto/PII/internal-ID fields.-- The compliance grep returns zero crypto hits (paste it).-- Privacy URL loads over HTTPS.-- `npm run build:pages` passes.--## Definition of done-- `openai-actions.yaml` (validated) + `openai-gpt-config.md` are complete; the human can build and submit the GPT from them.-- Free REST generation lane confirmed working with zero crypto surface. Compliance audit written with evidence. Changelog validated.--## Hand-off-Report the REST endpoint(s) used, the schema path + lint result, the GPT-config path, and the real Action response sample. List any `[HUMAN: ...]` steps (profile pic, identity verification, final submit). Commit/push only if asked; stage touched paths; both remotes.diff --git a/prompts/store-submissions/13-mcp-registry-directories.md b/prompts/store-submissions/13-mcp-registry-directories.mddeleted file mode 100644index 06653f3f1..000000000--- a/prompts/store-submissions/13-mcp-registry-directories.md+++ /dev/null@@ -1,46 +0,0 @@-# Prompt 13 — MCP registries & third-party directories (get listed everywhere)--> Paste into a fresh Claude Code chat in the three.ws repo. Follow CLAUDE.md. Use TodoWrite. Builds on 01 (annotations) and the existing `server*.json` manifests.--## Context-Beyond the first-party Claude/OpenAI stores, MCP discovery happens through registries and aggregators that index `server.json` manifests and READMEs. We already publish **38 servers** (6 hosted remote + 32 npm) to the official MCP registry (`registry.modelcontextprotocol.io/?q=io.github.nirholas`) and have a `public/lobehub/plugin.json`. This chat makes the listings **complete, consistent, and present across every major directory** so any MCP-compatible client can find three.ws by name.--Re-fetch each directory's current submission flow first:-- Official MCP registry: https://registry.modelcontextprotocol.io + the `mcp-publisher` CLI / `server.json` schema-- Smithery: https://smithery.ai (deploy/list)-- Glama: https://glama.ai/mcp/servers-- mcp.so: https://mcp.so-- PulseMCP: https://www.pulsemcp.com-- LobeHub plugins/MCP: https://lobehub.com--## Objective-Every three.ws MCP server is listed, consistent, and verified across the official registry + the major third-party directories, with one canonical metadata source of truth so listings don't drift.--## Tasks-1. **Manifest consistency pass.** Enumerate every `server*.json` (root: `server.json`, `server-3d.json`, `server-agent.json`, `server-bazaar.json`, `server-ibm.json`, `server-pumpfun.json`, and `mcp-server/server.json`) plus each npm package's manifest. Verify for all:- - Current `$schema` URL, accurate `name` (`io.github.nirholas/...` namespace), `description`, `version`, `repository`, `websiteUrl`.- - Remote servers list correct `remotes` (transport + URL); npm servers list correct `packages` (registry + identifier + runtime args).- - Every tool the manifest implies actually exists and lists over the live transport.- - `$THREE` is the only coin referenced anywhere.-2. **Official registry hygiene.** Confirm all 38 are present and current in the official registry. For any stale/missing one, prepare the `mcp-publisher` republish command (don't publish without the human, but stage the exact commands). Note any that fail validation and fix the manifest.-3. **Third-party directory submissions.** For each of Smithery, Glama, mcp.so, PulseMCP, LobeHub, produce a ready-to-submit listing in `prompts/store-submissions/_generated/mcp-directories/<directory>.md`:- - The server(s) to list (lead with the hosted remote `/api/mcp` and `/api/mcp-3d` + the headline npm servers).- - Name, one-line tagline, description, category/tags, install/connect snippet (URL for remote, `npx -y @three-ws/...` for stdio), example prompts, and the directory-specific fields each site asks for.- - For LobeHub, reconcile/refresh the existing `public/lobehub/plugin.json`.-4. **Canonical metadata source.** Create `prompts/store-submissions/_generated/mcp-listing-source.json` — one object per server with the shared fields (name, tagline, description, category, tags, connect snippet, example prompts). Every directory listing derives from this so copy never drifts. Note which fields each directory consumes.-5. **README registry section.** Ensure `docs/mcp.md` / `README.md` link to the official registry search and at least the Smithery/Glama listings once live.-6. **Changelog.** Add a `data/changelog.json` entry ("three.ws MCP servers listed across Smithery, Glama, mcp.so, PulseMCP & LobeHub", tag `infra`/`sdk`) and run `npm run build:pages`.--## Verification (must actually run)-- Every `server*.json` validates against the current schema and its declared tools list over the live transport.-- Each hosted remote URL resolves and answers `tools/list`; each npm `npx -y @three-ws/...` server starts and lists tools.-- The compliance grep over manifests + listing copy returns zero non-$THREE coin references.-- `npm run build:pages` passes.--## Definition of done-- All manifests consistent and validated; canonical metadata source written.-- A ready-to-submit listing doc per third-party directory derived from the canonical source.-- Republish commands staged for any stale official-registry entry. Changelog validated.--## Hand-off-Report the manifest-validation results, the canonical source path, the per-directory listing docs, and any `[HUMAN: ...]` account/auth steps each directory needs. Commit/push only if asked; stage touched paths; both remotes.diff --git a/prompts/store-submissions/16-tokenized-3d-nft.md b/prompts/store-submissions/16-tokenized-3d-nft.mddeleted file mode 100644index ea2d5e885..000000000--- a/prompts/store-submissions/16-tokenized-3d-nft.md+++ /dev/null@@ -1,33 +0,0 @@-# Prompt 16 — Tokenized 3D: mint a generated avatar as an on-chain Solana 3D NFT--> Paste into a fresh Claude Code chat in the three.ws repo. Follow CLAUDE.md. Use TodoWrite. Prereqs: 04/05 (studio + viewer), ideally 07 (personas) and 09 (provenance). **Claude / paid track only** — keep this entirely out of the OpenAI free app.--## The thesis-three.ws is the only platform in either directory that does text→3D→rig AND owns Solana rails. Today a generated avatar is just a file on a CDN. The web3-native move that nobody else can ship: let the user (or an agent acting for them) **own that avatar on-chain** — mint the rigged GLB as a Metaplex NFT whose media is a live, interactive 3D viewer, with verifiable provenance and enforced creator royalties. Generated assets become ownable, transferable, composable property.--## Objective-A tool `mint_3d_asset` that mints a generated/owned GLB as a Metaplex NFT on Solana, and a read-back tool `get_3d_asset_onchain` that resolves a mint to its live 3D asset + holder + provenance.--## What to build (all real — real storage, real on-chain mint, no simulated tx)-1. **Durable media + metadata.** Promote the GLB to durable storage (reuse `api/_lib/r2.js` `publicUrl`; add Arweave/permanent pinning if available). Render a thumbnail via the existing `render_avatar_image` path. Build **Metaplex-compliant** metadata JSON: the GLB under `animation_url` + `properties.files` (mimeType `model/gltf-binary`), `image` = thumbnail, `external_url` = the three.ws viewer link. No placeholder fields.-2. **Mint.** Use the existing Solana signing rails (`api/_lib/avatar-wallet.js`, `vault-transfer.js`, `explorerTxUrl`). Mint a programmable NFT with enforced royalties to the connected user's wallet (OAuth) or a supplied address. **Devnet default, explicit `network` flag for mainnet** — document which. Return mint address + `explorerTxUrl` + viewer link. Real on-chain mint.-3. **Provenance baked in.** Embed creator, prompt, parent lineage (from prompt 09 if present), generation model/provider, and timestamp into the metadata `properties` and the platform launch records (reuse the existing launch-records pattern — do not invent a parallel store).-4. **Royalties.** `seller_fee_basis_points` configurable with a hard cap; creator share routed via the standard royalty enforcement. `$THREE` is the only coin referenced anywhere in copy/UI; SOL/USDC are mint/settlement mechanics only; never hardcode or recommend any other mint.-5. **Read-back.** `get_3d_asset_onchain(mint)` reads the on-chain metadata, confirms it resolves to a live viewer, and returns holder, provenance, and royalty terms. `readOnlyHint: true`, `openWorldHint: true`.-6. **States + guardrails.** Designed loading/minting/success/error states; idempotency guard so a double-call doesn't double-mint; clean failure at the boundary (RPC down, insufficient SOL for rent).--## Why only three.ws-Generation + rig + avatar storage + Solana signing already coexist in this repo. Minting is the payoff of infrastructure competitors would have to assemble from scratch — and tying the NFT media to a *live rigged viewer* (not a static PNG) is unique.--## Verification (must actually run)-- Real **devnet** mint end-to-end: generate → mint → paste mint address + explorer link. Metadata resolves and the viewer renders the owned, animated GLB.-- `get_3d_asset_onchain(mint)` returns the correct holder + provenance + royalty terms.-- Royalty basis points respect the hard cap; a double-call does not double-mint.-- `grep` the feature for any non-`$THREE` token reference — must be clean. No private key ever appears in a response.-- `npm test` green; add tests for the metadata shape (model under `animation_url`), royalty cap, and mint idempotency. Evidence to `prompts/store-submissions/_generated/tokenized/`.--## Definition of done-- A generated avatar mints to a real on-chain Solana NFT with live-viewer media, baked provenance, capped enforced royalties, and a working read-back — all real settlement, designed states, coin policy clean.--## Hand-off-Report the mint/read tool names, the storage + metadata shape, the network used, the royalty cap, and the evidence path. Strong flagship use case for the Claude submission (prompt 03). Commit/push only if asked; stage touched paths; both remotes.diff --git a/prompts/store-submissions/17-embodied-onchain-identity.md b/prompts/store-submissions/17-embodied-onchain-identity.mddeleted file mode 100644index 2d8ac304b..000000000--- a/prompts/store-submissions/17-embodied-onchain-identity.md+++ /dev/null@@ -1,31 +0,0 @@-# Prompt 17 — Embodied on-chain identity: the avatar *is* the wallet--> Paste into a fresh Claude Code chat in the three.ws repo. Follow CLAUDE.md. Use TodoWrite. Prereqs: 07 (personas) + the agent-wallet rails. **Claude / paid track only.**--## The thesis-Prompt 07 gives a persona a living body. three.ws already has agent wallets (`api/_lib/avatar-wallet.js`, `vault-transfer.js`, the agent MCP's `provision_wallet`) and ERC-8004 reputation reads. Merge them into a primitive no other directory app has: **every persona carries a real Solana wallet and an on-chain identity, and its 3D body visually reflects its chain state** — balance tier, reputation, holdings, name. An agent you can see, that holds and moves real value, whose appearance *is* a function of its on-chain standing.--## Objective-Bind a persona to a deterministic agent wallet + on-chain identity; expose fund/balance/tip/send with guardrails; and drive the avatar's visuals from live chain state.--## What to build (all real — real wallets, real balances, real transfers)-1. **Persona↔wallet binding.** Provision or derive a stable, recoverable Solana wallet per persona id (reuse `provision_wallet` / `avatar-wallet.js`). Deterministic from the persona so the same persona always maps to the same wallet. **Private keys never appear in any tool response or log.**-2. **Identity read.** `persona_identity(persona_id)` → wallet address, USDC/SOL balance, ERC-8004 reputation + attestations (reuse `solana_agent_reputation` / `_attestations` / `_passport`), token holdings, and resolved ENS/SNS name (reuse `ens_sns_resolve`). `readOnlyHint: true`, `openWorldHint: true`.-3. **Value ops.** `persona_tip` / `persona_send` (USDC) with a hard per-call + per-session spend cap and a confirmation threshold above which the host model must confirm. Real settlement via the existing x402/transfer rails. `$THREE` is the only promoted coin; USDC is settlement; any other mint is accepted only as a runtime parameter, never hardcoded or recommended.-4. **Visual binding (the innovation).** In the viewer component (prompts 05/07), map live chain state onto the body: reputation → an aura/badge, holdings tier → a cosmetic, low/zero balance → a muted state, verified ENS/SNS → a nameplate. Real data → deterministic visual mapping, with designed states and graceful fallback when reads fail.-5. **Identity card.** Structured content rendering wallet + reputation + name + balance as a verifiable identity card (reuse the provenance-card patterns from prompt 08).--## Why only three.ws-Embodiment (07) + agent wallets + reputation reads + transfer rails already interoperate here. The novel composition — a *visible* agent whose look encodes its on-chain trust and treasury — is the moat.--## Verification (must actually run)-- Provision a persona wallet, fund it on devnet, read identity, perform a capped `persona_tip` with real settlement (paste the reference), and watch the body change as reputation/holdings change.-- A private key never appears in any response or log — prove it with a grep over captured transcripts.-- Spend caps demonstrably block an over-threshold transfer; failed reads degrade gracefully (no frozen/crash state).-- `$THREE` remains the only coin referenced; grep clean. `npm test` green; add tests for binding determinism, spend-cap enforcement, and key-never-leaked. Evidence to `prompts/store-submissions/_generated/identity/`.--## Definition of done-- A persona binds to a real, recoverable Solana wallet + on-chain identity, can tip/send within caps with real settlement, and its body reflects live chain state — designed states, keys never leaked, coin policy clean.--## Hand-off-Report the binding scheme, the identity/value tool names, the guardrail config, and the visual-mapping rules. Deepens the embodiment headline (prompt 07) for the Claude listing. Commit/push only if asked; stage touched paths; both remotes.diff --git a/prompts/store-submissions/18-token-gated-3d-embeds.md b/prompts/store-submissions/18-token-gated-3d-embeds.mddeleted file mode 100644index a3dc7a1b5..000000000--- a/prompts/store-submissions/18-token-gated-3d-embeds.md+++ /dev/null@@ -1,32 +0,0 @@-# Prompt 18 — Token-gated 3D: holder-only interactive scenes--> Paste into a fresh Claude Code chat in the three.ws repo. Follow CLAUDE.md. Use TodoWrite. Prereqs: the embed stack (`src/avatar-embed.js`, `api/embed`, `specs/EMBED_SPEC.md`, `specs/EMBED_HOST_PROTOCOL.md`) + SIWS auth (`api/_lib/siwx-*`). **Claude / paid track for creation;** the embed runtime does a public on-chain check.--## The thesis-Communities want exclusivity, and three.ws is the only platform that pairs generation with first-class embeddable 3D. Merge that with web3 access control: generate a 3D scene or avatar that **only renders for a wallet holding ≥ N of a given SPL token** — gating the live *experience*, not just a download, with the balance verified on-chain at view time. The canonical use is $THREE-holder-only avatars and rooms; the gate primitive also accepts a runtime mint (the coin-agnostic plumbing exception in CLAUDE.md) so any community can gate with their own token. three.ws never hardcodes, markets, or recommends a non-`$THREE` mint.--## Objective-`create_gated_embed(asset_id, gate)` where `gate = { mint, min_amount, chain }` → a shareable embed URL whose viewer verifies the visitor's holdings before rendering premium content, with a designed locked state otherwise.--## What to build (all real — server-verified on-chain balances, no client trust)-1. **Gate config + record.** Persist the gate terms alongside the embed (reuse the existing embed/launch records). The `mint` defaults to the `$THREE` CA but is a runtime parameter; never hardcode any mint beyond that default.-2. **Runtime verification.** The embed host (`EMBED_HOST_PROTOCOL`) connects the visitor's wallet and signs a lightweight ownership proof (reuse the SIWS path in `api/_lib/siwx-*`). The **server** verifies the live SPL balance via Solana RPC and decides access — never trust a client-reported balance. Real RPC read.-3. **Locked / unlocked states.** Designed: locked shows a teaser + "Hold {min_amount} {symbol} to unlock" + a connect-wallet CTA; unlocked renders the full interactive 3D scene. Smooth transition, keyboard-accessible, no console errors.-4. **Anti-abuse.** Issue a short-lived signed access token after a successful check; re-verify on expiry; rate-limit verification attempts per wallet/IP.-5. **Coin policy.** `$THREE` is the only promoted coin and the example default; the gate's arbitrary-mint support is runtime plumbing only. `grep` the feature to prove no other mint is hardcoded, marketed, or recommended.-6. **Changelog** entry + `npm run build:pages`.--## Why only three.ws-Generation + embeds + SIWS + Solana RPC already coexist here. Token-gating an *interactive 3D experience* (vs. a static link) is a community primitive no directory competitor can offer.--## Verification (must actually run)-- Create a gated embed (e.g. `min_amount: 1`, `mint: $THREE`). Visit with a wallet **below** threshold → locked state. Visit with a wallet **at/above** threshold → full scene renders.-- Demonstrate the balance check is **server-verified** and cannot be spoofed by a client-edited balance.-- Access token expires and re-verifies; rate limiting triggers on abuse.-- Coin policy grep clean. `npm test` green; add tests for gate pass/fail by balance and access-token expiry. Evidence to `prompts/store-submissions/_generated/gated/`.--## Definition of done-- A creator can mint a holder-only 3D embed; visitors are gated by a real, server-verified on-chain balance; locked/unlocked states are designed; abuse is bounded; coin policy clean.--## Hand-off-Report the gate tool, the verification flow, the anti-abuse config, and the evidence path. A community/web3 differentiator for the Claude listing and a driver of $THREE utility. Commit/push only if asked; stage touched paths; both remotes.diff --git a/prompts/store-submissions/19-verifiable-ai3d-provenance.md b/prompts/store-submissions/19-verifiable-ai3d-provenance.mddeleted file mode 100644index 0cfa258b2..000000000--- a/prompts/store-submissions/19-verifiable-ai3d-provenance.md+++ /dev/null@@ -1,32 +0,0 @@-# Prompt 19 — Verifiable AI-3D provenance: on-chain content credentials--> Paste into a fresh Claude Code chat in the three.ws repo. Follow CLAUDE.md. Use TodoWrite. Prereqs: 09 (lineage) helpful. **Anchoring is paid/Claude; the verify path is free and ships in BOTH tracks** (zero payment/coin surface).--## The thesis-As AI-generated 3D floods the web, authenticity becomes the scarce thing. three.ws can be the source of truth: every asset it generates gets a signed, verifiable **content credential** — who created it, from what prompt, by which model, when, and its full lineage — with the credential hash **anchored on Solana** so anyone can confirm the asset wasn't tampered with and genuinely originated here. C2PA-style provenance for 3D, anti-deepfake by construction. Verification is public and free; anchoring is the paid write.--## Objective-`anchor_provenance(asset_id)` writes a signed credential and anchors its hash on Solana; `verify_provenance(glb_url | hash)` returns the credential, the anchor transaction, and a tamper verdict. The verify path is callable by anyone, no auth, no payment.--## What to build (all real — real hashing, real on-chain anchor)-1. **Credential schema.** Versioned spec at `specs/PROVENANCE_3D.md`: creator (account/wallet), prompt, parent lineage (ties to prompt 09), generation model/provider, timestamp, the GLB content hash (sha256 over bytes), and a signature from a three.ws issuer key. Documented and open-licensed.-2. **Anchor.** Write the credential hash on Solana (memo/PDA) via the existing signing rails; store the full credential off-chain (`r2.js`) addressed by its hash; return the anchor tx + `explorerTxUrl`. Real on-chain write. Paid tool, `destructiveHint: false`.-3. **Verify.** Recompute the GLB content hash, match it against the stored credential, confirm the anchor tx exists on-chain, and return `verified | tampered | unknown` plus the chain of custody. `readOnlyHint: true`, free, public — **safe for the OpenAI free track because it has no payment or coin surface.**-4. **Verify badge.** The viewer component (05) shows a "Verified · three.ws" badge linking to the proof, with designed verified/unverified/tampered states.-5. **Coin policy.** `$THREE` only; the verify path contains **zero** token/payment fields. `grep` to prove it.-6. **Changelog** + `npm run build:pages`.--## Why only three.ws-Generation, asset storage, and Solana writes already coexist here, so three.ws can credential at the moment of creation — something a downstream verifier can never reconstruct. Owning the issuance point is the moat.--## Verification (must actually run)-- Anchor a real asset on **devnet**; `verify_provenance` returns `verified` + the anchor tx.-- Mutate the GLB by a single byte → `verify_provenance` returns `tampered`.-- The verify path exposes no payment/coin/internal fields — grep clean (it must be droppable into the OpenAI free app).-- `npm test` green; add tests for hash determinism, tamper detection, and anchor read-back. Evidence to `prompts/store-submissions/_generated/provenance/`.--## Definition of done-- Generated assets carry a signed, on-chain-anchored content credential; anyone can verify authenticity and tampering for free; the verify path is coin/payment-clean and reusable across both stores.--## Hand-off-Report the credential schema path, the anchor/verify tool names, the network, and the evidence path. Anchoring is a Claude/web3 differentiator; the free verify path is an authenticity feature for the OpenAI listing. Commit/push only if asked; stage touched paths; both remotes.diff --git a/prompts/store-submissions/20-spatial-mcp-standard.md b/prompts/store-submissions/20-spatial-mcp-standard.mddeleted file mode 100644index b3f38d598..000000000--- a/prompts/store-submissions/20-spatial-mcp-standard.md+++ /dev/null@@ -1,32 +0,0 @@-# Prompt 20 — Spatial MCP: make 3D a native conversational response type (own the category)--> Paste into a fresh Claude Code chat in the three.ws repo. Follow CLAUDE.md. Use TodoWrite. Prereqs: 05 (viewer component). **Infrastructure — benefits both store listings. No crypto in the spec or renderer.**--## The thesis-This is the README's 100x meta-move made concrete. MCP tool results are text/JSON today. three.ws can define and own the standard for **spatial MCP responses**: tool results that carry a live, interactive 3D scene as a first-class artifact, with a reference renderer other apps adopt. Be the infrastructure the ecosystem builds on, not just another listing.--## Objective-Publish an open spec + a reference renderer + a conformance validator, and make every three.ws 3D tool emit conformant artifacts — so three.ws is the reference implementation of 3D-native MCP.--## What to build (all real — a working spec, renderer, and validator)-1. **Spec.** `specs/SPATIAL_MCP.md`: a documented structured-content shape for a 3D artifact — scene/GLB URL, camera, environment/lighting, animation + persona hooks, AR handoff (ties to prompt 21), and interaction affordances. Aligned with the MCP-Apps / Apps SDK component-embedding model so a host can render it. Versioned and open-licensed.-2. **Reference renderer.** A small, standalone-embeddable component (extend the prompt 05 viewer) that renders any spec-conformant artifact: orbit/zoom, animation playback, AR button, and graceful fallback for missing fields. Publishable independent of three.ws's product UI.-3. **Validator tool.** `validate_spatial_response(payload)` that checks conformance and returns actionable errors (not just a boolean). Use it as the gate that all three.ws 3D tools pass their artifacts through.-4. **Adoption.** Emit the spec artifact from the existing 3D tools (`render_avatar`, `preview_3d`, `text_to_3d`, etc.). Write `docs/spatial-mcp.md` showing how a *third-party* MCP server adopts the shape, with a worked example transforming a foreign tool result into a conformant artifact.-5. **Changelog** + `npm run build:pages`.--## Why only three.ws-You already have the renderer, the universal rig pipeline, and a fleet of 3D tools to make the spec real on day one. A standard with a live reference implementation and real adopters beats a paper spec — and three.ws is the only one positioned to ship all three at once.--## Verification (must actually run)-- Every three.ws 3D tool result validates against the spec (run the validator over real outputs).-- The reference renderer renders a conformant payload derived from a *different* (mock foreign) tool shape transformed through the spec — proving portability.-- The validator rejects malformed payloads with actionable messages.-- The spec and renderer contain **no** crypto/coin surface — grep clean (so the renderer is reusable in the OpenAI free app).-- `npm test` green; add validator accept/reject cases and an "all 3D tools emit conformant artifacts" invariant. Evidence to `prompts/store-submissions/_generated/spatial-mcp/`.--## Definition of done-- An open spatial-MCP spec, a reusable reference renderer, a conformance validator, and three.ws tools emitting conformant artifacts — the category's reference implementation, crypto-clean and reusable across both stores.--## Hand-off-Report the spec path, the renderer/validator names, the list of tools now emitting conformant artifacts, and the adoption-doc path. This is the positioning play behind both listings (prompts 03 + 06). Commit/push only if asked; stage touched paths; both remotes.diff --git a/prompts/store-submissions/21-ar-ready-exports.md b/prompts/store-submissions/21-ar-ready-exports.mddeleted file mode 100644index c1aeba236..000000000--- a/prompts/store-submissions/21-ar-ready-exports.md+++ /dev/null@@ -1,32 +0,0 @@-# Prompt 21 — AR-ready exports: place any generated model in your room--> Paste into a fresh Claude Code chat in the three.ws repo. Follow CLAUDE.md. Use TodoWrite. Prereqs: 04/05 (studio + viewer), 20 (spatial artifact) helpful. **Pure consumer value, zero crypto — ships in BOTH the Claude and OpenAI free tracks.**--## The thesis-A generated GLB is great in a viewer; it's *unforgettable* when the user taps "View in your space" and the model appears on their desk through their phone. three.ws can convert generated GLBs to AR-ready formats (USDZ for iOS Quick Look, GLB for Android Scene Viewer) and return a one-tap AR link. This is the consumer screenshot moment for the free app — no wallet, no token, no friction.--## Objective-`export_ar(asset_id | glb_url)` → AR-ready asset URLs + a device-aware "View in AR" launch link (USDZ on iOS, Scene Viewer intent on Android, WebGL viewer fallback elsewhere), plus an AR button in the embedded viewer.--## What to build (all real — a working GLB→USDZ pipeline, no fake conversion)-1. **Conversion.** A real GLB→USDZ pipeline (USD tooling / a real converter lane — not a stub). Validate the output actually opens in Quick Look. Store outputs via `api/_lib/r2.js` `publicUrl`. Reject bad inputs at the boundary using the existing model `validate`/`inspect` path.-2. **Device-aware launch page.** A hosted AR launch page that serves USDZ to iOS (`<a rel="ar">`), a Scene Viewer intent to Android, and the WebGL viewer everywhere else — branched on User-Agent, with designed states for each.-3. **Tool response.** Return the AR asset URLs + launch link + viewer link with minimal metadata. **Strip internal identifiers** (session/trace IDs, any auth/coin fields) so the response is OpenAI-clean. Shape it as a conformant spatial artifact (prompt 20) with the AR handoff populated.-4. **Component AR button.** Add a "View in AR" affordance to the viewer (prompts 05/07) using the launch page, with hover/active/focus states and an `aria-label`.-5. **No crypto/coin surface anywhere** (both tracks) — grep to prove it. **Changelog** + `npm run build:pages`.--## Why only three.ws-You generate the model *and* control the viewer and storage, so the path from "text prompt" to "AR on my desk" is one continuous pipeline — competitors stitching third-party generators can't offer one-tap AR from a chat.--## Verification (must actually run)-- Convert a real generated GLB → a USDZ that opens in iOS Quick Look (capture/describe it) and renders via Scene Viewer on Android.-- The launch link routes correctly per User-Agent (iOS → USDZ, Android → Scene Viewer, desktop → WebGL).-- Bad input is rejected cleanly at the boundary (not a crash).-- The tool response is OpenAI-clean — no internal/auth/coin fields — grep to prove it.-- `npm test` green; add tests for conversion-output validity and device routing. Evidence to `prompts/store-submissions/_generated/ar/`.--## Definition of done-- Any generated model exports to AR-ready formats with a one-tap, device-aware "View in AR" link and an in-viewer AR button — real conversion, OpenAI-clean responses, designed states, zero crypto surface, reusable across both stores.--## Hand-off-Report the conversion pipeline, the launch-page routing, the AR-button surface, and the evidence path. A consumer headline for the OpenAI listing and a polish win for Claude. Commit/push only if asked; stage touched paths; both remotes.diff --git a/prompts/x402-catalog/01-free-tier-lane.md b/prompts/x402-catalog/01-free-tier-lane.mddeleted file mode 100644index 9a2224ee0..000000000--- a/prompts/x402-catalog/01-free-tier-lane.md+++ /dev/null@@ -1,66 +0,0 @@-# 01 — Free tier lane for the aggregator (`/api/v1/x/*`)--Read `prompts/x402-catalog/00-CONTEXT.md` first and obey every rule in it. Work alone, finish-100%, never ask questions.--## Mission--The aggregator currently has three billing lanes (BYOK / plan / x402). Add the fourth and most-important one: a **genuine free tier**. An unauthenticated caller with no payment header gets a-per-IP quota on endpoints marked `free`, and only sees the 402 challenge after exhausting it.-This is what makes "the free crypto API" real instead of marketing copy — an agent must be able-to `curl https://three.ws/api/v1/x/coingecko/price?ids=solana` and get data with zero setup.--## Context--- Front door: `api/v1/x/[...slug].js` — read its billing-lane selection logic top to bottom- before changing it. It already imports `limits`/`clientIp` from `api/_lib/rate-limit.js` and- helpers from `api/_lib/http.js` (`rateLimited`, `setRateLimitHeaders`).-- Engine: `api/_lib/aggregator.js` (`executeUpstream`, `getPaidHandler`).-- Registry: `api/v1/_providers.js`. The `free` field contract (from 00-CONTEXT):- `free: { perMin: <n>, perDay: <n> }` on an endpoint descriptor.-- Existing rate-limit plumbing: read `api/_lib/rate-limit.js` fully — reuse its store/limiter- rather than inventing a second one. If it is purely in-memory per-instance, that is- acceptable for per-minute quotas; for per-day quotas check whether the repo has a shared- store (`api/_lib/db.js` has `sql`; grep for existing daily-quota patterns, e.g. in- `api/_lib/usage.js` / `recordEvent`) and use the same mechanism the platform already uses.--## Tasks--1. **Engine support.** In the front door's lane selection: when the caller has no BYOK key, no- bearer/session auth, and no x402 payment header, AND the resolved endpoint descriptor has a- `free` field → serve the request through the free lane: enforce `perMin` and `perDay` per- client IP per endpoint, execute the upstream, return the payload.-2. **Headers.** Free-lane responses carry `X-RateLimit-Limit`, `X-RateLimit-Remaining`,- `X-RateLimit-Reset` (reuse `setRateLimitHeaders`) plus `X-Free-Tier: 1`.-3. **Over-quota behavior.** When the free quota is exhausted, fall through to the existing x402- lane (the 402 challenge). Add a JSON hint field to the 402 response body if the paidEndpoint- rail allows attaching one (read `api/_lib/x402-paid-endpoint.js` to see; if the challenge- shape is spec-locked, put the hint in a response header `X-Free-Tier-Reset: <iso>` instead):- the caller should learn "free quota resets at T; or pay per call; or send a three.ws API- key."-4. **Mark existing endpoints free.** In `api/v1/_providers.js`, add `free` quotas to every- `coingecko` and `defillama` endpoint (they're keyless upstreams — suggested:- `{ perMin: 30, perDay: 2000 }`). Do NOT mark `openai/chat` free (platform key costs real- money per call).-5. **Discovery.** Extend `providerCatalog()` so each endpoint's entry includes its `free`- quota (or `free: false`). Verify `GET /api/v1/x` renders it.-6. **Metering.** Free-lane calls still record a usage event (find how the BYOK lane calls- `recordEvent` in the front door and mirror it with a `billing: 'free'` marker) so adoption- is measurable — this data is how the owner knows the funnel works.-7. **Tests** in `tests/api/v1-free-tier.test.js`: free endpoint serves without auth; quota- headers present; over-quota falls through to 402; non-free endpoint (openai/chat) still- 402s immediately; catalog exposes free quotas. Read a neighboring `tests/api/*.test.js`- first for the harness pattern (how handlers are imported and req/res are faked). Run- `npx vitest run tests/api/v1-free-tier.test.js` until green.-8. **Docs.** Update `docs/api-reference.md`'s section on `/api/v1/x` (or add one matching the- neighboring format): the four lanes, the free-tier quotas, one runnable curl example using- `ids=solana`. Changelog entry in `data/changelog.json` (tag: `feature`) — holder-readable:- the three.ws crypto API now has a free tier.-9. Commit (explicit paths) and push per 00-CONTEXT.--## Definition of done--Free lane works end-to-end locally (prove with a real invocation of the handler in tests),-quota falls through to a real 402, catalog + docs + changelog updated, tests green, committed,-pushed to threews (threeD attempted).diff --git a/prompts/x402-catalog/02-provider-dexscreener.md b/prompts/x402-catalog/02-provider-dexscreener.mddeleted file mode 100644index 65b86540a..000000000--- a/prompts/x402-catalog/02-provider-dexscreener.md+++ /dev/null@@ -1,63 +0,0 @@-# 02 — Aggregator provider: DexScreener--Read `prompts/x402-catalog/00-CONTEXT.md` first and obey every rule in it. Work alone, finish-100%, never ask questions.--## Mission--Add DexScreener as a provider in `api/v1/_providers.js` so any agent can pull live DEX pair-data (price, liquidity, volume, txns) for any token through the free three.ws crypto API. This-replaces the pointless paid `token-intel`/`three-intel` wrappers with an honest free surface.--## Context--- Registry + descriptor contract: `api/v1/_providers.js` (read the header comment and match the- existing `coingecko` entry's style exactly — tabs, `required()` helper, slim transforms).-- DexScreener is keyless (`requiresKey: false`, `envVar: null`, `byokHeader: null`).-- Known API surface (VERIFY EVERY PATH WITH CURL BEFORE WIRING — shapes drift):- - Base `https://api.dexscreener.com`- - `GET /latest/dex/tokens/{tokenAddresses}` — up to 30 comma-separated addresses; ~300 req/min- - `GET /latest/dex/search?q=<query>` — ~300 req/min- - `GET /latest/dex/pairs/{chainId}/{pairId}` — ~300 req/min- - `GET /token-profiles/latest/v1` and `GET /token-boosts/latest/v1` — ~60 req/min-- The repo already consumes DexScreener elsewhere (`api/_lib/token-market.js`- `fetchTokenMarket`) — read it for field names the platform already normalizes to.-- Use the $THREE mint `FeMbDoX7R1Psc4GEcvJdsbNbZA3bfztcyDCatJVJpump` for every example address- in params docs, tests, and docs.--## Tasks--1. Curl each endpoint above with a real request (token endpoint: use the $THREE mint). Record- actual response shapes.-2. Add provider `dexscreener` (category `crypto-market-data`) with endpoints:- - `token` — pairs for one or more token addresses. Param `addresses` (required, comma-sep,- cap at 30). **Transform**: DexScreener returns full pair objects (~large); slim each pair- to: `chainId, dexId, pairAddress, baseToken {address,name,symbol}, quoteToken {symbol},- priceUsd, priceNative, liquidity.usd, fdv, marketCap, volume.h24, priceChange {h1,h6,h24},- txns.h24, pairCreatedAt, url`. Sort by `liquidity.usd` desc.- - `search` — param `q` (required). Same slim transform, cap 20 pairs.- - `pair` — params `chain` + `pair` (both required), path-param style like defillama's `tvl`.- Same slim transform.- - `profiles` — latest token profiles (no params). Slim to- `chainId, tokenAddress, description, links` per entry, cap 30.- - `boosts` — latest boosted tokens (no params). Slim similarly, cap 30.-3. Free-tier field on all endpoints per the 00-CONTEXT contract: `token`/`search`/`pair` get- `free: { perMin: 30, perDay: 3000 }`; `profiles`/`boosts` get- `free: { perMin: 10, perDay: 500 }` (upstream limit is 60/min shared). Set `priceAtomics`- `'1000'` ($0.001) on all — the x402 price for above-quota callers. Scope `agents:read`.-4. `summary` lines must be specific and agent-readable (what data, for what input, from where).- `params` documents every input with an example using the $THREE mint.-5. **Tests** in `tests/api/v1-provider-dexscreener.test.js`: descriptor integrity (every- endpoint resolvable via `ENDPOINT_INDEX`, transforms handle a recorded real-shaped payload- AND a malformed/empty payload without throwing), `required()` errors on missing params. Use- fixtures captured from your real curls (a recorded upstream response used as a test fixture- is real data, not a mock of our code). Run targeted vitest until green.-6. **Docs:** add the provider to the `/api/v1/x` section of `docs/api-reference.md` with one- runnable curl per endpoint ($THREE mint example). Changelog entry (`feature`): live DEX- pair data for any token, free.-7. Commit (explicit paths: the registry, tests, docs, changelog) and push per 00-CONTEXT.--## Definition of done--All five endpoints wired, transforms verified against real captured responses, tests green,-docs + changelog updated, committed, pushed to threews (threeD attempted).diff --git a/prompts/x402-catalog/03-provider-jupiter.md b/prompts/x402-catalog/03-provider-jupiter.mddeleted file mode 100644index 20c24bf5f..000000000--- a/prompts/x402-catalog/03-provider-jupiter.md+++ /dev/null@@ -1,56 +0,0 @@-# 03 — Aggregator provider: Jupiter (Solana prices, quotes, token search)--Read `prompts/x402-catalog/00-CONTEXT.md` first and obey every rule in it. Work alone, finish-100%, never ask questions.--## Mission--Add Jupiter as a provider in `api/v1/_providers.js`: Solana token prices, real swap quotes, and-token metadata search through the free three.ws crypto API. A swap **quote** (not execution) is-one of the highest-value free data calls an agent can make — it's the true executable price.--## Context--- Registry + descriptor contract: `api/v1/_providers.js` (match existing entries' style).-- Jupiter's keyless tier lives on `https://lite-api.jup.ag` (their paid/keyed tier is- `api.jup.ag`). Use the lite base — `requiresKey: false`. Known surface (VERIFY EVERY PATH- WITH CURL BEFORE WIRING — Jupiter versions endpoints aggressively; if a path 404s, probe the- adjacent version, e.g. `/price/v2` vs `/price/v3`, `/swap/v1/quote` vs `/v6/quote`, and use- what actually responds):- - Price: `GET /price/v3?ids=<comma-sep mints>` (v2 form: `/price/v2?ids=…`)- - Quote: `GET /swap/v1/quote?inputMint=…&outputMint=…&amount=<atomics>&slippageBps=50`- - Token search: `GET /tokens/v2/search?query=<text>` (v1 form: `/tokens/v1/token/<mint>`)-- USDC mint for examples: `EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v` is a real third-party- reference — acceptable ONLY as a quote-side parameter default documented in `params` (it's- generic infrastructure, like `ids=solana` precedent). For the token-side examples use the- $THREE mint `FeMbDoX7R1Psc4GEcvJdsbNbZA3bfztcyDCatJVJpump`.-- BYOK: Jupiter keys go in an `x-api-key` header against `api.jup.ag`. The descriptor `base` is- static, so keep the lite base and set `byokHeader: null` — document in the endpoint summaries- that this is Jupiter's keyless tier. Do not build multi-base plumbing.--## Tasks--1. Curl each candidate path with real mints ($THREE, wrapped SOL `So11111111111111111111111111111111111111112`)- and record the working versions + response shapes.-2. Add provider `jupiter` (category `crypto-market-data`) with endpoints:- - `price` — param `ids` (required, comma-sep mints). Transform to a flat- `{ [mint]: { price_usd, … } }` keeping only stable fields you observed.- - `quote` — params `inputMint`, `outputMint`, `amount` (all required), `slippageBps`- (default 50). Transform: keep `inAmount, outAmount, otherAmountThreshold, priceImpactPct,- routePlan` slimmed to `[{ label, inputMint, outputMint, percent }]`, drop the rest.- - `token-search` — param `query` (required). Slim each hit to- `address, name, symbol, decimals, logoURI, tags, daily_volume` (whatever subset the real- response carries), cap 20.-3. Free-tier field on all three: `free: { perMin: 20, perDay: 2000 }`. `priceAtomics` `'1000'`.- Scope `agents:read`. Specific `summary` + fully documented `params` with runnable examples.-4. **Tests** in `tests/api/v1-provider-jupiter.test.js`: descriptor integrity via- `ENDPOINT_INDEX`, transforms against captured real-shaped fixtures + malformed payloads,- required-param errors. Targeted vitest until green.-5. **Docs:** provider section in `docs/api-reference.md` with one runnable curl per endpoint.- Changelog entry (`feature`): Solana prices, executable swap quotes, and token search, free.-6. Commit (explicit paths) and push per 00-CONTEXT.--## Definition of done--Three endpoints wired against verified-live paths, transforms tested against captured real-shapes, docs + changelog updated, tests green, committed, pushed to threews (threeD attempted).diff --git a/prompts/x402-catalog/04-provider-coingecko-defillama-expansion.md b/prompts/x402-catalog/04-provider-coingecko-defillama-expansion.mddeleted file mode 100644index 42fc41092..000000000--- a/prompts/x402-catalog/04-provider-coingecko-defillama-expansion.md+++ /dev/null@@ -1,67 +0,0 @@-# 04 — Expand CoinGecko + DefiLlama coverage (and add the Llama price/stablecoin bases)--Read `prompts/x402-catalog/00-CONTEXT.md` first and obey every rule in it. Work alone, finish-100%, never ask questions.--## Mission--The `coingecko` and `defillama` providers in `api/v1/_providers.js` each expose only 2-endpoints. Expand them to real coverage, and add DefiLlama's two sibling APIs (coins.llama.fi-prices, stablecoins.llama.fi) as their own providers since they live on different base URLs.--## Context--- Registry + descriptor contract: `api/v1/_providers.js`. Match existing style exactly. Append- new endpoints INSIDE the existing `coingecko`/`defillama` entries; add the two new providers- at the end of `PROVIDERS`. Don't reformat existing entries (concurrent agents may be editing- the same file — keep your diff surgical).-- All of these upstreams are keyless. VERIFY EVERY PATH WITH CURL BEFORE WIRING and slim every- large payload with a `transform` (see the existing `defillama/protocols` transform for the- bar: a multi-MB upstream response must not ship through unslimmed).-- Known surfaces to verify:- - CoinGecko `https://api.coingecko.com/api/v3`: `/coins/{id}` (use- `localization=false&tickers=false&community_data=false&developer_data=false`),- `/search/trending`, `/simple/token_price/{platform}?contract_addresses=…&vs_currencies=usd`,- `/global`, `/coins/{id}/ohlc?vs_currency=usd&days=…`- - DefiLlama `https://api.llama.fi`: `/v2/chains`, `/protocol/{slug}` (HUGE — slim hard),- `/v2/historicalChainTvl/{chain}`- - Llama coins `https://coins.llama.fi`: `/prices/current/{coins}` where `{coins}` is- comma-sep `chain:address` (e.g. `solana:FeMbDoX7R1Psc4GEcvJdsbNbZA3bfztcyDCatJVJpump`)- - Llama stablecoins `https://stablecoins.llama.fi`: `/stablecoins?includePrices=true`--## Tasks--1. Curl everything; record real shapes.-2. **CoinGecko additions** (each: `free: { perMin: 20, perDay: 1500 }`, `priceAtomics '1000'`,- scope `agents:read`, specific summary, documented params):- - `coin` — `/coins/{id}` slimmed to name/symbol/market_data essentials (price, ath, atl,- market_cap, volume, supply, price changes) + description.en truncated to 500 chars.- - `trending` — `/search/trending`, slim to coins `[{ id, symbol, name, market_cap_rank,- price_btc }]` and top categories.- - `token-price` — `/simple/token_price/{platform}` with params `platform` (default- `solana`), `addresses` (required). Example address: the $THREE mint.- - `global` — `/global`, slim to total market cap, volume, btc/eth dominance, active coins.- - `ohlc` — `/coins/{id}/ohlc`, params `id` (required), `days` (default 1, allow 1/7/14/30).-3. **DefiLlama additions** (same pricing/free defaults):- - `chains` — `/v2/chains` slimmed to `[{ name, tvl, tokenSymbol, chainId }]` sorted by tvl.- - `protocol` — `/protocol/{slug}` slimmed to name, category, chains, current TVL per chain,- and the LAST 30 points of the total TVL series only.- - `chain-tvl` — `/v2/historicalChainTvl/{chain}`, last 90 points.-4. **New provider `llama-prices`** (base coins.llama.fi, category `crypto-market-data`):- endpoint `current` — param `coins` (required, comma-sep `chain:address`), transform to- `{ [key]: { price, symbol, decimals, timestamp, confidence } }`.-5. **New provider `llama-stablecoins`** (base stablecoins.llama.fi, category `defi-data`):- endpoint `list` — slim each to `name, symbol, pegType, price, circulating total`, sorted by- circulating desc, cap 50.-6. **Tests** in `tests/api/v1-provider-llama-expansion.test.js` +- `tests/api/v1-provider-coingecko-expansion.test.js`: descriptor integrity via- `ENDPOINT_INDEX`, every new transform against captured real-shaped fixtures and malformed- payloads, required-param errors. Targeted vitest until green.-7. **Docs:** extend the provider sections in `docs/api-reference.md` (runnable curl each).- Changelog entry (`feature`), holder-readable.-8. Commit (explicit paths) and push per 00-CONTEXT.--## Definition of done--CoinGecko 2→7 endpoints, DefiLlama 2→5, two new Llama providers live, everything transformed-slim + tested against real captured shapes, docs + changelog updated, committed, pushed.diff --git a/prompts/x402-catalog/05-provider-solana-reads.md b/prompts/x402-catalog/05-provider-solana-reads.mddeleted file mode 100644index ae60b87a4..000000000--- a/prompts/x402-catalog/05-provider-solana-reads.md+++ /dev/null@@ -1,64 +0,0 @@-# 05 — Aggregator provider: Solana on-chain reads--Read `prompts/x402-catalog/00-CONTEXT.md` first and obey every rule in it. Work alone, finish-100%, never ask questions.--## Mission--Add a `solana` provider to `api/v1/_providers.js` exposing the on-chain reads agents ask for-constantly — balance, token holdings, supply, largest holders, transaction lookup, priority-fees — as simple GET endpoints, so an agent never has to hand-build JSON-RPC.--## Context--- Registry: `api/v1/_providers.js`. The descriptor contract supports POST upstreams with a- `body` builder — Solana RPC is a single POST endpoint with JSON-RPC bodies, so every- "endpoint" here is `method: 'POST'` upstream-side. BUT the public aggregator surface should- stay GET-friendly for these (they're reads). Read `api/v1/x/[...slug].js` to see how- GET/POST are dispatched; if the front door strictly maps caller method → upstream method,- extend the endpoint descriptor with an explicit `upstreamMethod` field handled in- `api/_lib/aggregator.js` (`executeUpstream`) so a caller GET can drive an upstream POST.- Keep that change minimal and documented in the registry header comment.-- **RPC URL:** the platform already talks to Solana RPC — read `api/solana-rpc.js` and grep- `api/_lib` for the env var(s) in use (e.g. `SOLANA_RPC_URL` / Helius). Use the SAME env- resolution the platform already uses; the descriptor `base` may be computed at module load- from that env with a sensible public fallback (`https://api.mainnet-beta.solana.com`).-- JSON-RPC methods to wrap: `getBalance`, `getTokenAccountsByOwner` (jsonParsed, by owner +- programId TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA), `getTokenSupply`,- `getTokenLargestAccounts`, `getTransaction` (jsonParsed, maxSupportedTransactionVersion 0),- `getAccountInfo` (jsonParsed), `getRecentPrioritizationFees`.-- Example addresses in params/tests/docs: $THREE mint- `FeMbDoX7R1Psc4GEcvJdsbNbZA3bfztcyDCatJVJpump`; for wallet examples generate a synthetic- base58 or use a well-known program id — never a real person's wallet.--## Tasks--1. Curl the platform's configured RPC (or the public fallback) with each JSON-RPC body; record- real shapes.-2. Add provider `solana` (category `onchain-data`) with endpoints (all GET caller-side):- - `balance` — param `address` (required) → `{ lamports, sol }`.- - `token-holdings` — param `owner` (required) → parsed token accounts slimmed to- `[{ mint, amount, decimals, uiAmount }]`, zero-balances filtered, sorted by uiAmount.- - `token-supply` — param `mint` (required) → `{ amount, decimals, uiAmount }`.- - `largest-holders` — param `mint` (required) → top 20 `[{ address, uiAmount }]`.- - `transaction` — param `signature` (required) → slimmed: slot, blockTime, fee, err,- signer(s), log messages truncated to first 20 lines, pre/post token balance deltas.- - `account` — param `address` (required) → owner program, lamports, executable, parsed data- type when available.- - `priority-fees` — no params → last 150 slots reduced to `{ p50, p75, p95, max }`- (compute the percentiles in the transform).-3. Each endpoint: `free: { perMin: 20, perDay: 2000 }`, `priceAtomics '1000'`, scope- `agents:read`, specific summary, documented params with examples. JSON-RPC `error` in the- upstream 200 response must surface as a proper HTTP error (status 400/404 with the RPC- message), not as a payload — handle in the transform or a shared helper.-4. **Tests** in `tests/api/v1-provider-solana.test.js`: descriptor integrity, every transform- against captured real-shaped fixtures (success AND RPC-error payloads), percentile math,- required-param errors. Targeted vitest until green.-5. **Docs:** provider section in `docs/api-reference.md` with runnable curls. Changelog entry- (`feature`): free Solana reads for agents — no RPC endpoint, no JSON-RPC boilerplate.-6. Commit (explicit paths) and push per 00-CONTEXT.--## Definition of done--Seven read endpoints live through the aggregator, RPC errors mapped to HTTP errors, transforms-tested against real captured shapes, docs + changelog updated, committed, pushed.diff --git a/prompts/x402-catalog/06-pump-data-v1.md b/prompts/x402-catalog/06-pump-data-v1.mddeleted file mode 100644index f63cff600..000000000--- a/prompts/x402-catalog/06-pump-data-v1.md+++ /dev/null@@ -1,62 +0,0 @@-# 06 — Pump.fun data as free `/api/v1` endpoints (including honest whale detection)--Read `prompts/x402-catalog/00-CONTEXT.md` first and obey every rule in it. Work alone, finish-100%, never ask questions.--## Mission--three.ws already has real pump.fun plumbing (`api/pump/*.js`, `api/_lib/pump-launch-feed.js`,-`api/_lib/pump-alert-runner.js`, Helius integration). Expose it as clean, FREE, versioned-endpoints under `/api/v1/pump/*` — including the whale-activity detection currently trapped-inside the paid `api/x402/pump-agent-audit.js` "oracle". Free data here is a funnel to the paid-pump-launch product.--## Context--- These are NOT third-party proxies — they're native routes backed by our own modules, so they- do NOT go in `api/v1/_providers.js`. They go under `api/v1/pump/` and get registered in- `api/v1/_catalog.js` (read its header: every native v1 route needs a catalog entry — id,- method, path, auth, scope, summary, params).-- Read before writing: `api/pump/trending.js`, `api/pump/curve.js`, `api/pump/search.js`,- `api/pump/dashboard.js`, `api/pump/helius-stats.js`, `api/_lib/pump-launch-feed.js`, and the- whale logic inside `api/x402/pump-agent-audit.js` (lines defining what a "whale" is: wallet- buying ≥5 SOL in one tx across top bonding-curve coins).-- Look at how `api/v1/sentiment.js` / `api/v1/market/intel.js` are built (auth handling,- `wrap`/`json`/`error` from `api/_lib/http.js`, rate limiting) — match that pattern.-- If an `api/pump/*.js` route holds logic you need but it isn't importable (logic inline in- the handler), extract the shared part into `api/_lib/` and have BOTH routes use it — never- copy-paste and never break the existing route.--## Tasks--1. Create `api/v1/pump/[action].js` (single dynamic route, matching however `api/v1/agents/`- or `api/portfolio/[action].js` handles actions) exposing:- - `trending` — reuse the trending module. Slim, cap 25.- - `curve` — bonding-curve progress for a mint (`mint` param, example: $THREE CA).- - `search` — text search over pump tokens (`q` param).- - `launches` — the three.ws platform launch feed from `pump_agent_mints`- (`api/_lib/pump-launch-feed.js`) — this is the allowed runtime launch-directory surface.- - `whales` — port the whale-activity detection from `pump-agent-audit.js` as a free read:- `limit` param (default 5, max 25), returns `{ wallets, whale_count, total_sol_moved }`.- Drop the decorative "bullish/bearish signal + confidence" fields — report facts only.-2. Every action: public auth (no key needed), per-IP rate limit (reuse- `api/_lib/rate-limit.js`; 20/min is fine), proper `cache-control` headers for cacheable- reads (trending/launches: 30–60s), errors surfaced honestly (upstream down = 503 with a- clear message, never empty-array fakery).-3. Register all five in `api/v1/_catalog.js` with specific summaries + documented params.-4. **Tests** in `tests/api/v1-pump.test.js`: each action responds through the handler with- real-shaped fixtures at the module boundary you extracted (fixtures captured from real- calls), rate limit enforced, unknown action 404s, catalog entries exist and match the- routes. Targeted vitest until green.-5. **Docs:** `docs/api-reference.md` section for `/api/v1/pump/*` with runnable curls- ($THREE mint for examples). Changelog entry (`feature`): free pump.fun market data —- trending, curve progress, search, launches, whale activity.-6. Do NOT modify or delist `api/x402/pump-agent-audit.js` — storefront changes belong to- prompt 18 and prompts must not depend on each other. Just build the free surface.-7. Commit (explicit paths) and push per 00-CONTEXT.--## Definition of done--Five free pump endpoints live under `/api/v1/pump/*`, registered in the catalog, whale logic-shared (not duplicated) with the existing paid route, tests green, docs + changelog updated,-committed, pushed.diff --git a/prompts/x402-catalog/07-name-resolution-v1.md b/prompts/x402-catalog/07-name-resolution-v1.mddeleted file mode 100644index 659797f7c..000000000--- a/prompts/x402-catalog/07-name-resolution-v1.md+++ /dev/null@@ -1,49 +0,0 @@-# 07 — Free name resolution: ENS + SNS under `/api/v1/resolve`--Read `prompts/x402-catalog/00-CONTEXT.md` first and obey every rule in it. Work alone, finish-100%, never ask questions.--## Mission--three.ws already resolves ENS and SNS names (the `ens_sns_resolve` MCP tool and `api/sns.js`).-Expose that capability as one free versioned endpoint: `GET /api/v1/resolve?name=vitalik.eth`-or `?name=foo.sol` or reverse (`?address=…&chain=…`). Name resolution is a high-frequency agent-primitive and a perfect zero-friction entry point into the crypto API.--## Context--- Find the existing implementation first — do NOT reimplement resolution: grep for- `ens_sns_resolve` (MCP tool registration lives under `api/_mcp3d/tools/` or in the MCP- dispatch; the resolver logic it calls is the thing to reuse), and read `api/sns.js` +- `api/sns-subdomain.js`. Whatever module those share is your backend.-- Native v1 route → lives at `api/v1/resolve.js`, registered in `api/v1/_catalog.js` (read its- header for the entry contract). Match the handler style of `api/v1/sentiment.js`- (`wrap`/`json`/`error` from `api/_lib/http.js`).-- Reverse ENS lookup needs an Ethereum RPC; reverse SNS needs Solana RPC — check what the- existing resolver already supports and expose exactly that. If reverse lookup is NOT already- implemented, add forward-only now and document it — do not half-build reverse resolution- with a placeholder.--## Tasks--1. Locate and read the existing resolver(s). Write down (in your final report) which module you- reused and what it supports.-2. Create `GET /api/v1/resolve`:- - `?name=<x>.eth` → `{ name, chain: 'ethereum', address, source: 'ens' }`- - `?name=<x>.sol` → `{ name, chain: 'solana', address, source: 'sns' }`- - `?address=…` (+ optional `chain`) → reverse lookup IF the existing resolver supports it.- - Unknown TLD → 400 with the list of supported suffixes. Unresolvable name → 404 with- `{ error: 'not_found', name }` (a miss is not a 500).-3. Public, keyless, per-IP rate limit 30/min (reuse `api/_lib/rate-limit.js`), `cache-control`- ~5 min on hits.-4. Register in `api/v1/_catalog.js` with a specific summary + params.-5. **Tests** in `tests/api/v1-resolve.test.js`: forward .eth and .sol against fixtures captured- from real resolutions, unknown TLD 400, miss 404, rate limit, catalog entry present.- Targeted vitest until green.-6. **Docs:** `docs/api-reference.md` entry with runnable curls. Changelog entry (`feature`).-7. Commit (explicit paths) and push per 00-CONTEXT.--## Definition of done--One clean resolve endpoint reusing the platform's existing resolver, honest 400/404 semantics,-tests green, catalog + docs + changelog updated, committed, pushed.diff --git a/prompts/x402-catalog/08-sentiment-narrative-v1.md b/prompts/x402-catalog/08-sentiment-narrative-v1.mddeleted file mode 100644index f0f4e2bc4..000000000--- a/prompts/x402-catalog/08-sentiment-narrative-v1.md+++ /dev/null@@ -1,47 +0,0 @@-# 08 — Harden + free-tier the existing v1 sentiment/intel routes--Read `prompts/x402-catalog/00-CONTEXT.md` first and obey every rule in it. Work alone, finish-100%, never ask questions.--## Mission--`api/v1/sentiment.js`, `api/v1/market/intel.js`, and `api/v1/market/projects.js` already exist-but are undocumented, unadvertised, and their access model predates the free-tier strategy.-Audit them, give them a genuine free lane, and document them so they're a real part of the free-crypto API instead of dead routes.--## Context--- Read all three route files end to end, plus their backing modules (`api/sentiment.js`,- `api/aixbt/*` — note aixbt is a keyed upstream; check which env var it needs and what- happens today when it's absent).-- Catalog: `api/v1/_catalog.js` — check whether these routes are registered; fix any drift- between catalog entries and actual behavior (params, auth, summaries).-- Free-tier pattern: unauthenticated per-IP quota via `api/_lib/rate-limit.js`, then a clear- upgrade message — mirror however `api/v1/pump` or other public v1 routes gate (read what- exists at the time you run; if nothing else has a free pattern yet, implement per-IP- rate-limited public access directly — this prompt must not depend on any other prompt).--## Tasks--1. **Audit.** For each of the three routes: does it respond today? With what auth? What does it- return when its upstream key is missing? Fix anything broken at the root (a route that 500s- on missing env must 503 with `not_configured` and name the env var).-2. **Free access.** Make sentiment and any keyless-backed intel data publicly readable with a- per-IP quota (20/min). For aixbt-backed endpoints that consume a paid upstream key, keep- auth/x402 required but make the 401/402 response state exactly what a caller can do- (get a key at /dashboard/developers, or pay per call).-3. **Catalog truth.** Update `api/v1/_catalog.js` entries: accurate summaries, params, auth- levels. Every entry must match observed behavior — verify by invoking the handlers.-4. **Tests** in `tests/api/v1-sentiment-intel.test.js`: each route's happy path with captured- real-shaped fixtures, missing-env 503 (not 500), quota enforcement, catalog/behavior- consistency. Targeted vitest until green.-5. **Docs:** `docs/api-reference.md` section for sentiment + market intel with runnable curls- (use `$THREE` / generic ids for examples). Changelog entry (`improvement`), holder-readable:- sentiment and narrative intel are now part of the free API.-6. Commit (explicit paths) and push per 00-CONTEXT.--## Definition of done--All three routes verified working (or degrading with honest 503s), freely readable where the-upstream is free, catalog + docs + changelog accurate, tests green, committed, pushed.diff --git a/prompts/x402-catalog/09-crypto-api-docs-openapi.md b/prompts/x402-catalog/09-crypto-api-docs-openapi.mddeleted file mode 100644index 8b590a7e2..000000000--- a/prompts/x402-catalog/09-crypto-api-docs-openapi.md+++ /dev/null@@ -1,62 +0,0 @@-# 09 — Crypto API storefront: OpenAPI, docs page, discovery--Read `prompts/x402-catalog/00-CONTEXT.md` first and obey every rule in it. Work alone, finish-100%, never ask questions.--## Mission--Give the free crypto API a real storefront: a public `/crypto-api` page, OpenAPI coverage for-`/api/v1/x/*`, and docs — all **generated from the live registry** so they stay correct no-matter which provider prompts have or haven't run yet. This is what turns plumbing into a-product agents can discover.--## Context--- The provider registry (`api/v1/_providers.js`) exports `providerCatalog()` — machine-readable- provider/endpoint/price/params data. The wider catalog is `api/v1/_catalog.js` (`API_META`).- **Everything you build renders FROM these at runtime/build time** — never hand-enumerate- endpoints, or this page is stale the day another prompt lands a provider.-- `api/openapi-json.js` already exists — read it fully; extend it to include every- `/api/v1/x/{provider}/{endpoint}` path (parameters from each descriptor's `params`, the- billing lanes as description text, `free` quota when the descriptor carries one).-- Pages: `data/pages.json` feeds sitemap/llms.txt/changelog; `npm run build:pages` validates.- Find how existing marketing/docs pages are built (look at a recent page in `pages.json`, and- how its HTML/JS lives under the repo root or `public/`) and match that pattern exactly.-- Frontend is vanilla JS + Vite. Design bar: Vercel/Stripe docs quality. Use existing design- tokens/CSS variables — grep `public/` and `src/` for the token stylesheet other pages share.--## Tasks--1. **OpenAPI.** Extend `api/openapi-json.js` to render every aggregator endpoint from- `providerCatalog()`. Verify the output parses (`curl | jq` on a local invocation or a unit- test that imports the handler and validates JSON + a few known paths).-2. **`/crypto-api` page.** A public page that:- - States the pitch in one line: one free API for crypto data — DEX pairs, prices, quotes,- TVL, on-chain reads, name resolution — no key, no wallet, generous free tier, pay-per-call- only above quota.- - Renders the live provider/endpoint table by fetching `GET /api/v1/x` client-side- (provider, endpoint, method, summary, free quota, x402 price). Loading state: skeleton- rows. Error state: actionable message. Empty state: impossible by design but handle it.- - Shows one copy-paste curl example (use `coingecko/price?ids=solana` — it exists today)- with a copy button, hover/focus states, keyboard accessible.- - Links to `/docs`, the OpenAPI JSON, and the x402 docs.-2b. Wire the page into site navigation wherever sibling developer pages are linked (find how- existing pages appear in nav/footer and match).-3. **pages.json** entry (path, title, description, `added: 2026-07-06` or the date you run).- Run `npm run build:pages` — must pass.-4. **Docs.** `docs/api-reference.md`: ensure the `/api/v1/x` section exists and explains the- four billing lanes (free/BYOK/plan/x402) with one runnable curl. Keep it generated-friendly:- describe the discovery endpoint rather than enumerating providers.-5. **README** at `api/v1/README.md`: what the unified API is, how the registry works, how to- add a provider (descriptor contract), how billing lanes resolve. This is the doc the next- contributor reads.-6. **Changelog** entry (`feature`): the three.ws crypto API has a home page and OpenAPI spec.-7. **Verify in a browser:** `npm run dev`, load `/crypto-api`, confirm the live table renders- from the real endpoint, no console errors, responsive at 320/768/1440.-8. Commit (explicit paths) and push per 00-CONTEXT.--## Definition of done--`/crypto-api` renders the live registry with designed loading/error states, OpenAPI covers the-aggregator dynamically, README + docs + pages.json + changelog shipped, build:pages green,-browser-verified, committed, pushed.diff --git a/prompts/x402-catalog/10-crypto-api-mcp-tools.md b/prompts/x402-catalog/10-crypto-api-mcp-tools.mddeleted file mode 100644index bbc51ca30..000000000--- a/prompts/x402-catalog/10-crypto-api-mcp-tools.md+++ /dev/null@@ -1,59 +0,0 @@-# 10 — Expose the crypto API as MCP tools--Read `prompts/x402-catalog/00-CONTEXT.md` first and obey every rule in it. Work alone, finish-100%, never ask questions.--## Mission--Agents increasingly consume capability through MCP, not raw HTTP. Expose the aggregator-(`/api/v1/x/*`) through the three.ws MCP server as tools — dynamically, from the registry, so-the toolset grows automatically as providers land.--## Context--- MCP server: `api/mcp.js` is the streamable-HTTP entry; the 3D MCP internals live in- `api/_mcp3d/` (`catalog.js` = tool registry, `dispatch.js` = execution, `discovery.js`).- Read all three plus 2–3 existing tool implementations under `api/_mcp3d/tools/` to learn the- exact registration + handler contract (input schema shape, result shape, how paid tools- declare pricing via `declareMcpDiscovery` from `api/_lib/x402/bazaar-helpers.js`).-- Aggregator: `api/v1/_providers.js` exports `ENDPOINT_INDEX` and `providerCatalog()`;- `api/_lib/aggregator.js` exports `executeUpstream` and `resolveUpstreamKey`.-- Design decision (made — do not revisit): **one generic tool + a few curated ones**, not one- tool per endpoint (a 30-tool flood degrades agent tool selection):- - `crypto_data` — params `{ provider, endpoint, params }`, validated against- `ENDPOINT_INDEX`; unknown pair → error listing valid pairs. Description enumerates the- live provider/endpoint ids WITH their one-line summaries (generated from- `providerCatalog()` at registration time).- - `token_snapshot` — curated convenience: given a Solana mint (example: the $THREE CA- `FeMbDoX7R1Psc4GEcvJdsbNbZA3bfztcyDCatJVJpump`), fan out to whichever registered providers- can describe it (dexscreener token pairs if registered, coingecko token-price, solana- token-supply…), tolerate absent providers (skip, note in result), merge into one snapshot.- Must work with ONLY the providers that exist at runtime — check `ENDPOINT_INDEX` per- sub-call; degrade gracefully. Note: a `pump_snapshot` tool already exists — read it first- and reuse/extend rather than duplicating scope.-- Free-tier/pricing: tools backed by free-tier endpoints should be callable without payment- within the same per-IP quotas; above quota they return the standard MCP PaymentRequired- structuredContent (see how existing paid tools do this).--## Tasks--1. Read the MCP internals listed above; write the registration for `crypto_data` +- `token_snapshot` following the existing tool pattern exactly.-2. Implement execution through `executeUpstream` (never re-fetch upstreams directly), with the- free-quota/payment gate mirroring how existing paid tools gate.-3. Ensure MCP discovery lists the new tools with accurate descriptions (run whatever local- listing path exists — `npm run test:mcp` and the audits `npm run audit:mcp` /- `npm run audit:mcp-golden` are in package.json; run them and fix failures they surface for- your tools).-4. **Tests** in `tests/api/mcp-crypto-data.test.js`: tools/list includes both tools with- schemas; `crypto_data` validates provider/endpoint and errors helpfully on unknowns;- `token_snapshot` merges partial provider availability without throwing (fixture-backed at- the executeUpstream boundary). Targeted vitest until green.-5. **Docs:** `docs/mcp.md` — add both tools with example calls. Changelog entry (`feature`).-6. Commit (explicit paths) and push per 00-CONTEXT.--## Definition of done--Both tools registered and dispatchable, generated from the live registry (no hand-enumerated-endpoint lists in code), MCP audits green, tests green, docs + changelog updated, committed,-pushed.diff --git a/prompts/x402-catalog/11-speech-package.md b/prompts/x402-catalog/11-speech-package.mddeleted file mode 100644index ddf856802..000000000--- a/prompts/x402-catalog/11-speech-package.md+++ /dev/null@@ -1,60 +0,0 @@-# 11 — Speech package: ASR + TTS as products (`/api/v1/ai/asr`, `/api/v1/ai/tts`)--Read `prompts/x402-catalog/00-CONTEXT.md` first and obey every rule in it. Work alone, finish-100%, never ask questions.--## Mission--three.ws already runs NVIDIA NIM speech lanes (`api/_lib/asr-nvidia.js`,-`api/_lib/tts-nvidia.js`, routes `api/asr.js`, `api/tts/speak.js`, `api/tts/voices.js`) but-they exist as internal avatar plumbing. Productize them: versioned `/api/v1/ai/*` endpoints-with a free quota and x402 above it, listed on the bazaar with real descriptions. Nobody else-in the x402 ecosystem sells speech — this is a differentiated listing.--## Context--- Read the four files above end to end first: what the NIM lanes accept (audio formats, size- caps, voices), which env vars gate them (NVIDIA key names), current error behavior.-- Versioned native routes → `api/v1/ai/asr.js` and `api/v1/ai/tts.js`, registered in- `api/v1/_catalog.js` (read its entry contract). Match the handler style of existing v1- routes (`wrap`/`json`/`error` from `api/_lib/http.js`).-- Paid lane: the platform's x402 rail (`paidEndpoint` from `api/_lib/x402-paid-endpoint.js`,- `declareHttpDiscovery`/`THREEWS_SERVICE` from `api/_lib/x402/bazaar-helpers.js`,- `priceFor` from `api/_lib/x402-prices.js`). Read `api/x402/tutor.js` as a compact example of- a paid POST endpoint.-- The NIM lanes cost us real GPU quota — free tier must be tight: suggested- ASR 5/day per IP (≤60s audio), TTS 10/day per IP (≤500 chars). x402 price above quota:- ASR `'10000'` ($0.01) per clip, TTS `'5000'` ($0.005) per call (env-overridable via- `priceFor` slugs `ai-asr` / `ai-tts`).--## Tasks--1. **TTS endpoint.** `POST /api/v1/ai/tts` `{ text, voice? }` → audio (respect however- `api/tts/speak.js` returns audio today — content-type, encoding; reuse its lane code via a- shared module, never duplicate). `GET /api/v1/ai/tts?voices=1` (or a `/voices` sibling —- pick what fits the routing) lists voices free, reusing `api/tts/voices.js` internals.-2. **ASR endpoint.** `POST /api/v1/ai/asr` accepting what the existing lane accepts (read- `api/asr.js` — likely base64 or multipart audio) → `{ text, confidence?, duration? }`.-3. **Free quota + x402.** Per-IP daily quotas as above (reuse `api/_lib/rate-limit.js` or the- platform's daily-quota mechanism — find what exists, e.g. in `api/_lib/usage.js`). Above- quota: the x402 402 challenge with bazaar discovery declared, so both endpoints appear on- x402scan with REAL descriptions whose first sentence answers "what can I only get here":- e.g. "Speech-to-text for agents over x402 — the only ASR lane in the x402 ecosystem; pay- $0.01 USDC per clip, no API key, no account."-4. **Env gating.** Missing NVIDIA env → 503 `not_configured` naming the exact env var (never a- 500, never a fake response). Add both lanes to whatever health surface exists- (`api/healthz.js` or `api/_lib/forge-lane-health.js` pattern — read and match).-5. **Tests** in `tests/api/v1-ai-speech.test.js`: routing + validation (bad body 400, oversize- 413/400 with clear message), quota fall-through to 402, missing-env 503, catalog entries- present. Mock nothing of OUR code — fixture the NIM boundary with captured real response- shapes. Targeted vitest until green. Also run `npm run audit:x402-catalog`.-6. **Docs:** `docs/api-reference.md` section for `/api/v1/ai/*` (runnable curls). Changelog- entry (`feature`): speech-to-text and text-to-speech for agents, free daily quota, USDC- above it.-7. Commit (explicit paths) and push per 00-CONTEXT.--## Definition of done--Both speech endpoints live with free quota → x402 fall-through, bazaar-discoverable with-uniqueness-first descriptions, env-gated honestly, tests + audit green, docs + changelog-updated, committed, pushed.diff --git a/prompts/x402-catalog/12-image-gen-package.md b/prompts/x402-catalog/12-image-gen-package.mddeleted file mode 100644index 7678ea947..000000000--- a/prompts/x402-catalog/12-image-gen-package.md+++ /dev/null@@ -1,61 +0,0 @@-# 12 — Image generation package (`/api/v1/ai/image`)--Read `prompts/x402-catalog/00-CONTEXT.md` first and obey every rule in it. Work alone, finish-100%, never ask questions.--## Mission--Productize the platform's text→image lanes as `POST /api/v1/ai/image`: free daily quota, x402-above it, bazaar-listed. The lanes exist (`api/_mcp3d/text-to-image.js` routes across NIM and-the GCP Vertex/Gemini image lane in `api/_mcp3d/vertex-imagen.js`) but are buried inside MCP-tool plumbing.--## Context--- **The working tree may contain uncommitted, in-flight changes to- `api/_mcp3d/text-to-image.js` and the Vertex lane** (a GCP-credits campaign runs in- parallel; recent commits added explicit lane control + provider logging). `git status` and- `git log --oneline -5 -- api/_mcp3d/` first, read the CURRENT state, and build on top of it.- Do not revert or fight anything you find; do not commit files you didn't change.-- Read `api/_mcp3d/text-to-image.js` fully: which providers it routes (NIM model(s),- `vertex-imagen.js` — note Vertex `:predict` for Imagen was retired; the image lane targets- `gemini-2.5-flash-image`), which env vars select the lane, what it returns (bytes? URL? R2- upload?).-- **Env reality:** the GCP lane env vars (`GCP_SERVICE_ACCOUNT_JSON`, `GOOGLE_CLOUD_PROJECT`,- `GOOGLE_CLOUD_LOCATION`) are NOT yet set in Vercel. Your endpoint must work the moment they- land and degrade honestly until then: if no image lane is configured at all → 503- `not_configured` naming the env vars; if one lane works → use it.-- Versioned native route → `api/v1/ai/image.js`, registered in `api/v1/_catalog.js`. Paid lane- via `paidEndpoint` + `declareHttpDiscovery` + `priceFor` (slug `ai-image`) — read- `api/x402/tutor.js` for the compact paid-POST pattern.-- Pricing suggestion: free 5 images/day per IP; x402 `'20000'` ($0.02) per image above quota.--## Tasks--1. `POST /api/v1/ai/image` `{ prompt, aspect_ratio?, seed? }` → `{ url, provider, width,- height }` (persist output wherever the existing lane persists — R2/CDN; read how- `text-to-image.js` callers store results and reuse that path; if the lane returns raw- bytes, upload via the platform's existing object-storage helper — find it, e.g.- `api/cdn-object.js` or what forge uses in `api/_lib/forge-store.js`).-2. Free quota → x402 fall-through as specified; bazaar description with uniqueness first:- "Text-to-image for agents over x402 — pay $0.02 USDC per image, no API key, no account;- runs on NVIDIA NIM / Google Vertex lanes."-3. Lane health: add an `/api/v1/ai/image?health=1` (or match the platform's existing lane- health pattern — see `api/_lib/forge-lane-health.js` and `api/granite-health.js`) that- reports per-lane configured/reachable without burning quota.-4. Content boundaries: reject empty/oversized prompts (400) and pass provider safety refusals- through as 422 with the provider's reason — never retry-loop a refusal.-5. **Tests** in `tests/api/v1-ai-image.test.js`: validation, quota fall-through to 402,- no-lane 503 naming env vars, provider-refusal 422, catalog entry present — provider- boundary fixture-backed with real captured shapes. Targeted vitest until green. Run- `npm run audit:x402-catalog`.-6. **Docs:** `docs/api-reference.md` section (runnable curl). Changelog entry (`feature`).-7. Commit ONLY your files (explicit paths — the in-flight `_mcp3d` files belong to another- agent unless you had to modify them; if you did modify shared files, say so in your report)- and push per 00-CONTEXT.--## Definition of done--Image endpoint live end-to-end on whichever lane is configured, honest 503 until env lands,-health probe real, bazaar-discoverable, tests + audit green, docs + changelog updated,-committed, pushed.diff --git a/prompts/x402-catalog/13-free-3d-lane-productization.md b/prompts/x402-catalog/13-free-3d-lane-productization.mddeleted file mode 100644index bdb6d3818..000000000--- a/prompts/x402-catalog/13-free-3d-lane-productization.md+++ /dev/null@@ -1,54 +0,0 @@-# 13 — Productize the free text→3D lane (`/api/v1/ai/text-to-3d`)--Read `prompts/x402-catalog/00-CONTEXT.md` first and obey every rule in it. Work alone, finish-100%, never ask questions.--## Mission--three.ws runs the ONLY text→3D lane in the x402/MCP ecosystem, and its draft tier is free-(NVIDIA NIM TRELLIS — the `forge_free` MCP tool and `api/nim-forge.js` / `api/forge-nim.js`).-But as an HTTP product it's invisible: buried under forge job plumbing with no clean versioned-route. Ship `POST /api/v1/ai/text-to-3d` — the flagship free endpoint of the AI package.--## Context--- Read first: `api/nim-forge.js`, `api/forge-nim.js`, the `forge_free` MCP tool implementation- (grep `forge_free` under `api/_mcp3d/`), `api/_lib/forge-tiers.js` (NOTE: has uncommitted- in-flight changes from a parallel campaign — read current state, build on it, don't fight- it), `api/_lib/forge-job-token.js`, `api/_lib/forge-store.js`. Understand: how a draft job- is submitted, whether drafts finish inline or need polling, where the GLB lands (URL), and- the viewer link format.-- Versioned native route → `api/v1/ai/text-to-3d.js`, registered in `api/v1/_catalog.js`.- Reuse the existing lane modules — zero duplicated generation logic.-- This endpoint is FREE with a per-IP quota (suggested 10/day — GPU quota is real). Above- quota, do NOT paywall it silently: return 429 with reset time AND a pointer to the paid- `/api/x402/forge` tiers for higher quality/volume. (The paid forge remains the upsell; this- free lane is the funnel.)--## Tasks--1. `POST /api/v1/ai/text-to-3d` `{ prompt }` →- `{ status: 'done'|'pending', glb_url?, viewer_url?, job? }` mirroring the existing draft- lane semantics (inline finish when fast; otherwise return the job token + the existing free- poll URL `GET /api/forge?job=<id>` — reuse, don't rebuild polling).-2. Per-IP daily quota (10/day) via the platform's quota mechanism; 429 with- `X-RateLimit-Reset` + upsell pointer as above. Missing NVIDIA env → 503 `not_configured`- naming the var.-3. Register in `api/v1/_catalog.js` with a summary whose first sentence answers uniqueness:- "Free text→3D — the only text-to-mesh lane in the agent-payments ecosystem; textured GLB- from a prompt, no key, no wallet."-4. **Generate one real model end-to-end** as verification (prompt: "a small ceramic robot- figurine"), confirm the GLB URL serves binary glTF (check magic bytes `glTF`) and the- viewer link renders. Record the URLs in your report.-5. **Tests** in `tests/api/v1-text-to-3d.test.js`: validation (empty prompt 400), quota 429- shape, missing-env 503, response contract for inline-done and pending paths (lane boundary- fixture-backed with real captured shapes). Targeted vitest until green.-6. **Docs:** `docs/api-reference.md` entry (runnable curl). Changelog entry (`feature`),- holder-readable: free text→3D now has a first-class API endpoint.-7. Commit (explicit paths; don't commit the in-flight `forge-tiers.js` changes unless you- authored changes in it — report if you did) and push per 00-CONTEXT.--## Definition of done--Endpoint live, one real GLB generated and verified end-to-end, quota honest with paid upsell,-tests green, catalog + docs + changelog updated, committed, pushed.diff --git a/prompts/x402-catalog/14-pipeline-x402-products.md b/prompts/x402-catalog/14-pipeline-x402-products.mddeleted file mode 100644index 065caa36e..000000000--- a/prompts/x402-catalog/14-pipeline-x402-products.md+++ /dev/null@@ -1,65 +0,0 @@-# 14 — 3D pipeline stages as individually-priced x402 products--Read `prompts/x402-catalog/00-CONTEXT.md` first and obey every rule in it. Work alone, finish-100%, never ask questions.--## Mission--The repo holds a full 3D asset pipeline nobody else in the x402 ecosystem has — rigging,-animation retargeting, remeshing, game-ready conversion, stylization, background removal —-but only generation (forge) is sold. Wrap each working stage as its own x402 resource with an-honest description, so the catalog reads as a coherent "3D Asset Pipeline API".--## Context--- Candidate stage routes — READ EACH ONE FIRST and triage (works end-to-end? env-gated?- half-built?): `api/forge-remesh.js`, `api/forge-gameready.js`, `api/forge-stylize.js`,- `api/forge-rembg.js`, `api/forge-segment.js`, `api/forge-motion.js`, plus rigging — find the- `rig_mesh` MCP tool implementation (grep under `api/_mcp3d/`) and the retarget machinery- (`src/animation-retarget.js` is client-side; check for a server-side rig/animate lane).- **Only productize stages that actually work.** A stage that is broken or env-dead gets fixed- if the fix is contained, or excluded with a written reason in your report — never listed- broken.-- x402 pattern: read `api/x402/model-check.js` (a working GET stage on a model URL) as the- template — `paidEndpoint`, `buildBazaarSchema`, `declareHttpDiscovery` + `THREEWS_SERVICE`,- `priceFor`, `installAccessControl` (all under `api/_lib/`).-- New paid routes live under `api/x402/` with kebab-case slugs: `pipeline-rig`,- `pipeline-remesh`, `pipeline-gameready`, `pipeline-stylize`, `pipeline-rembg` (skip- `segment`/`motion` unless triage shows them solid). Input contract: a `glb_url` (or- image URL for rembg) + stage-specific options; output: the processed asset persisted the- same way forge persists (see `api/_lib/forge-store.js`) and returned as a URL. Never inline- multi-MB binaries in JSON.-- Suggested prices (env-overridable): rig `'50000'` ($0.05), remesh/gameready/stylize- `'30000'` ($0.03), rembg `'10000'` ($0.01).-- Descriptions: first sentence answers "what can I only get here", states input → output +- price plainly. No "bullish signal" decoration, no fluff.--## Tasks--1. Triage every candidate stage (read + one real local invocation each where feasible). Write- the works/fixed/excluded table for your report.-2. Implement the x402 wrapper route for each surviving stage, reusing the stage's existing- module (extract shared logic into `api/_lib/` if it's currently inline in a handler — both- routes keep working).-3. Verify one REAL end-to-end call per shipped stage: take a real GLB (generate one via the- free NIM lane or use a small committed test asset if `tests/` has one), run the stage, open- the output URL, confirm it's a valid GLB (magic bytes) and the transformation actually- happened (e.g. triangle count dropped for remesh — `api/x402/model-check.js` internals can- verify). Record evidence in your report.-4. Handler-throws-before-settlement rule: any upstream/env failure must throw BEFORE- settlement so buyers are never charged for a failed stage (the `paidEndpoint` rail handles- this if you don't catch-and-continue — don't).-5. **Tests** in `tests/api/x402-pipeline-stages.test.js`: per stage — input validation (bad- URL 400, non-GLB 415/400), discovery schema present, price resolution via `priceFor`.- Stage-lane boundaries fixture-backed with real captured shapes. Targeted vitest until- green. Run `npm run audit:x402-catalog`.-6. **Docs:** new `docs/3d-pipeline.md` (linked from `docs/start-here.md`): the pipeline story- (generate → rig → animate → optimize → deliver), each stage with a runnable curl + price.- Changelog entry (`feature`): the 3D pipeline is now purchasable stage-by-stage.-7. Commit (explicit paths) and push per 00-CONTEXT.--## Definition of done--Every working stage is a priced, discoverable x402 resource verified with a real end-to-end-call; broken stages fixed or excluded with reasons; tests + audit green; pipeline doc +-changelog shipped; committed, pushed.diff --git a/prompts/x402-catalog/15-pipeline-orchestrator.md b/prompts/x402-catalog/15-pipeline-orchestrator.mddeleted file mode 100644index e07d9e3f3..000000000--- a/prompts/x402-catalog/15-pipeline-orchestrator.md+++ /dev/null@@ -1,70 +0,0 @@-# 15 — Pipeline orchestrator: one paid call, full asset pipeline--Read `prompts/x402-catalog/00-CONTEXT.md` first and obey every rule in it. Work alone, finish-100%, never ask questions.--## Mission--Ship `POST /api/x402/pipeline` — one x402 call that runs a requested chain of pipeline stages-(generate → rig → optimize → …) as a single job with one price, returning a job token the-caller polls free. This is the "asset factory" call: an agent describes what it wants and gets-back a game-ready asset.--## Context--- Job infrastructure exists — reuse it, don't rebuild: `api/_lib/forge-job-token.js` (signed- job tokens), `api/_lib/forge-store.js` (persistence), the free poll route `GET- /api/forge?job=<id>` (read `api/forge.js` to see how status/result polling works today), and- `api/_lib/forge-events.js`.-- Stage implementations: whatever exists at the time you run. Discover them at runtime by- reading the modules directly — generation (`api/nim-forge.js` / forge lanes), rigging- (`rig_mesh` MCP tool internals under `api/_mcp3d/`), optimization/remesh/gameready/stylize- (`api/forge-*.js`). **This prompt must not depend on prompt 14 having run** — call the- underlying stage modules, not the x402 wrapper routes.-- x402 pattern: `paidEndpoint`/`buildBazaarSchema`/`declareHttpDiscovery`/`priceFor` — read- `api/x402/forge.js` end to end first; it already does paid-job-submit + free-poll and is- your closest template.-- Pricing: per-stage price table inside the route (env-overridable via `priceFor` slugs like- `pipeline-stage-rig`); the quoted job price = sum of requested stages. The 402 challenge- must quote the exact total for the requested chain.--## Tasks--1. Request contract:- `{ stages: [...], prompt?, glb_url?, options?: { per-stage } }` where `stages` is an- ordered subset of `['generate','rig','remesh','gameready','stylize']`. Validate hard:- `generate` requires `prompt` and must be first; without `generate`, `glb_url` is required;- reject unknown stages/invalid orders with a 400 explaining the valid grammar. Only offer- stages whose backing module you verified working (triage like prompt 14; exclude broken- ones from the grammar and say so in the description).-2. Execution: on settlement, enqueue/run the chain (mirror how `api/x402/forge.js` handles- async work on Vercel — if it runs work inline/deferred, follow the same mechanism).- Persist per-stage progress into the job record: `stages: [{ id, status, started_at,- finished_at, output_url?, error? }]` so polling shows WHERE the job is.-3. Failure semantics: a stage failure marks the job `failed` at that stage with the completed- stages' outputs still available in the result (partial value delivered, honestly labeled).- Anything that can be validated pre-settlement (inputs, lane env availability) throws- BEFORE payment settles.-4. Poll path: reuse the existing free forge poll route — extend its job-shape handling if the- pipeline record differs (keep backward compatibility for plain forge jobs; existing tests- must stay green).-5. Bazaar description, uniqueness first: "One call, full 3D asset pipeline — text or GLB in,- rigged/optimized game-ready GLB out; the only asset pipeline in the x402 ecosystem. Priced- per stage, quoted exactly in the 402 challenge."-6. **Verify one real end-to-end job**: `stages: ['generate','rig']` (or the cheapest working- pair), poll to completion, download the final GLB, confirm magic bytes + rig present- (inspect for skinned mesh / bones — `api/x402/model-check.js` internals report skeleton- stats). Record evidence in your report.-7. **Tests** in `tests/api/x402-pipeline.test.js`: grammar validation matrix, price quoting- per chain, per-stage progress shape, partial-failure semantics, poll compatibility.- Stage-module boundaries fixture-backed. Targeted vitest + `npm run audit:x402-catalog`- until green.-8. **Docs:** section in `docs/3d-pipeline.md` if it exists, else `docs/api-reference.md` —- the chain grammar, one runnable example, pricing. Changelog entry (`feature`).-9. Commit (explicit paths) and push per 00-CONTEXT.--## Definition of done--One paid call runs a validated stage chain to a real verified GLB with per-stage progress,-exact price quoting, honest partial-failure semantics, tests + audit green, docs + changelog-shipped, committed, pushed.diff --git a/prompts/x402-catalog/16-embodiment-endpoint.md b/prompts/x402-catalog/16-embodiment-endpoint.mddeleted file mode 100644index 733187cb5..000000000--- a/prompts/x402-catalog/16-embodiment-endpoint.md+++ /dev/null@@ -1,72 +0,0 @@-# 16 — Embodiment: `POST /api/x402/embody` — an agent buys itself a body--Read `prompts/x402-catalog/00-CONTEXT.md` first and obey every rule in it. Work alone, finish-100%, never ask questions.--## Mission--The company thesis — give every AI agent a 3D body — is absent from the x402 catalog. Ship one-paid call: agent description (or selfie URL) in → rigged 3D avatar + voice + one-tag embed-snippet out. An external agent on any framework pays ~$1 USDC and gets an embeddable, animated,-talking presence. This is the flagship listing.--## Context--All the parts exist; this prompt wires them into one purchasable call. Spend real time on-discovery before writing code — read, in order:-- **Avatar generation:** the `forge_avatar` MCP tool implementation (grep under `api/_mcp3d/`)- — it already chains mesh generation + auto-rigging with a humanoid gate. Also- `text_to_avatar`. Reuse whichever chain is solid; note its latency profile (job-based?).-- **Agent records:** `api/agents.js` + `api/agents/` — how a three.ws agent is created/stored- (id, name, personality, model GLB, voice). The embody call should create a real agent record- so the result plugs into everything agents already get (profile page, chat, embed).-- **Embed:** the one-tag embed surface — `api/embed/`, `public/`/`src/` embed widget code, and- how existing agent embeds are generated (grep for the embed snippet template / `<script`- tag with an agent id). `tests/api/agents-embed.test.js` exists — read it.-- **Voice:** how agents get a TTS voice today (`api/tts/voices.js`, agent record fields,- `tests/api/agents-voice.test.js`).-- **x402 job pattern:** `api/x402/forge.js` (paid submit + free poll via- `api/_lib/forge-job-token.js`). Avatar generation is slow — embody MUST be job-based:- paid submit returns a job token; free polling returns progress then the final bundle.--## Tasks--1. Contract: `POST /api/x402/embody`- `{ name, prompt?, image_url?, personality?, voice? }` — exactly one of `prompt`/`image_url`- required; `name` required (≤64 chars); `voice` optional (validate against the real voice- list; default sensibly). 400s with precise messages.-2. On settlement: run the avatar chain (reuse `forge_avatar` internals — humanoid gate- included; a non-humanoid result follows the platform's existing fallback semantics, never a- T-pose), create the agent record with the generated GLB + personality + voice, produce the- embed snippet.-3. Final job result:- `{ agent_id, glb_url, viewer_url, profile_url, embed_html, voice, chat_url }` — every URL- must actually resolve (verify in your end-to-end test). `embed_html` is the real one-tag- embed other agent embeds use.-4. Price: `priceFor('embody', '1000000')` ($1.00). Bazaar description, uniqueness first:- "Give your agent a 3D body — one x402 call returns a rigged, animated, talking avatar plus- a one-tag embed for any website. The only embodiment endpoint in the x402 ecosystem.- $1 USDC, no account."-5. Anything validatable pre-settlement (inputs, lane env, voice id) throws BEFORE payment;- post-settlement chain failures mark the job failed with a clear stage + reason (and note in- the description that generation failures are re-runnable via the returned job semantics —- match whatever retry story forge jobs already have).-6. **Verify one real end-to-end embody**: run the chain (bypass payment the same way existing- x402 tests/dev flows do — find the dev/test settlement path in `api/_lib/- x402-paid-endpoint.js` or existing tests), poll to done, open every returned URL, load the- embed snippet on a blank local page (`npm run dev`) and confirm the avatar renders and- idles. Record evidence (URLs, agent id) in your report.-7. **Tests** in `tests/api/x402-embody.test.js`: validation matrix, job lifecycle shape,- agent-record creation, embed snippet correctness (matches the real embed template), voice- validation. Chain boundaries fixture-backed with real captured shapes. Targeted vitest +- `npm run audit:x402-catalog` until green.-8. **Docs:** `docs/embody.md` linked from `docs/start-here.md` — the story, the contract, one- runnable example, what the buyer gets. Changelog entry (`feature`), holder-readable: agents- can now buy themselves a 3D body in one call.-9. Commit (explicit paths) and push per 00-CONTEXT.--## Definition of done--One paid call produces a real agent with a rendering, embeddable, voiced avatar — verified-end-to-end in a browser; every returned URL live; tests + audit green; docs + changelog-shipped; committed, pushed.diff --git a/prompts/x402-catalog/17-x402-dev-toolkit.md b/prompts/x402-catalog/17-x402-dev-toolkit.mddeleted file mode 100644index 86a7d7d9b..000000000--- a/prompts/x402-catalog/17-x402-dev-toolkit.md+++ /dev/null@@ -1,63 +0,0 @@-# 17 — x402 developer toolkit: echo, debugger, receipt verifier--Read `prompts/x402-catalog/00-CONTEXT.md` first and obey every rule in it. Work alone, finish-100%, never ask questions.--## Mission--Make three.ws the test bench every x402 developer uses. Three free tools — a payment echo, a-402-exchange debugger, and an attestation/receipt verifier — plus one docs page consolidating-the half-hidden dev endpoints that already exist (`schema-check`, `rate-limit-probe`,-`permit2-paid-demo`). Every developer who tests against us discovers the paid catalog. This is-the cheapest distribution we can buy.--## Context--- Read first: `api/x402/schema-check.js`, `api/x402/rate-limit-probe.js`,- `api/x402/permit2-paid-demo.js` (what they already cover — don't duplicate),- `api/_lib/x402-paid-endpoint.js` (the settlement rail and how a payment envelope is parsed/- verified), `api/_lib/x402-spec.js` (schema builders/validators), and the attestation scheme- used by fact-check/tutor (grep `attestation` / `sha-256` under `api/x402/` and `api/_lib/`).-- The platform also runs a facilitator (`api/x402-facilitator/`) — the debugger should reuse- its verification primitives rather than re-implementing signature checks.-- All three new tools are FREE and must be bazaar-discoverable (facilitators index free- resources too — see how `dance-tip` declares Free, and how `declareHttpDiscovery` +- `THREEWS_SERVICE` work in `api/_lib/x402/bazaar-helpers.js`). Rate limit each per-IP- (30/min) — free ≠ abusable.--## Tasks--1. **Echo** — `POST /api/x402/echo`: returns exactly what the caller's request looked like- from a server's perspective: method, relevant headers (payment header parsed if present —- decoded envelope with signature fields REDACTED to prefixes), body, and — when a payment- payload is present — the rail's verification verdict (valid/invalid + why) WITHOUT- settling. This is "httpbin for x402".-2. **Debugger** — `POST /api/x402/debug`: caller pastes a JSON blob of their failed exchange- (`{ challenge?, payment?, response? }` — any subset) and gets a structured diagnosis:- schema problems (via `x402-spec` validators), network/chain mismatches, amount mismatches,- expiry issues, common footguns (wrong `x402Version`, base-vs-solana confusion, atomics vs- decimal). Diagnosis list format: `[{ severity, field, problem, fix }]`. Cover at minimum- the failure modes our own rail can produce — enumerate them from- `x402-paid-endpoint.js`'s error paths.-3. **Receipt verifier** — `GET/POST /api/x402/verify-receipt`: given an attestation object- from any three.ws paid response (fact-check/tutor style SHA-256 attestations), recompute- and confirm/deny integrity; given a settlement tx reference, check it on the right chain- (reuse facilitator/x402 lib primitives). Response says exactly what was and wasn't- verifiable.-4. All three: precise 400s on malformed input, free-tier rate limit, bazaar discovery with- descriptions whose first sentence targets developers ("Debug your x402 integration- against a live server — free").-5. **Tests** in `tests/api/x402-dev-toolkit.test.js`: echo redaction (no full signatures in- output — assert), debugger diagnosis matrix (feed it real captured malformed exchanges —- generate them by calling our own rail wrongly in the test), receipt verifier- confirm/deny/partial cases. Targeted vitest + `npm run audit:x402-catalog` until green.-6. **Docs:** new `docs/x402-dev-tools.md` linked from `docs/start-here.md` — all SIX dev- tools (three new + schema-check + rate-limit-probe + permit2-paid-demo), each with a- runnable curl and what it's for. Changelog entry (`feature`): free x402 developer toolkit.-7. Commit (explicit paths) and push per 00-CONTEXT.--## Definition of done--Three free dev tools live and discoverable, signatures never echoed whole, diagnosis covers-our rail's real failure modes, docs page unifies all six tools, tests + audit green, changelog-shipped, committed, pushed.diff --git a/prompts/x402-catalog/18-storefront-cleanup.md b/prompts/x402-catalog/18-storefront-cleanup.mddeleted file mode 100644index abf023621..000000000--- a/prompts/x402-catalog/18-storefront-cleanup.md+++ /dev/null@@ -1,72 +0,0 @@-# 18 — Storefront cleanup: delist demos, kill dead weight, rewrite every description--Read `prompts/x402-catalog/00-CONTEXT.md` first and obey every rule in it. Work alone, finish-100%, never ask questions.--## Mission--The x402scan listing currently mixes three real products with fourteen demos and wrappers,-and the junk destroys trust in the whole server. Delist the internal demos (they keep working-for their pages), remove the endpoints with no honest buyer, and rewrite every surviving-description so its FIRST sentence answers "what can I get here that I can't get anywhere-else?" — owner-reviewed strategy, approved 2026-07-06.--## Context--- Discovery mechanics: `api/_lib/x402/bazaar-helpers.js` — `declareHttpDiscovery({...})`- produces the bazaar extension; a resource with `discoverable: false` keeps settling payments- but stops being indexed by facilitators. Read the helper to confirm the exact flag shape- before using it.-- The catalog audit: `npm run audit:x402-catalog` — run it before AND after; it must be green- after. Tests referencing endpoint descriptions live under `tests/` (grep each endpoint slug)- and must be updated in the same change.-- Decisions (made by the owner — execute, don't relitigate):- - **Delist (discoverable: false), keep functioning:** `dance-tip` (drives /club),- `three-intel` (drives the /play kiosk), `crypto-intel` (drives /agent-exchange). Their- pages must keep working exactly as before — verify each page's flow still calls its- endpoint successfully.- - **Remove entirely:** `api/insights/revenue-vision` and `api/x402/tutor.js` — delete the- routes, their tests, and every reference (grep the slugs across the repo: docs, catalogs,- SKU lists like `api/x402-skus.js`, MCP declarations). If something internal genuinely- consumes tutor (grep first), delist instead of delete and say so in your report.- - **Delist the paid `pump-agent-audit`** (a free whale surface replaces it in another- prompt; the paid "oracle" framing is dishonest) — delist, don't delete.- - **De-decorate:** `symbol-availability` — remove the fake "bullish/bearish oracle signal"- field from response + description; it's a collision checker, sell it as exactly that.- - **Keep + rewrite descriptions:** `forge`, `vanity` (+`vanity-premium`,- `vanity-verifiable` if listed), `pump-launch`, `mint-to-mesh` + `mint-to-mesh-batch`,- `model-check`, `mcp` (`POST /api/mcp`), `onchain-identity-verify`, `agent-reputation`,- `skill-marketplace`, `fact-check`, `symbol-availability`.-- Description rules: first sentence = the uniqueness claim, concrete and true. Then input →- output, price, chain(s). ≤ ~600 chars where the schema allows. No emoji, no hype adjectives,- no "oracle" unless it reports real derived data. `skill-marketplace` currently ships an- EMPTY description — read `api/x402/skill-marketplace.js`, understand what it actually does,- and write the real one. `agent-reputation`'s description must state plainly that it scores- three.ws-registered agents (scoping honesty).--## Tasks--1. Inventory: list every resource currently declaring bazaar discovery (grep- `declareHttpDiscovery` / `declareMcpDiscovery` under `api/`). Produce the before-table for- your report.-2. Apply the delistings, removals, and de-decoration above. For each delisted page-driving- endpoint, exercise its page flow (`npm run dev`, drive /club tip, /play kiosk, or the- page's API call path — or its existing test) and confirm unchanged behavior.-3. Rewrite all keeper descriptions per the rules; update the corresponding- `buildBazaarSchema` metadata and tags (≤5 tags, ≤32 chars each) so tags reflect reality- (`3d`, `solana`, `x402`, `dev-tools`, …).-4. Update every test that asserted old descriptions/fields; delete tests of removed routes.-5. Run `npm run audit:x402-catalog` + targeted vitest for every touched test file until- green. Grep the removed slugs repo-wide — zero dangling references (docs, SKUs, catalogs,- `data/pages.json` if any page linked them).-6. **Docs:** update `docs/api-reference.md` to drop removed endpoints and reflect new- descriptions. Changelog entry (`improvement`), holder-readable: the x402 catalog was- curated — every listed resource is now a real product with an honest description.-7. Commit (explicit paths — this touches many files; review `git diff --staged` line by line)- and push per 00-CONTEXT.--## Definition of done--Catalog shows only honest, uniquely-valuable listings; demo pages still work; removed slugs-have zero dangling references; audit + tests green; docs + changelog updated; committed,-pushed.diff --git a/prompts/x402-catalog/19-vanity-instant-inventory.md b/prompts/x402-catalog/19-vanity-instant-inventory.mddeleted file mode 100644index 0dadf56b4..000000000--- a/prompts/x402-catalog/19-vanity-instant-inventory.md+++ /dev/null@@ -1,68 +0,0 @@-# 19 — Instant vanity: serve pre-ground addresses from inventory--Read `prompts/x402-catalog/00-CONTEXT.md` first and obey every rule in it. Work alone, finish-100%, never ask questions.--## Mission--The vanity grinder is one of the catalog's three real products, but grinding happens at-request time. An inventory of pre-ground addresses turns it into INSTANT delivery and unlocks-longer prefixes at premium prices, plus an upsell into pump-launch ("launch with a-`pump`-suffix mint, delivered in seconds").--## Context--- **In-flight work exists — build on it, don't duplicate it.** A parallel GCP-credits campaign- includes vanity inventory: read `prompts/gcp-credits/06-vanity-inventory.md` (its plan) and- the working tree's `api/_lib/vanity-inventory-store.js` (possibly uncommitted /- half-complete — `git status`, `git log --oneline -3 -- api/_lib/vanity-inventory-store.js`).- Whatever state you find is your starting point: complete the store if incomplete, then do- the product wiring below. Do not fight or rewrite working in-flight code.-- Current product: `api/x402/vanity.js` (read fully — pricing tiers, keypair vs mnemonic- formats, `sealTo` ECIES sealing, the never-stored guarantee), plus `api/x402/- vanity-premium.js` and `api/x402/vanity-verifiable.js`.-- **Security invariants (non-negotiable):** inventory entries' secrets must be stored- encrypted at rest (the store should already address this — verify; if it doesn't, encrypt- with a server-side key from env before persisting), each entry is served EXACTLY ONCE- (atomic claim — no double-sell under concurrent requests), and a served entry is deleted- immediately. `sealTo` sealing must work for inventory-served results identically to- ground-on-demand results. State plainly in the endpoint description that inventory- addresses were pre-generated server-side and never re-served.-- Launch upsell: `api/x402/pump-launch.js` already supports vanity prefix/suffix grinding —- read how, and route it through inventory when a matching entry exists.--## Tasks--1. Audit the store: schema, encryption at rest, atomic claim semantics. Complete/fix what's- missing. Add a concurrency test proving no double-claim (two simultaneous claims of the- last matching entry → exactly one wins).-2. Wire `api/x402/vanity.js`: on a paid request, check inventory for a matching- prefix/suffix/format entry FIRST → instant delivery (claim + serve + delete); no match →- grind as today. Response includes `source: 'inventory' | 'ground'` and honest timing.-3. Extend offered patterns: inventory makes longer prefixes viable (4–5 Base58 chars) at- premium prices — add tiers priced meaningfully above the grind cap (e.g. 4 chars $2.50,- 5 chars $10, env-overridable via `priceFor`), offered ONLY when inventory holds a match- (the 402 quote for an unavailable pattern must say "not in stock — grindable range is …").-4. Inventory replenishment: a maintenance path that grinds ahead of demand — check what the- gcp-credits campaign planned (GPU workers?) and wire the trigger the repo supports today- (a `scripts/` grinder script + an `api/cron/` hook if a cron surface exists — read- `api/cron/` to see the platform's pattern). No GitHub Actions.-5. Pump-launch upsell: when `pump-launch` gets vanity params, consult inventory first (shared- claim path — same atomicity), fall back to grinding. Update its description to advertise- instant vanity when in stock.-6. **Tests** in `tests/api/vanity-inventory.test.js`: claim atomicity (the concurrency test),- serve-once + delete, seal-to on inventory results, source field, out-of-stock 402 quote- messaging, pump-launch inventory path. Targeted vitest + `npm run audit:x402-catalog`- until green.-7. **Docs:** update the vanity section of `docs/api-reference.md` (tiers table, instant vs- ground). Changelog entry (`feature`): vanity addresses now deliver instantly from- pre-ground inventory, with longer patterns available.-8. Commit (explicit paths; coordinate with in-flight files — if `vanity-inventory-store.js`- was uncommitted when you started, committing your completed version of it is correct;- note it in your report) and push per 00-CONTEXT.--## Definition of done--Inventory-backed instant delivery live with proven serve-once atomicity and encrypted-at-rest-secrets, premium long-pattern tiers quoted honestly, pump-launch upsell wired, replenishment-path real, tests + audit green, docs + changelog shipped, committed, pushed.diff --git a/prompts/x402-catalog/20-fact-check-v2.md b/prompts/x402-catalog/20-fact-check-v2.mddeleted file mode 100644index fa0a440c0..000000000--- a/prompts/x402-catalog/20-fact-check-v2.md+++ /dev/null@@ -1,61 +0,0 @@-# 20 — Fact-check v2: free sample lane + published accuracy benchmark--Read `prompts/x402-catalog/00-CONTEXT.md` first and obey every rule in it. Work alone, finish-100%, never ask questions.--## Mission--Fact-check is one of the catalog's defensible products — sourced verdicts with SHA-256-attestations ARE useful to agents — but at $0.10 with zero proof of quality, nobody tries it.-Fix the funnel: a free sample lane, and a published accuracy benchmark that makes the quality-claim checkable instead of asserted.--## Context--- Read `api/x402/fact-check.js` end to end: the search + LLM analysis chain, verdict taxonomy- (supported/contradicted/mixed/insufficient), authority weighting, strictness parameter,- attestation scheme, cost breakdown, which env vars it needs.-- Free-lane mechanics: per-IP daily quota (suggested 3 free checks/day) via the platform's- quota mechanism (`api/_lib/rate-limit.js` or the daily pattern used elsewhere — find it);- above quota → the existing 402. Free-lane responses are complete real checks (same chain),- marked `lane: 'free'` — never a degraded fake.-- Benchmark: a committed suite of claims with KNOWN verdicts, spanning all four verdict- classes and difficulty levels. Claims must be time-stable (not "X is the current president"- — verdicts that won't drift), non-partisan, and include crypto-domain claims where token- references follow the $THREE rule (use $THREE or protocol-generic facts like "Solana uses- proof of history", never third-party coin promotion).--## Tasks--1. **Free lane.** Implement the quota + fall-through on the existing route. The 402 for- over-quota callers states the reset time and the paid price. Response schema gains `lane`.-2. **Benchmark suite.** `tests/fixtures/fact-check-benchmark.json`: ≥40 claims —- 10 per verdict class — each `{ claim, expected_verdict, rationale, difficulty }`. Write- them yourself with care; they are the product's quality bar.-3. **Benchmark runner.** `scripts/fact-check-benchmark.mjs`: runs the suite through the REAL- chain (requires the env vars; exits with a clear message naming them if absent), scores- accuracy overall + per class + per difficulty, writes- `data/_generated/fact-check-benchmark.json` (score, per-class table, run date, chain- config). Run it for real; if env is present, commit the genuine results. If the env- genuinely isn't available locally, ship the runner + a `not yet run in this environment`- state on the page (see next task) that renders honestly — never fabricate scores.-4. **Public accuracy page.** `/fact-check` page (follow the repo's page pattern; entry in- `data/pages.json`; `npm run build:pages` green): what the service does, how the benchmark- works (link the claims file — transparency is the point), latest scores from the generated- JSON (designed empty state when unrun), a live "try one free check" box calling the real- endpoint from the browser (loading/error/result states designed), and the x402 pricing.-5. **Description update.** Rewrite the bazaar description: first sentence = uniqueness- ("Sourced fact-checking with cryptographic attestations — verdicts you can audit, with a- published accuracy benchmark"), mention the free daily lane.-6. **Tests** in `tests/api/fact-check-v2.test.js`: quota fall-through, `lane` field, benchmark- fixture schema validation (all classes covered, ≥40 entries), runner scoring math against- a synthetic result set. Targeted vitest + `npm run audit:x402-catalog` until green.-7. **Docs:** update fact-check coverage in `docs/api-reference.md`. Changelog entry- (`improvement`): fact-check now has a free daily lane and a public accuracy benchmark.-8. Commit (explicit paths) and push per 00-CONTEXT.--## Definition of done--Free lane real and quota'd, benchmark suite + runner shipped (real scores committed if env-allows; honest unrun state otherwise), `/fact-check` page live and browser-verified, rewritten-listing, tests + audit green, docs + changelog shipped, committed, pushed.diff --git a/prompts/x402-catalog/21-token-security-v1.md b/prompts/x402-catalog/21-token-security-v1.mddeleted file mode 100644index 6a2ea9b44..000000000--- a/prompts/x402-catalog/21-token-security-v1.md+++ /dev/null@@ -1,64 +0,0 @@-# 21 — Token security check: free rug/risk signals under `/api/v1/token/security`--Read `prompts/x402-catalog/00-CONTEXT.md` first and obey every rule in it. Work alone, finish-100%, never ask questions.--## Mission--The one question every trading agent asks before touching a token: "is this a rug?" Ship a-free endpoint that answers it with on-chain facts — mint/freeze authority status, holder-concentration, liquidity depth, token age — composed into a risk report. Facts, not scores-pulled from thin air.--## Context--- Native v1 route → `api/v1/token/security.js`, registered in `api/v1/_catalog.js` (read its- entry contract). Match the handler style of existing v1 routes (`wrap`/`json`/`error` from- `api/_lib/http.js`).-- Data sources (all keyless or already-configured — compose, don't proxy):- - Solana RPC (use the platform's existing RPC resolution — read `api/solana-rpc.js` and- `api/_lib` for the env): `getAccountInfo` on the mint (jsonParsed) → `mintAuthority`,- `freezeAuthority`, `supply`, `decimals`; `getTokenLargestAccounts` → concentration.- - DexScreener (keyless; the repo already normalizes it in `api/_lib/token-market.js` —- reuse) → liquidity USD, pair age, volume.- - `api/_lib/token-market.js` also exports `buildTokenRisk` — read it first; if it already- computes part of this, reuse it and extend rather than duplicating.-- Response contract (every field present; `null` when unresolvable, never omitted, never- faked):- `{ address, chain: 'solana', mint_authority: { revoked: bool|null, address: string|null },- freeze_authority: { revoked, address }, supply, decimals,- top_holders: { top1_pct, top5_pct, top10_pct, holders_sampled },- liquidity: { usd, largest_pair, pair_created_at },- flags: [ ...string ], ts }`- where `flags` are factual, e.g. `mint_authority_active`, `freeze_authority_active`,- `top1_holder_over_20pct`, `liquidity_under_10k`, `pair_younger_than_24h`. No composite- "risk score", no bullish/bearish — agents weigh facts themselves.-- EVM (`0x…`) input: return 400 with a clear "solana only (for now)" message — do not- half-build EVM support.-- Example mint everywhere: the $THREE CA `FeMbDoX7R1Psc4GEcvJdsbNbZA3bfztcyDCatJVJpump`.- Never a real third-party mint in code, tests, or docs.--## Tasks--1. Read the context modules; curl the real RPC + DexScreener for the $THREE mint and record- shapes.-2. Implement `GET /api/v1/token/security?address=<mint>` per the contract. Partial upstream- failure degrades per-section to `null`s + a `sources` array naming what answered — the- call succeeds if ANY section resolved; 503 only when everything failed.-3. Public, keyless, per-IP rate limit 20/min (reuse `api/_lib/rate-limit.js`),- `cache-control` 60s.-4. Register in `api/v1/_catalog.js` — summary first sentence: "Rug-check any Solana token in- one free call: authority status, holder concentration, liquidity depth — on-chain facts,- no invented scores."-5. **Tests** in `tests/api/v1-token-security.test.js`: full report against captured- real-shaped fixtures, each flag's trigger condition, partial-failure nulls + sources,- EVM 400, unresolvable mint 404, rate limit, catalog entry present. Targeted vitest until- green.-6. **Docs:** `docs/api-reference.md` entry with a runnable curl ($THREE mint). Changelog- entry (`feature`): free token security checks — authorities, concentration, liquidity.-7. Commit (explicit paths) and push per 00-CONTEXT.--## Definition of done--One free call turns a mint into a factual security report with honest per-section-degradation, tests green, catalog + docs + changelog updated, committed, pushed.diff --git a/prompts/x402-overhaul/01-crypto-token-snapshot.md b/prompts/x402-overhaul/01-crypto-token-snapshot.mddeleted file mode 100644index 7503b5b56..000000000--- a/prompts/x402-overhaul/01-crypto-token-snapshot.md+++ /dev/null@@ -1,47 +0,0 @@-# 01 — Free Crypto Data API: Token Snapshot--Read `prompts/x402-overhaul/00-CONTEXT.md` first, then `/workspaces/three.ws/CLAUDE.md`.-Independent work order — completes fully on its own.--## Agent use-case (name it in the docs)-A trading/research agent has a token address and needs its current market state in one call-before deciding to buy, alert, or ignore. Today it has to juggle DexScreener + an RPC + a-price API. We give it one clean free call.--## Build — `GET /api/crypto/token`-- New file `api/crypto/token.js`, free plain-handler pattern (00-CONTEXT "Free endpoint- pattern": `cors`/`wrap`/`error` from `_lib/http.js`, rate-limit via `clientIp`+`limits`).-- Input: `?address=<mint|pair|contract>&chain=<solana|base|...>` (chain optional; infer from- address shape when omitted — Solana base58 vs 0x EVM).-- Data: DexScreener (keyless) for price/liq/mcap/volume/24h-change; `_lib/sol-price.js` /- `_lib/token-market.js` / `_lib/token-metadata.js` to enrich name/symbol/decimals. Prefer- keyless sources; enrich with Helius/Birdeye only if keys exist (else `null`, per- "never blocked").-- Output (stable schema): `{ address, chain, name, symbol, priceUsd, change24h, marketCapUsd,- liquidityUsd, volume24hUsd, fdvUsd, pairCreatedAt, dexId, url, ts, sources[] }`.-- Every field that couldn't be resolved = `null`, never omitted, never faked.--## Catalog registration-Drop `api/_lib/crypto-catalog/token.js` exporting `{ slug:'token', method:'GET',-path:'/api/crypto/token', title, summary, inputSchema, outputSchema, example }`. (The-`/api/crypto` index in prompt 10 globs this dir; if it doesn't exist yet, your file still-stands alone — no dependency.)--## States to handle-Unknown/invalid address → 400 with a clear message + example. Token found but thin data-(new launch, no pair) → 200 with the fields you have + the rest `null`. Upstream (DexScreener)-down → 200 from RPC/meta fallback where possible, else 503 with a retry hint. Rate-limited →-429. Never 500 on a well-formed request.--## Tests (`tests/`)-Schema shape always present; address-type inference (Solana vs EVM); graceful-degradation-path (simulate no key → keyless fields still return); use `$THREE` (CA in 00-CONTEXT) or a-synthetic mint in fixtures, never a real third-party mint.--## Definition of done-Inherit 00-CONTEXT's DoD + anti-laziness gates. Additionally:-- [ ] Live call against a real token (use `$THREE`) captured in PROGRESS.md with real JSON.-- [ ] Docs: add this endpoint to `docs/crypto-api.md` (create if absent; prompt 11 expands- it — your section stands alone) with a runnable `curl` example and the named use-case.-- [ ] `data/changelog.json`: entry (tags: `feature`, `sdk`) — "Free crypto token snapshot API- for AI agents".diff --git a/prompts/x402-overhaul/02-crypto-token-security.md b/prompts/x402-overhaul/02-crypto-token-security.mddeleted file mode 100644index 71501f24d..000000000--- a/prompts/x402-overhaul/02-crypto-token-security.md+++ /dev/null@@ -1,41 +0,0 @@-# 02 — Free Crypto Data API: Token Security / Rug Signals--Read `prompts/x402-overhaul/00-CONTEXT.md` first, then `/workspaces/three.ws/CLAUDE.md`.-Independent work order — completes fully on its own.--## Agent use-case (name it in the docs)-Before an agent buys or LPs into a token, it needs a fast "is this a honeypot / rug?" read:-mint & freeze authority, LP status, top-holder concentration flag, tax/transfer restrictions.-This is the single most-requested pre-trade check in crypto agent workflows — and a free,-honest version is a magnet.--## Build — `GET /api/crypto/security`-- New file `api/crypto/security.js`, free plain-handler pattern (00-CONTEXT).-- Input: `?address=<mint>&chain=<solana|base>`.-- Solana: read mint account via `_lib/solana/*` / `api/solana-rpc.js` — mint authority,- freeze authority, supply, decimals; `_lib/token-metadata.js` / `solana-token-meta.js` for- metadata mutability. Pull LP/liquidity from DexScreener. Concentration from prompt-03's- data source if a key exists, else a coarse keyless flag.-- Output: `{ address, chain, checks: { mintAuthorityRevoked, freezeAuthorityRevoked,- metadataMutable, lpBurnedOrLocked, liquidityUsd, topHolderPctFlag }, riskLevel:- 'low'|'medium'|'high'|'unknown', reasons[], ts, sources[] }`. `riskLevel` derived from the- boolean checks with a documented, deterministic rule — NOT an LLM opinion.-- Be honest: unknowns are `unknown`/`null`, never guessed. Document the exact rule that maps- checks → riskLevel in the docs.--## Catalog registration-Drop `api/_lib/crypto-catalog/security.js` (same entry shape as 00-CONTEXT / prompt 01).--## States-Invalid mint → 400. New token, no LP yet → 200 with `lpBurnedOrLocked:null`, riskLevel may be-`high`/`unknown` per rule. RPC down → 503 + retry hint. Never fabricate a "safe" verdict.--## Tests-Deterministic riskLevel rule (given checks → expected level); revoked vs live authority-parsing; keyless-only degradation. Fixtures use `$THREE` or synthetic mints.--## Definition of done-Inherit 00-CONTEXT DoD + gates. Plus:-- [ ] Live call on a real token captured in PROGRESS.md.-- [ ] `docs/crypto-api.md` section with the check list, the riskLevel rule, curl example, use-case.-- [ ] `data/changelog.json` (tags: `feature`,`security`) — "Free token safety / rug-signal API".diff --git a/prompts/x402-overhaul/03-crypto-token-holders.md b/prompts/x402-overhaul/03-crypto-token-holders.mddeleted file mode 100644index 51266f4ff..000000000--- a/prompts/x402-overhaul/03-crypto-token-holders.md+++ /dev/null@@ -1,35 +0,0 @@-# 03 — Free Crypto Data API: Holders & Concentration--Read `prompts/x402-overhaul/00-CONTEXT.md` first, then `/workspaces/three.ws/CLAUDE.md`.-Independent work order — completes fully on its own.--## Agent use-case (name it in the docs)-An agent sizing a position needs holder distribution: how many holders, what % the top 10-hold, whether the dev/insiders still dominate. High concentration = exit risk. One free call.--## Build — `GET /api/crypto/holders`-- New file `api/crypto/holders.js`, free plain-handler pattern (00-CONTEXT).-- Input: `?address=<mint>&chain=<solana>&limit=<N default 10, max 50>`.-- Data: Helius / Birdeye (`_lib/helius.js`, `_lib/birdeye.js`) for holder lists if keys- exist; otherwise derive top holders from Solana RPC `getTokenLargestAccounts` + supply- (keyless) for a coarse-but-real top-N. Never mock — if only keyless is available, return- the keyless truth and mark `source`.-- Output: `{ address, chain, holderCount, top: [{ owner, amount, pct }], top10Pct,- concentration: 'low'|'medium'|'high'|'unknown', ts, sources[] }`. `concentration` from a- documented threshold on `top10Pct`.--## Catalog registration-Drop `api/_lib/crypto-catalog/holders.js` (entry shape per 00-CONTEXT).--## States-Invalid mint → 400. Brand-new token → 200 with whatever holders exist. No key + RPC gives-only largest accounts → 200 with `holderCount:null`, top-N present, noted. Never 500.--## Tests-top10Pct math; concentration thresholds; keyless RPC fallback path. `$THREE`/synthetic fixtures.--## Definition of done-Inherit 00-CONTEXT DoD + gates. Plus:-- [ ] Live call captured in PROGRESS.md.-- [ ] `docs/crypto-api.md` section (thresholds documented) + curl + use-case.-- [ ] `data/changelog.json` (tags: `feature`) — "Free holder distribution / concentration API".diff --git a/prompts/x402-overhaul/04-crypto-pumpfun-launches.md b/prompts/x402-overhaul/04-crypto-pumpfun-launches.mddeleted file mode 100644index b54f8229d..000000000--- a/prompts/x402-overhaul/04-crypto-pumpfun-launches.md+++ /dev/null@@ -1,40 +0,0 @@-# 04 — Free Crypto Data API: Live pump.fun Launches--Read `prompts/x402-overhaul/00-CONTEXT.md` first, then `/workspaces/three.ws/CLAUDE.md`.-Independent work order — completes fully on its own.--## Agent use-case (name it in the docs)-A sniper/discovery agent wants the freshest pump.fun launches with enough signal to filter:-name, symbol, mint, age, current market cap, bonding-curve progress, dev wallet. A free live-feed is exactly what agents poll.--## Build — `GET /api/crypto/launches`-- New file `api/crypto/launches.js`, free plain-handler pattern (00-CONTEXT).-- Input: `?limit=<N default 20, max 100>&minMarketCap=<usd optional>&maxAgeMin=<optional>`.-- Data: reuse the existing pump.fun feed helpers — `_lib/pump-launch-feed.js`,- `_lib/pumpfun-ws-feed.js`, `_lib/agent-pumpfun.js`, `_lib/pump-trending-score.js`. Do NOT- build a new scraper; wrap what exists. If those helpers expose more than we surface, surface- the useful fields.-- Output: `{ launches: [{ mint, name, symbol, createdAt, ageMinutes, marketCapUsd,- bondingProgressPct, dev, url, imageUrl }], count, ts, source }`. Sorted newest first;- respect filters.--## Catalog registration-Drop `api/_lib/crypto-catalog/launches.js` (entry shape per 00-CONTEXT).--## States-No launches match filter → 200 `{ launches: [], count: 0 }` with a note, not an error. Feed-source momentarily empty/down → 200 with last-known or empty + `source` note; never 500.-Cap limit at 100.--## Tests-Filter logic (minMarketCap, maxAgeMin, limit cap); field mapping from the feed helper;-empty-result shape. Use synthetic/`$THREE` fixtures — never commit a real third-party mint.--## Definition of done-Inherit 00-CONTEXT DoD + gates. Plus:-- [ ] Live call captured in PROGRESS.md (real recent launches).-- [ ] `docs/crypto-api.md` section + curl + use-case.-- [ ] `data/changelog.json` (tags: `feature`) — "Free live pump.fun launches feed for agents".-- [ ] Note in PROGRESS: this pairs with `/api/crypto/bonding` (05) and `/api/crypto/whales`- (06) — cross-link them in docs if those pages exist.diff --git a/prompts/x402-overhaul/05-crypto-bonding-status.md b/prompts/x402-overhaul/05-crypto-bonding-status.mddeleted file mode 100644index 5c5706ef0..000000000--- a/prompts/x402-overhaul/05-crypto-bonding-status.md+++ /dev/null@@ -1,35 +0,0 @@-# 05 — Free Crypto Data API: Bonding-Curve / Graduation Status--Read `prompts/x402-overhaul/00-CONTEXT.md` first, then `/workspaces/three.ws/CLAUDE.md`.-Independent work order — completes fully on its own.--## Agent use-case (name it in the docs)-An agent holding or watching a pump.fun token needs to know exactly where it is on the-bonding curve: % to graduation, SOL in curve, whether it has migrated to Raydium/PumpSwap.-Timing entries/exits around graduation is a core meme-trading move.--## Build — `GET /api/crypto/bonding`-- New file `api/crypto/bonding.js`, free plain-handler pattern (00-CONTEXT).-- Input: `?mint=<pump.fun mint>`.-- Data: `_lib/pump-quote.js`, `_lib/pump-launch-feed.js`, `_lib/agent-pumpfun.js`, pump curve- helpers + Solana RPC for the bonding-curve account state. Wrap existing logic; do not- reimplement the curve math if a helper already computes it.-- Output: `{ mint, onCurve, bondingProgressPct, solInCurve, tokensRemaining,- marketCapUsd, graduated, migratedTo, ts, source }`. `graduated:true` + `migratedTo` when- it has left the curve.--## Catalog registration-Drop `api/_lib/crypto-catalog/bonding.js` (entry shape per 00-CONTEXT).--## States-Not a pump.fun mint / never launched → 400 with explanation. Already graduated → 200-`graduated:true`, curve fields `null`/final. RPC down → 503 + retry. Never 500.--## Tests-Progress % math; graduated vs on-curve branch; non-pump mint rejection. Synthetic/`$THREE` fixtures.--## Definition of done-Inherit 00-CONTEXT DoD + gates. Plus:-- [ ] Live call on a real on-curve mint captured in PROGRESS.md.-- [ ] `docs/crypto-api.md` section + curl + use-case; cross-link `/api/crypto/launches`.-- [ ] `data/changelog.json` (tags: `feature`) — "Free bonding-curve status API for pump.fun tokens".diff --git a/prompts/x402-overhaul/06-crypto-whale-activity.md b/prompts/x402-overhaul/06-crypto-whale-activity.mddeleted file mode 100644index 7292766d2..000000000--- a/prompts/x402-overhaul/06-crypto-whale-activity.md+++ /dev/null@@ -1,39 +0,0 @@-# 06 — Free Crypto Data API: Whale / Large-Buy Activity--Read `prompts/x402-overhaul/00-CONTEXT.md` first, then `/workspaces/three.ws/CLAUDE.md`.-Independent work order — completes fully on its own.--## Agent use-case (name it in the docs)-An agent wants to know if big money is moving into a token (or the pump.fun market broadly)-before it commits — whale already in = price impact ahead; no whales = thin. A free read of-large buys is high-signal.--## Note on existing code-There is a PAID `api/x402/pump-agent-audit.js` doing "whale activity" for $0.02. Reuse its-data logic (`_lib/pump-volume-anomaly.js`, `_lib/gmgn-feed.js`, `_lib/agent-pumpfun.js`,-Solana RPC) but expose a FREE, cleaner version here. Do NOT delete the paid one in this-prompt (prompt 20 handles retirement decisions) — just build the free `/api/crypto/whales`.--## Build — `GET /api/crypto/whales`-- New file `api/crypto/whales.js`, free plain-handler pattern (00-CONTEXT).-- Input: `?mint=<optional — token-specific>&minSol=<default 5>&limit=<default 10, max 25>`.- With `mint`: whale buys of that token. Without: top whale wallets active across pump.fun.-- Output: `{ scope:'token'|'market', mint, whales: [{ wallet, solMoved, txHash, ts }],- whaleCount, totalSolMoved, signal:'bullish'|'bearish'|'neutral', ts, source }`. Signal from- a documented deterministic rule (buy pressure), not an LLM.--## Catalog registration-Drop `api/_lib/crypto-catalog/whales.js` (entry shape per 00-CONTEXT).--## States-No whales over threshold → 200 empty + `neutral`, not an error. Feed down → 200 last-known/-empty + note. Never 500. Cap limit at 25.--## Tests-Threshold filter; token vs market scope; signal rule; empty case. Synthetic/`$THREE` fixtures.--## Definition of done-Inherit 00-CONTEXT DoD + gates. Plus:-- [ ] Live call captured in PROGRESS.md.-- [ ] `docs/crypto-api.md` section (signal rule documented) + curl + use-case.-- [ ] `data/changelog.json` (tags: `feature`) — "Free whale-activity API for crypto agents".diff --git a/prompts/x402-overhaul/07-crypto-symbol-availability.md b/prompts/x402-overhaul/07-crypto-symbol-availability.mddeleted file mode 100644index 3427958b5..000000000--- a/prompts/x402-overhaul/07-crypto-symbol-availability.md+++ /dev/null@@ -1,40 +0,0 @@-# 07 — Free Crypto Data API: Symbol Availability--Read `prompts/x402-overhaul/00-CONTEXT.md` first, then `/workspaces/three.ws/CLAUDE.md`.-Independent work order — completes fully on its own.--## Agent use-case (name it in the docs)-An agent about to launch a token wants to check candidate tickers for collisions (exact +-fuzzy) before committing — so its brand isn't lost among clones. A free batch check is a-natural top-of-funnel for the paid Pump Launcher.--## Note on existing code-There is a PAID `api/x402/symbol-availability.js` (`< $0.01`). Move this capability to a FREE-`/api/crypto/symbol` (it's a discovery utility that should drive launcher adoption, not earn-sub-cent dust). Reuse its collision logic. Leave the retirement of the paid route to prompt-20 — but in THIS prompt, add a one-line deprecation note in the paid file's header pointing-to the free route, and stage only that file + your new files.--## Build — `GET/POST /api/crypto/symbol`-- New file `api/crypto/symbol.js`, free plain-handler pattern (00-CONTEXT).-- Input: `{ symbols: string[] (max 20), chain?: 'solana' }` (POST) or `?symbols=A,B,C` (GET).-- Data: reuse the existing symbol-collision source the paid route uses (token registries /- DexScreener / pump feed search). Exact + fuzzy match.-- Output: `{ results: [{ symbol, available, exactCollisions, fuzzyCollisions }],- availableCount, takenCount, ts }`.--## Catalog registration-Drop `api/_lib/crypto-catalog/symbol.js` (entry shape per 00-CONTEXT).--## States-Empty/oversized list → 400 with the cap. No collisions → all `available:true`. Registry-source down → 200 degraded with a note. Never 500. Cap at 20 symbols.--## Tests-Exact vs fuzzy; cap enforcement; available/taken counts. Use made-up tickers in fixtures.--## Definition of done-Inherit 00-CONTEXT DoD + gates. Plus:-- [ ] Live call captured in PROGRESS.md.-- [ ] `docs/crypto-api.md` section + curl + use-case; cross-link the paid Pump Launcher.-- [ ] `data/changelog.json` (tags: `feature`,`improvement`) — "Symbol-availability check is now free".diff --git a/prompts/x402-overhaul/08-crypto-wallet-portfolio.md b/prompts/x402-overhaul/08-crypto-wallet-portfolio.mddeleted file mode 100644index 9dabb3416..000000000--- a/prompts/x402-overhaul/08-crypto-wallet-portfolio.md+++ /dev/null@@ -1,35 +0,0 @@-# 08 — Free Crypto Data API: Wallet Portfolio--Read `prompts/x402-overhaul/00-CONTEXT.md` first, then `/workspaces/three.ws/CLAUDE.md`.-Independent work order — completes fully on its own.--## Agent use-case (name it in the docs)-An agent needs to inspect a wallet — its own or a counterparty's — before transacting: token-balances, SOL/native, rough USD value. Useful for treasury agents, copy-trade agents, and-pre-trade counterparty checks.--## Build — `GET /api/crypto/wallet`-- New file `api/crypto/wallet.js`, free plain-handler pattern (00-CONTEXT).-- Input: `?address=<wallet>&chain=<solana|base|...>`.-- Data: `_lib/balances.js`, `_lib/helius.js` (if key) / Solana RPC `getTokenAccountsByOwner`- (keyless) for SPL balances; `_lib/sol-price.js` + DexScreener for USD valuation. Keyless- path must return real balances even without Helius.-- Output: `{ address, chain, native: { amount, usd }, tokens: [{ mint, symbol, amount,- usd }], totalUsd, tokenCount, ts, sources[] }`. Unpriced tokens → `usd:null`, still listed.--## Catalog registration-Drop `api/_lib/crypto-catalog/wallet.js` (entry shape per 00-CONTEXT).--## States-Invalid address → 400. Empty wallet → 200 with zeros/empty arrays. RPC down → 503 + retry.-Never 500. Consider a sane cap on tokens returned (e.g. 200) with a `truncated` flag.--## Tests-Balance parsing; USD valuation with a missing price; keyless RPC path; empty wallet.-Use a known public address or a synthetic one in fixtures (no private keys, ever).--## Definition of done-Inherit 00-CONTEXT DoD + gates. Plus:-- [ ] Live call on a real public address captured in PROGRESS.md.-- [ ] `docs/crypto-api.md` section + curl + use-case.-- [ ] `data/changelog.json` (tags: `feature`) — "Free wallet portfolio API for agents".diff --git a/prompts/x402-overhaul/09-crypto-trending.md b/prompts/x402-overhaul/09-crypto-trending.mddeleted file mode 100644index 96ab0fac3..000000000--- a/prompts/x402-overhaul/09-crypto-trending.md+++ /dev/null@@ -1,33 +0,0 @@-# 09 — Free Crypto Data API: Trending / Hot Tokens--Read `prompts/x402-overhaul/00-CONTEXT.md` first, then `/workspaces/three.ws/CLAUDE.md`.-Independent work order — completes fully on its own.--## Agent use-case (name it in the docs)-A discovery agent wants "what's hot right now" — tokens ranked by momentum (volume spike,-buy pressure, holder growth) so it can surface opportunities without scraping five sites.--## Build — `GET /api/crypto/trending`-- New file `api/crypto/trending.js`, free plain-handler pattern (00-CONTEXT).-- Input: `?window=<5m|1h|24h default 1h>&limit=<default 20, max 50>&source=<pumpfun|all>`.-- Data: `_lib/pump-trending-score.js`, `_lib/pump-volume-anomaly.js`, `_lib/gmgn-feed.js`,- DexScreener trending. Compose a ranked list; document the ranking signal. Wrap existing- scoring helpers rather than inventing a new score.-- Output: `{ window, tokens: [{ mint, symbol, name, marketCapUsd, volumeUsd,- change, score, url }], count, ts, sources[] }`. Ranked by `score` desc.--## Catalog registration-Drop `api/_lib/crypto-catalog/trending.js` (entry shape per 00-CONTEXT).--## States-Source down → 200 with whatever ranked data is available + note. Empty → 200 empty. Never-500. Cap limit at 50.--## Tests-Ranking order; window param; limit cap; source filter. Synthetic fixtures.--## Definition of done-Inherit 00-CONTEXT DoD + gates. Plus:-- [ ] Live call captured in PROGRESS.md.-- [ ] `docs/crypto-api.md` section (ranking signal documented) + curl + use-case.-- [ ] `data/changelog.json` (tags: `feature`) — "Free trending-tokens API for crypto agents".diff --git a/prompts/x402-overhaul/10-crypto-api-index.md b/prompts/x402-overhaul/10-crypto-api-index.mddeleted file mode 100644index be4eacdb9..000000000--- a/prompts/x402-overhaul/10-crypto-api-index.md+++ /dev/null@@ -1,45 +0,0 @@-# 10 — Free Crypto Data API: Bundle Index + OpenAPI + Discovery--Read `prompts/x402-overhaul/00-CONTEXT.md` first, then `/workspaces/three.ws/CLAUDE.md`.-Independent work order — completes fully on its own. **Does NOT require prompts 01–09 to have-run** — it globs whatever catalog entries exist and reflects them; with zero entries it still-returns a valid (empty) catalog. As sibling endpoints land, it lists them automatically.--## Agent use-case (name it in the docs)-An agent (or a human wiring one up) hits ONE URL to discover the entire free Crypto Data API:-every endpoint, its inputs/outputs, and a live example. This is the front door that makes the-bundle feel like one product, not nine loose routes.--## Build-1. **The catalog assembler** — `api/_lib/crypto-catalog/index.js` that imports/globs every- `api/_lib/crypto-catalog/*.js` entry file (excluding itself) and returns the merged array.- Use a static import map or a build-safe directory read (Vercel functions can't always- fs-glob at runtime — prefer an explicit `export` barrel that each entry is added to, OR a- generated manifest; pick the pattern that works in this repo's serverless runtime and- document it). If an entry is malformed, skip it and log — never throw.-2. **`GET /api/crypto`** — `api/crypto/index.js`, free handler. Returns- `{ name:'three.ws Crypto Data API', free:true, keyless:true, version, endpoints:[...from- catalog...], docs:'/docs/crypto-api', ts }`. Human-friendly HTML when `Accept: text/html`,- JSON otherwise.-3. **`GET /api/crypto/openapi.json`** — a real OpenAPI 3.1 doc generated FROM the catalog- entries (paths, params, response schemas). Must validate. Wire a rewrite in `vercel.json`- if needed (stage only your hunk).--## States-Zero catalog entries → valid empty catalog + a "coming soon" note, never an error. Malformed-entry → skipped, rest served.--## Tests-Assembler merges N entries; skips malformed; OpenAPI validates (use a schema validator already-in devDeps if present, else assert required OpenAPI fields); index HTML vs JSON negotiation.--## Definition of done-Inherit 00-CONTEXT DoD + gates. Plus:-- [ ] `curl /api/crypto` and `/api/crypto/openapi.json` outputs captured in PROGRESS.md.-- [ ] `docs/crypto-api.md`: ensure it has an intro + a generated/maintained endpoint table- (this prompt owns the intro + table; sibling prompts add their own sections).-- [ ] `data/pages.json`: register `/docs/crypto-api` if it's a public page (coordinate: prompt- 11 builds the page — if it doesn't exist yet, still register the intended path).-- [ ] `STRUCTURE.md`: row for the Crypto Data API surface (`/api/crypto/*`).-- [ ] `data/changelog.json` (tags: `feature`,`sdk`) — "three.ws Crypto Data API: one free,- keyless crypto data bundle for AI agents".diff --git a/prompts/x402-overhaul/11-crypto-api-docs-page.md b/prompts/x402-overhaul/11-crypto-api-docs-page.mddeleted file mode 100644index d59abd4e3..000000000--- a/prompts/x402-overhaul/11-crypto-api-docs-page.md+++ /dev/null@@ -1,43 +0,0 @@-# 11 — Free Crypto Data API: Public Docs / Landing Page--Read `prompts/x402-overhaul/00-CONTEXT.md` first, then `/workspaces/three.ws/CLAUDE.md`.-Independent work order — completes fully on its own. Does NOT require 01–10; it documents the-whole free Crypto Data API and degrades gracefully for endpoints not yet live (mark them-"live" vs "coming soon" by probing `/api/crypto` at build/runtime, or list the full intended-set — never blank).--## Goal-A screenshot-worthy public page — `three.ws/crypto` (or `/docs/crypto-api`, follow existing-docs/page conventions) — that makes an agent developer go "I'm wiring this in right now."-This is a marketing surface AND the funnel top: free data here, paid uniques (Forge, Vanity,-Pump Launcher) linked as the next step.--## Build-- Follow the repo's existing page system (read `data/pages.json`, an existing docs/landing- page, and `DESIGN-TOKENS.md` before writing a line — match the design system, don't invent).-- Content: hero ("Free crypto data for AI agents — one keyless API"), a live endpoint table- (name, one-line purpose, method+path, price=Free), a copy-paste quickstart (curl + a JS- `fetch` snippet that actually runs), per-endpoint request/response examples using REAL- responses (call the live endpoints; if one isn't live yet, mark "coming soon"), and a- "when you're ready to build" CTA linking Forge / Vanity / Pump Launcher.-- Every code sample must run. Every link must resolve.-- All states designed: works at 320px / 768px / 1440px; light + dark; hover/focus states;- loading skeleton if it fetches live data client-side.--## Register it-- `data/pages.json`: path, title, description, `added` date (feeds sitemap/llms.txt/changelog).-- Link it from the site nav / docs index per existing conventions.-- `STRUCTURE.md`: row if it's a new surface.--## Tests / verification-- `npm run dev`, open the page, exercise it in a real browser: no console errors, live- examples render, all links resolve. Capture what you verified in PROGRESS.md.-- `npm run build:pages` green.--## Definition of done-Inherit 00-CONTEXT DoD + gates. Plus:-- [ ] Page live in dev, screenshot-worthy, responsive, a11y-clean, zero console errors.-- [ ] Every curl/fetch sample executed and confirmed working (paste one real run in PROGRESS).-- [ ] `data/pages.json` + nav link + `STRUCTURE.md` done.-- [ ] `data/changelog.json` (tags: `feature`,`docs`; `link` = the page path) — "New: three.ws- Crypto Data API docs".diff --git a/prompts/x402-overhaul/12-3d-free-generate.md b/prompts/x402-overhaul/12-3d-free-generate.mddeleted file mode 100644index 68304749d..000000000--- a/prompts/x402-overhaul/12-3d-free-generate.md+++ /dev/null@@ -1,46 +0,0 @@-# 12 — Free 3D API: Text→3D Generate--Read `prompts/x402-overhaul/00-CONTEXT.md` first, then `/workspaces/three.ws/CLAUDE.md`.-Independent work order — completes fully on its own.--## Agent use-case (name it in the docs)-Any agent building a game, a scene, an NFT, or a visual wants a 3D model from a text prompt —-free, no key, no account. No other agent platform gives away 3D generation. This is a magnet-that funnels to paid Forge Pro (quality tiers) and Rigged Avatars.--## Note on existing code-The free NVIDIA NIM / TRELLIS lane already exists: `api/forge-nim.js`, `api/nim-forge.js`,-`api/forge.js`, `_lib/forge-job-token.js`. Do NOT rebuild generation — wrap the existing free-lane behind a clean, agent-first, keyless endpoint. The current `/api/x402/forge` charges;-this one is the FREE draft lane, clearly separated.--## Build — `POST /api/3d/generate` + `GET /api/3d/generate?job=<id>`-- New file `api/3d/generate.js`, free plain-handler pattern (00-CONTEXT) + the job-token poll- pattern the existing forge routes use (`_lib/forge-job-token.js`).-- Input (POST): `{ prompt: string, format?: 'glb' }`. Returns `{ job, status, poll }` (or the- GLB inline when the draft finishes fast, matching existing forge behavior).-- Poll (GET `?job=`): `{ status:'pending'|'done'|'error', glbUrl?, viewerUrl?, error? }`.-- Rate-limit generously but protect the GPU lane (per-IP + a global concurrency guard —- reuse whatever the existing forge routes use; don't invent a new limiter).-- Free = the draft/NIM tier only. Higher quality + rigging = paid Forge (link it in the- response + docs). Be explicit about the free tier's limits so it's honest.--## Catalog registration-Drop `api/_lib/3d-catalog/generate.js` (same entry shape as the crypto catalog; the `/api/3d`-index in prompt 14 globs this dir).--## States-Empty/oversized prompt → 400. Job pending → 200 pending + poll URL. Generation failed-upstream → 200 `status:error` + actionable message + no charge (it's free). GPU lane-saturated → 429 with retry-after. Never 500 on a well-formed prompt.--## Tests-Job lifecycle (create → pending → done); prompt validation; rate-limit path; that the-returned GLB URL resolves to a real GLB (fetch it, assert it parses / non-zero bytes) for at-least one real generation.--## Definition of done-Inherit 00-CONTEXT DoD + gates. Plus:-- [ ] One real generation run end-to-end; GLB verified real; capture job + glbUrl in PROGRESS.md.-- [ ] `docs/3d-api.md` section (free-tier limits stated) + curl + use-case + link to paid Forge.-- [ ] `data/changelog.json` (tags: `feature`,`sdk`) — "Free text→3D generation API for agents".diff --git a/prompts/x402-overhaul/13-3d-free-inspect.md b/prompts/x402-overhaul/13-3d-free-inspect.mddeleted file mode 100644index c190738a1..000000000--- a/prompts/x402-overhaul/13-3d-free-inspect.md+++ /dev/null@@ -1,41 +0,0 @@-# 13 — Free 3D API: Inspect / Validate / Optimize Report--Read `prompts/x402-overhaul/00-CONTEXT.md` first, then `/workspaces/three.ws/CLAUDE.md`.-Independent work order — completes fully on its own.--## Agent use-case (name it in the docs)-An agent handling 3D assets (from any source) needs to validate a glTF/GLB and get structural-stats + optimization advice before using it: vertices, triangles, materials, textures,-animations, extensions, and a prioritized "make this smaller/faster" list. Free = adoption.--## Note on existing code-`api/x402/model-check.js` already does this for a sub-cent charge. Move the capability to a-FREE `/api/3d/inspect` (a validation utility should be free — it drives trust and funnels to-paid pipelines). Reuse its inspection logic (`_lib/glb-size-optimizer.js`,-`_lib/x402/enrich-model-metadata.js`, existing glTF validators in the repo). Add a one-line-deprecation note to the paid `model-check.js` header pointing here; leave actual retirement to-prompt 20. Stage only your new files + that one-line header edit.--## Build — `GET/POST /api/3d/inspect`-- New file `api/3d/inspect.js`, free plain-handler pattern (00-CONTEXT).-- Input: `?url=<glb/gltf url>` (GET) or `{ url }` / raw upload (POST) — match how model-check- accepts input.-- Output: `{ url, valid, stats: { vertices, triangles, materials, textures, animations,- extensions[] }, sizeBytes, recommendations: [{ severity, issue, fix }], ts }`.--## Catalog registration-Drop `api/_lib/3d-catalog/inspect.js` (entry shape per prompt 12 / 00-CONTEXT).--## States-Bad URL / not a model → 400 with reason. Fetch fails → 502 + retry hint. Huge file → enforce a-sane size cap with a clear message. Never 500.--## Tests-Stat extraction on a real GLB; recommendation ordering by severity; invalid-input handling.-Use a repo test GLB or a generated one.--## Definition of done-Inherit 00-CONTEXT DoD + gates. Plus:-- [ ] Live call on a real GLB captured in PROGRESS.md.-- [ ] `docs/3d-api.md` section + curl + use-case.-- [ ] `data/changelog.json` (tags: `feature`,`improvement`) — "3D model inspection is now free".diff --git a/prompts/x402-overhaul/14-3d-api-index-and-docs.md b/prompts/x402-overhaul/14-3d-api-index-and-docs.mddeleted file mode 100644index 44eb8d507..000000000--- a/prompts/x402-overhaul/14-3d-api-index-and-docs.md+++ /dev/null@@ -1,33 +0,0 @@-# 14 — Free 3D API: Index + Docs Page--Read `prompts/x402-overhaul/00-CONTEXT.md` first, then `/workspaces/three.ws/CLAUDE.md`.-Independent work order — completes fully on its own. Globs whatever `api/_lib/3d-catalog/*`-entries exist (works with zero); documents the whole free 3D API + links the paid tiers.--## Build-1. **Assembler** — `api/_lib/3d-catalog/index.js` merging every `api/_lib/3d-catalog/*.js`- entry (skip malformed, never throw). Use the serverless-safe pattern documented in prompt- 10 (barrel/manifest, not runtime fs-glob if that's unreliable here).-2. **`GET /api/3d`** — `api/3d/index.js`, free handler: `{ name:'three.ws 3D API', free:true,- keyless:true, endpoints:[...catalog...], paidTiers:[{name:'Forge Pro',...},{name:'Rigged- Avatar',...}], docs:'/docs/3d-api', ts }`. HTML on `Accept: text/html`, else JSON.-3. **`GET /api/3d/openapi.json`** — real OpenAPI 3.1 from the catalog; validates.-4. **Public docs page** — `three.ws/3d` (or `/docs/3d-api`), following the repo's page system- + `DESIGN-TOKENS.md`. Hero, endpoint table, runnable quickstart, real request/response- examples (call live endpoints), an embedded 3D viewer preview of a generated GLB if the- viewer component is reusable, and a clear free→paid ladder (free draft → Forge Pro tiers →- Rigged Avatars). Screenshot-worthy, responsive, a11y-clean, zero console errors.--## Register-`data/pages.json` (the docs page), nav link, `STRUCTURE.md` row for `/api/3d/*`.--## Tests / verification-Assembler merge + skip-malformed; OpenAPI validates; index HTML/JSON negotiation; open the-docs page in `npm run dev`, verify live examples + links + no console errors. Capture in PROGRESS.--## Definition of done-Inherit 00-CONTEXT DoD + gates. Plus:-- [ ] `/api/3d`, `/api/3d/openapi.json`, and the docs page all captured/verified in PROGRESS.md.-- [ ] `data/pages.json` + nav + `STRUCTURE.md` done.-- [ ] `data/changelog.json` (tags: `feature`,`docs`; `link` = page path) — "three.ws 3D API:- free text→3D + inspection for AI agents, with pro tiers".diff --git a/prompts/x402-overhaul/15-generalize-reputation.md b/prompts/x402-overhaul/15-generalize-reputation.mddeleted file mode 100644index c345a66bb..000000000--- a/prompts/x402-overhaul/15-generalize-reputation.md+++ /dev/null@@ -1,44 +0,0 @@-# 15 — Generalize Agent Reputation → any agent, any chain--Read `prompts/x402-overhaul/00-CONTEXT.md` first, then `/workspaces/three.ws/CLAUDE.md`.-Independent work order — completes fully on its own.--## The problem-`api/x402/agent-reputation.js` scores only three.ws agents from pump.fun activity. No outside-agent has a reason to call it — that's why it doesn't sell. A trust primitive is only valuable-if it works on ANY counterparty an agent is about to transact with.--## Agent use-case (name it in the docs)-Before Agent A pays / trades / delegates to Agent B, it calls one endpoint to get B's trust-score from real on-chain evidence — regardless of which platform B was minted on. This is a-genuine pre-transaction primitive agents will pay for.--## Build — upgrade `api/x402/agent-reputation.js` (keep the route + paid model)-- Accept ANY identifier: a wallet address (Solana or EVM), an ERC-8004 agent id, a pump.fun- mint/creator, or a three.ws agent_id — auto-detect the type.-- Score from REAL on-chain signals available for that identifier: transaction history,- age, counterparties, holdings, prior settled x402/agent payments, ERC-8004 feedback if- present. Reuse `_lib/agent-registry.js`, `_lib/solana/*`, `_lib/helius.js`, `_lib/aixbt.js`,- ERC-8004 helpers, and the existing scoring logic — generalize it, don't fork it.-- Output: `{ subject, subjectType, score, tier, signals: { ... real evidence ... },- evidence: [{ kind, ref }], caveats[], ts }`. Score rule documented + deterministic.-- Keep the sweep/leaderboard/decay modes but make them work over the generalized subject set.-- Pricing stays (this is a paid unique). Update the `BAZAAR` description + the `api/wk.js`- discovery mirror + run `node scripts/verify-x402-discovery.mjs`.--## States-Unknown/unscannable subject → 200 with `score:null`, `tier:'unknown'`, explicit caveat — never-a fake score. Chain data unavailable → degrade to what's readable, mark caveats. Never 500.--## Tests-Subject-type detection (Solana wallet vs EVM vs mint vs agent_id); score determinism; unknown-subject path; discovery mirror matches live 402. `$THREE`/synthetic fixtures.--## Definition of done-Inherit 00-CONTEXT DoD + gates. Plus:-- [ ] Real scores for at least 3 different subject types captured in PROGRESS.md.-- [ ] `scripts/verify-x402-discovery.mjs` passes; paste output.-- [ ] `docs/` trust-primitive doc updated (`docs/api-reference.md` or a new- `docs/trust-primitives.md` linked from `docs/start-here.md`) with the score rule + use-case.-- [ ] `data/changelog.json` (tags: `feature`,`improvement`) — "Agent reputation now scores any- wallet or agent on any chain".diff --git a/prompts/x402-overhaul/16-generalize-identity-verify.md b/prompts/x402-overhaul/16-generalize-identity-verify.mddeleted file mode 100644index 9ce7532a4..000000000--- a/prompts/x402-overhaul/16-generalize-identity-verify.md+++ /dev/null@@ -1,44 +0,0 @@-# 16 — Generalize On-Chain Identity Verify → cross-platform trust primitive--Read `prompts/x402-overhaul/00-CONTEXT.md` first, then `/workspaces/three.ws/CLAUDE.md`.-Independent work order — completes fully on its own.--## The problem-`api/x402/onchain-identity-verify.js` only verifies three.ws agent_ids against three.ws's own-index. Useless to outside agents. A verification primitive must work for any claimed-identity↔address link.--## Agent use-case (name it in the docs)-Agent A is told "I am the deployer of contract/mint X" or "I own wallet W / ENS name / agent-id". Before trusting or paying, A calls one endpoint that returns cryptographic/on-chain-evidence the claim is real: deploy tx, signer, ownership proof, ENS/SNS resolution, ERC-8004-registration. A cross-platform trust check agents will pay for.--## Build — upgrade `api/x402/onchain-identity-verify.js` (keep route + paid model)-- Input: `{ claim: { identity, address, chain } }` where identity may be an agent_id, ENS/SNS- name, wallet, or ERC-8004 id; address is the mint/contract/wallet the claim asserts control- of.-- Verify with REAL sources: contract deploy tx + deployer (RPC/explorer), mint- authority/creator (Solana), ENS/SNS resolution (`_lib/` resolvers or the ens_sns MCP), token- ownership, ERC-8004 registry, three.ws `meta.onchain` index when relevant. Reuse existing- helpers; generalize.-- Output: `{ claim, verified:true|false|'unverifiable', evidence: [{ kind, ref, detail }],- method, ts }`. Never assert `verified:true` without concrete on-chain evidence.-- Update `BAZAAR` description + `api/wk.js` discovery mirror + run the verify script.--## States-Insufficient data → `verified:'unverifiable'` + what's missing, never a false positive.-Chain/explorer down → degrade + caveat. Bad input → 400. Never 500.--## Tests-Each identity type resolves; true vs false vs unverifiable branches; no-evidence never returns-true; discovery mirror matches live. Synthetic/`$THREE` fixtures.--## Definition of done-Inherit 00-CONTEXT DoD + gates. Plus:-- [ ] Real verifications (a true case + a false/unverifiable case) captured in PROGRESS.md.-- [ ] `scripts/verify-x402-discovery.mjs` passes; paste output.-- [ ] `docs/` trust-primitive doc updated (same doc as prompt 15 if present — extend, don't- duplicate) with the evidence model + use-case.-- [ ] `data/changelog.json` (tags: `feature`,`improvement`) — "On-chain identity verification- now works cross-platform for any claim".diff --git a/prompts/x402-overhaul/17-elevate-forge-listing.md b/prompts/x402-overhaul/17-elevate-forge-listing.mddeleted file mode 100644index 54a96063e..000000000--- a/prompts/x402-overhaul/17-elevate-forge-listing.md+++ /dev/null@@ -1,48 +0,0 @@-# 17 — Elevate the Forge Listing (Forge Pro tiers + discovery)--Read `prompts/x402-overhaul/00-CONTEXT.md` first, then `/workspaces/three.ws/CLAUDE.md`.-Independent work order — completes fully on its own.--## Scope guard (important)-The OKX.AI work stream (`prompts/okx-ai/`) owns the forge **payment integration** and-`api/mcp-3d.js`. This prompt is ONLY about the **x402scan listing quality** of the existing-`api/x402/forge.js`: its description, quality tiers, tags, response polish, and discovery-metadata. **Do NOT modify the payment/settlement handler logic or `api/mcp-3d.js`.** If a-change would touch those, stop at the metadata boundary and note it for the OKX stream.--## Why-Forge (text→3D / image→3D) is our crown jewel and the only real 3D generation on any agent-marketplace — but on x402scan it's buried in the same flat list as `dance-tip`, so it reads-as trivial. Make the listing sell.--## Build-- Rewrite the `BAZAAR` description on `api/x402/forge.js` to lead with the agent use-case- (game assets, NFTs, scenes, product viz), the quality tiers and prices ($0.05 draft / $0.15- standard / $0.50 high — confirm against `_lib/x402-prices.js` and the real handler), the- keyless/no-account pledge, and the free draft lane (`/api/3d/generate`) as the on-ramp.-- Ensure input/output schemas in the discovery metadata are accurate and complete (prompt,- reference-image mode, job-token poll, GLB output). An agent should understand how to call it- from the schema alone.-- Verify the tiers in `_lib/x402-prices.js` are coherent and documented; adjust only pricing- metadata (not settlement) if needed.-- Update the `api/wk.js` discovery mirror for `/api/x402/forge`; run- `node scripts/verify-x402-discovery.mjs` until clean.-- Tags: ensure it's tagged so it surfaces under 3D / AI / Utility on x402scan.--## States / correctness-The live 402 and the discovery doc must match exactly (the verify script enforces this).-Don't change runtime behavior; if the description promises a field, the handler must already-return it — verify by calling the endpoint, don't assume.--## Tests-Discovery/live-402 parity (verify script); schema completeness assertion. No settlement tests-here (owned by OKX stream).--## Definition of done-Inherit 00-CONTEXT DoD + gates (skip the parts about new endpoints). Plus:-- [ ] New `BAZAAR` description + accurate schemas shipped; `scripts/verify-x402-discovery.mjs`- passes (paste output).-- [ ] Live 402 captured + confirmed matching the discovery doc, in PROGRESS.md.-- [ ] `docs/3d-api.md` (or Forge doc) updated to describe the paid tiers + free on-ramp.-- [ ] `data/changelog.json` (tags: `improvement`) — "Forge listing sharpened: clear 3D- generation tiers for agents".diff --git a/prompts/x402-overhaul/18-elevate-vanity-listing.md b/prompts/x402-overhaul/18-elevate-vanity-listing.mddeleted file mode 100644index edf6c22b0..000000000--- a/prompts/x402-overhaul/18-elevate-vanity-listing.md+++ /dev/null@@ -1,39 +0,0 @@-# 18 — Elevate the Vanity Grinder Listing (make it a flagship)--Read `prompts/x402-overhaul/00-CONTEXT.md` first, then `/workspaces/three.ws/CLAUDE.md`.-Independent work order — completes fully on its own.--## Why-`api/x402/vanity.js` (+ `vanity-premium.js`, `vanity-verifiable.js`) is genuinely useful and-hard to copy — a real Rust/WASM ed25519 grinder that returns a custom Solana address, keyless,-pay-per-call. It should be one of our headline products. Make the listing reflect that.--## Build (listing quality — do not break the grinder)-- Audit the three vanity routes; make sure the primary agent-facing one has a crisp `BAZAAR`- description that leads with the use-case (branded token mint address, branded agent/treasury- wallet), the format options (keypair vs BIP-39 mnemonic), the char caps + price ladder, the- security model (nothing stored; served once over TLS; optional `sealTo` ECIES), and the- keyless/no-account pledge.-- Ensure input/output schemas in discovery are complete and accurate — an agent should grind- an address from the schema alone.-- Confirm price ladder in `_lib/x402-prices.js` matches the live handler; fix metadata drift.-- Update `api/wk.js` discovery mirror(s) for the vanity routes; run- `node scripts/verify-x402-discovery.mjs` until clean.-- If `vanity-premium.js` / `vanity-verifiable.js` overlap confusingly, clarify each one's- distinct purpose in its description (don't merge/remove here — that's a bigger call; note it- for prompt 21/22 if consolidation is warranted).--## States / correctness-Live 402 ↔ discovery parity (verify script). Don't alter grinding/signing behavior. Verify the-endpoint still returns a real, valid vanity keypair by calling it (short prefix) — capture proof.--## Tests-Discovery/live parity; schema completeness; one real grind (1-char prefix) returns a valid-address matching the prefix.--## Definition of done-Inherit 00-CONTEXT DoD + gates (skip new-endpoint parts). Plus:-- [ ] Sharpened descriptions + accurate schemas; verify script passes (paste output).-- [ ] One real grind captured in PROGRESS.md (address matches requested prefix).-- [ ] Vanity doc in `docs/` created/updated (use-cases, formats, security model, price ladder).-- [ ] `data/changelog.json` (tags: `improvement`) — "Vanity address grinder listing overhauled".diff --git a/prompts/x402-overhaul/19-elevate-pump-launch-listing.md b/prompts/x402-overhaul/19-elevate-pump-launch-listing.mddeleted file mode 100644index 196ce6f9d..000000000--- a/prompts/x402-overhaul/19-elevate-pump-launch-listing.md+++ /dev/null@@ -1,45 +0,0 @@-# 19 — Elevate the Pump Launcher Listing--Read `prompts/x402-overhaul/00-CONTEXT.md` first, then `/workspaces/three.ws/CLAUDE.md`.-Independent work order — completes fully on its own.--## Why-`api/x402/pump-launch.js` is a genuinely strong product: deploy a brand-new pump.fun token in-one paid call — the server fronts the SOL and signs the create tx, so the agent needs no SOL-and no account, just USDC. Optional vanity mint. That's real utility. Make the listing sell it-and wire it to the free funnel.--## Scope-Listing quality + discovery + the free→paid funnel — NOT the deploy/signing internals (they-work). Do not change how the SOL fronting or tx signing works.--## Build-- Rewrite the `BAZAAR` description to lead with the use-case ("launch a token autonomously,- no SOL, no account — pay USDC"), the inputs (name, symbol, metadataUri OR imageUrl we pin,- creator-rewards wallet, optional vanity prefix/suffix), the output (mint, tx sig, pump.fun- URL), and networks. Make the schema complete enough to call blind.-- Wire the funnel: reference the FREE `/api/crypto/symbol` (ticker check) and- `/api/crypto/launches` as pre/post steps in the description + docs, so the free data API- feeds paid launches.-- Confirm the $5.00 price (or current) in `_lib/x402-prices.js` matches the handler; fix- metadata drift only.-- Update `api/wk.js` discovery mirror for `/api/x402/pump-launch`; run- `node scripts/verify-x402-discovery.mjs` until clean.--## States / correctness-Live 402 ↔ discovery parity (verify script). Do NOT execute a real mainnet launch to test-(that costs real SOL and creates a real token — CLAUDE.md: no real third-party mints in-tests). Verify the 402 challenge + input validation + dry-run/validation path without-broadcasting. Confirm the description's promised fields exist in the handler by reading it.--## Tests-Discovery/live parity; input validation (missing name/symbol/image); schema completeness. No-real broadcast.--## Definition of done-Inherit 00-CONTEXT DoD + gates (skip new-endpoint parts). Plus:-- [ ] Sharpened description + accurate schema + funnel links; verify script passes (paste output).-- [ ] 402 challenge + validation path captured in PROGRESS.md (no real launch).-- [ ] Pump Launcher doc in `docs/` created/updated with the full flow + funnel.-- [ ] `data/changelog.json` (tags: `improvement`) — "Pump Launcher listing sharpened + wired to- free symbol/launches APIs".diff --git a/prompts/x402-overhaul/20-deprecate-dead-endpoints.md b/prompts/x402-overhaul/20-deprecate-dead-endpoints.mddeleted file mode 100644index 726f9bbbd..000000000--- a/prompts/x402-overhaul/20-deprecate-dead-endpoints.md+++ /dev/null@@ -1,46 +0,0 @@-# 20 — Retire the Dead Endpoints from the Agent Catalog--Read `prompts/x402-overhaul/00-CONTEXT.md` first, then `/workspaces/three.ws/CLAUDE.md`.-Independent work order — completes fully on its own.--## Why-These endpoints are why our scan page looks like a graveyard. They dilute the good products-and signal low quality to any agent browsing. Remove them from the agent-facing catalog.--## Targets + the rule for each-For EACH target: first `grep` the frontend/src (`src/`, `public/`, pages) for an internal-consumer.-- **Has an internal consumer** (e.g. `dance-tip` → `/club`, `three-intel` → `/play` kiosk):- KEEP the route working for that page, but REMOVE it from the agent-facing x402 discovery- (its `api/wk.js` mirror block) and any bazaar catalog so it stops appearing as a product on- x402scan. Add a header comment: "internal-use only; not an agent product."-- **No internal consumer**: fully remove — delete the route file, its `api/wk.js` discovery- block, its `_lib/x402-prices.js` entry, its tests, and any dead imports. Leave no orphan.--| Endpoint | Expected disposition (verify with grep) |-|---|---|-| `dance-tip` | internal (/club) → de-list from agent catalog, keep for club |-| `three-intel` | internal (/play kiosk) → de-list from agent catalog, keep for town |-| `fact-check` | me-too LLM → remove if no consumer |-| `tutor` | me-too LLM → remove if no consumer |-| `revenue-vision` / `crypto-intel` | me-too LLM → remove if no consumer |-| `mint-to-mesh` + `mint-to-mesh-batch` | cube novelty → remove if no consumer; note "real version = Forge" |--Do NOT touch: `forge`, `vanity*`, `pump-launch`, `agent-reputation`, `onchain-identity-verify`,-`mcp`, `model-check`/`symbol-availability` (those last two are being freed by prompts 13/07 —-if their free replacements exist, add a redirect note; otherwise leave them).--## Correctness-After edits, `node scripts/verify-x402-discovery.mjs` MUST pass (no dangling discovery-entries). `npm test` MUST pass (remove/adjust tests for deleted routes). No broken imports,-no dead references anywhere (grep for each removed slug across the repo). The `/club` and-`/play` pages must still work — load them in `npm run dev` and confirm.--## Definition of done-Inherit 00-CONTEXT DoD + gates. Plus:-- [ ] Per-endpoint disposition table in PROGRESS.md with the grep evidence that drove each call.-- [ ] `scripts/verify-x402-discovery.mjs` + `npm test` green (paste output).-- [ ] `/club` and `/play` verified still working in dev (whatever kept internal endpoints).-- [ ] Zero orphaned references (paste the grep confirming each removed slug is gone).-- [ ] `data/changelog.json` (tags: `improvement`) — "Trimmed low-value endpoints so agents find- the tools that matter" (holder-readable; don't enumerate coin specifics).diff --git a/prompts/x402-overhaul/21-unified-catalog.md b/prompts/x402-overhaul/21-unified-catalog.mddeleted file mode 100644index ac3dbcf7d..000000000--- a/prompts/x402-overhaul/21-unified-catalog.md+++ /dev/null@@ -1,45 +0,0 @@-# 21 — Unified Service Catalog (one source of truth, two storefronts)--Read `prompts/x402-overhaul/00-CONTEXT.md` first, then `/workspaces/three.ws/CLAUDE.md`.-Independent work order — completes fully on its own. Reads the CURRENT state of endpoints; it-does not require any other prompt to have run.--## Why-x402scan (Base) and OKX.AI (X Layer) are two storefronts over the SAME backend. Right now the-listing metadata is scattered across each endpoint's `BAZAAR` export, the `api/wk.js` discovery-mirrors, and (separately) the OKX catalog. Drift is inevitable and quality suffers. Build ONE-canonical catalog that every storefront reads.--## Build — `api/_lib/service-catalog/`-- A canonical catalog module `api/_lib/service-catalog/index.js` that assembles one array of- service descriptors from the real endpoints: slug, title, category, agent use-case,- input/output schema, price (per network), free|paid, endpoint URL, tags, status- (live|deprecated). Source it from the existing `BAZAAR` exports + the new- `crypto-catalog`/`3d-catalog` entries (import them; don't duplicate their content).-- Expose helpers: `getCatalog()`, `getByStorefront('x402scan'|'okx')`, `toBazaarDiscovery()`,- `toOkxCatalog()`. Each storefront renders from these, so a description is written once.-- Refactor `api/wk.js` x402 discovery to derive from `toBazaarDiscovery()` where feasible- (keep `scripts/verify-x402-discovery.mjs` green — the live 402 must still match).-- **Coordination with the OKX stream:** the OKX work builds `api/_lib/okx-catalog.js`. Do NOT- edit that file if it exists; instead make `toOkxCatalog()` produce exactly the shape it- expects and leave a one-line note in PROGRESS.md so the OKX stream can point its module at- ours. If it doesn't exist yet, ship `toOkxCatalog()` ready for it to consume.--## Correctness-`node scripts/verify-x402-discovery.mjs` green (parity preserved). `npm test` green. Prove no-description drift: a test asserting every live paid route's `BAZAAR` description equals the-catalog's for that slug.--## Tests-Catalog assembly from real endpoints; storefront projections produce valid shapes; discovery-parity; no-drift assertion.--## Definition of done-Inherit 00-CONTEXT DoD + gates. Plus:-- [ ] One canonical catalog live; both storefront projections tested; verify script + `npm test`- green (paste output).-- [ ] `specs/` entry documenting the catalog contract (it's a load-bearing wire format both- storefronts depend on) — `specs/service-catalog.md`.-- [ ] `STRUCTURE.md` row; PROGRESS.md note to the OKX stream about `toOkxCatalog()`.-- [ ] `data/changelog.json` (tags: `infra`) — "Unified service catalog powering all agent- storefronts".diff --git a/prompts/x402-overhaul/22-x402scan-profile-overhaul.md b/prompts/x402-overhaul/22-x402scan-profile-overhaul.mddeleted file mode 100644index 8b734fb60..000000000--- a/prompts/x402-overhaul/22-x402scan-profile-overhaul.md+++ /dev/null@@ -1,43 +0,0 @@-# 22 — x402scan Profile & Resource-Description Overhaul--Read `prompts/x402-overhaul/00-CONTEXT.md` first, then `/workspaces/three.ws/CLAUDE.md`.-Independent work order — completes fully on its own.--## Why-Our x402scan server profile is the storefront window. Today it's a generic blurb over a flat-list of 17 mixed-quality resources. Rewrite the top-level pitch and curate/retag the resource-descriptions so a browsing agent (or its developer) instantly gets what three.ws offers and-why to use it.--## Build-- **Server-level profile** — find where the top-level x402 server metadata is served (the- `.well-known/x402.json` root fields in `api/wk.js`: name, description, tags, categories).- Rewrite the description to the real positioning: "three.ws — 3D generation + crypto data +- launch/trust tools for AI agents. Free Crypto Data API and free text→3D; pay-per-call for- Forge Pro, rigged avatars, vanity addresses, token launches, and cross-chain trust checks."- Set accurate top-level tags/categories (3D, AI, Crypto, Data, Utility).-- **Resource descriptions** — for every resource that REMAINS in the catalog (post prompt-20- spirit; if 20 hasn't run, still curate), ensure each description leads with the agent- use-case, states price + networks, and reads as a product, not a demo. Fix any that are- empty (e.g. `skill-marketplace` had no description) or jargon-y.-- **Categorize/tag** each resource so x402scan's category filters surface us well.-- Keep the discovery doc valid: `node scripts/verify-x402-discovery.mjs` green.--## Correctness-The live `.well-known/x402.json` must render with the new profile + curated resources and pass-the verify script. Fetch it locally (`curl` the dev route) and confirm the JSON is well-formed-and the descriptions are the new ones. If prompt 21's unified catalog exists, source-descriptions from it (don't re-author drift); otherwise edit the per-resource metadata-directly and note the follow-up.--## Tests-Discovery doc validity + verify script; presence of top-level description/tags; no empty-resource descriptions remain.--## Definition of done-Inherit 00-CONTEXT DoD + gates (skip new-endpoint parts). Plus:-- [ ] New server profile + curated resource descriptions live; `.well-known/x402.json` capture- in PROGRESS.md; verify script green (paste output).-- [ ] No resource with an empty/placeholder description remains.-- [ ] `data/changelog.json` (tags: `improvement`) — "Refreshed our agent-marketplace profile and- product descriptions".