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): open the materialize campaign, forge creations to delivered physical prints
nirholas8de951a5e5e3
diff --git a/prompts/materialize/00-CONTEXT.md b/prompts/materialize/00-CONTEXT.mdnew file mode 100644index 000000000..befd42f93--- /dev/null+++ b/prompts/materialize/00-CONTEXT.md@@ -0,0 +1,190 @@+# Materialize: shared facts and binding decisions++Every work order in this pack starts by reading this file. It carries the+decisions so the work orders can carry the work. If reality on disk+disagrees with a claim here, reality wins; measure first (each order's+step 0), then update this file in the same commit as the fix.++## What Materialize is++The physical lane of the forge. A user (or a paying AI agent) takes any+finished 3D generation and orders a high-precision physical print of it.+The platform analyzes the mesh for printability, repairs it, previews it at+true scale in AR, quotes a real price, takes payment in USDC on Solana,+routes the job to a fulfillment provider, attests the print on-chain, and+tracks it to delivery.++Origin: an inbound partnership offer (2026-08-13) from a Chinese+high-precision print operator. The partner is unverified and uncontracted.+**Nothing in this campaign blocks on the partner.** The adapter layer plus a+manual-fulfillment lane (a real operator console driving any print bureau+by hand) launches the product; a contracted partner API slots in later as+one more adapter. Signing any partner is an owner action, never an agent+action.++## Naming and routes (decided, do not re-litigate)++- Surface name: **Materialize**. Route: `/materialize`. Page:+ `pages/materialize.html`, app `src/materialize.js`.+- API prefix: `/api/print/*` (handlers in `api/print/`). "print" is the+ honest verb for the API; "Materialize" is the product name for humans.+- Agent lane: `POST /api/x402/print-order` (file `api/x402/print-order.js`).+- Certificate page: `/p/:certId` (physical provenance permalink).+- Order tracking: `/materialize/orders/:id` for humans;+ `GET /api/print/orders/:id` for machines.++## Architecture++```+/m/:id "Materialize" button /materialize page forge result bar x402 agent+ │ │ │ │+ └────────────┬──────────┴───────────────────┴───────────────┘+ ▼+ POST /api/print/analyze free, keyless: printability report + score+ POST /api/print/prepare repair + scale + export STL/3MF/GLB to R2+ GET /api/print/catalog materials, size presets, price parameters+ POST /api/print/quote itemized, HMAC-signed, expiring quote+ POST /api/print/orders session checkout (Solana USDC)+ POST /api/x402/print-order agent checkout (x402 settle, same pipeline)+ │+ ▼+ print_orders row + state machine ── operator console (api/print/ops/*)+ │ │+ ▼ ▼+ fulfillment adapter (manual | partner API) ── status webhooks back in+ │+ ▼+ on-chain certificate (Solana memo attest) + QR ──► /p/:certId+```++Same design properties as the forge: one orchestrator per concern, adapters+declared as data, failure is a routing event. Read+`docs/forge-pipeline.md` before touching anything; Materialize reuses the+forge's job-token (HMAC), R2 mirroring, and store patterns wholesale.++## OSS decisions (search order honored: existing deps, then npm)++| Need | Use | Status |+|---|---|---|+| Mesh booleans, manifold repair, hollow/offset, volume | `manifold-3d` (Apache-2.0, WASM, the Manifold kernel) | add dependency |+| Decimate, weld, dedup, texture read | `@gltf-transform/{core,extensions,functions}` | already a dep |+| STL export | `three/examples/jsm/exporters/STLExporter` | already a dep (`three`) |+| 3MF writer (zip of XML, OPC layout) | small in-repo writer over `fflate` | `fflate` ships inside three's examples deps; verify with `npm ls fflate`, pin directly if absent |+| Wall-thickness sampling (inward ray casts) | `three-mesh-bvh` | verify with `npm ls three-mesh-bvh`; add if absent |+| QR codes for certificates | `qrcode` | verify; add if absent |++Rules: pin semver ranges (`^x.y.0`). No native-binary deps in `api/`+handlers (Cloud Run image is node-only for the API container); manifold-3d+is WASM, which is why it was chosen over CGAL bindings. If a prepare job+exceeds the request budget on 200k-triangle meshes, promote the prepare+step to a `workers/print-prepare/` Cloud Run worker following any existing+worker's layout; do not silently cap quality instead.++## Database (Neon Postgres, migrations in api/_lib/migrations/)++Tables (one migration per work order that introduces them):++- `print_orders`: id, user_id (nullable only for x402 agent orders, which+ carry a payer wallet instead), creation_id (FK forge_creations, nullable+ for direct GLB uploads), source_glb_url, prepared_asset_urls JSONB+ (stl/3mf/glb on R2), analysis JSONB (the printability report at order+ time), material_id, target_height_mm, quantity, quote JSONB (itemized,+ with the signed token), price_usdc NUMERIC, status TEXT, provider TEXT,+ provider_order_id TEXT, shipping JSONB (name, address lines, country,+ phone; nothing else, minimize PII), tracking_number TEXT, timestamps.+- `print_order_events`: order_id, status, note, actor (system | operator |+ provider | buyer), created_at. The timeline is this table, never a+ mutated column.+- `print_certificates`: id, order_id, creation_id, glb_sha256, edition_no,+ edition_of, solana_signature TEXT (null until attested), created_at.++Status machine (enforced in one module, `api/_lib/print-store.js`):+`created → quoted → paid → screening → submitted → printing → quality_check+→ shipped → delivered`, with `rejected` (failed screening, auto-refund+path), `canceled`, and `refunded` as terminal branches. Transitions are+whitelisted pairs; an illegal transition throws. Every transition writes a+`print_order_events` row and publishes a `user_notifications` event via the+existing `publishUserEvent()` vocabulary (extend `USER_EVENT_TYPES` with+one `print` type, mirroring how `market` events landed).++## Money (Solana first, always)++- Human checkout: USDC on Solana through the platform's existing self-hosted+ rail (re-derive the exact flow from `api/x402/` and the marketplace+ purchase path in step 0 of order 02; reuse, never fork, the settle logic).+- Agent checkout: `POST /api/x402/print-order`, priced per quote (dynamic+ 402 amount, same pattern as the market-data endpoints with per-call+ pricing). Params rejected pre-settle (422) so a bad request never charges.+- $THREE holders: percentage discount on the print price, applied in the+ quote engine from the existing holder-check used by the forge High tier+ (`api/_lib/forge-tiers.js` knows the pattern). The discount renders in the+ itemized quote, never silently.+- No card processor. Onboarding one is a new external paid API and is+ owner-gated; the quote UI says "USDC on Solana" plainly.+- Refunds are operator actions from the console (order 04), recorded as+ events; no automatic on-chain sends without the CLAUDE.md gate.++## Pricing model (quote engine, order 02)++`data/print-catalog.json` is the single source of truth: materials (resin+standard/tough, SLS nylon, full-color sandstone, PLA draft, metal-tier+entries marked quote-on-request), each with density, per-cm3 rate,+setup fee, min/max bounding box, finish options, and lead-time days.+Quote = setup + rate * material_volume_cm3 * quantity, plus finish fees,+plus zone-based shipping from volumetric weight; quantity breaks at 5/20.+Numbers come from current published market rates of real print services+(researched at execution time, cited in the catalog file header) with a+declared margin field, all owner-tunable in one file. The engine is pure+and unit-tested; the catalog is data.++## The printability report (order 01, the contract everything reads)++One JSON shape produced by `/api/print/analyze` and stored on the order:+manifold (bool), watertight shells count, self_intersections count,+open_edges count, min_wall_mm (sampled), bbox_mm, volume_cm3 (of the+manifold repair, the number money hangs off), triangles, has_textures,+recommended_min_height_mm per material class, and a 0-100 printability+score with named deductions. Spec lands in `specs/PRINT_PIPELINE.md`+(order 06) and the shape never changes without a version field bump.++## Safety (order 06, gate runs before payment, at `screening` again after)++Fabrication gate over prompt lineage + mesh + reference imagery, extending+`api/_mcp-studio/safety.js` patterns: refuse firearm components and+receivers, working weapon parts, keys to real locks, counterfeit branded+goods and logos, and anything the upstream generation gate already refused.+Deny with an actionable message before money moves; a paid order that+fails second screening auto-enters `rejected` with the refund path. The+gate is code plus tests, not a prompt suggestion.++## Provenance (order 05, the phygital moat)++Every shipped print gets a certificate: SHA-256 of the exact prepared+asset, edition number (DB-enforced), and a Solana attestation (memo+transaction from the platform wallet; devnet in tests, mainnet send is+owner-gated per CLAUDE.md gate 1). The package carries a QR to `/p/:certId`+showing the spinning original, the prompt lineage, the edition, and the+on-chain proof. Re-derive what `scripts/tokenize-3d-devnet-e2e.mjs` already+proves before writing any new chain code.++## Launch scope vs later (so nobody boils the ocean)++In scope now: single-object prints, five-ish materials, worldwide shipping+zones (CN/US/EU tiers), human + agent checkout, manual fulfillment lane,+certificates, full docs. Explicitly later (note in reports, do not build):+multi-part assemblies, paint/finishing marketplace, creator royalties on+physical sales, holder gift drops, physical goods marketplace. Later items+get designed-for (schema fields where free) but never half-built.++## Standards that bite in this pack++- CLAUDE.md rules apply in full: no mocks, no fake data, no unfinished+ markers, every state designed, em-dash banned, explicit-path commits.+- The manual fulfillment lane is real operations, not a mock: a human+ operator with a console driving a real bureau is how every print+ marketplace on earth launched. Build it as a first-class adapter.+- PII discipline: shipping addresses are the first real PII this platform+ stores. Minimum fields, never logged, never in analytics events, surfaced+ only to the operator console and the provider adapter.+- Every money number a user sees comes from the quote engine. No price is+ ever computed in a frontend file.diff --git a/prompts/materialize/01-printability-engine.md b/prompts/materialize/01-printability-engine.mdnew file mode 100644index 000000000..930d0f80f--- /dev/null+++ b/prompts/materialize/01-printability-engine.md@@ -0,0 +1,125 @@+# Work order 01: the printability engine (analyze, repair, export)++**How to run:** paste this whole file into a fresh Claude Code chat in this+repo, or name its path. Read `prompts/materialize/00-CONTEXT.md` first; its+decisions bind this order.++**Binding operating clause:** finish 100%. Never end the session with a+question, an unexecuted plan, or "let me know". CLAUDE.md hard rules apply:+no mocks, no fake data, no unfinished markers, no em-dash anywhere, commit+finished work promptly with explicit paths. Pushes and production deploys+are owner-gated; everything else in this file is yours to do.++## Why this order exists++Every downstream piece (quotes, orders, the page, fulfillment) consumes one+thing: a trustworthy answer to "can this mesh be printed, at what size, and+what exact bytes go to the printer". AI-generated meshes are the worst case+the printing world sees: non-manifold shells, self-intersections, paper-thin+decorations, textures instead of geometry. Turning that into a printable+solid automatically, server-side, at forge scale, is the platform's hard+technical moat. Get this right and everything above it is plumbing.++## Step 0: re-derive current state (never trust status claims, even here)++```+ls api/print/ 2>/dev/null+npm ls manifold-3d three-mesh-bvh fflate 2>/dev/null+grep -rn "print" api/_lib/3d-catalog/ | head+ls tests/api/ | grep -i print+git log --oneline -10 -- api/print src/print+```++Whatever already exists and passes its tests, keep and extend; skip any+task below that is verifiably done. Read `api/3d/inspect.js` end to end+before writing anything: analyze is its sibling and must match its+conventions (keyless, CORS, bounded input, no persistence).++## Tasks++### 1. Dependencies++Add `manifold-3d` (pin `^` range). Verify `fflate` and `three-mesh-bvh`+per the 00-CONTEXT table; add whichever are missing. Log the rationale in+the commit message per CLAUDE.md OSS rules.++### 2. `api/_lib/print/` core modules (pure, unit-testable, no HTTP)++- `mesh-io.js`: load a GLB from a URL or buffer via gltf-transform, merge+ primitives, bake node transforms, return indexed positions + uvs ++ texture handles. Bound input size (reject > 100 MB or > 2M triangles+ with a designed error naming the limit).+- `analyze.js`: produce the printability report exactly as specified in+ 00-CONTEXT (manifold check, shells, self-intersections, open edges,+ bbox_mm, volume_cm3 via manifold-3d, min-wall sampling via inward+ ray casts with three-mesh-bvh over a deterministic sample of surface+ points, score with named deductions). Deterministic: same bytes, same+ report. Include `version: 1`.+- `repair.js`: manifold reconstruction via manifold-3d (union of shells,+ hole fill), optional decimation to a triangle budget via+ gltf-transform's simplify, scale-to-target-height, and optional hollow+ (manifold offset) with two drain holes for resin economy, gated to+ meshes where hollowing is geometrically safe. Every operation returns+ metrics before/after so the UI can show what changed.+- `export-stl.js`: binary STL from the repaired mesh (three's STLExporter+ or a direct writer; binary only, watertight input asserted).+- `export-3mf.js`: a minimal, spec-correct 3MF writer over fflate: OPC+ zip layout, `3D/3dmodel.model` XML, units mm, vertex colors when the+ source had textures (sample the base-color texture at each vertex UV in+ `mesh-io.js`; this is what makes full-color sandstone prints possible+ and no competitor's export button does it). Validate output opens in at+ least one real slicer toolchain via a structural test (parse the zip,+ validate XML against the 3MF core spec requirements you assert).++### 3. HTTP surface (thin handlers over the core, forge conventions)++- `POST /api/print/analyze` (`api/print/analyze.js`): body+ `{glbUrl}` or `{creationId}` (resolve via `api/_lib/forge-store.js`).+ Free, keyless, CORS like `api/3d/inspect.js`. Returns the report.+- `POST /api/print/prepare` (`api/print/prepare.js`): body adds+ `{targetHeightMm, material, hollow}`. Runs repair + exports, mirrors+ STL/3MF/repaired GLB to R2 exactly the way the forge mirrors finished+ models (reuse the forge's persistence helper, do not fork it), returns+ permanent URLs + the post-repair report. If p95 wall time in your local+ measurement exceeds 20s on a 200k-triangle mesh, implement the async+ job-token pattern from `api/forge.js` (HMAC token, poll param) instead+ of raising timeouts.+- Register both in the free 3D API catalog: new descriptors in+ `api/_lib/3d-catalog/` plus the barrel import lines, so `/api/3d` and+ its OpenAPI advertise them with zero page edits.++### 4. Tests (vitest, `tests/api/`)++Fixtures: generate three tiny deterministic GLBs in-test (a clean cube, a+two-shell non-manifold, an open-bottom shell); never commit binary blobs.+Cover: report shape and determinism, manifold repair actually closes the+open shell (re-analyze reports manifold true), volume within 1% of the+analytic cube volume, STL byte-level header/count correctness, 3MF zip+structure + color payload presence, both handlers' validation errors, and+the size bounds.++## Definition of done (every line mechanically checkable)++- [ ] `npm test` green, including the new `tests/api/print-*.test.js`.+- [ ] `curl -s localhost:3000/api/print/analyze -d '{"glbUrl":"<a real R2 forge model URL>"}' -H 'content-type: application/json'` returns a version-1 report with a numeric score, on the dev server.+- [ ] The same call against a creationId of a real `forge_creations` row works.+- [ ] `/api/3d` index and `/api/3d/openapi.json` list both new endpoints.+- [ ] `npm run check:rules -- --paths <files you touched>` passes.+- [ ] Deliverables committed with explicit paths; this file deleted in the closing commit (`git rm prompts/materialize/01-printability-engine.md`) and PROGRESS.md appended.++## Never blocked++| Blocker | Resolution |+|---|---|+| manifold-3d WASM will not load in the API runtime | It is plain WASM + JS, no native binding. Check the import style (ESM default export needs `await Manifold.init()` style setup); mirror how other WASM (draco decoders) is handled in this repo. |+| No real GLB URL for the curl check | `psql "$DATABASE_URL" -c "select id, asset_url from forge_creations where status='succeeded' order by created_at desc limit 5"` or generate one on the spot via `POST /api/3d/generate`. |+| R2 credentials | Same env the forge uses; find the mirroring helper by grepping `api/_lib/` for the R2 upload call. They are set in `.env`. |+| Wall-thickness sampling too slow | Sample count is a dial: 2,000 surface points with BVH raycasts is milliseconds. Fix the sample count, document it in the report's `sampling` field, never drop the metric. |+| 3MF spec ambiguity | The core spec is public (3mf.io); assert the small required subset (content types, relationship, model XML with mesh + color group). A structural round-trip test is the arbiter, not a vendor tool. |++## Report format++End the session with: files created/changed (paths), test names added and+their status, the measured analyze/prepare wall times on a real forge+model, any deviation from 00-CONTEXT (one line each, with why), and the+single next action for order 02.diff --git a/prompts/materialize/02-quote-order-payments.md b/prompts/materialize/02-quote-order-payments.mdnew file mode 100644index 000000000..34e6fb0e4--- /dev/null+++ b/prompts/materialize/02-quote-order-payments.md@@ -0,0 +1,134 @@+# Work order 02: catalog, quotes, orders, and money (human + agent)++**How to run:** paste this whole file into a fresh Claude Code chat in this+repo, or name its path. Read `prompts/materialize/00-CONTEXT.md` first; its+decisions bind this order.++**Binding operating clause:** finish 100%. Never end with a question or an+unexecuted plan. CLAUDE.md hard rules apply: no mocks, no fake data, no+unfinished markers, no em-dash, explicit-path commits. Two CLAUDE.md gates+can appear in this order and only these: an irreversible on-chain send+(none is required here; settle verification is read-only) and production+deploys (owner-gated). Everything else, do.++## Why this order exists++This is where Materialize becomes commerce: a real catalog, a quote a buyer+can trust, an order row with a state machine that cannot lie, and two+checkout lanes. The second lane is the historic one: `POST+/api/x402/print-order` is, to our knowledge, the first API where an AI+agent pays to manufacture a physical object. Build it with the same care+the market-data x402 endpoints got.++## Step 0: re-derive current state++```+ls api/print/ data/print-catalog.json 2>/dev/null+ls api/_lib/migrations/ | tail -15+grep -rn "print" api/_lib/feed.js | head+ls api/x402/ | grep -i print+npm test -- tests/api/print 2>/dev/null | tail -5+```++Order 01 must have landed `/api/print/analyze` and `/api/print/prepare`+(check, do not assume). Read before writing: one full x402 endpoint with+dynamic pricing (`api/x402/forge.js` and one `api/x402/market-*.js`), the+marketplace confirmed-purchase path (how `status='confirmed'` is written+and why trials poisoned analytics, per STRUCTURE.md's marketplace row), and+`api/_lib/forge-tiers.js` for the $THREE holder check.++## Tasks++### 1. Catalog (`data/print-catalog.json` + `GET /api/print/catalog`)++Build the catalog per 00-CONTEXT's pricing model. Research current+published market rates from real print services at execution time and cite+sources + retrieval date in the file's `_sources` field. Every material+carries: id, display name, class (resin, sls_nylon, full_color, fdm_draft,+metal_quote_only), density g/cm3, rate per cm3, setup fee, min wall mm,+min/max height mm, finish options with fees, lead-time days, margin+fraction. Shipping zones: CN-domestic, US, EU, ROW with per-kg volumetric+rates. The handler serves the catalog minus `_sources` and margin fields+(public output is buyer-facing).++### 2. Quote engine (`api/_lib/print/quote.js`, pure + tested)++Input: printability report + material id + target height + quantity ++destination country. Output: itemized lines (setup, material with the cm3+it was computed from, finish, quantity break, $THREE holder discount when+the session or payer wallet qualifies, shipping, total USDC), lead-time+estimate, and a rejection with a named reason when the mesh violates the+material's constraints (too thin walls for resin, too large for the bed).+`POST /api/print/quote` wraps it and returns the itemization plus an+HMAC-signed quote token (same signing helper the forge job tokens use)+with a 24h expiry embedding every priced parameter, so checkout can never+be replayed at a stale price or altered client-side.++### 3. Schema + store (`api/_lib/print-store.js` + one migration)++Create `print_orders`, `print_order_events`, `print_certificates` exactly+per 00-CONTEXT. The store module owns the transition whitelist; write the+state machine as data (a map of legal from/to pairs) with one `transition()`+function that inserts the event row and publishes the `print` user+notification in the same transaction. Extend `USER_EVENT_TYPES` in+`api/_lib/feed.js` with `print`, wiring the bell copy the way `market`+events did. Run `npm run db:status` before and after; `npm run db:migrate`+applies immediately, so read what is pending first.++### 4. Human checkout (`POST /api/print/orders`)++Session + CSRF, mirroring an existing session-gated POST (the follow+endpoint is the reference shape). Body: quote token + shipping fields+(minimum PII per 00-CONTEXT). Flow: verify token, create `created` row,+transition to `quoted`, take USDC on Solana through the platform's+existing self-hosted settle rail (reuse the exact verification path the+x402 lane uses; payment lands, transition to `paid`, then `screening`).+`GET /api/print/orders/:id` returns the order + full event timeline to its+owner. Payment verification is read-only chain work; no gate applies.++### 5. Agent checkout (`POST /api/x402/print-order`)++Dynamic-price 402 quoting the signed quote token's total, per-call+settlement like the market-data endpoints. Body: quote token + shipping ++payer wallet. Params rejected pre-settle (422) so a malformed order never+charges. On settle: same store path as the human lane (user_id null,+payer wallet recorded). Register it wherever x402 endpoints are cataloged+(re-derive: grep how `market-pulse` reaches the service catalog and the+discovery docs, and follow the same wiring).++### 6. Tests++Quote engine: itemization math from a fixture report, holder discount,+quantity breaks, every constraint rejection, token expiry and tamper+rejection. Store: every legal transition, every illegal transition throws,+event rows land, notification published once. Handlers: auth, CSRF,+pre-settle 422, and that a stale or altered quote token is refused. Follow+`tests/api/` conventions; the marketplace analytics test shows how to+fixture Postgres-backed stores here.++## Definition of done++- [ ] `npm test` green including new print quote/store/handler tests.+- [ ] `npm run db:status` shows the migration applied; the three tables exist.+- [ ] Dev-server flow proven end to end and pasted in the report: analyze a real creation, quote it, create an order with a real session, watch it reach `screening`, `GET` shows the timeline.+- [ ] `POST /api/x402/print-order` returns a correct 402 challenge with the quote's exact amount for an unpaid call.+- [ ] Quote totals rendered anywhere come only from the engine (grep proves no price math in `src/`).+- [ ] `npm run check:rules -- --paths <files you touched>` passes.+- [ ] Committed with explicit paths; this file deleted in the closing commit; PROGRESS.md appended.++## Never blocked++| Blocker | Resolution |+|---|---|+| How settle verification works | Read `api/x402/README.md` and one settled endpoint end to end. The rail is self-hosted Solana; everything needed is in-repo and in `.env`. |+| Holder-check mechanics | `api/_lib/forge-tiers.js` already gates the forge High tier on $THREE holdings. Reuse its helper. |+| A QA session for the dev-server flow | `AUDIT_EMAIL` / `AUDIT_PASSWORD` in `.env` are a real QA account. |+| Real market pricing research | Public price pages of major print bureaus are indexable; capture numbers + dates in `_sources`. If a datum is unverifiable, price conservatively high and mark the field `estimate: true`. Owner tunes one file later. |+| Migration ordering fear | `npm run db:status` first, always. It previews every pending migration; yours must be the only surprise. |+| USDC-only feels narrow | Decided in 00-CONTEXT: Solana first, no card processor without owner approval. State it in UI copy, never apologize for it. |++## Report format++Files + tests + the pasted end-to-end dev flow transcript, the catalog's+source citations, any 00-CONTEXT deviation (one line + why), and the single+next action for orders 03/04/05.diff --git a/prompts/materialize/03-materialize-surface.md b/prompts/materialize/03-materialize-surface.mdnew file mode 100644index 000000000..c5d0a9b5b--- /dev/null+++ b/prompts/materialize/03-materialize-surface.md@@ -0,0 +1,130 @@+# Work order 03: the /materialize surface and every entry point++**How to run:** paste this whole file into a fresh Claude Code chat in this+repo, or name its path. Read `prompts/materialize/00-CONTEXT.md` first; its+decisions bind this order.++**Binding operating clause:** finish 100%. Never end with a question or an+unexecuted plan. CLAUDE.md hard rules apply in full, including the UI/UX+standards section: every state designed (loading, empty, error, populated),+transitions with intention, responsive at 320/768/1440, accessibility,+microinteractions. No em-dash. Explicit-path commits. The definition of+done for UI work includes exercising it in a real browser via `npm run dev`.++## Why this order exists++The screenshot moment. A user watches their prompt become an object they+can hold: the model spinning in a material-accurate preview, a slider that+resizes it over a coffee mug for scale, a price that updates live, an AR+button that puts the print at true size on their actual desk. This page is+the demo that sells the platform; the quality bar is the best product+pages on the internet, not the average of ours.++## Step 0: re-derive current state++```+grep -n materialize data/pages.json public/nav-data.js 2>/dev/null+ls pages/materialize.html src/materialize.js 2>/dev/null+curl -s localhost:3000/api/print/catalog | head -c 400+grep -n "print" src/model-page.js src/forge.js | head+```++Orders 01 and 02 must be live locally (analyze, prepare, catalog, quote,+orders). Verify by calling them, not by reading this sentence. Read before+writing: `src/model-page.js` (viewer + action-bar patterns), one recent+page module end to end for the house style (`src/labs.js` is compact), and+`docs/ui-juice.md` if present for the platform's motion conventions.++## Tasks++### 1. The page (`pages/materialize.html` + `src/materialize.js` + styles)++Route `/materialize`, registered in `data/pages.json` (path, title,+description, `added` date; this alone wires sitemap, llms.txt, features,+changelog). Flow, one screen, no wizard:++- **Pick a model**: accept `?creation=<id>` deep links, a paste-a-URL/GLB+ upload drop zone, and a "your creations" rail for signed-in users+ (reuse the creations fetch the portfolio page uses). Anonymous users get+ the full flow up to checkout, which asks for sign-in (state designed,+ not a dead end).+- **Live printability**: call analyze on selection; render the score as a+ meter with the named deductions as fixable line items; "Repair" runs+ prepare and shows before/after metrics (shells closed, walls thickened,+ final volume). Real progress from the job, never a fake bar.+- **Material + size**: material cards from the catalog (photo-real swatch+ styling per class; resin glossy, nylon matte, sandstone full-color using+ the model's own texture in the preview via a material override in the+ viewer). Size slider between the material's min/max height with a+ real-world scale reference silhouette (person svg at 175mm-scale logic:+ a mug at 95mm, a hand at 180mm, a person at full scale) that resizes+ against the model.+- **Live quote**: itemized panel re-quoted on every material/size/qty+ change (debounced), rendering exactly the engine's line items including+ the $THREE holder discount line when present. Rejections (walls too+ thin for resin) render as guidance pointing at the repair or a material+ that accepts the mesh, never a bare error.+- **True-scale AR**: the platform already ships model-viewer AR on model+ pages; here set the AR scale so the object appears at the exact ordered+ size. This is the feature phones were made for; make the button+ prominent on mobile.+- **Checkout**: shipping form (minimum PII fields, inline validation,+ country select drives the shipping zone), then the USDC payment step+ reusing the existing wallet-pay UI pattern (re-derive from the+ marketplace purchase flow). Success state links the order page and+ explains the certificate that will follow.++### 2. Order tracking (`/materialize/orders/:id`)++A timeline page over `GET /api/print/orders/:id`: status steps rendered as+a vertical progress rail with real timestamps from `print_order_events`,+the prepared model spinning at the top, tracking number once shipped,+certificate link once attested. Design the waiting states; most of this+page's life is spent between `submitted` and `shipped`.++### 3. Entry points (the platform must feel like one product)++- `/m/:id` model pages: a "Materialize" action next to the existing+ download/remix actions (`src/model-page.js`), deep-linking with the+ creation preselected.+- Forge result bar (`src/forge.js`): same action on a finished generation.+- Creations gallery cards: the action in the existing card menu.+- Nav: add to the appropriate menu in `public/nav-data.js` (advanced tier+ tag per the onboarding-tier conventions).++### 4. Tests + browser verification++Unit-test the pure page logic you extract (scale math, quote-panel+rendering from a fixture itemization; follow `src/model-lib.js` ++`tests/model-lib.test.js` precedent for the split). Then `npm run dev`,+exercise the full flow in a real browser on a real forge creation, and+capture: no console errors, network tab shows real analyze/quote calls,+every interactive element has hover/focus/active states, 320px layout+holds.++## Definition of done++- [ ] `/materialize` in `data/pages.json`; `npm run check:pages` (or the build's page audit) passes.+- [ ] Full flow exercised in a real browser against the dev server on a real creation: select, analyze, repair, quote, checkout to the payment step; described with evidence in the report.+- [ ] AR opens at ordered scale on a real device or the report states exactly what was verified locally vs what needs a phone.+- [ ] All three entry points render and deep-link correctly.+- [ ] Every state visible: empty (no model picked), loading, analyze failure (feed it a broken URL), quote rejection, checkout success.+- [ ] `npm test` green including new pure-logic tests.+- [ ] `npm run check:rules -- --paths <files you touched>` passes.+- [ ] Committed with explicit paths; this file deleted in the closing commit; PROGRESS.md appended.++## Never blocked++| Blocker | Resolution |+|---|---|+| Backend endpoint missing or broken | Fix it; orders 01/02 are in-repo code, not another team. Root-cause, never mask in the UI. |+| No real device for AR | Verify the scale attribute wiring and the model-viewer config locally, state the residual as one line in the report. Do not fake a verification. |+| Wallet-pay UI pattern unclear | Read the marketplace purchase flow end to end; reuse its components/copy. If it is genuinely bespoke per surface, match the closest one and note it. |+| Design tokens | Use the existing CSS variables; the platform has them (grep `--` in `public/nav.css` and neighbors). Do not invent a parallel palette. |+| Signed-in creations rail | The portfolio page's paginated creations endpoint already exists (`api/users/[username]/creations.js`). Reuse. |++## Report format++Files + tests, the browser-verification evidence (states seen, console+clean, network calls), screenshots if captured, residuals (AR device), one+line per 00-CONTEXT deviation, next action for 04/05/06.diff --git a/prompts/materialize/04-fulfillment-ops.md b/prompts/materialize/04-fulfillment-ops.mdnew file mode 100644index 000000000..ecb77e9de--- /dev/null+++ b/prompts/materialize/04-fulfillment-ops.md@@ -0,0 +1,121 @@+# Work order 04: fulfillment adapters and the operator console++**How to run:** paste this whole file into a fresh Claude Code chat in this+repo, or name its path. Read `prompts/materialize/00-CONTEXT.md` first; its+decisions bind this order.++**Binding operating clause:** finish 100%. Never end with a question or an+unexecuted plan. CLAUDE.md hard rules apply: no mocks, no fake data, no+unfinished markers, no em-dash, explicit-path commits. Signing a partner,+sending funds, deploys: owner-gated. Building every rail so those are+one-step owner actions: this order.++## Why this order exists++Orders that reach `screening` must reach `delivered`. The lane that makes+that true on day one is a human operator with a first-class console,+because that is a real fulfillment operation (it is how every print+marketplace launched), and it is the honest alternative to blocking the+product on an uncontracted partner API. The adapter layer means the day a+partner contract lands, their API becomes a config change, not a rebuild.++## Step 0: re-derive current state++```+ls api/print/ops/ api/_lib/print/adapters/ 2>/dev/null+grep -rn "provider" api/_lib/print-store.js 2>/dev/null | head+grep -rln "admin" api/ | head # find the existing admin-auth pattern+psql "$DATABASE_URL" -c "select status, count(*) from print_orders group by 1" 2>/dev/null+```++Order 02's store and state machine must exist (verify). Re-derive how this+repo authenticates admin/operator endpoints (the KOL `import-gmgn` route+is one known admin surface; find the shared helper it uses and reuse it).++## Tasks++### 1. Adapter contract (`api/_lib/print/adapters/`)++One interface, adapters as data + module pairs, mirroring the forge engine+registry philosophy: each adapter declares capabilities (materials it can+run, max bbox, ships-from country, lead-time) and implements+`submit(order, assets)`, `status(providerOrderId)`, `cancel()`, plus a+webhook verifier. The store's `submitted → printing → quality_check →+shipped` transitions are driven only through adapter events; no handler+writes those states directly.++### 2. The `manual` adapter (launch lane, fully real)++`submit` assigns the order to the operator queue and notifies the operator+channel (re-derive the existing Telegram ops-notification helper; the+changelog cron proves one exists). `status` reads what the operator+recorded. The operator console (task 3) is this adapter's API. No part of+this simulates anything: it is a workflow tool for a human running real+print jobs through a real bureau.++### 3. Operator console (`/materialize/ops`, session + operator allowlist)++A working queue over `api/print/ops/*` endpoints (list by status, order+detail with the prepared asset download links + shipping label data,+transition actions with notes, tracking-number entry, refund marking).+Server-side authorization on every endpoint via the repo's admin pattern;+the page is never the security boundary. Ship it with the platform's+design system; an internal tool with dead-end states breeds exactly the+operational mistakes the state machine exists to prevent.++### 4. The `partner-cn` adapter skeleton, wired behind env++Per 00-CONTEXT, the Chinese partner is uncontracted: build the adapter+module fully structured (auth header slot, submit/status/webhook mapping+to the store's vocabulary) but registered only when its env vars exist+(`PRINT_PARTNER_CN_URL`, `PRINT_PARTNER_CN_KEY`), exactly how the forge+treats BYOK lanes. Every code path that can run without credentials has a+real test; the report lists the env vars as the single missing input. No+fabricated endpoints: the mapping uses the store's own vocabulary and a+documented request shape in the module header, marked as the contract to+reconcile against the partner's real API docs when they arrive.++### 5. Webhooks + reconciliation++`POST /api/print/webhook/:provider` with per-adapter HMAC verification and+idempotent event application (a replayed webhook must not duplicate+timeline rows). A reconciliation cron (`api/cron/print-orders-sync.js`,+registered in `vercel.json` crons per the repo's cron conventions) polls+`status()` for non-terminal orders older than the adapter's lead time and+flags stalls to the operator channel. Note the CLAUDE.md rule: the cron+count claim lives in CLAUDE.md and is guarded by `check:claude`; run+`npm run check:claude` after touching `vercel.json` and update the count+in CLAUDE.md in the same commit if it moved.++### 6. Tests++Adapter contract conformance suite run against both adapters (manual fully,+partner-cn's credential-free paths), webhook idempotency, operator endpoint+authorization (anonymous and non-operator sessions get refused), stall+detection picks up a fixture order past lead time.++## Definition of done++- [ ] `npm test` green including adapter conformance + ops authorization tests.+- [ ] Dev-server proof in the report: a paid test order walked `screening → submitted → printing → shipped` entirely through the console UI, timeline showing operator-actor events.+- [ ] Webhook replay proven idempotent (same payload twice, one event row).+- [ ] `npm run check:claude` passes with the cron registered.+- [ ] Anonymous and non-operator access to every `api/print/ops/*` endpoint refused (test-proven).+- [ ] `npm run check:rules -- --paths <files you touched>` passes.+- [ ] Committed with explicit paths; this file deleted in the closing commit; PROGRESS.md appended.++## Never blocked++| Blocker | Resolution |+|---|---|+| No partner API docs | By design. Build the skeleton behind env per task 4; the missing vars are the report's one owner input. |+| Admin auth pattern unclear | Grep for the helper the KOL admin import uses; if the repo truly has no shared operator-role concept, add the minimal allowlist (env-listed user ids) and document it in the module header. |+| Telegram ops channel | The changelog push cron already posts to Telegram; reuse its client and env. A separate ops chat id, if absent, goes in the report as one env var, and notifications also land in the in-app bell meanwhile. |+| Fear of adding a cron | Follow `scripts/create-gcp-scheduler.mjs` conventions; scheduler sync is owner-run at deploy. Registering in vercel.json is the repo-side deliverable. |+| Refund mechanics | Marking `refunded` with an event note is this order. Moving actual funds is CLAUDE.md gate 1, owner-executed; the console renders the exact recipient + amount for that action. |++## Report format++Files + tests, the console walkthrough evidence, the exact env vars and+owner actions remaining (partner credentials, ops chat id if new), one+line per 00-CONTEXT deviation, next action.diff --git a/prompts/materialize/05-provenance-phygital.md b/prompts/materialize/05-provenance-phygital.mdnew file mode 100644index 000000000..9874d7116--- /dev/null+++ b/prompts/materialize/05-provenance-phygital.md@@ -0,0 +1,118 @@+# Work order 05: certificates, editions, and the phygital link++**How to run:** paste this whole file into a fresh Claude Code chat in this+repo, or name its path. Read `prompts/materialize/00-CONTEXT.md` first; its+decisions bind this order.++**Binding operating clause:** finish 100%. Never end with a question or an+unexecuted plan. CLAUDE.md hard rules apply: no mocks, no fake data, no+unfinished markers, no em-dash, explicit-path commits. CLAUDE.md gate 1+applies exactly once here: the mainnet attestation send is owner-approved+per action or via a standing approval recorded in this pack's PROGRESS.md.+Devnet is yours; build everything so mainnet is a flag.++## Why this order exists++The moat that compounds. Anyone can print a mesh; only three.ws can hand+you an object whose exact bytes, prompt lineage, and edition number are+attested on Solana at print time, with a QR on the package that resolves+to the living original. This turns a print into a collectible with+provable scarcity and turns every shipped box into a marketing surface.+Solana first, per CLAUDE.md: this is the home-chain feature.++## Step 0: re-derive current state++```+ls api/print/certs* api/_lib/print/certificate.js pages/certificate.html 2>/dev/null+psql "$DATABASE_URL" -c "\d print_certificates" 2>/dev/null+cat scripts/tokenize-3d-devnet-e2e.mjs | head -60+grep -rn "memo" solana-agent-sdk/src api/_lib | head+npm ls qrcode 2>/dev/null+```++Order 02 created the `print_certificates` table (verify). Read+`scripts/tokenize-3d-devnet-e2e.mjs` fully: the repo has already proven a+devnet 3D-asset attestation flow, and this order extends proven code+rather than writing new chain plumbing. Find the platform wallet signing+helper the same way.++## Tasks++### 1. Certificate issuance (`api/_lib/print/certificate.js`)++On an order's transition into `shipped` (hook the store's transition, do+not poll): compute SHA-256 of the exact prepared asset bytes on R2, claim+the next edition number for the creation atomically (a+`SELECT ... FOR UPDATE` counter or unique index race per creation id,+test-proven under concurrency), insert the certificate row, then attest:+a Solana memo-program transaction from the platform wallet carrying a+compact JSON payload (cert id, glb_sha256, edition_no/edition_of,+creation id). Devnet by default; mainnet behind+`PRINT_CERT_CLUSTER=mainnet` plus the gate above. Record the signature on+the row; a failed send leaves `solana_signature` null and a retry path via+the reconciliation cron from order 04 (extend it, do not add a second+cron).++### 2. The certificate page (`/p/:certId`)++`pages/certificate.html` + `src/certificate-page.js` over+`GET /api/print/certs/:id` (public, read-only): the original model+spinning, prompt lineage (respecting the creation's existing visibility+rules; a private creation renders its cert without the prompt), edition+badge, material + print date, the on-chain proof as a link to the+transaction on a Solana explorer plus the raw memo payload rendered so+verification needs no explorer, and a "verify these bytes" affordance+documenting how to hash the asset and compare. Add the route to+`data/pages.json`.++### 3. QR + package insert++Generate a QR PNG per certificate (the `qrcode` package) pointing at+`/p/:certId`, stored to R2 next to the prepared assets, surfaced in the+operator console (order 04) as part of the shipping step: a print-ready+insert card (HTML print stylesheet on an ops-only page: QR, model name,+edition, three.ws mark). The operator prints and boxes it; the adapter+contract's `submit` payload includes the insert URL for partner lanes.++### 4. Editions surface++Edition scarcity per creation: `edition_of` comes from the creator. On the+model page and /materialize, a signed-in creator of the model can cap+editions for their creation (a small settings affordance writing to+`forge_creations` or a sibling table per what order 02 shipped; re-derive)+with the default open edition. Sold-out editions refuse new orders at+quote time with a designed message. Cert page and model page both render+"edition 3 of 25".++### 5. Tests++Hash correctness against a fixture buffer, atomic edition claiming under+concurrent issuance (two parallel transactions, no duplicate edition_no),+memo payload shape, devnet flag default, cert API visibility rules+(private prompt stays private), quote-time sold-out refusal.++## Definition of done++- [ ] `npm test` green including concurrency test on edition claiming.+- [ ] A real devnet attestation executed from this session for a real prepared asset; transaction signature pasted in the report and resolving on a devnet explorer.+- [ ] `/p/:certId` renders that certificate on the dev server with the proof link live.+- [ ] QR PNG generated, stored, and the insert card printable from the ops page.+- [ ] Mainnet path exists behind the env flag + gate, untriggered.+- [ ] `data/pages.json` carries `/p/:certId`'s page entry (pattern per how `/m/:id` is registered; re-derive).+- [ ] `npm run check:rules -- --paths <files you touched>` passes.+- [ ] Committed with explicit paths; this file deleted in the closing commit; PROGRESS.md appended.++## Never blocked++| Blocker | Resolution |+|---|---|+| Platform wallet / devnet SOL | The tokenize e2e script already signs on devnet; reuse its wallet source. Devnet faucet if the balance is dry. |+| Memo vs NFT debate | Decided: memo attestation now (cheap, sufficient for verification), collectible mint is a later item per 00-CONTEXT scope. Do not build cNFT infra here. |+| Explorer link choice | Any public Solana explorer URL format; render the raw payload too so the page never depends on a third party. |+| Private creations | Visibility rule stated in task 2: cert renders, prompt withheld. Follow the creation's existing visibility field. |+| Edition cap UI scope creep | One affordance, one field, quote-time enforcement. The marketplace for editions is explicitly later. |++## Report format++Files + tests, the devnet signature, the cert page URL exercised, owner+items (mainnet approval), one line per 00-CONTEXT deviation, next action.diff --git a/prompts/materialize/06-safety-docs-launch.md b/prompts/materialize/06-safety-docs-launch.mdnew file mode 100644index 000000000..8c0b36b36--- /dev/null+++ b/prompts/materialize/06-safety-docs-launch.md@@ -0,0 +1,129 @@+# Work order 06: the fabrication gate, docs, spec, and launch++**How to run:** paste this whole file into a fresh Claude Code chat in this+repo, or name its path. Read `prompts/materialize/00-CONTEXT.md` first; its+decisions bind this order.++**Binding operating clause:** finish 100%. Never end with a question or an+unexecuted plan. CLAUDE.md hard rules apply: no mocks, no fake data, no+unfinished markers, no em-dash, explicit-path commits. Production deploy+and any public announcement remain owner-gated; this order ends with the+ship being one command and one yes.++## Why this order exists++Physical manufacturing raises the stakes of everything the platform+already moderates: a refused image generation costs nothing, a printed+firearm component is a crime. The gate must be code. And a surface this+novel without docs is invisible: the docs are how users, agents, and the+partner's engineers discover that prompt-to-object exists. This order+closes both, then assembles the launch.++## Step 0: re-derive current state++```+ls prompts/materialize/ # which orders already retired?+ls docs/materialize.md specs/PRINT_PIPELINE.md 2>/dev/null+grep -n "print" data/changelog.json | head+cat api/_mcp-studio/safety.js | head -80+npm test -- tests/api/print 2>/dev/null | tail -3+grep -rn "screening" api/_lib/print-store.js | head+```++All prior orders' deliverables must be verified on disk (the shrinking+pack directory is the ledger, but verify the code, not the ledger). Any+gap found belongs to this session now; fix it, never report around it.++## Tasks++### 1. The fabrication gate (`api/_lib/print/gate.js`)++Runs twice per order: at quote time (cheap, fail fast, nothing charged)+and again on the `paid → screening` transition (thorough, auto-`rejected`++ refund path on failure). Layers, all real code with tests:++- Reuse the upstream generation safety verdicts: a creation the forge+ gate flagged never reaches a printer (re-derive where forge/mcp-studio+ verdicts are recorded; read `api/_mcp-studio/safety.js` and+ `docs/mcp-safety.md`).+- Fabrication-specific denylist evaluated over prompt lineage + model+ title + buyer note: firearm parts and receivers, suppressors, working+ weapon mechanisms, keys or bypass tools for real locks, counterfeit+ branded goods and logos/trademarks, ammunition. Structured rules with+ per-rule tests, not one regex blob.+- LLM screening pass over the same lineage through the platform's+ existing LLM chain (`api/_lib/llm.js`) with a constrained verdict+ schema, results recorded on the order (`analysis.screening`), the+ denylist always winning over a permissive LLM verdict.+- Geometry heuristics where cheap and honest (e.g. blade-profile aspect+ ratios are NOT reliably detectable; do not pretend otherwise, and say+ so in the spec's limitations section).++Every refusal is designed UX: names the category, links the content+policy, offers what is allowed. Refusals emit the same ops-channel+notification as stalls (order 04), so a human reviews edge cases.++### 2. The spec (`specs/PRINT_PIPELINE.md`)++The wire contracts other code depends on: printability report v1 (every+field, units, the score deductions), quote token claims, order states ++legal transitions, adapter interface, webhook envelope + HMAC, certificate+memo payload, gate verdict shape and its stated limitations. Follow the+depth of the neighboring specs in `specs/`.++### 3. Docs (every layer from CLAUDE.md's documentation section)++- `docs/materialize.md`: the feature doc, zero-context reader, linked+ from `docs/start-here.md` and `docs/nav.json` per how sibling docs are+ wired. Covers the user flow, materials, pricing model shape, the agent+ lane with a runnable x402 example, certificates, and the content+ policy.+- `docs/api-reference.md`: the `/api/print/*` endpoints in the house+ format; the x402 endpoint listed with its siblings.+- STRUCTURE.md: one row for Materialize mapping every path this campaign+ created.+- `data/changelog.json`: one holder-readable entry (tags: feature), plus+ a second entry if certificates shipped separately. `npm run build:pages`+ validates.+- MCP: if the platform's MCP studio exposes forge tools, add the+ analyze/quote tools there so agents discover the lane the same way they+ discovered generation (re-derive the tool registry location; follow an+ existing tool's shape end to end including its safety wiring).++### 4. Launch assembly++- `npm run audit:docs` green; `npm test` green; `npm run gate` run and+ triaged (fix what your campaign broke; pre-existing reds noted per the+ never-blocked table).+- Walk the CLAUDE.md definition-of-done checklist against the whole+ surface in a real browser and record it in the report.+- Owner ship-list, one message: deploy command (`npm run deploy:gcp:full`+ after the runbook's worktree steps), the partner/env residuals from+ order 04, mainnet cert approval from order 05, and suggested changelog+ timing. Nothing else may remain.++## Definition of done++- [ ] Gate tests cover every denylist category (allow + deny cases) and the two run points; `npm test` green.+- [ ] A crafted violating order is refused at quote time on the dev server, and a paid fixture reaching `screening` auto-rejects, both evidenced in the report.+- [ ] `specs/PRINT_PIPELINE.md` exists and matches the shipped code (spot-check three fields against live responses).+- [ ] `npm run audit:docs` passes; changelog entry validates via `npm run build:pages`.+- [ ] STRUCTURE.md row, docs/nav.json wiring, api-reference section all present.+- [ ] `npm run check:rules -- --paths <files you touched>` passes.+- [ ] Committed with explicit paths; this file AND the campaign README/context retire per the pack's retirement policy once PROGRESS.md records final evidence.++## Never blocked++| Blocker | Resolution |+|---|---|+| Upstream verdict storage unclear | Read the mcp-studio safety module and grep where its verdicts persist; if generation verdicts are not persisted, gate on re-evaluation of the lineage text and note the gap as a one-line owner FYI, not a stall. |+| LLM chain budget | The free-first chain in `api/_lib/llm.js` is the platform default; screening prompts are short. Use it as-is. |+| `npm run gate` has pre-existing reds | Fix what blocks your verification path; list the rest with one line each. Never let someone else's red stop your green (CLAUDE.md playbook). |+| Content-policy page to link | If none exists for fabrication, add the section to the existing policy/legal page the platform links elsewhere; a refusal must never link a 404. |+| Announcement copy | Changelog entry is the deliverable; social/announce content is owner-gated publishing and goes in the ship-list message only. |++## Report format++The final campaign report: every order's deliverables verified on disk,+gate evidence, docs/audit results, the one-message owner ship-list, and+PROGRESS.md's closing entry.diff --git a/prompts/materialize/PROGRESS.md b/prompts/materialize/PROGRESS.mdnew file mode 100644index 000000000..96f6a3b91--- /dev/null+++ b/prompts/materialize/PROGRESS.md@@ -0,0 +1,15 @@+# 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.diff --git a/prompts/materialize/README.md b/prompts/materialize/README.mdnew file mode 100644index 000000000..3c3ded608--- /dev/null+++ b/prompts/materialize/README.md@@ -0,0 +1,46 @@+# materialize: forge output becomes a physical object in the buyer's hands++This campaign builds **Materialize**, the lane that takes any three.ws forge+creation from GLB to a high-precision physical print delivered to a door.+The complete loop: prompt or photo, generated 3D model, printability analysis+and automatic repair, true-scale AR preview, itemized quote, Solana USDC+checkout (human or paying AI agent over x402), fulfillment through a+provider adapter, an on-chain birth certificate linking the physical object+back to its generation record, and a tracked delivery.++Nobody has shipped this loop end to end. Pieces exist elsewhere (print+bureaus have upload forms, AI 3D vendors have download buttons), but no+platform closes prompt-to-object in one surface, and no platform lets an AI+agent pay for a physical object of a model it just generated. That second+one is the headline: the x402 print endpoint makes three.ws the first place+where an autonomous agent can order manufacturing.++## Files++| File | Work order | Depends on |+|---|---|---|+| [00-CONTEXT.md](00-CONTEXT.md) | Shared facts: architecture, schema, naming, OSS decisions, launch scope. Read first, always. | none |+| [01-printability-engine.md](01-printability-engine.md) | Mesh analysis, repair, and print-format export (STL, 3MF, color) | none |+| [02-quote-order-payments.md](02-quote-order-payments.md) | Material catalog, quote engine, order state machine, Solana + x402 checkout | 01 |+| [03-materialize-surface.md](03-materialize-surface.md) | The /materialize page, entry points across the platform, true-scale AR | 01, 02 |+| [04-fulfillment-ops.md](04-fulfillment-ops.md) | Provider adapter layer, operator fulfillment console, partner onboarding | 02 |+| [05-provenance-phygital.md](05-provenance-phygital.md) | On-chain print certificates, editions, QR link from object to record | 02 |+| [06-safety-docs-launch.md](06-safety-docs-launch.md) | Fabrication content gate, docs, spec, changelog, launch checklist | all |+| [PROGRESS.md](PROGRESS.md) | Cross-chat handoff log. Append on finish. | none |++Run order: 01 first (everything consumes its analysis and export layer),+then 02, then 03/04/05 in any order or in parallel, then 06 to close.+Every order re-derives current state in its step 0, so re-running a+half-finished order is always safe.++## Relation to other packs++prompts/swarm-100/ audits what exists; this pack builds a new surface, like+prompts/roadmap/. Where a swarm-100 sweep later touches `api/print/*` or+`/materialize`, both re-derive state first, so order does not matter.++## Retirement++A finished work order is deleted in the same commit as its last deliverable+(git rm, explicit path), per the prompts/README.md retirement policy. The+campaign retires when all six are gone and PROGRESS.md records the evidence.