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.
Materialize campaign: progress log
The only memory between sessions. Append an entry when you finish (or meaningfully advance) a work order: date, order, what shipped (paths), what was verified (commands/evidence), owner items surfaced. Never record "done" for anything not verified on disk.
Log
2026-08-13: Campaign authored. Product architecture decided in 00-CONTEXT.md (naming, routes, schema, OSS choices, pricing model, launch scope), six work orders written to the pack standard. Origin: inbound partnership offer from a Chinese high-precision print operator; campaign deliberately does not block on any partner. No product code exists yet; order 01 is the first build session.
2026-09-02, order 02 (quote, orders, money): checkout is wired on both lanes. NOTE FOR THE NEXT SESSION: this order was run by two sessions at once. A concurrent session landed the catalog (
data/print-catalog.json, 4 cited sources), the quote engine (api/_lib/print/quote.js: pricing, constraint rejections with fixes, alternatives, hollowing, HMAC quote tokens) and the freeGET /api/print/catalog+POST /api/print/quotehandlers. This session built the money half on top of it rather than a second copy of the same thing. Shipped here:api/print/orders.js(session + CSRF, opens an order from a verified token and returns a Solana Pay intent, gasless when the buyer's wallet is connected),api/print/orders/[id].js,api/print/orders/[id]/confirm.js(findReference + validateTransfer, a chain READ, then paid -> screening),api/x402/print-order.js(the agent lane: every refusal pre-settle, the 402 quotes the token's own total, the post-settlement hook promotes the order),createOrder/normalizeShipping/listOrdersForUserinapi/_lib/print-store.js, migration20260902214500_print_order_payment.sql(payment reference, signature, quote expiry, unique indexes so one transaction cannot settle two orders),print_updatewired through notify-prefs and the bell,printOrderIprate bucket, ring-catalog + service-catalog registration, teststests/print-checkout-store.test.jsandtests/api/print-checkout-endpoints.test.js. Two real defects found and fixed while proving it: the edition gate 500'd every direct-GLB order (no creation id means no series to be sold out of), andpaidEndpointadvertised a FIXED $THREE amount beside a per-request USDC price, so a 39.13 USDC print and a 12 USDC one both offered the same flat token price.acceptThree: falsenow opts print-order and knock out. Also cataloged knock, which had been failing the ring parity test. Verified: localserver/index.mjsagainst the production database, real QA session, real GLB. Catalog -> analyze (score 100) -> quote (39.13 USDC, itemized) -> order 201 with a Solana Pay intent -> GET shows the timeline and never the street address -> confirm with no payment answers 202 pending -> the store leg reachesscreeningand refusesscreening -> delivered. The 402 for that order quotes exactly 39130000 atomics of USDC and nothing else. NOT verified, and deliberately: no USDC was ever sent. Taking real money is CLAUDE.md gate 1, so thepaidtransition in the transcript was driven through the store with a note saying so, and that QA order was closed out asrejectedrather than left in the operator queue. The chain-read half is proven by the 202 and by the payment_mismatch unit test. Owner items:data/print-catalog.jsonrates and shipping zones are the one file to tune against a real bureau quote and a real carrier account. Next: order 03 (the /materialize surface) can consumePOST /api/print/ordersand itspaymentblock as-is.2026-09-02: Order 04 (fulfillment adapters + operator console) shipped. Adapter layer
api/_lib/print/adapters/(contract, registry,manual,partner-cn) with capabilities declared as data and registration gated onconfigured(), so an uncredentialed lane is invisible rather than broken. Orchestrationapi/_lib/print/fulfillment.js(adapters speak, the store decides: every adapter result becomes at most onetransition()call). Fulfillment reads and the webhook ledger inapi/_lib/print/fulfillment-queries.js, kept out ofprint-store.jsso the state machine stays the file a reviewer can read. Operator gateapi/_lib/print/ops-auth.js(admin session,PRINT_OPERATORSallowlist, orOPS_SECRET; fails closed in dev too, because these responses carry PII). Operator channelapi/_lib/print/ops-notify.js(private Telegram ops chat, admin bell,ops_alertsfor stalls). APIapi/print/ops/[action].js(queue, order, adapters, transition, submit, tracking, cancel, refund) andapi/print/webhook/[provider].js. Console/materialize/ops(pages/materialize-ops.html,src/materialize-ops.{js,css}). Sweepapi/cron/print-orders-sync.js, registered invercel.jsonat17 * * * *(cron count in CLAUDE.md moved to 113). Runbookdocs/ops/materialize-fulfillment.md. Tests:print-adapter-contract(conformance run over both adapters),print-ops-authorization,print-webhook-idempotency,print-fulfillment-routing,print-orders-sync. Verified against the production database withserver/index.mjsand a real Chromium session: a seeded order walked screening -> submitted -> printing -> quality_check -> shipped entirely through the console UI, every event attributed to the operator,quality_check -> deliveredrefused 409. Three identical signed webhook deliveries produced one timeline row and one ledger row; a forged signature and a delivery to the manual lane were both 401 before the body was parsed. The sweep polled 6 open orders, isolated one unreachable partner intofailures, flagged one stalled order and stamped it so the next sweep stays quiet (proven by re-querying with the re-alert window at zero). Anonymous and signed-in-non-operator callers were refused on all eight endpoints, live and in tests. All walkthrough rows were deleted afterwards. Three real defects found and fixed while proving it: the drawer sat under the sticky site header so Close was unclickable; the drawer's click listener was re-registered per render, firing each action up to three times (two 409s behind every landed mutation); and the post-action reload wiped the result line and, worse, the refund payout instruction carrying the recipient and amount. Owner items:TELEGRAM_PRINT_OPS_CHAT_ID(a dedicated private ops chat; without it paging falls back toTELEGRAM_ALERTS_CHAT_ID, then to the admin bell),PRINT_OPERATORS(staff fulfillment without granting platform admin), andPRINT_PARTNER_CN_URL+PRINT_PARTNER_CN_KEY, which stay absent until a partner is contracted. Signing that partner is an owner action. Next: the adapter registry is the only file a contracted partner touches.2026-09-02, order 03 (the /materialize surface): the page is live locally and exercised end to end in a real browser. NOTE: this pack ran with ~49 sessions sharing one worktree, so several of these files were swept into other sessions' commits before this one landed; the content is this session's. Shipped:
pages/materialize.html+src/materialize.js+ the puresrc/materialize-lib.js(scale drawing, slider maths, itemization rows, timeline, shipping validation), the tracking pagepages/materialize-order.html+src/materialize-order.js, and the two handlers the page needed that nobody had built:api/print/prepare.js(repair, scale, optional hollow, then STL/3MF/repaired-GLB to R2 with the before and after reports) andapi/print/upload.js(presigned slot so a local .glb can be measured). Entry points:/m/:idaction bar, the forge result bar (deep-links by creation id, falls back to the GLB url), creation cards, and the advanced-tier nav item. Routes indata/pages.json,vite.config.js(input + dev static + the/materialize/orders/:iddynamic rule) andvercel.json. Docs: a "Using the page" section indocs/materialize.md; STRUCTURE.md row extended. Also added to order 02's engine (which a concurrent session had landed):fitHeightRange()andmaterialFits(), so the slider ends and the material cards are the server's own measurement of THIS mesh rather than the catalog's machine limits, plustests/print-quote-engine.test.js(27) andtests/materialize-lib.test.js(41), both green. Verified in Chromium againstserver/index.mjson the production database with a real QA session and real forge creations: empty state, loading, populated, analyze failure (two distinct messages for an unreadable file and an unfetchable URL), rejection with its fix and alternatives, repair (38s, 6404 vertices merged, score 88 to 93, viewer swapped to the prepared file), material switch, quantity break, destination re-pricing, the AR desktop QR handoff, the anonymous sign-in gate, shipping validation, a real order (201) with a live Solana Pay intent and QR, and the tracking page in both its live and canceled states. Console clean, no horizontal overflow at 320 or 768. Five defects found and fixed while proving it:/api/auth/meanswers{user:null}for a visitor and the envelope was being read as the user, so the sign-in gate never fired; the printability card rendered before the size existed and reported the mesh's native wall thickness; the preset row rendered four dead chips when none fitted the material's band; the creations rail only worked for an account with a claimed username; and the tracking page showed a raw material id and no lead time until a job was submitted. NOT verified, deliberately: no USDC was sent (CLAUDE.md gate 1), sopaidand everything after it on the tracking page is covered by unit tests, not a live payment. AR placement itself needs a phone; thescale+ar-scale="fixed"wiring was verified in the DOM and the factor is the quote's own scale. model-viewer cannot fetch an R2 model from a localhost origin because the bucket's CORS allowlist nameshttps://three.wsonly (confirmed by preflight; it is thebacklog-05-r2-bucket-corsitem), so the browser runs stood that one policy down; every model, API call and price in them was real. Two QA orders (0ce46a9b-5ac5-43ed-b2bb-151c213ef016,0a83c40c-6030-4c33-9920-21a48ab04e64) were opened against the production database and closed out ascanceledwith a note; neither is in the operator queue. Owner items: none new. Next: orders 04, 05 and 06 are already in flight from other sessions; the surface consumes their endpoints as they land.2026-09-02, order 05 (certificates, editions, the phygital link): shipped and closed. Ran alongside orders 01-04 in other sessions, so parts of this landed inside their commits; what this session authored:
api/_lib/print/certificate.js(SHA-256 of the exact prepared bytes read back off object storage, atomic edition claim, QR to R2, SPL Memo attestation,retryPendingAttestations, the public read with its visibility rule),api/_lib/print/editions.js(series keys, cap normalisation,assertEditionAvailable, creator-onlysetEditionLimit), the state machine inapi/_lib/print-store.js(statuses, transition whitelist, guarded update, timeline row,print_updatenotification, the shipped -> certificate hook) which orders 02 and 04 then extended, migration20260902193000_print_certificates.sql(+forge_creations.print_edition_limit),api/print/certs/[id].js,api/print/editions.js,api/print/ops/insert-card.js,pages/certificate.html+src/certificate-page.js+src/certificate.css(/cert/:idand the/certlookup),pages/print-insert.html+src/print-insert.js+src/print-insert.css(the A5 package insert), the Physical editions panel on/m/:id,editionNoteon/materialize, the edition gate on/api/print/quoteand both checkout lanes, and the attestation retry pass inapi/cron/print-orders-sync.js. Tests:tests/print-certificate.test.js(44),tests/print-store.test.js(20), the attestation cases intests/print-orders-sync.test.js,editionNoteintests/materialize-lib.test.js. ROUTE DEVIATION from 00-CONTEXT: the certificate page is/cert/:certId, not/p/:certId./p/([a-z0-9-]+)was already the launchpad route and a 24-hex certificate id matches it, so/p/would have shadowed a live surface. 00-CONTEXT and the architecture diagram were updated to match. Certificate ids are 24 lowercase hex characters (the/drop/:idconvention) rather than uuids, because the id is printed on a card and encoded in a QR that has to scan off paper. Verified end to end against the production database and real object storage: orderaa005325-6d60-490a-9c18-331fe55d1eb9walkedcreated -> shippedthrough the store, which hashed the real 2,554,288-byte GLB of creation19d94f26-8207-4cd8-89ab-62193dc2c211toc3a3eaf09f88ef4776a089817de1dd09e82c334c5b9dafa2534bdf00d44da578(independently confirmed withcurl … | sha256sum), claimed edition 1, wrote a real 4,934-byte QR PNG to R2, and built certificateaef337708dbb8191c25c2a64./cert/aef337708dbb8191c25c2a64,/materialize/insert/aef337708dbb8191c25c2a64(screen and print media, the print sheet showing only the card),/certand the not-found state were all rendered in a real browser at 1440 and 390 with no errors from this code. The sold-out refusal was proven live: the series was capped at 1, the quote came backedition_sold_outwith the remaining count and a fix line, and the cap was restored to null. NOT verified, and the one open item: the devnet memo transaction never sent. The attesterFcwqit9x1KmfUboPtoVWBUdEuonNyTA8T6xtfAEPpPeHhas no devnet SOL, the public devnet faucet is rate-limited for this machine's IP, and the only wallet here holding devnet SOL is a platform treasury the permission layer declined to sign or transfer from. The certificate is issued, hashed, QR'd and carries its exact memo string;solana_signatureis null and the page says so. OWNER ACTION, one step: send about 0.02 devnet SOL to that address and the sweep attests it within 15 minutes with no code change. Owner items: mainnet certificates needPRINT_CERT_CLUSTER=mainnetplusPRINT_CERT_MAINNET_APPROVALon the Cloud Run service; without the second the certificate is issued and left unattested rather than downgraded to a devnet signature. Deliberately untriggered here (CLAUDE.md gate 1).2026-09-02: Order 06 (fabrication gate, spec, docs, launch) shipped. The campaign is closed; 00-CONTEXT, 01, 06 and the README are retired in this commit and this log is the surviving record. THE GATE.
api/_lib/print/rules.jscarries the denylist as structured rules, one per category with its own buyer-facing message and its own "what is allowed instead" line: firearm components, suppressors and solvent traps, ammunition and feeding devices, keys and lock-bypass tools, counterfeit and trademark goods, working weapon mechanisms, drug paraphernalia, plus one SOFT rule for realistic weapon likeness.api/_lib/print/gate.jslayers them: the generation content classifier (narrowed to its four scale-independent categories, see the deviation below), the denylist, a scale signal, then the platform LLM chain. The denylist always wins; the model can only ADD a refusal, and it is not called at all once a hard rule fires. TWO RUN POINTS, both wired, neither advisory. At quote timeapi/print/quote.jsruns the deterministic layers before any price exists and answers 451 with the category, the policy link and the allowed alternative, so a refusal costs the buyer nothing and a price is never gated on a third-party model being up. After payment the screening pass runs as a third pass insideapi/cron/print-orders-sync.js(it makes a model call, so it must not sit in a checkout request), records the verdict onanalysis.screening, and moves a failure torejected.submitOrder()now refuses any order without a recordedallowverdict, so the gate cannot be clicked past from the operator console. Also shipped by this order:specs/PRINT_PIPELINE.md(six versioned wire contracts: printability report, quote token, order states, gate verdict, adapter interface, webhook envelope, certificate memo, plus a stated limitations section),docs/materialize.mdwired intodocs/nav.json,docs/start-here.mdanddata/pages.json, the/api/print/*section ofdocs/api-reference.md, the STRUCTURE.md row, three changelog entries, and two MCP tools (print_analyze,print_quoteinapi/_mcp/tools/print.js) so an agent discovers the print lane in the same list it discovered generation. Tests:print-fabrication-gate(36),print-gate-wiring(7),print-mcp-tools(9). GAPS FROM EARLIER ORDERS, closed here rather than reported: order 01 never registered its endpoints in the free 3D API catalog, so/api/3dand its OpenAPI did not advertise the print lane at all;api/_lib/3d-catalog/ print-quote.jsandprint-prepare.jsplus the static barrel fix that, and both now appear in the live index and in/api/3d/openapi.json(verified).src/materialize-order.jsshipped an inlineonclick="location.reload()"on its error-state Try again button, which the site CSP blocks, so the only way out of that state did nothing; it is delegated now.pages/print-insert.htmlresolved no[hidden]guard. VERIFIED. Gate unit + wiring + MCP suites green (52 tests). Against a localserver/index.mjson the production database with the page served by vite: a clean quote returns 33.87 USDC withscreening.verdict: allow, and three crafted violating orders (an AR-15 lower receiver, a suppressor baffle asked for in the buyer note, a bump key) each answer 451 with the right category and no price and no token in the body. Run point 2 was proven end to end on real rows: two orders walked created -> quoted -> paid -> screening, the violating one auto-rejected with the category and the policy link on its timeline andallow/refusestored underanalysis.screening, the ordinary one stayed in screening, and both rows were deleted afterwards (0 remaining). No USDC moved: thepaidtransition was driven through the store with a note saying so, per CLAUDE.md gate 1. The LLM layer was proven separately against the live chain (OVH Llama-3.3-70B refused "a compact carry pistol, life accurate, for range use"). Browser walk:/materializeat 320, 768 and 1440 with zero horizontal overflow and no page-code console errors, and/docs/materialize#content-policyresolves to a real anchor (id="content-policy"), which is what keeps a refusal from linking a 404.npm run audit:docsclean (1480 files).npm run gate: every step passes exceptaudit:tokens, which reports 8 hardcoded token hexes across four pages unrelated to this campaign (motion, oracle-lab, stream, threews-claim); the one drifted hex that WAS this campaign's (pages/payment-outcomes.html) is fixed. A peer session is visibly working that list down. DEVIATIONS FROM 00-CONTEXT, one line each. (1) There is noPOST /api/print/analyze: order 02 merged analysis intoPOST /api/print/quote, which returns the report alone when no material is given. That is one round trip instead of two and is what the docs, the spec and the MCP tools describe; no stale reference to the old path survives. (2) The upstream generation classifier is honoured for csam, sexual, gore and hate only. Its fifth category refuses the bare word "pistol", which would refuse every tabletop miniature carrying one; weapons and drug paraphernalia are owned by the fabrication rules instead, which distinguish a display piece from a working part. (3) Generation safety verdicts are not persisted anywhere (checkPromptSafetyrefuses inline and stores nothing, and the main/forgelane never called it), so the gate re-evaluates the lineage rather than reading a stored verdict. Owner FYI, not a blocker. OWNER ITEMS carried out of this campaign are collected in the closing report: the devnet SOL for the certificate attester, the mainnet certificate approval pair, the partner and ops env vars from order 04, and the catalog rates to tune against a real bureau quote.
Retire this file when the campaign is done (required)
This file is shared context rather than a single order, so it outlives the
prompts that cite it. Delete it in the commit that closes the LAST prompt of
this campaign, once nothing else in prompts/finish/ references it:
grep -rl 'materialize-PROGRESS' prompts/finish/
git rm prompts/finish/_context/materialize-PROGRESS.md
While any sibling prompt of this campaign is still on disk, leave this file in place and keep it accurate instead. The shrinking directory is the only signal to the next agent that a campaign is closed.