Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.
JavaScript 3d-generationai-agentsanimationavatardigital-humangenerative-aiglbgltfimage-to-3dllmmcpmcp-servermodel-context-protocolsolanatext-to-3dthreejsweb-componentswebglwebxrx402
docs(prompts): queue finish orders 941 to 965 covering the agent REST API, perps go-live, trading tools, teams, approvals over Telegram, installers and payouts
nirholasa3ab4a34208a
diff --git a/prompts/finish/941-expose-agent-rest-api.md b/prompts/finish/941-expose-agent-rest-api.mdnew file mode 100644index 000000000..f8278dfd0--- /dev/null+++ b/prompts/finish/941-expose-agent-rest-api.md@@ -0,0 +1,11 @@+Our agent REST API is written but not reachable. api/_lib/agents-v1/http.js says every /api/v1/agents, runs, automations, models and me route is declared in api/v1/rest.js, and that file does not exist. The business logic is all there: agents.js (list, create, update, delete, status), messages.js (send and paginated history), runs.js (create, update, cancel, steps), automations.js (seven triggers, four actions, a per-minute cron sweep) and the envelope and Idempotency-Key handling in http.js. Only start, stop, loop, predictions, chat/completions, models and me/free-tier are mounted today.++Build the missing route layer so a developer can do everything over plain HTTP with one bearer key: create, read, update and delete agents; start and stop them; chat with an agent synchronously and read its message history; create, inspect, update and cancel autonomous runs and list their steps; create, update (a real update endpoint, not delete-and-recreate), delete and trigger-now automations; list skills and models. Register each route in vercel.json and the server route table, follow the existing envelope ({data, meta:{requestId,timestamp}}), idempotency and error table conventions, and write the OpenAPI entries so docs/api-reference.md and the generated spec stay true.++Go beyond a plain CRUD surface. Add webhooks, because polling is the only option on competing APIs: let a developer register an HTTPS endpoint for run finished, automation fired, message received and approval needed, signed with an HMAC header, retried with backoff, with a delivery log and a replay button. Add cursor pagination everywhere and a /api/v1/agents/:id/export that returns the agent's config as portable JSON.++Verify against the real server (run server/index.mjs on a spare port with --env-file) with curl for every route, including an idempotent retry and a webhook delivery to a local receiver.++---++This brief is standalone. Assume no other brief has run, and keep working if others run at the same time: use names unique to this work for tables, routes and files, give migrations a fresh timestamp, append to shared files instead of rewriting them, and re-read a shared file before you edit it. CLAUDE.md governs everything, including its spend gate (anything that signs or moves funds shows recipient, amount, asset and chain and waits for an explicit yes; test with devnet, simulation or paper mode) and the rule that nothing naming another crypto project is committed without the owner's approval, so list any new third-party names you introduce in your report. Never name any competitor in a committed file. Finish it fully: wire it, document it, add the changelog entry, verify it for real, and report what you observed.diff --git a/prompts/finish/942-perps-go-live.md b/prompts/finish/942-perps-go-live.mdnew file mode 100644index 000000000..5109224a3--- /dev/null+++ b/prompts/finish/942-perps-go-live.md@@ -0,0 +1,11 @@+Perpetuals exist as a library and nowhere else. api/_lib/perps/phoenix.js (about 790 lines) is a real Phoenix venue adapter: markets, market data, accounts, collateral deposit and withdraw, order quotes with liquidation distance, market, limit, take-profit and stop-loss orders, reduce-only, cancels. api/_lib/perps/index.js is a venue-agnostic contract. Its header promises a service layer, v1 routes, MCP tools and an /agents/:id/perps page, and none of them exist. api/_mcp/prompts.js already references perps_markets, perps_order_preview and perps_order_execute, which are not registered, so that prompt is broken today.++Make perps a finished product. Build api/_lib/perps/service.js that signs through the agent wallet under the existing spend policy and guards (api/_lib/agent-trade-guards.js), with a mandatory leverage cap and per-position margin cap per agent, defaults conservative. Expose MCP tools (perps_markets, perps_market_data, perps_account, perps_collateral_deposit, perps_collateral_withdraw, perps_order_preview, perps_order_execute, perps_order_cancel, perps_positions), REST routes under /api/v1/agents/:id/perps, and the agents/:id/perps page.++Every execute is two steps: a preview that returns a preview_id, the exact margin, leverage, size, entry, fees and liquidation price, then an execute that requires the preview_id, an explicit confirm flag and an Idempotency-Key, and fails if the quote moved beyond tolerance. Build a live position tracker (stream) with unrealised PnL, funding paid and distance to liquidation, alerts at thresholds the owner sets, and an agent-level kill switch that flattens everything with confirmation. Add a paper mode that fills at live prices so strategies can be tested before real margin is used; live mode needs an explicit per-agent enable.++Because Phoenix is one venue, keep the venue interface honest so a second one can be added later. Test with the venue's own simulation or devnet; never open a real position in a test. Fix the dangling prompt.++---++This brief is standalone. Assume no other brief has run, and keep working if others run at the same time: use names unique to this work for tables, routes and files, give migrations a fresh timestamp, append to shared files instead of rewriting them, and re-read a shared file before you edit it. CLAUDE.md governs everything, including its spend gate (anything that signs or moves funds shows recipient, amount, asset and chain and waits for an explicit yes; test with devnet, simulation or paper mode) and the rule that nothing naming another crypto project is committed without the owner's approval, so list any new third-party names you introduce in your report. Never name any competitor in a committed file. Finish it fully: wire it, document it, add the changelog entry, verify it for real, and report what you observed.diff --git a/prompts/finish/943-trading-tools-mcp-and-best-route.md b/prompts/finish/943-trading-tools-mcp-and-best-route.mdnew file mode 100644index 000000000..fdf4ec640--- /dev/null+++ b/prompts/finish/943-trading-tools-mcp-and-best-route.md@@ -0,0 +1,11 @@+Our most useful trading code is invisible to agents. api/_lib/trading-tools/ already has market.js (getMarketSignals, getIndicators with RSI, EMA, SMA, MACD and Bollinger bands, getNewsFeed, tokenSearch with a safety score, getPrice), arbitrage.js (arbitragePrices and arbitrageQuote with runtime venue discovery and fee-aware ranking) and venues.js (auto, launchpad and aggregator routing with slippage and price impact). Nothing imports market.js or arbitrage.js, and swap_quote and swap_execute are named in api/_mcp/prompts.js but no MCP tool defines them.++Register real MCP tools and REST routes for all of it: swap_quote, swap_execute, token_search, get_price, get_indicators, get_market_signals, get_news_feed, arbitrage_prices, arbitrage_quote. Swap quotes must compare Jupiter against at least one second aggregator and return both routes with net output after fees and price impact, so the agent (and the user) can see why a route won; a dex parameter picks one or lets auto choose. Execution goes through the existing guarded executor (api/agents/solana-trade.js: slippage clamp, price impact breaker, rug firewall, spend caps, idempotency) and follows the preview then confirm pattern with a quote_id. Never submit a stale quote.++Fill the gaps the market code does not cover: macro signals, top movers and anomalies across the Solana ecosystem, derived from data we already ingest (pump feed, dex trades, smart-money). Every signal returns its inputs and timestamp; do not ship a static placeholder block.++Make arbitrage honest: the two legs are not atomic, so the tool must show the risk, a simulated worst case, and refuse by default above a size cap. Tests with recorded real quotes, and a live read-only check of each route.++---++This brief is standalone. Assume no other brief has run, and keep working if others run at the same time: use names unique to this work for tables, routes and files, give migrations a fresh timestamp, append to shared files instead of rewriting them, and re-read a shared file before you edit it. CLAUDE.md governs everything, including its spend gate (anything that signs or moves funds shows recipient, amount, asset and chain and waits for an explicit yes; test with devnet, simulation or paper mode) and the rule that nothing naming another crypto project is committed without the owner's approval, so list any new third-party names you introduce in your report. Never name any competitor in a committed file. Finish it fully: wire it, document it, add the changelog entry, verify it for real, and report what you observed.diff --git a/prompts/finish/944-specialist-team-and-coordinator.md b/prompts/finish/944-specialist-team-and-coordinator.mdnew file mode 100644index 000000000..b96ec6679--- /dev/null+++ b/prompts/finish/944-specialist-team-and-coordinator.md@@ -0,0 +1,11 @@+The idea to match: a private team of specialist bots working together, driven from one chat. A Researcher vets tokens, an Entry specialist watches for setups, a Trader executes inside the owner's rules and reuses the research, a Launcher prepares launches, and a coordinator routes plain-language requests to them, keeps work moving, and comes back to the owner only when approval or attention is needed. Several setups run at once.++We have the parts but not the product: delegation and hiring (api/agent-delegate.js, api/agent-collab.js, api/swarms), autopilot's propose, review, execute, undo loop (api/autopilot), the sniper worker and strategy compiler (workers/agent-sniper, api/sniper/compile.js), the safety and coin-intel endpoints, and the confirm-before-execute intents used by the Trading Copilot (api/_lib/wallet-intents.js, docs/trading-copilot.md). The existing concierge (api/concierge.js) only answers visitor questions.++Build teams as a first-class object: a team has a name, a shared spend policy, and role members that are real three.ws agents with their own bodies and pages. Build a shared findings board so the Trader cites a non-expired Researcher finding instead of redoing the work, and the report shows which finding justified which trade (reuse api/_lib/trade-receipt.js). Build the coordinator chat: it turns a sentence like "research this, watch for an entry under 50k market cap, buy 0.5 SOL if it passes" into a visible plan of role-tagged steps, streams step status, and turns every signing step into an approval card that pauses the plan until the owner decides. The coordinator remembers preferences (default size, risk, venues) through the agent-memory package and shows what it remembered.++Roles cannot exceed their permissions: a Researcher can never sign. Token names, descriptions and social text are untrusted data and must never steer the plan; add tests with hostile-looking real token metadata. Give the squad a page where the avatars animate by state (working, alert, waiting for approval). Ship it working end to end in paper mode with a real team.++---++This brief is standalone. Assume no other brief has run, and keep working if others run at the same time: use names unique to this work for tables, routes and files, give migrations a fresh timestamp, append to shared files instead of rewriting them, and re-read a shared file before you edit it. CLAUDE.md governs everything, including its spend gate (anything that signs or moves funds shows recipient, amount, asset and chain and waits for an explicit yes; test with devnet, simulation or paper mode) and the rule that nothing naming another crypto project is committed without the owner's approval, so list any new third-party names you introduce in your report. Never name any competitor in a committed file. Finish it fully: wire it, document it, add the changelog entry, verify it for real, and report what you observed.diff --git a/prompts/finish/945-orders-dca-any-token.md b/prompts/finish/945-orders-dca-any-token.mdnew file mode 100644index 000000000..8687c1755--- /dev/null+++ b/prompts/finish/945-orders-dca-any-token.md@@ -0,0 +1,9 @@+Limit, stop, trailing, DCA and TWAP orders work today (workers/agent-orders, api/agents/orders.js) but only on pump.fun tokens, and agents cannot create them over MCP: api/_mcp/resources.js exposes orders and DCA as read-only resources. Meanwhile api/dca-strategies.js is a second, separate DCA system. Users expect to say "DCA 0.2 SOL into this token every day" or "sell half if it doubles" for any Solana token, from any client.++Extend the order engine to any SPL token by routing fills through the venue layer (Jupiter and PumpSwap; if a router module from another piece of work already exists in the tree, use it, otherwise call the existing executor in api/agents/solana-trade.js). Keep the audited path for every fill: guards, caps, idempotency key per slice, per-agent lock. Add MCP tools dca_create, dca_list, dca_cancel, limit_order_create, limit_order_list, limit_order_cancel, limit_order_history and stop and trailing variants, each with a preview that returns what would be placed and when, and a confirm flag on create. Merge the two DCA systems behind one API and migrate existing rows without losing any schedule.++Beyond parity: ladder orders (several take-profit levels in one call), OCO pairs (one fill cancels the other), expiry, a visible order book per agent with next-fire times and a reason for every skip (price outside band, cap hit, venue unhealthy), and a notification when an order fires or fails. Real executions use the existing spend gate; verify end to end in simulation and on devnet.++---++This brief is standalone. Assume no other brief has run, and keep working if others run at the same time: use names unique to this work for tables, routes and files, give migrations a fresh timestamp, append to shared files instead of rewriting them, and re-read a shared file before you edit it. CLAUDE.md governs everything, including its spend gate (anything that signs or moves funds shows recipient, amount, asset and chain and waits for an explicit yes; test with devnet, simulation or paper mode) and the rule that nothing naming another crypto project is committed without the owner's approval, so list any new third-party names you introduce in your report. Never name any competitor in a committed file. Finish it fully: wire it, document it, add the changelog entry, verify it for real, and report what you observed.diff --git a/prompts/finish/946-portfolio-sniper-duels-tools.md b/prompts/finish/946-portfolio-sniper-duels-tools.mdnew file mode 100644index 000000000..dd3d4ea52--- /dev/null+++ b/prompts/finish/946-portfolio-sniper-duels-tools.md@@ -0,0 +1,7 @@+Three useful capabilities are reachable only by REST or a human UI. Add them as agent tools and fix their gaps. (1) Portfolio: api/agents/portfolio.js and api/_lib/portfolio.js give a valued SPL and SOL portfolio with FIFO cost basis, PnL by source and risk flags, but MCP only has wallet_status. Add get_portfolio, get_balance_history and get_pnl tools, and a REST route under /api/v1/agents/:id. (2) New-launch alerts and sniper control: api/alerts/rules.js holds per-user pump alert rules, api/signals/subscribe.js handles signals, and the sniper API lives in api/sniper. Add tools sniper_subscribe, sniper_status, sniper_activate, sniper_deactivate and alert_rule_create, list and delete, including a rule kind for "new launch matching these filters" (creator history, market cap band, name pattern, safety score). (3) Duels: api/duels/* and the duels-tick cron exist with free-play points. Add duel_challenge, duel_accept, duel_details and duel_markets tools so an agent can challenge another and a leaderboard tracks results.++Make each tool annotated (readOnly, destructive, idempotent, openWorld hints) and covered by a test that calls it through the real MCP dispatcher. Make alert delivery reach the owner by push and Telegram where those channels exist. Document them in docs/mcp.md.++---++This brief is standalone. Assume no other brief has run, and keep working if others run at the same time: use names unique to this work for tables, routes and files, give migrations a fresh timestamp, append to shared files instead of rewriting them, and re-read a shared file before you edit it. CLAUDE.md governs everything, including its spend gate (anything that signs or moves funds shows recipient, amount, asset and chain and waits for an explicit yes; test with devnet, simulation or paper mode) and the rule that nothing naming another crypto project is committed without the owner's approval, so list any new third-party names you introduce in your report. Never name any competitor in a committed file. Finish it fully: wire it, document it, add the changelog entry, verify it for real, and report what you observed.diff --git a/prompts/finish/947-agent-lifecycle-runs-automations-tools.md b/prompts/finish/947-agent-lifecycle-runs-automations-tools.mdnew file mode 100644index 000000000..e771738c6--- /dev/null+++ b/prompts/finish/947-agent-lifecycle-runs-automations-tools.md@@ -0,0 +1,9 @@+An MCP client cannot manage an agent today. api/_mcp/tools/agents.js has create_agent, register_agent, attach_avatar_to_agent, list_my_agents and call_agent, but no update_agent, delete_agent, start or stop, no avatar upload, and no tools for autonomous runs or automations even though api/_lib/agents-v1/runs.js and automations.js are complete (createRun, updateRun, cancelRun, listRunSteps; seven triggers including price_threshold, schedule, balance_below, tip_received, launch_matching, graduation and whale_buy; actions agent_prompt, swap, transfer, notify).++Add the full tool set: update_agent, delete_agent (destructive, needs confirm_delete), start_agent, stop_agent, upload_agent_avatar (accept a GLB or image URL or data, run it through the existing avatar ingest and attach it), create_agent_run, update_agent_run, cancel_agent_run, get_agent_run_steps, and automation_list, automation_get, automation_create, automation_update, automation_delete, automation_trigger. Create and update must validate with the same schema as the REST path so there is one source of truth. Return step traces that show each tool call an agent made, with its receipt.++Make runs better than a fire-and-forget loop: a run has a budget (dollars and steps), a cancel that takes effect between steps, a human-readable summary when it ends, and a replay view in the agent page. Test every tool through the real dispatcher, including a destructive call without its confirm flag being refused.++---++This brief is standalone. Assume no other brief has run, and keep working if others run at the same time: use names unique to this work for tables, routes and files, give migrations a fresh timestamp, append to shared files instead of rewriting them, and re-read a shared file before you edit it. CLAUDE.md governs everything, including its spend gate (anything that signs or moves funds shows recipient, amount, asset and chain and waits for an explicit yes; test with devnet, simulation or paper mode) and the rule that nothing naming another crypto project is committed without the owner's approval, so list any new third-party names you introduce in your report. Never name any competitor in a committed file. Finish it fully: wire it, document it, add the changelog entry, verify it for real, and report what you observed.diff --git a/prompts/finish/948-agent-mail-tools.md b/prompts/finish/948-agent-mail-tools.mdnew file mode 100644index 000000000..6f609d37d--- /dev/null+++ b/prompts/finish/948-agent-mail-tools.md@@ -0,0 +1,9 @@+Agent email is fully built on the backend and invisible to agents. api/v1/agent-mail.js, api/_lib/mail/service.js, inbound.js, resend.js, content-rules.js, spam.js, threading.js and the agent_mail migration give each agent a mailbox on its own domain, quote then confirm for create and send, outbound through the mail provider with content rules, inbound with spam scoring, threading and attachments, and a mail_received notification. docs/prompts/11-agent-mail.md even specifies agent_mail_* tools, but api/_mcp/catalog.js has none.++Register agent_mail_get_address, agent_mail_create, agent_mail_send, agent_mail_list, agent_mail_read, agent_mail_reply, agent_mail_search and agent_mail_delete as MCP tools and REST routes, with sends going through the quote and confirm gate and showing the exact recipient and body before anything leaves. Inbound mail is untrusted data: bodies and attachments can never become instructions, and the tool output must say so to the model. Add a per-agent allowlist of recipients and a daily send cap, an inbox page on the agent profile with threads, and a rule that lets the owner forward certain mail to the approval flow or an automation trigger ("when mail arrives from X, run this prompt").++Verify with a real inbox: send between two agent mailboxes, receive, read, reply, and show a hostile inbound message being treated as data.++---++This brief is standalone. Assume no other brief has run, and keep working if others run at the same time: use names unique to this work for tables, routes and files, give migrations a fresh timestamp, append to shared files instead of rewriting them, and re-read a shared file before you edit it. CLAUDE.md governs everything, including its spend gate (anything that signs or moves funds shows recipient, amount, asset and chain and waits for an explicit yes; test with devnet, simulation or paper mode) and the rule that nothing naming another crypto project is committed without the owner's approval, so list any new third-party names you introduce in your report. Never name any competitor in a committed file. Finish it fully: wire it, document it, add the changelog entry, verify it for real, and report what you observed.diff --git a/prompts/finish/949-commerce-and-invoices.md b/prompts/finish/949-commerce-and-invoices.mdnew file mode 100644index 000000000..055e89c1b--- /dev/null+++ b/prompts/finish/949-commerce-and-invoices.md@@ -0,0 +1,9 @@+Agents can pay and call paid endpoints (pay_quote and pay_and_call in api/_mcpagent/tools.js) and we have per-transaction and daily spend limits (api/_lib/agent-spend-policy.js), but there is no commerce layer: no way for an agent to invoice someone, track whether it was paid, buy a thing and confirm receipt, or check and set spending rules as tools. api/billing/invoices.js is only a usage statement.++Build real invoices: an invoice object (payer or open, amount, asset in USDC, SOL or $THREE, memo, due date, status), created by an agent or owner, payable by a Solana Pay link and QR, verified on-chain by a watcher that matches the memo reference, with webhooks and a receipt page. Tools: invoice_create, invoice_details, invoice_list, invoice_verify, invoice_cancel. Add agent_send (transfer, gated by the whitelist and approval), agent_buy and agent_buy_confirm (purchase from a listed offer with a quote then explicit confirm), agent_sell (list an offer), and spending_setup and spending_check so an agent can read and propose changes to its own limits (changes need owner step-up, never self-approved).++Reconcile everything into the earnings ledger so invoice income shows next to skill and creator-fee income. Test with real devnet payments and an expired and an underpaid invoice.++---++This brief is standalone. Assume no other brief has run, and keep working if others run at the same time: use names unique to this work for tables, routes and files, give migrations a fresh timestamp, append to shared files instead of rewriting them, and re-read a shared file before you edit it. CLAUDE.md governs everything, including its spend gate (anything that signs or moves funds shows recipient, amount, asset and chain and waits for an explicit yes; test with devnet, simulation or paper mode) and the rule that nothing naming another crypto project is committed without the owner's approval, so list any new third-party names you introduce in your report. Never name any competitor in a committed file. Finish it fully: wire it, document it, add the changelog entry, verify it for real, and report what you observed.diff --git a/prompts/finish/950-domain-tools.md b/prompts/finish/950-domain-tools.mdnew file mode 100644index 000000000..897f2e3dd--- /dev/null+++ b/prompts/finish/950-domain-tools.md@@ -0,0 +1,9 @@+Agents can mint .sol subdomains but cannot search, price or register web domains. Add domain_search, domain_check, domain_pricing and domain_register tools. Use Google Cloud Domains (the Cloud Domains API) as the backend, since GCP is pre-approved and we already run there; check its supported TLD list and pricing endpoints first and document the limits. Search returns availability and registration and renewal price for a name across TLDs; check returns a single answer with a clear unavailable reason; pricing lists TLDs.++Registration spends money, so it is a gated action: a quote with the exact price, registrant contact handling, term and auto-renew choice, an explicit confirm flag and an idempotency key, then a status poll. Never run a real registration in a test; run the real search, check and price calls against the live API and the registration call against the API's validate-only mode.++Make it useful for launches: from a coin page, suggest and check available domains for the project name, and connect a purchased domain to the agent's public page through the existing custom-domain path (docs/tutorials/deploy-to-vercel-custom-domain.md is legacy wording; follow the Cloud Run and load balancer runbook in docs/ops/gcp-production.md).++---++This brief is standalone. Assume no other brief has run, and keep working if others run at the same time: use names unique to this work for tables, routes and files, give migrations a fresh timestamp, append to shared files instead of rewriting them, and re-read a shared file before you edit it. CLAUDE.md governs everything, including its spend gate (anything that signs or moves funds shows recipient, amount, asset and chain and waits for an explicit yes; test with devnet, simulation or paper mode) and the rule that nothing naming another crypto project is committed without the owner's approval, so list any new third-party names you introduce in your report. Never name any competitor in a committed file. Finish it fully: wire it, document it, add the changelog entry, verify it for real, and report what you observed.diff --git a/prompts/finish/951-whitelist-api-cooldown.md b/prompts/finish/951-whitelist-api-cooldown.mdnew file mode 100644index 000000000..0768addc2--- /dev/null+++ b/prompts/finish/951-whitelist-api-cooldown.md@@ -0,0 +1,9 @@+Withdrawal allowlists exist (withdraw_allowlist in api/_lib/agent-trade-guards.js, max 50, set by replacing the whole list through PUT /api/agents/:id/solana-wallet) but there is no way to manage them as an agent or a developer, a new address is usable instantly, and the list only guards the withdraw category. A stolen session or a prompt-injected agent can add an attacker address and drain the wallet in one minute.++Make the whitelist first-class. Add get_whitelist, add_to_whitelist and remove_from_whitelist as MCP tools and REST endpoints with labels, chain and per-destination caps. A newly added address has a cooldown (default 24 hours, owner-configurable, never below an hour) before it can receive funds, the owner is notified immediately by every channel they have connected, and a pending address can be cancelled with one click. Removing is instant. Adding or editing requires step-up (re-auth or passkey), and an agent can propose an address but never activate one. Extend enforcement to every outbound category (transfers, tips, bridge, order payouts, invoice payouts, card withdrawals), not only withdraw, and compare addresses safely (normalised, with lookalike and casing tests).++Show the allowlist state in every confirmation table that moves funds. Tests: cooldown cannot be bypassed by editing the list through another path, injection attempts through tool arguments, and the old whole-list PUT still works but follows the same cooldown rules.++---++This brief is standalone. Assume no other brief has run, and keep working if others run at the same time: use names unique to this work for tables, routes and files, give migrations a fresh timestamp, append to shared files instead of rewriting them, and re-read a shared file before you edit it. CLAUDE.md governs everything, including its spend gate (anything that signs or moves funds shows recipient, amount, asset and chain and waits for an explicit yes; test with devnet, simulation or paper mode) and the rule that nothing naming another crypto project is committed without the owner's approval, so list any new third-party names you introduce in your report. Never name any competitor in a committed file. Finish it fully: wire it, document it, add the changelog entry, verify it for real, and report what you observed.diff --git a/prompts/finish/952-token-budgets-and-credit-deposits.md b/prompts/finish/952-token-budgets-and-credit-deposits.mdnew file mode 100644index 000000000..fe3f82f8a--- /dev/null+++ b/prompts/finish/952-token-budgets-and-credit-deposits.md@@ -0,0 +1,9 @@+Usage control is dollar-only today. api/_lib/inference-billing.js enforces a per-agent {daily_usd, monthly_usd} budget and stops the agent when it is exhausted; api/credits/deposit.js credits SOL and $THREE deposits. There is no hourly token limit, no max-tokens budget, no USDC deposit through the credits endpoint, and the free-tier error is a 429 free_tier_exhausted with no path to approve a paid fallback.++Add token budgets: per agent hourly and daily token ceilings and a per-run ceiling, enforced before the model call, that pause the agent and notify the owner, with a resume button and an "extend once" approval. Add USDC to the deposit flow (verify the transfer on-chain, idempotent, same ledger), and make the deposit page show every accepted asset and its rate from live config. Paying credits in $THREE should earn a configurable bonus read from api/_lib/token/config.js, default to whatever the owner policy allows, and never type the number into copy. When the free tier runs out, return an error that carries the choices (wait until reset_at, top up, bring your own key) so a client can approve the paid fallback in one step.++Build a spend page with per-agent usage by day, by model and by tool, projected month-end, and alerts at 50, 80 and 100 percent of any cap. Tests for the race between two concurrent calls at the ceiling.++---++This brief is standalone. Assume no other brief has run, and keep working if others run at the same time: use names unique to this work for tables, routes and files, give migrations a fresh timestamp, append to shared files instead of rewriting them, and re-read a shared file before you edit it. CLAUDE.md governs everything, including its spend gate (anything that signs or moves funds shows recipient, amount, asset and chain and waits for an explicit yes; test with devnet, simulation or paper mode) and the rule that nothing naming another crypto project is committed without the owner's approval, so list any new third-party names you introduce in your report. Never name any competitor in a committed file. Finish it fully: wire it, document it, add the changelog entry, verify it for real, and report what you observed.diff --git a/prompts/finish/953-api-key-plans.md b/prompts/finish/953-api-key-plans.mdnew file mode 100644index 000000000..d845e0ef0--- /dev/null+++ b/prompts/finish/953-api-key-plans.md@@ -0,0 +1,9 @@+Our API keys (api/_lib/api-keys.js, sk_live_ keys with scopes and expiry) are metered per call in usage_events, but there are no plans. Access tiers today are a $THREE holding ladder, which is a loyalty feature, not a developer plan. Developers need Free, Builder, Scale and Enterprise plans with monthly call quotas, and the quotas must actually be enforced (competing APIs record calls but do not enforce them, which is a weakness to beat).++Define plans in one config (included calls, burst rate, concurrent limit, webhook count, price), build enforcement in the shared v1 gateway so every route respects it, return 429 with Retry-After and X-RateLimit headers and a 402 with a clear upgrade path at the quota, and show live usage against quota in the dashboard. Add self-serve upgrade: pay monthly in USDC or credits (and $THREE at a configured discount), with proration, downgrade at period end and a receipt. Revocation must take effect immediately, not after a cache window: invalidate the cache on revoke and test it.++Add per-key analytics (calls by route, errors, latency percentiles, top callers), key rotation with an overlap window, and IP allowlists. Publish the plans on a /developers page generated from the plan config with a calculation note, never typed numbers. Docs in docs/api-reference.md, changelog entry, tests for quota edge cases (exactly at limit, concurrent calls, period rollover).++---++This brief is standalone. Assume no other brief has run, and keep working if others run at the same time: use names unique to this work for tables, routes and files, give migrations a fresh timestamp, append to shared files instead of rewriting them, and re-read a shared file before you edit it. CLAUDE.md governs everything, including its spend gate (anything that signs or moves funds shows recipient, amount, asset and chain and waits for an explicit yes; test with devnet, simulation or paper mode) and the rule that nothing naming another crypto project is committed without the owner's approval, so list any new third-party names you introduce in your report. Never name any competitor in a committed file. Finish it fully: wire it, document it, add the changelog entry, verify it for real, and report what you observed.diff --git a/prompts/finish/954-oauth-connector-google.md b/prompts/finish/954-oauth-connector-google.mdnew file mode 100644index 000000000..78cfc30e3--- /dev/null+++ b/prompts/finish/954-oauth-connector-google.md@@ -0,0 +1,9 @@+We have an OAuth 2.1 authorization server for MCP (api/oauth/[action].js with PKCE S256, dynamic registration, api/wk.js discovery documents) and sign-in with X, GitHub, SIWE, SIWS and Privy, but api/auth/google/ is empty. The target experience: one connector URL pasted into Claude or ChatGPT, sign in with Google or X, no API key, credentials never shown to the client. Competing connectors sign the first client out when a second connects; ours should not.++Build Google sign-in properly (a direct OAuth authorization code flow with PKCE, account linking to an existing user by verified email with a confirm step, and a clean error state), and make it a choice on the MCP authorization screen next to X, GitHub and wallet sign-in. Verify the connector end to end against a real MCP client: Claude's custom connector flow and a second client at the same time, both staying connected. Scope the grant per tool group (read, trade, spend, launch) with a consent screen that lists what each scope can do and which actions will still ask for confirmation, and let the user revoke a client from settings with immediate effect.++Update /connect with the one URL and per-client steps. If a Google client credential is missing, follow the credential row in CLAUDE.md before concluding it does not exist. Document in docs/mcp.md and add tests for the token exchange and revocation.++---++This brief is standalone. Assume no other brief has run, and keep working if others run at the same time: use names unique to this work for tables, routes and files, give migrations a fresh timestamp, append to shared files instead of rewriting them, and re-read a shared file before you edit it. CLAUDE.md governs everything, including its spend gate (anything that signs or moves funds shows recipient, amount, asset and chain and waits for an explicit yes; test with devnet, simulation or paper mode) and the rule that nothing naming another crypto project is committed without the owner's approval, so list any new third-party names you introduce in your report. Never name any competitor in a committed file. Finish it fully: wire it, document it, add the changelog entry, verify it for real, and report what you observed.diff --git a/prompts/finish/955-telegram-login-link-codes-external-wallet.md b/prompts/finish/955-telegram-login-link-codes-external-wallet.mdnew file mode 100644index 000000000..0efe7f9dc--- /dev/null+++ b/prompts/finish/955-telegram-login-link-codes-external-wallet.md@@ -0,0 +1,9 @@+Account linking has holes. There is no Telegram login or magic link (Telegram exists only as a gateway and notification channel), no multi-device link code (api/auth/handoff.js is only a 60 second iOS-to-Safari handoff), and no tool that lets an agent register an external wallet as its payout or owner wallet.++Build: (1) Telegram sign-in using Telegram's login widget and a deep-link magic-link flow with a one-time token, verified server-side (HMAC check of the payload, freshness window, replay protection), creating or linking an account. (2) Link codes: a short-lived one-time code generated in the web UI that links a phone, a desktop app, a CLI or a Telegram chat to the account, with a list of linked devices and one-click revoke. (3) set_external_wallet and get_linked_accounts tools and REST endpoints so an agent or owner can attach a Solana or EVM wallet proved by a signed message; changing a payout wallet goes through step-up and the cooldown rules.++Make linking safe: codes are single use, rate limited and expire in minutes, a link request always shows what will be linked and requires confirmation in the already signed-in session, and every link and unlink is in the audit log (api/audit-log.js). Wire the gateway (api/gateway/telegram.js) so a linked Telegram chat resolves to the right account. Write the missing docs/chat-gateways.md that api code already cites. Test the replay, expiry and wrong-account cases.++---++This brief is standalone. Assume no other brief has run, and keep working if others run at the same time: use names unique to this work for tables, routes and files, give migrations a fresh timestamp, append to shared files instead of rewriting them, and re-read a shared file before you edit it. CLAUDE.md governs everything, including its spend gate (anything that signs or moves funds shows recipient, amount, asset and chain and waits for an explicit yes; test with devnet, simulation or paper mode) and the rule that nothing naming another crypto project is committed without the owner's approval, so list any new third-party names you introduce in your report. Never name any competitor in a committed file. Finish it fully: wire it, document it, add the changelog entry, verify it for real, and report what you observed.diff --git a/prompts/finish/956-pump-self-funded-launch-and-pairs.md b/prompts/finish/956-pump-self-funded-launch-and-pairs.mdnew file mode 100644index 000000000..190188cf9--- /dev/null+++ b/prompts/finish/956-pump-self-funded-launch-and-pairs.md@@ -0,0 +1,9 @@+Launching is session-signed and the x402 route is pay then launch. What is missing is the developer-friendly path where an agent funds its own launch: ask for a quote, pay the exact quoted amount from the agent wallet within a validity window, then retry with the payment proof, safely idempotent so a timeout never charges twice. Also missing: a list of supported pairs and the creator fee range, so a launcher can choose.++Build GET /api/pump/pairs returning the supported quote assets (SOL, USDC and the stable pairs api/_lib/pump-quote.js already classifies) with their live status and the allowed creator-fee range read from config. Build the quote flow: a launch intent with name, symbol, description, image, quote asset, initial buy and creator fee returns a quote with every fee line and its expiry; payment from the agent wallet is a gated spend (recipient, amount, asset, chain, explicit yes) and the proof (transaction signature plus a preflight token) is accepted once and replays the same result. Honour the repo rule that launching signs only from a same-site session: the funding and the final launch confirmation happen in the browser or approval flow, and the CLI or API only creates the intent and polls. No bearer token can sign a launch.++Let the creator pick the creator-fee bps within the range and show what that does to earnings. Return a launch status endpoint with stages (quote, paid, submitted, confirmed, indexed). Dry-run test against a launch lane that never touches mainnet; real launches are the owner's action.++---++This brief is standalone. Assume no other brief has run, and keep working if others run at the same time: use names unique to this work for tables, routes and files, give migrations a fresh timestamp, append to shared files instead of rewriting them, and re-read a shared file before you edit it. CLAUDE.md governs everything, including its spend gate (anything that signs or moves funds shows recipient, amount, asset and chain and waits for an explicit yes; test with devnet, simulation or paper mode) and the rule that nothing naming another crypto project is committed without the owner's approval, so list any new third-party names you introduce in your report. Never name any competitor in a committed file. Finish it fully: wire it, document it, add the changelog entry, verify it for real, and report what you observed.diff --git a/prompts/finish/957-uniswap-lane-and-launch-status.md b/prompts/finish/957-uniswap-lane-and-launch-status.mdnew file mode 100644index 000000000..a946a2e80--- /dev/null+++ b/prompts/finish/957-uniswap-lane-and-launch-status.md@@ -0,0 +1,9 @@+Our launch lanes are pump.fun, Meteora DBC and a Robinhood Chain paired launch (api/_lib/paired-launchpad.js, api/_mcp/tools/paired.js with paired_launch_quote and paired_launch). There is no standalone Uniswap lane, and the paired launch has no idempotency key and no status endpoint, so a client that times out cannot tell whether a launch happened.++Add an Uniswap lane on an EVM chain we already support: a fixed-supply token with a pool created through Uniswap's contracts or a maintained SDK, with creator fee routing, liquidity lock options, and a quote that lists every fee. Solana remains the default lane and must be unaffected. For both EVM lanes add an Idempotency-Key header, a persisted launch record, and GET /api/launches/:id that reports stages until finalized, so a retry returns the same launch. Wire the existing launch wizard to a lane picker that compares fees, graduation behaviour, creator share and chain from live config.++Spend gate applies: the wizard shows the confirmation table and signs only after an explicit yes. Test on a testnet or fork; a real launch is the owner's action. Document each lane with a table generated from the lane config.++---++This brief is standalone. Assume no other brief has run, and keep working if others run at the same time: use names unique to this work for tables, routes and files, give migrations a fresh timestamp, append to shared files instead of rewriting them, and re-read a shared file before you edit it. CLAUDE.md governs everything, including its spend gate (anything that signs or moves funds shows recipient, amount, asset and chain and waits for an explicit yes; test with devnet, simulation or paper mode) and the rule that nothing naming another crypto project is committed without the owner's approval, so list any new third-party names you introduce in your report. Never name any competitor in a committed file. Finish it fully: wire it, document it, add the changelog entry, verify it for real, and report what you observed.diff --git a/prompts/finish/958-creator-fee-payouts.md b/prompts/finish/958-creator-fee-payouts.mdnew file mode 100644index 000000000..bf5a027be--- /dev/null+++ b/prompts/finish/958-creator-fee-payouts.md@@ -0,0 +1,9 @@+Public creator earnings exist (api/agents/[id]/earnings.js, api/leaderboard/earnings.js, the 30 minute snapshot cron) and collection runs every five minutes in api/cron/launcher-claimer.js with hourly distribution crons. What a creator cannot do is register a payout wallet with a signature, see the breakdown of earned, held, pending and sent with each distribution listed, or understand when money moves.++Build the payout wallet flow: register or change a payout wallet by signing a message with that wallet (Ed25519 for Solana, with timestamp and nonce), with step-up and the cooldown for changes, and with the wallet shown on the earnings page. Expand the earnings API to return totalEarned, totalClaimed, totalSent, totalPending and totalHeld per agent and per coin, plus recentDistributions with transaction signatures, and state why anything is held (below minimum, wallet not registered, cooldown). Add a creator earnings page section that explains the schedule from the cron definitions in vercel.json rather than typed text, a per-$100 flow explainer generated from the split policy in api/_lib/token/config.js, and CSV export.++Notify the creator when fees are distributed or held. Reconcile on-chain vault balances against our records in a scheduled check that alerts on drift. Tests for the held reasons and the signature replay case.++---++This brief is standalone. Assume no other brief has run, and keep working if others run at the same time: use names unique to this work for tables, routes and files, give migrations a fresh timestamp, append to shared files instead of rewriting them, and re-read a shared file before you edit it. CLAUDE.md governs everything, including its spend gate (anything that signs or moves funds shows recipient, amount, asset and chain and waits for an explicit yes; test with devnet, simulation or paper mode) and the rule that nothing naming another crypto project is committed without the owner's approval, so list any new third-party names you introduce in your report. Never name any competitor in a committed file. Finish it fully: wire it, document it, add the changelog entry, verify it for real, and report what you observed.diff --git a/prompts/finish/959-external-skill-registries.md b/prompts/finish/959-external-skill-registries.mdnew file mode 100644index 000000000..ad8434463--- /dev/null+++ b/prompts/finish/959-external-skill-registries.md@@ -0,0 +1,9 @@+Skills are our strongest extensibility surface but they are closed: api/skills/community.js serves only our own community-skills/registry.json baked at deploy, there is no runtime import from external registries, and forking works for agents but not skills. The open ecosystem already has dozens of Solana skill repositories (protocol integrations, data, security, infrastructure) in the same SKILL.md format.++Build safe external import. A registry is a GitHub repository or a manifest URL; the importer fetches skills at runtime, caches them (five minutes for the index, content-addressed for bodies), validates the manifest and SKILL.md, shows the permissions and tools the skill requests, scans it (reuse the guardian and policy packages and the skill sandbox limits), and installs only after the owner approves. Show provenance on every skill (source repo, commit, license, author) and pin the commit so an upstream change never silently alters an installed skill; offer an update diff. Skills that request spending, signing or outbound messaging are flagged and run only under the spend gate.++Add skill_fork and skill_publish as MCP tools and a browse view with categories (DeFi, intelligence, social, infrastructure, security, data) and install counts. Check licences before listing. Test with two real public registries and one deliberately hostile skill that must be refused.++---++This brief is standalone. Assume no other brief has run, and keep working if others run at the same time: use names unique to this work for tables, routes and files, give migrations a fresh timestamp, append to shared files instead of rewriting them, and re-read a shared file before you edit it. CLAUDE.md governs everything, including its spend gate (anything that signs or moves funds shows recipient, amount, asset and chain and waits for an explicit yes; test with devnet, simulation or paper mode) and the rule that nothing naming another crypto project is committed without the owner's approval, so list any new third-party names you introduce in your report. Never name any competitor in a committed file. Finish it fully: wire it, document it, add the changelog entry, verify it for real, and report what you observed.diff --git a/prompts/finish/960-one-flag-installers.md b/prompts/finish/960-one-flag-installers.mdnew file mode 100644index 000000000..c8c3e6ae7--- /dev/null+++ b/prompts/finish/960-one-flag-installers.md@@ -0,0 +1,9 @@+The three-ws CLI (packages/three-ws-cli) already writes MCP config for many clients through npx three-ws setup and verifies each server with a live tools/list. What is missing is the one-line install experience: a hosted shell installer, a single flag per client, and a Claude Code integration that also installs skills.++Build: a /cli/install script that checks OS and Node, installs or runs the CLI, and prints next steps; a /cli/claude script that wires the MCP and the skills into Claude Code and offers a one-command launch ("claude \"launch my agent\""); and per-client flags (npx three-ws --claude, --cursor, --codex, --vscode, --windsurf) that do the whole setup non-interactively. Pipe-to-shell is a trust problem: serve each script with a checksum and signature, document how to download and read it first, make it idempotent, and never write secrets to disk in plain text. Add npx three-ws team and agent status commands that show live state, and npx three-ws doctor that diagnoses a broken setup (bad config, expired auth, unreachable server).++Test on a clean container for each client config path. Update /connect, docs/cli.md and the CLI README with commands that actually run.++---++This brief is standalone. Assume no other brief has run, and keep working if others run at the same time: use names unique to this work for tables, routes and files, give migrations a fresh timestamp, append to shared files instead of rewriting them, and re-read a shared file before you edit it. CLAUDE.md governs everything, including its spend gate (anything that signs or moves funds shows recipient, amount, asset and chain and waits for an explicit yes; test with devnet, simulation or paper mode) and the rule that nothing naming another crypto project is committed without the owner's approval, so list any new third-party names you introduce in your report. Never name any competitor in a committed file. Finish it fully: wire it, document it, add the changelog entry, verify it for real, and report what you observed.diff --git a/prompts/finish/961-desktop-agent-runtime.md b/prompts/finish/961-desktop-agent-runtime.mdnew file mode 100644index 000000000..61fbcb87b--- /dev/null+++ b/prompts/finish/961-desktop-agent-runtime.md@@ -0,0 +1,9 @@+apps/desktop (Companion) is a transparent always-on-top mascot that delivers notifications; apps/forge-desktop (Forge) is a local 3D toolchain. Neither runs agents. Users who want keys that never leave their machine, and strategies that run while the cloud is unreachable, need a local runtime.++Extend apps/desktop into an agent runtime on top of packages/agent-runtime: run agents, strategies, orders and automations locally, keep signing keys in the OS keychain (Electron safeStorage), and optionally sync configuration and receipts with the cloud account. A tray menu shows each agent's status with pause, kill and approvals, and native notifications carry approval requests using the same payload-hash confirmation as the web flow, so an approval cannot differ from what was shown. The mascot becomes the agent's face: it reacts to state (working, waiting for approval, error).++Security: context isolation on, an IPC allowlist, no key material in logs or crash reports, signed auto-update. Build installers with electron-builder for macOS, Windows and Linux and produce the Linux artifact in this session; signing certificates missing are an owner action to list. README with install steps and a runnable example, STRUCTURE.md row, and a smoke test that starts the runtime headless and runs a paper-mode strategy.++---++This brief is standalone. Assume no other brief has run, and keep working if others run at the same time: use names unique to this work for tables, routes and files, give migrations a fresh timestamp, append to shared files instead of rewriting them, and re-read a shared file before you edit it. CLAUDE.md governs everything, including its spend gate (anything that signs or moves funds shows recipient, amount, asset and chain and waits for an explicit yes; test with devnet, simulation or paper mode) and the rule that nothing naming another crypto project is committed without the owner's approval, so list any new third-party names you introduce in your report. Never name any competitor in a committed file. Finish it fully: wire it, document it, add the changelog entry, verify it for real, and report what you observed.diff --git a/prompts/finish/962-approvals-inbox-telegram.md b/prompts/finish/962-approvals-inbox-telegram.mdnew file mode 100644index 000000000..3b6803a2f--- /dev/null+++ b/prompts/finish/962-approvals-inbox-telegram.md@@ -0,0 +1,9 @@+Ask-before-each-trade only works if approving takes two seconds from anywhere. We have push infrastructure (api/push, public/push-sw.js, api/_lib/web-push.js), confirm-before-execute intents (api/_lib/wallet-intents.js), spend-policy step-up rules and a Telegram gateway (api/gateway/telegram.js, workers/agent-gateway) that receives messages, but no approval queue and no two-way control from chat apps.++Build an approvals inbox: a table of pending requests (agent, action, human summary, recipient, amount, asset, chain, payload hash, expiry), an API to list, approve and deny, a /approvals page with filters, and an audit trail. The payload hash binds what was shown to what executes; a tampered or expired request fails closed; approve is idempotent. Deliver each request by web push and by Telegram with inline Approve and Deny buttons whose callback data is signed and expiring, and show the full confirmation table in the message. Add Telegram commands: /agents, /positions, /pause, /kill, /approvals, and plain chat to the agent. Ignore commands from unlinked users and forwarded instructions.++Owners can create explicit auto-approve rules capped by size and venue, always revocable, default off. Use a maintained Telegram library (grammy or telegraf) after checking it. Test with a real throwaway bot and the replay and tamper cases.++---++This brief is standalone. Assume no other brief has run, and keep working if others run at the same time: use names unique to this work for tables, routes and files, give migrations a fresh timestamp, append to shared files instead of rewriting them, and re-read a shared file before you edit it. CLAUDE.md governs everything, including its spend gate (anything that signs or moves funds shows recipient, amount, asset and chain and waits for an explicit yes; test with devnet, simulation or paper mode) and the rule that nothing naming another crypto project is committed without the owner's approval, so list any new third-party names you introduce in your report. Never name any competitor in a committed file. Finish it fully: wire it, document it, add the changelog entry, verify it for real, and report what you observed.diff --git a/prompts/finish/963-agent-signup-and-public-stats.md b/prompts/finish/963-agent-signup-and-public-stats.mdnew file mode 100644index 000000000..4c82f8e0d--- /dev/null+++ b/prompts/finish/963-agent-signup-and-public-stats.md@@ -0,0 +1,9 @@+Two discovery gaps. First, an autonomous agent cannot onboard itself: there is no wallet-signed signup (an Ed25519 signed request that creates an agent identity with no human in the loop) and no capabilities discovery call that tells a new agent what it can do and what each action costs. api/agents/capabilities.js is about scoped session keys, a different thing. Second, there is no public platform stats endpoint: /api/home-stats is a cached homepage feed and /api/healthz is always green.++Build POST /api/v1/agents/signup that accepts a signed payload (timestamp, nonce, public key, requested name) and creates an agent with its custodial wallet, returns credentials once, rate limits by key and IP, and rejects replays; plus GET /api/v1/capabilities returning tools by group with prices, plan limits and approval rules, generated from the registry. Anyone created this way starts in paper mode with strict caps until a human claims the agent.++Build GET /api/stats with real totals (agents, launches, volume, earnings paid, active strategies) each with its source and timestamp and a short cache, and make /api/health honest: database, RPC, worker and wallet probes that return degraded when something is wrong. Publish both in docs/api-reference.md and on /status. Tests for signature replay and a clock-skewed request.++---++This brief is standalone. Assume no other brief has run, and keep working if others run at the same time: use names unique to this work for tables, routes and files, give migrations a fresh timestamp, append to shared files instead of rewriting them, and re-read a shared file before you edit it. CLAUDE.md governs everything, including its spend gate (anything that signs or moves funds shows recipient, amount, asset and chain and waits for an explicit yes; test with devnet, simulation or paper mode) and the rule that nothing naming another crypto project is committed without the owner's approval, so list any new third-party names you introduce in your report. Never name any competitor in a committed file. Finish it fully: wire it, document it, add the changelog entry, verify it for real, and report what you observed.diff --git a/prompts/finish/964-mcp-annotations-and-tool-count.md b/prompts/finish/964-mcp-annotations-and-tool-count.mdnew file mode 100644index 000000000..2720e8b54--- /dev/null+++ b/prompts/finish/964-mcp-annotations-and-tool-count.md@@ -0,0 +1,9 @@+Our MCP surface is big and uneven. Estimated annotation coverage is high but not complete: api/_mcp-studio/catalog-tools.js has none, discovery and home tools are unmarked, and several tool files have partial readOnly and idempotent hints. api/_mcp/prompts.js names tools that are not registered (perps_markets, swap_quote and others), so some prompts point at nothing. There is no single published tool count; READMEs say 15 and 16 while the registry in api/_mcpall/registry.js mounts far more.++Make the surface trustworthy. Add a test that loads every MCP server, enumerates every tool, and fails unless each has all four hints set deliberately (readOnlyHint, destructiveHint, idempotentHint, openWorldHint) and a description with a when-to-use line. Add a test that every tool, resource and prompt referenced by any prompt actually exists, and fix every dangling reference (register the tool if it belongs, or correct the prompt). Compute the real totals (tools, resources, prompts, per server) at build time and at request time and publish them on /mcp-tools and in tools.json with a how-it-is-calculated note; update every README and doc that quotes a number so none can drift, with a check that fails the build on a mismatch.++Add per-tool pages with schema, example call, price and a try-it for free read-only tools, search and filters by category, and a diff of tools added in each release for the changelog. Wire the checks into npm run gate.++---++This brief is standalone. Assume no other brief has run, and keep working if others run at the same time: use names unique to this work for tables, routes and files, give migrations a fresh timestamp, append to shared files instead of rewriting them, and re-read a shared file before you edit it. CLAUDE.md governs everything, including its spend gate (anything that signs or moves funds shows recipient, amount, asset and chain and waits for an explicit yes; test with devnet, simulation or paper mode) and the rule that nothing naming another crypto project is committed without the owner's approval, so list any new third-party names you introduce in your report. Never name any competitor in a committed file. Finish it fully: wire it, document it, add the changelog entry, verify it for real, and report what you observed.diff --git a/prompts/finish/965-revenue-ledger-reinvest.md b/prompts/finish/965-revenue-ledger-reinvest.mdnew file mode 100644index 000000000..76f12be44--- /dev/null+++ b/prompts/finish/965-revenue-ledger-reinvest.md@@ -0,0 +1,9 @@+Agents earn from several places and nothing shows it together. Creator fees (api/agents/[id]/earnings.js), paid skill and service calls (api/agent-skill-price.js, api/x402/agents.js), marketplace royalties (api/skill-royalties), invoice income and realised trading PnL each live in their own table and page. The only reinvest rule that exists is auto_claim_reinvest_pct in api/agent/launcher.js.++Build one revenue ledger per agent and per owner that joins every income source, each row linked to its transaction, with totals by source and period, CSV and JSON export, charts that follow the dataviz skill's guidance, and a how-it-is-calculated drawer. Reconcile it against on-chain and database sources on a schedule and alert on drift.++On top of it build reinvest rules: an owner states a split ("20 percent of income to model credits, 20 percent into a DCA of the agent's own coin, 10 percent to a tools budget, keep the rest") and a worker executes it each period with idempotency keys, per-run receipts and hard caps. Every leg that sends funds to a new address stops at the explicit confirmation table. Show projections only from trailing real history with the window stated, never invented growth. Notify on milestones and on any rule failure. This is the "agents as companies" story, so give each agent a /earnings page that can be made public with a toggle, honest and fully sourced.++---++This brief is standalone. Assume no other brief has run, and keep working if others run at the same time: use names unique to this work for tables, routes and files, give migrations a fresh timestamp, append to shared files instead of rewriting them, and re-read a shared file before you edit it. CLAUDE.md governs everything, including its spend gate (anything that signs or moves funds shows recipient, amount, asset and chain and waits for an explicit yes; test with devnet, simulation or paper mode) and the rule that nothing naming another crypto project is committed without the owner's approval, so list any new third-party names you introduce in your report. Never name any competitor in a committed file. Finish it fully: wire it, document it, add the changelog entry, verify it for real, and report what you observed.