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.
OKX-07: Final audit, docs closure, approval watch, first-sale readiness
How to run this: paste this whole file into a fresh Claude Code chat opened in
/workspaces/three.ws, or say "execute prompts/finish/914-okx-ai-07-final-audit-and-watch.md".
Read prompts/finish/_context/okx-ai-00-CONTEXT.md, all of prompts/finish/_context/okx-ai-PROGRESS.md,
prompts/finish/_context/okx-ai-RUNBOOK.md and CLAUDE.md first.
Binding operating clause
- Finish 100%. Trust nothing in
okx-ai-PROGRESS.mduntil you have re-verified it yourself today. This work order exists precisely because earlier work orders claimed done. - Stop only for a real payment or an OTP, batched into one message, per the CLAUDE.md gates.
- CLAUDE.md hard rules: no mocks, no TODO comments, no em-dash or en-dash characters. Stage explicit paths only.
State on 2026-09-24, re-measured
- Part 1: item 1 PASS (four paid rows 402, spec-valid, OKX SDK parse PASS 20 probes).
Items 2 and 3 blocked on a funded buyer and a session. Item 4 PASS on the three local copies,
on-chain copy unreadable without a session. Item 5: the stream's files carried 16 legacy
em-dashes in
tests/api/okx-identity-studio.test.jsandtests/api/okx-3d-services.test.js, now removed; no TODOs, no stubs, repo root clean. Item 6:npm run build:pagesexit 0 (952 pages);npm run audit:docshas 5 findings, all README-less directories outside this stream (packages/agent-cli,packages/agents-sdk,packages/mcp-policy,packages/three-ws-cli,workers/signal-bridge, all added by other features on 2026-09-22);npm testhad 30 failing files, of which the forge lane suites (18 tests, a staleforge-store.jsmock) andmcp-3d-challenge(two unclassified tools) touched this stream's path and were fixed (9acf0cba2,bfeca3aa1). The rest are outside it. - Part 2: unchanged since 2026-09-10 and re-checked: the doc's curls answer as documented,
docs/okx-marketplace.mdis linked fromdocs/start-here.md, and its "Verified behavior" section still matches production (no settlement claimed). - Part 3: approval status could NOT be read (onchainos v4.6.2 installed,
loggedIn: false, every agent read needs the session). No branch executed. RUNBOOK §0.5 and the CLI version line were corrected.
Part 1: independent adversarial audit (against production, today)
- Unpaid 402 on the cheapest and the flagship endpoints, still spec-valid. Challenges drift when unrelated deploys touch shared code.
- One real paid call end to end including the on-chain settlement check (OKX-04's runbook; request funding in your single owner message if the wallet is dry).
- Replay protection spot check (OKX-04 case 5a) still rejects.
- Free lane: health honest, catalog identical to the module and to the submitted listing
(
onchainos agent service-list --agent-id 2632). - Audit every file this work stream touched (derive the list from
okx-ai-PROGRESS.mdplusgit log --sincethe stream's start) against the CLAUDE.md rules: no TODOs, no dead paths, no half-wired states, no scratch files, repo root clean. Fix what you find; do not file it. npm testgreen;npm run build:pagesgreen (it validates changelog entries);npm run audit:docsclean.
Part 2: docs closure sweep
Read each as a zero-context outsider and verify it is correct, not merely present:
-
specs/okx-agent-payments.mdmatches implemented reality, including every OKX-04 fix. -
docs/okx-marketplace.mddocuments every service and every curl example actually runs (run them), and is linked fromdocs/start-here.md. -
docs/agent-identities.mdstill matches the shipped Agent Identity Studio. -
STRUCTURE.mdhas rows for every surface this stream added. -
data/pages.jsonregisters every new page. -
data/changelog.jsonentries are present and well-formed; any claim OKX-04 disproved is corrected. A doc that promises what the code does not do is a release blocker. - Every new package or worker directory has a README.
Part 3: approval watch and launch execution
- Check current approval status (
onchainos agent get-agents --agent-ids 2632). prompts/finish/_context/okx-ai-RUNBOOK.mdalready exists. Verify every command in it by running it, fix whatever has drifted, and keep it good enough for a zero-context operator to run launch day alone.- Execute the branch that matches reality, do not just document it:
- Approved: confirm activation, add the holder-visible
data/changelog.jsonentry announcing the listing (tagfeature), let the changelog cron deliver it (never runchangelog:pushmanually, its file state double-posts against the cron's DB state), and verify the listing renders correctly to a buyer (onchainos agent search --query "3D avatar rigging GLB"). - Rejected again: capture the exact
approvalRemarkand email text, append it tookx-ai-PROGRESS.md, map the stated reason to the responsible work order, fix it, and re-run OKX-05. - Still pending: record the status and the date, and leave the watch command in the RUNBOOK. Do not idle-loop or leave a daemon running.
- Approved: confirm activation, add the holder-visible
- First-sale ops in the RUNBOOK: where sales and feedback show up (
soldCount,feedback-list), how revenue arrives (the payTo wallet from OKX-04's evidence), where errors surface (api/_mcp/payments.js), and what to monitor daily.
Part 4: memory
Write or update the agent-memory file for this work stream so future sessions do not re-derive
it: agent #2632 state, what shipped, where the evidence lives, the RUNBOOK location, the
current watch status. Update MEMORY.md.
Definition of done
- Part 1 audit run with evidence pasted; every finding fixed, not filed.
- Part 2 checklist green item by item, each verified rather than assumed.
- RUNBOOK commands all personally executed and corrected where they had drifted.
- Approval status checked and recorded, and the matching branch EXECUTED.
- Memory file written;
okx-ai-PROGRESS.mdclosed out with the final state of the whole stream. -
npm run check:rules -- --paths <files you touched>clean.
Never blocked (pre-answered)
| Blocker | Do this |
|---|---|
| The bot is offline | Read the Cloud Run host (curl -s https://three.ws/api/healthz | jq '.subsystems.subsystems[]|select(.name=="okx_chat_bot")'); fixes ship with npm run okx:bot:deploy (owner-gated). Never npm run okx:bot while that host beats: it is a second writer on the bot's identity. |
| Wallet dry or logged out | One batched owner message with the funding table and the OTP request. Everything else proceeds without it. |
| A doc claim cannot be reproduced | That is a defect in the doc, not in your test. Correct the doc in the same session. |
| A deploy would be needed to fix a live string | Deploys are owner-gated. Prepare it as one command, say so, and finish everything else. |
| Approval has not moved in days | Record the status, keep the watch command in the RUNBOOK, and end the session. Never poll in a loop. |
Report format
Which PROGRESS claims you re-verified and which failed re-verification, the docs checklist result, the executed launch branch, and the single owner action if one remains.
Retire this prompt when it is done (required)
Verify every Definition of done line against actual command output in front of you. Never claim a line you did not verify.
Record the outcome in this campaign's PROGRESS or INDEX file if it has one.
Commit with explicit paths and a subject that describes the diff (house style: type(scope): what changed and why a reader cares), and delete this prompt file in that same commit:
git rm prompts/finish/914-okx-ai-07-final-audit-and-watch.mdA finished order left on disk reads as open work to the next agent, so the shrinking directory is the campaign's progress ledger.
If a line genuinely cannot pass inside this session (an external party must respond, or an owner-gated action is the final step), finish everything else, leave this file in place, and state exactly which line remains and who owns it. Never delete this file on a partial.