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
feat(x-content): add partner spotlight content module with AWS and IBM partner records and tests
nirholasfc5cd8ba79d8
diff --git a/api/_lib/x-content/partners.js b/api/_lib/x-content/partners.jsnew file mode 100644index 000000000..5ba47a745--- /dev/null+++ b/api/_lib/x-content/partners.js@@ -0,0 +1,392 @@+// The partner spotlight series: one post a day about one of the partners on+// three.ws/partners and one thing three.ws built on that partner, filmed live.+//+// Owner, 2026-10-11: "every day for our autonomous X pipeline we should make a+// post about our partners and the features we built ... make it really in depth+// and strong. once per day."+//+// The registry (data/x-content/partners/<id>.json) is the only source of facts.+// Each partner entry carries the designation exactly as docs/partners.md says to+// state it, the evidence that the designation is live, the phrases that would+// overstate the relationship, and a list of features. Each feature carries a+// scenario that films it working on production, and facts, each with evidence.+//+// This module is pure: it picks what runs next, writes the brief, judges a+// draft, and turns a draft into a queue item. The model call is injected, so+// the whole loop runs offline in tests. scripts/x-partners.mjs films, drafts,+// and hands the item to the queue's own review and approval.+//+// The series lint is what stands in for the owner's eye on a partner's name+// (approval.series in the queue lets these posts out without the owner):+// designation the thread states the designation word for word+// forbidden no phrase from the partner's forbidden list, in any case+// tags no @mention at all: the series names partners in plain text+// neighbours another partner is named only where this feature's facts do+// evidence every claim is built here from the registry's own evidence;+// the model writes copy, never a claim++import { existsSync, readFileSync, readdirSync } from 'node:fs';+import { resolve } from 'node:path';+import { claimProblems, languageProblems, mentionsIn } from './editorial.js';+import { headSpecProblems } from './formats.js';+import { copyProblems, copySimilarity, maxLengthOf } from './quality.js';++export const SERIES = 'partners';+export const REGISTRY_DIR = 'data/x-content/partners';+export const HEAD_ROTATION = ['card', 'gif', 'reel', 'art'];+export const PATTERN_ROTATION = ['mechanism', 'walkthrough', 'clip', 'number'];+export const LANES = ['community', 'developer', 'token', 'labs'];+export const MIN_REPLIES = 3;+export const MAX_REPLIES = 5;+export const MIN_FACTS_QUOTED = 3;+export const SIMILARITY_LIMIT = 0.34;++const DAY = 86_400_000;+const slug = /^[a-z0-9][a-z0-9-]{1,40}$/;++// --- registry ----------------------------------------------------------------++export function partnerProblems(partner) {+ const problems = [];+ const where = partner?.id || '(no id)';+ if (!slug.test(String(partner?.id || ''))) problems.push(`${where}: id must be a lowercase slug`);+ if (!String(partner?.name || '').trim()) problems.push(`${where}: name is required`);+ if (!Number.isInteger(partner?.order)) problems.push(`${where}: order must be its position on /partners`);+ if (!String(partner?.designation || '').trim()) problems.push(`${where}: designation is required, as docs/partners.md states it`);+ if (!partner?.designationEvidence?.length) problems.push(`${where}: designationEvidence must show the designation where it is published`);+ if (!/^https:\/\/three\.ws\//.test(String(partner?.page || ''))) problems.push(`${where}: page must be a three.ws URL`);+ if (!Array.isArray(partner?.forbidden)) problems.push(`${where}: forbidden must list the phrases that overstate the relationship`);+ if (!partner?.features?.length) problems.push(`${where}: at least one feature is required`);+ const ids = new Set();+ for (const feature of partner?.features || []) {+ const at = `${where}/${feature?.id || '(no id)'}`;+ if (!slug.test(String(feature?.id || ''))) problems.push(`${at}: id must be a lowercase slug`);+ if (ids.has(feature?.id)) problems.push(`${at}: id is duplicated`);+ ids.add(feature?.id);+ if (!/^https:\/\//.test(String(feature?.surface || ''))) problems.push(`${at}: surface must be an https URL`);+ if (!LANES.includes(feature?.lane)) problems.push(`${at}: lane must be one of ${LANES.join(', ')}`);+ if (!String(feature?.summary || '').trim()) problems.push(`${at}: summary is required`);+ if (!feature?.scenario?.steps?.length) problems.push(`${at}: a scenario is required; every spotlight is filmed`);+ if (!(feature?.facts?.length >= MIN_FACTS_QUOTED)) problems.push(`${at}: needs at least ${MIN_FACTS_QUOTED} facts`);+ for (const fact of feature?.facts || []) {+ if (!String(fact?.says || '').trim() || !fact?.evidence?.length) problems.push(`${at}: every fact needs says and evidence`);+ }+ }+ return problems;+}++export function loadPartners(root, dir = REGISTRY_DIR) {+ const path = resolve(root, dir);+ if (!existsSync(path)) return [];+ return readdirSync(path)+ .filter((name) => name.endsWith('.json'))+ .map((name) => JSON.parse(readFileSync(resolve(path, name), 'utf8')))+ .sort((left, right) => left.order - right.order || left.id.localeCompare(right.id));+}++// --- rotation ----------------------------------------------------------------++// Every spotlight the account has queued or sent, oldest first. An item names+// its partner and feature in `spotlight`, so the rotation never has to guess+// from copy.+export function spotlights(items) {+ return (items || [])+ .filter((item) => item?.series === SERIES && item.spotlight?.partner)+ .map((item) => ({ id: item.id, ...item.spotlight, day: String(item.notBefore || '').slice(0, 10), status: item.status }))+ .sort((left, right) => left.day.localeCompare(right.day) || left.id.localeCompare(right.id));+}++const lastIndex = (rows, match) => {+ for (let index = rows.length - 1; index >= 0; index--) if (match(rows[index])) return index;+ return -1;+};++// The least recently featured partner, in page order on a tie, then its least+// recently featured feature. A head format and a pattern that the last+// spotlights did not use, so a week of the series never looks like one post.+export function pickNext(partners, history, { exclude = [] } = {}) {+ const usable = partners.filter((partner) => !exclude.includes(partner.id) && partner.features?.length);+ if (!usable.length) return null;+ const partner = [...usable].sort((left, right) => lastIndex(history, (row) => row.partner === left.id) - lastIndex(history, (row) => row.partner === right.id) || left.order - right.order)[0];+ const feature = [...partner.features]+ .map((row, index) => ({ row, index, last: lastIndex(history, (spot) => spot.partner === partner.id && spot.feature === row.id) }))+ .sort((left, right) => left.last - right.last || left.index - right.index)[0].row;+ const recent = history.slice(-(HEAD_ROTATION.length - 1));+ const head = HEAD_ROTATION.map((as, index) => ({ as, index, last: lastIndex(recent, (row) => row.head === as) })).sort((left, right) => left.last - right.last || left.index - right.index)[0].as;+ const counted = (feature.facts || []).some((fact) => /\d/.test(fact.says));+ const patterns = PATTERN_ROTATION.filter((pattern) => pattern !== 'number' || counted);+ const pattern = patterns.map((name, index) => ({ name, index, last: lastIndex(recent, (row) => row.pattern === name) })).sort((left, right) => left.last - right.last || left.index - right.index)[0].name;+ return { partner, feature, head, pattern };+}++// The day the next spotlight runs: the first day from `now` that no spotlight+// already holds. The series slot takes one a day, and each spotlight waits for+// its own day, so the rotation goes out in the order it was written.+export function nextDay(history, now = Date.now()) {+ const taken = new Set(history.filter((row) => row.status !== 'paused').map((row) => row.day));+ for (let at = now; ; at += DAY) {+ const day = new Date(at).toISOString().slice(0, 10);+ if (!taken.has(day)) return day;+ }+}++export const spotlightId = (partner, feature, day) => `partner-${partner.id}-${feature.id}-${day.replace(/-/g, '')}`.slice(0, 80);++// --- brief and prompt ----------------------------------------------------------++const PATTERN_GUIDE = {+ mechanism: 'Lead with how it works: what the partner technology does inside the feature, in one plain sentence a newcomer follows.',+ walkthrough: 'Lead with the first thing a person does on the surface and what they get back, then follow that one path through the thread.',+ clip: 'The reel shows the feature running live. Write what the reel cannot say on its own: what is happening under the frame and why the partner makes it possible.',+ number: 'Lead with the strongest number among the facts, and what it is a number of. Use it exactly as the fact states it.',+};++const LANE_GUIDE = {+ community: 'For people who use three.ws and hold $THREE: plain words, no API names unless they are the point.',+ developer: 'For engineers who will open the code: name the real endpoint, package, format or model.',+ token: 'For people who follow the agent economy: say what the mechanism does, never what anything will be worth.',+ labs: 'For people who like early, well-made work: be specific about what is new.',+};++const HEAD_GUIDE = {+ reel: 'The head post carries the filmed reel itself.',+ gif: 'The head post carries a short looping GIF cut from the reel; the full reel rides on reply 1.',+ card: 'The head post carries a card: your headline (two short lines, under 60 characters, split with \\n) and body (one sentence, under 160 characters) beside a frame of the reel. The full reel rides on reply 1. Any number on the card must also appear in the thread.',+ art: 'The head post carries AI-generated key art, labelled as such, from your art prompt (what the image shows, in one paragraph: subject, composition, light; never text, logos or brand marks), with your headline and body. The full reel rides on reply 1.',+};++export function buildBrief({ partner, feature, head, pattern, day, proof = null, docs = {}, otherPartners = [] }) {+ return {+ series: SERIES,+ day,+ partner: {+ name: partner.name,+ designation: partner.designation,+ page: partner.page,+ guidance: partner.guidance,+ forbidden: partner.forbidden,+ },+ feature: {+ title: feature.title,+ surface: feature.surface,+ lane: feature.lane,+ summary: feature.summary,+ facts: feature.facts.map((fact) => fact.says),+ reel: (feature.scenario.steps || []).map((step) => step.caption).filter(Boolean),+ measured: proof?.facts || {},+ },+ head,+ pattern,+ docs,+ otherPartners: otherPartners.map((row) => row.name),+ };+}++export const SYSTEM = `You write the daily partner spotlight for @trythreews, the X account of three.ws, a platform for 3D AI agents: avatars, a web component, agent wallets on Solana, and the $THREE token. Each day the account features one partner listed on three.ws/partners and one thing three.ws built on that partner's technology. The feature was filmed working on production today; the reel is attached to the thread.++You are given a brief. It is the only source of facts you have. Do not add anything that is not in it, do not guess at numbers, and do not describe behaviour it does not record.++What the thread is:+- A head post and {MIN} to {MAX_REPLIES} replies. In depth: the reader should finish knowing what the feature does, how the partner's technology makes it work, what a person or an agent does with it, and where to try it.+- The head names the partner in plain words, says what three.ws built, and links the feature surface (the brief's feature.surface, written without https://). Open with the strongest true statement; the first 280 characters must stand on their own.+- One reply states the relationship using the designation exactly as the brief gives it, word for word, with the same capitals, and links the partner page (the brief's partner.page, without https://). Thank the partner warmly and specifically for what their technology makes possible.+- The other replies go deeper: the mechanism, one concrete path a user takes, what an agent can do with it, and what is new. Each reply carries one idea.+- Quote at least {FACTS} of the brief's feature.facts word for word, exactly as written, because each is checked against its evidence. Every number, ordinal and absolute word (first, only, every, never, all, free, zero, instant) must appear inside a quoted fact, inside the designation, or inside a measured value from feature.measured. If you cannot support a number, leave it out.+- Positive framing only. Nothing about what is missing, late, broken, or limited.++Hard rules, each enforced by a machine after you answer:+- Each post is at most {MAX} weighted characters; a URL counts as 23. The head is at least 100.+- Each post carries at most one link, and X reads the bare name three.ws as a link. In a post that links, say "we" or "our" for the platform instead of writing three.ws a second time.+- No @mentions anywhere. Name partners in plain text.+- Never use any phrase in the brief's partner.forbidden list, in any form. Never say or imply that the partner endorses, sponsors, invests in, or recommends three.ws or $THREE, and never upgrade the designation into something bigger.+- Do not name any company in the brief's otherPartners list unless one of the feature facts names it.+- No hashtags, no emoji, no em-dashes or en-dashes, no stacked exclamation marks, no more than one all-caps word, no thread counters like 1/5.+- No launch-deck openers (Introducing, We are excited, Say hello to, Meet the new, Big news), no rhetorical question first, no teaser that withholds the point.+- No hype or filler: game-changer, revolutionary, seamless, powerful, robust, innovative, cutting-edge, world-class, leverage, empower, unleash, elevate, harness, journey, supercharge, delve, very, really, simply, literally, actually, basically, truly, incredibly, amazing, awesome, groundbreaking.+- No crypto slang, no engagement asks, nothing that reads as investment advice or a price promise.+- Names written exactly: three.ws, $THREE, X (never Twitter), GitHub, JavaScript, TypeScript, OpenAI, NVIDIA, Solana, glTF, GLB, API, MCP, AI.++Respond with a single JSON object and nothing else:+{"post":"the head post","thread":["reply 1","reply 2","reply 3"],"headline":"card or art headline, two short lines split with \\n","body":"one sentence for the card","prompt":"art prompt, only when the head is art, else empty","why":"two sentences for the editor: what the thread leads on and why it is the strongest true thing about this feature"}`;++export function buildDraftRequest(brief, { voice = null, exemplar = null, findings = [], previous = null, maximum = 1000 } = {}) {+ const guidance = [+ `Pattern: ${brief.pattern}. ${PATTERN_GUIDE[brief.pattern] || PATTERN_GUIDE.mechanism}`,+ `Lane: ${brief.feature.lane}. ${LANE_GUIDE[brief.feature.lane] || LANE_GUIDE.community}`,+ `Head: ${brief.head}. ${HEAD_GUIDE[brief.head]}`,+ `How to describe the relationship: ${brief.partner.guidance}`,+ ].join('\n');+ const retry = previous+ ? ['## Your previous draft, and why it was rejected', JSON.stringify(previous, null, 2), findings.map((finding) => `- ${finding}`).join('\n'), 'Write it again. Fix every point. Keep what was already true.'].join('\n\n')+ : null;+ const text = [+ `## Brief\n${JSON.stringify(brief, null, 2)}`,+ `## How this one should read\n${guidance}`,+ voice ? `## House voice contract\n${voice}` : null,+ exemplar ? `## The house exemplar (an Article; match its voice and its warmth toward partners, not its length)\n${exemplar}` : null,+ retry,+ 'Write the thread now. Respond with the JSON object only.',+ ]+ .filter(Boolean)+ .join('\n\n');+ const system = SYSTEM.replace('{MIN}', String(MIN_REPLIES)).replace('{MAX_REPLIES}', String(MAX_REPLIES)).replace('{FACTS}', String(MIN_FACTS_QUOTED)).replace('{MAX}', String(maximum));+ return { system, parts: [{ type: 'text', text }] };+}++export function parseDraft(raw) {+ const text = String(raw || '');+ const start = text.indexOf('{');+ const end = text.lastIndexOf('}');+ if (start < 0 || end <= start) throw new Error('drafter returned no JSON object');+ const draft = JSON.parse(text.slice(start, end + 1));+ if (!String(draft.post || '').trim()) throw new Error('drafter returned an empty head post');+ return {+ post: String(draft.post).trim(),+ thread: (Array.isArray(draft.thread) ? draft.thread : []).map((row) => String(row || '').trim()).filter(Boolean),+ headline: String(draft.headline || '').trim(),+ body: String(draft.body || '').trim(),+ prompt: String(draft.prompt || '').trim(),+ why: String(draft.why || '').trim(),+ };+}++// --- claims --------------------------------------------------------------------++const lower = (value) => String(value || '').toLowerCase();++// The ledger, built from the registry and the run, never from the model: a+// fact the copy quotes brings its evidence, the designation brings the page+// that publishes it, and a value the run read brings the run.+export function claimsFor(partner, feature, texts, proof = null) {+ const corpus = lower(texts.join('\n'));+ const claims = [];+ const seen = new Set();+ const add = (says, evidence) => {+ if (!says || seen.has(lower(says)) || !corpus.includes(lower(says))) return;+ seen.add(lower(says));+ claims.push({ says, evidence });+ };+ add(partner.designation, partner.designationEvidence);+ for (const fact of feature.facts || []) add(fact.says, fact.evidence);+ for (const [name, value] of Object.entries(proof?.facts || {})) {+ const said = String(value || '').trim();+ if (said) add(said, [{ type: 'proof', fact: name, equals: said }]);+ }+ return claims;+}++// --- judging a draft ---------------------------------------------------------++const bare = (url) => String(url || '').replace(/^https?:\/\//, '').replace(/\/$/, '');+const linksTo = (text, url) => lower(text).includes(lower(bare(url)));++export function seriesFindings(partner, feature, draft, { partners = [] } = {}) {+ const findings = [];+ const texts = [draft.post, ...draft.thread];+ const corpus = texts.join('\n');+ if (!corpus.includes(partner.designation)) findings.push(`state the relationship as "${partner.designation}", word for word with the same capitals`);+ for (const phrase of partner.forbidden || []) {+ if (lower([corpus, draft.headline, draft.body].join('\n')).includes(lower(phrase))) findings.push(`"${phrase}" overstates the relationship with ${partner.name}; cut it`);+ }+ const tagged = mentionsIn([corpus, draft.headline, draft.body].join('\n'));+ if (tagged.length) findings.push(`${tagged.join(', ')}: the spotlight tags no one; name the partner in plain text`);+ if (!lower(draft.post).includes(lower(partner.name))) findings.push(`the head must name ${partner.name}`);+ if (!linksTo(draft.post, feature.surface)) findings.push(`the head must link ${bare(feature.surface)}`);+ if (!linksTo(corpus, partner.page)) findings.push(`one reply must link ${bare(partner.page)}`);+ if (draft.thread.length < MIN_REPLIES) findings.push(`the thread has ${draft.thread.length} replies; write ${MIN_REPLIES} to ${MAX_REPLIES}`);+ if (draft.thread.length > MAX_REPLIES) findings.push(`the thread has ${draft.thread.length} replies; keep it to ${MAX_REPLIES}`);+ const quoted = (feature.facts || []).filter((fact) => lower(corpus).includes(lower(fact.says)));+ if (quoted.length < MIN_FACTS_QUOTED) findings.push(`the thread quotes ${quoted.length} of the feature facts word for word; quote at least ${MIN_FACTS_QUOTED}`);+ const allowed = lower([feature.summary, ...(feature.facts || []).map((fact) => fact.says)].join('\n'));+ for (const other of partners.filter((row) => row.id !== partner.id)) {+ const named = new RegExp(`\\b${other.name.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')}\\b`, 'i');+ if (named.test(corpus) && !named.test(allowed)) findings.push(`${other.name} is another partner, and this feature's facts do not name it; leave it for its own day`);+ }+ return findings;+}++// Everything wrong with a draft, in the words the model will be shown. Offline,+// so a retry costs one model call.+export function draftFindings({ partner, feature, head, draft, proof = null, partners = [], rivals = [], maximum = 1000 }) {+ const findings = [...seriesFindings(partner, feature, draft, { partners })];+ const texts = [draft.post, ...draft.thread];+ for (const problem of copyProblems(draft.post, { minimum: 100, maximum })) findings.push(`head: ${problem}`);+ draft.thread.forEach((reply, index) => {+ for (const problem of copyProblems(reply, { minimum: 40, maximum, requireUrl: false })) findings.push(`reply ${index + 1}: ${problem}`);+ });+ for (const text of [...texts, draft.headline, draft.body].filter(Boolean)) {+ for (const finding of languageProblems(text)) if (finding.severity !== 'minor') findings.push(`${finding.rule}: ${finding.message}`);+ }+ const claims = claimsFor(partner, feature, texts, proof);+ for (const finding of claimProblems({ posts: texts.map((text) => ({ text })), claims, mentions: {} })) {+ if (finding.severity === 'blocking') findings.push(`${finding.rule}: ${finding.message}. Quote a fact from the brief that contains it, or leave it out`);+ }+ if (head !== 'reel') {+ const spec = specFor(head, draft);+ for (const problem of headSpecProblems({ kind: 'post', scenario: feature.scenario, head: spec, posts: texts.map((text) => ({ text })) })) findings.push(problem);+ }+ for (const rival of rivals) {+ const score = copySimilarity(draft.post, rival);+ if (score >= SIMILARITY_LIMIT) {+ findings.push(`the head reads like an earlier post (similarity ${score.toFixed(2)}): "${rival.slice(0, 110)}". Lead on a different fact.`);+ break;+ }+ }+ return [...new Set(findings)];+}++export function specFor(head, draft) {+ if (head === 'reel') return { as: 'reel' };+ if (head === 'gif') return { as: 'gif' };+ const spec = { as: head, headline: draft.headline };+ if (draft.body) spec.body = draft.body;+ if (head === 'art') spec.prompt = draft.prompt;+ return spec;+}++// Drafts until the machine checks pass or the attempts run out. `call` is+// callModelChain or a stand-in with its signature.+export async function draftSpotlight(brief, context, { call, voice = null, exemplar = null, attempts = 3, maximum = 1000 } = {}) {+ const tries = [];+ let previous = null;+ let findings = [];+ for (let attempt = 1; attempt <= attempts; attempt++) {+ const request = buildDraftRequest(brief, { voice, exemplar, findings, previous, maximum });+ const { value, model } = await call(request, { parse: parseDraft });+ findings = draftFindings({ ...context, head: brief.head, draft: value, maximum });+ tries.push({ attempt, model, findings });+ if (!findings.length) return { ok: true, draft: value, model, attempts: tries };+ previous = value;+ }+ return { ok: false, draft: previous, model: tries.at(-1)?.model, attempts: tries, findings };+}++// --- the queue item -----------------------------------------------------------++// The item a passing draft becomes. Tier 1 because it names a partner; the+// series slot and approval.series carry it from there.+export function itemFor({ partner, feature, head, pattern, day, draft, proof = null }) {+ const texts = [draft.post, ...draft.thread];+ const item = {+ id: spotlightId(partner, feature, day),+ status: 'draft',+ kind: 'post',+ tier: 1,+ series: SERIES,+ spotlight: { partner: partner.id, feature: feature.id, head, pattern },+ lane: feature.lane,+ pattern,+ notBefore: `${day}T00:00:00.000Z`,+ covers: feature.covers?.length ? feature.covers : undefined,+ scenario: feature.scenario,+ probes: [{ type: 'scenario' }, ...(feature.probes || [])],+ posts: texts.map((text) => ({ text })),+ claims: claimsFor(partner, feature, texts, proof),+ mentions: {},+ };+ if (head !== 'reel') item.head = specFor(head, draft);+ if (!item.covers) delete item.covers;+ return item;+}++export const maximumLength = (quality) => maxLengthOf(quality || {});diff --git a/data/x-content/partners/aws.json b/data/x-content/partners/aws.jsonnew file mode 100644index 000000000..1ed86eea2--- /dev/null+++ b/data/x-content/partners/aws.json@@ -0,0 +1,549 @@+{+ "id": "aws",+ "name": "Amazon Web Services",+ "order": 3,+ "designation": "AWS Partner",+ "designationEvidence": [+ {+ "type": "page",+ "url": "https://three.ws/aws",+ "contains": "Now an AWS Partner"+ }+ ],+ "page": "https://three.ws/aws",+ "handle": "awscloud",+ "mark": null,+ "forbidden": [+ "endorsed by AWS",+ "endorsed by Amazon",+ "AWS endorses",+ "AWS-endorsed",+ "certified by AWS",+ "AWS-certified",+ "AWS recommends",+ "AWS-recommended",+ "AWS Strategic Partner",+ "strategic partnership with AWS",+ "AWS Competency",+ "AWS Advanced",+ "AWS Premier",+ "AWS Select Tier",+ "available on AWS Marketplace",+ "available in AWS Marketplace",+ "listed on AWS Marketplace",+ "listed in AWS Marketplace",+ "live on AWS Marketplace",+ "live in AWS Marketplace",+ "now on AWS Marketplace",+ "launched on AWS Marketplace",+ "find us on AWS Marketplace",+ "buy three.ws on AWS",+ "buy it on AWS",+ "subscribe on AWS Marketplace today",+ "AWS Marketplace listing is live",+ "AWS invoice",+ "AWS bill",+ "AWS billing",+ "AWS credits",+ "AWS commitment",+ "EDP commitment",+ "toward EDP",+ "consolidated billing",+ "billed through AWS",+ "billed by AWS",+ "metered by AWS",+ "charged through AWS",+ "drawn down",+ "runs on AWS",+ "hosted on AWS",+ "powered by AWS",+ "AWS-hosted",+ "AWS infrastructure",+ "AWS-powered",+ "runs on EC2",+ "VPC deployment",+ "IAM-integrated",+ "Amazon Bedrock",+ "joint customers",+ "co-sell"+ ],+ "guidance": "three.ws is an AWS Partner, listed on the Software Path. Say that and nothing grander: it is a partner designation, not an endorsement, certification or tier. The AWS Marketplace integration is built and deployed, and the subscription it will open is a free front door that links an AWS account to a three.ws account and issues an x402 key. Usage is paid per call in USDC over x402, never on an AWS invoice. Never say three.ws is listed, available or live on AWS Marketplace, and never say the platform runs on or is hosted on AWS: production runs on Google Cloud and the Marketplace integration is the AWS leg. If the listing status comes up, use the product page's own words and keep it to one clause.",+ "docs": [+ "docs/partners.md",+ "docs/aws-marketplace.md",+ "docs/aws-builder-center.md",+ "docs/aws-marketplace-listing-kit.md",+ "docs/listings.md"+ ],+ "features": [+ {+ "id": "marketplace-front-door",+ "title": "A free AWS subscription that issues an x402 key",+ "surface": "https://three.ws/aws",+ "covers": [+ "/aws",+ "/aws-marketplace/welcome",+ "api/aws-marketplace/",+ "/api/aws-marketplace/register"+ ],+ "lane": "developer",+ "summary": "three.ws built the AWS Marketplace SaaS integration and a product page that explains it. Subscribing is a free front door: it links an AWS account to a three.ws account and issues an x402 access key that calls every /api/x402/* endpoint. Usage is then paid per call in USDC over x402, so AWS Marketplace does not meter or bill it. Registration and entitlement calls reach the AWS Marketplace APIs in us-east-1. The same x402 endpoints work today with no AWS account at all. It is for teams that want to start from the AWS side.",+ "docs": [+ "docs/aws-marketplace.md",+ "docs/aws-marketplace-listing-kit.md"+ ],+ "scenario": {+ "format": "square",+ "steps": [+ {+ "goto": "https://three.ws/aws",+ "settle": 4000+ },+ {+ "read": "path",+ "match": "(Software Path)"+ },+ {+ "hold": 2200,+ "caption": "An AWS Partner page, Software Path"+ },+ {+ "scroll": "Free AWS subscription",+ "ms": 1200,+ "caption": "The AWS subscription is free"+ },+ {+ "expect": "issues your x402 access key"+ },+ {+ "hold": 3000+ },+ {+ "scroll": "Pay per call in USDC",+ "ms": 1200,+ "caption": "Usage is paid per call over x402"+ },+ {+ "expect": "AWS Marketplace does not meter or bill it"+ },+ {+ "hold": 3500+ },+ {+ "scroll": "Marketplace APIs in us-east-1",+ "ms": 1200,+ "caption": "Registration calls reach us-east-1"+ },+ {+ "read": "region",+ "match": "(us-east-1)"+ },+ {+ "hold": 4500+ }+ ]+ },+ "facts": [+ {+ "says": "AWS Partner on the Software Path",+ "evidence": [+ {+ "type": "page",+ "url": "https://three.ws/aws",+ "contains": "Now an AWS Partner"+ },+ {+ "type": "proof",+ "fact": "path",+ "equals": "Software Path"+ }+ ]+ },+ {+ "says": "subscribing is free, with no pricing dimensions, no minimum, no commitment",+ "evidence": [+ {+ "type": "page",+ "url": "https://three.ws/aws",+ "contains": "Subscribing is free: no pricing dimensions, no minimum, no commitment."+ }+ ]+ },+ {+ "says": "it links your AWS account to a three.ws account and issues your x402 access key",+ "evidence": [+ {+ "type": "page",+ "url": "https://three.ws/aws",+ "contains": "It links your AWS account to a three.ws account and issues your x402 access key."+ }+ ]+ },+ {+ "says": "usage is paid per call in USDC over x402",+ "evidence": [+ {+ "type": "page",+ "url": "https://three.ws/aws",+ "contains": "Usage is paid per call in USDC over x402 (HTTP 402)"+ }+ ]+ },+ {+ "says": "AWS Marketplace does not meter or bill the usage",+ "evidence": [+ {+ "type": "page",+ "url": "https://three.ws/aws",+ "contains": "AWS Marketplace does not meter or bill it"+ }+ ]+ },+ {+ "says": "the key calls every /api/x402/* endpoint",+ "evidence": [+ {+ "type": "page",+ "url": "https://three.ws/aws",+ "contains": "The key the subscription issues calls every /api/x402/* endpoint."+ }+ ]+ },+ {+ "says": "x402 works today without an AWS subscription",+ "evidence": [+ {+ "type": "page",+ "url": "https://three.ws/aws",+ "contains": "You can use x402 today without an AWS subscription at all."+ }+ ]+ },+ {+ "says": "registration and entitlement calls reach the AWS Marketplace APIs in us-east-1",+ "evidence": [+ {+ "type": "proof",+ "fact": "region",+ "equals": "us-east-1"+ }+ ]+ },+ {+ "says": "three.ws subscribes under the AWS Standard Contract for Marketplace",+ "evidence": [+ {+ "type": "page",+ "url": "https://three.ws/aws",+ "contains": "three.ws subscribes under the AWS Standard Contract for Marketplace."+ }+ ]+ }+ ],+ "probes": [+ {+ "type": "api",+ "name": "the AWS partner page answers",+ "url": "https://three.ws/aws"+ }+ ]+ },+ {+ "id": "builder-center-writing",+ "title": "Engineering write-ups on the AWS Builder Center",+ "surface": "https://three.ws/docs/aws-builder-center",+ "covers": [+ "/docs/aws-builder-center"+ ],+ "lane": "developer",+ "summary": "three.ws publishes engineering articles on the AWS Builder Center under its official organization account. The first, published 30 May 2026, walks through metering a SaaS product through AWS Marketplace with the AWS SDK for JavaScript v3: ResolveCustomer, MeterUsage, GetEntitlements and signature-verified lifecycle webhooks. It ends on bridging an AWS customer identifier into the access check that already served an x402 paywall. A second piece, published 27 June 2026, covers agents with 3D bodies and on-chain payments. Every article links the readable source in the open repository.",+ "docs": [+ "docs/aws-builder-center.md",+ "docs/aws-marketplace.md"+ ],+ "scenario": {+ "format": "square",+ "steps": [+ {+ "goto": "https://three.ws/docs/aws-builder-center",+ "settle": 4000+ },+ {+ "scroll": "Published articles",+ "ms": 1000,+ "caption": "Our engineering write-ups, by AWS builders"+ },+ {+ "expect": "Published 30 May 2026"+ },+ {+ "read": "first",+ "match": "(How we metered a SaaS product through AWS Marketplace)"+ },+ {+ "hold": 3500,+ "caption": "Real SDK calls, with the source linked"+ },+ {+ "scroll": "Published 27 June 2026",+ "ms": 1000,+ "caption": "A second piece on agents with 3D bodies"+ },+ {+ "hold": 3500+ },+ {+ "scroll": "Why we publish here",+ "ms": 1200,+ "caption": "Every claim points at readable source"+ },+ {+ "expect": "readable source in"+ },+ {+ "hold": 5000+ }+ ]+ },+ "facts": [+ {+ "says": "published on the AWS Builder Center under the official organization account",+ "evidence": [+ {+ "type": "page",+ "url": "https://three.ws/docs/aws-builder-center",+ "contains": "publishes there under the official organization account"+ }+ ]+ },+ {+ "says": "How we metered a SaaS product through AWS Marketplace with the AWS SDK for JavaScript v3",+ "evidence": [+ {+ "type": "page",+ "url": "https://three.ws/docs/aws-builder-center",+ "contains": "How we metered a SaaS product through AWS Marketplace with the AWS SDK for JavaScript v3"+ }+ ]+ },+ {+ "says": "published 30 May 2026",+ "evidence": [+ {+ "type": "page",+ "url": "https://three.ws/docs/aws-builder-center",+ "contains": "Published 30 May 2026"+ }+ ]+ },+ {+ "says": "ResolveCustomer on the fulfillment URL, MeterUsage and BatchMeterUsage for consumption, GetEntitlements for tiered feature gating",+ "evidence": [+ {+ "type": "page",+ "url": "https://three.ws/docs/aws-builder-center",+ "contains": "ResolveCustomer on the fulfillment URL"+ }+ ]+ },+ {+ "says": "bridging an AWS customer identifier into the same access check that already served an on-chain x402 paywall",+ "evidence": [+ {+ "type": "page",+ "url": "https://three.ws/docs/aws-builder-center",+ "contains": "into the same access check that already served an on-chain"+ }+ ]+ },+ {+ "says": "a second article on agents with 3D bodies and on-chain payments, published 27 June 2026",+ "evidence": [+ {+ "type": "page",+ "url": "https://three.ws/docs/aws-builder-center",+ "contains": "Build Autonomous AI Agents with 3D Bodies and On-Chain Payments"+ },+ {+ "type": "page",+ "url": "https://three.ws/docs/aws-builder-center",+ "contains": "Published 27 June 2026"+ }+ ]+ },+ {+ "says": "every article points at readable source in the open repository",+ "evidence": [+ {+ "type": "page",+ "url": "https://three.ws/docs/aws-builder-center",+ "contains": "Every article we publish there points at readable source"+ }+ ]+ }+ ],+ "probes": [+ {+ "type": "api",+ "name": "the Builder Center index page answers",+ "url": "https://three.ws/docs/aws-builder-center"+ }+ ]+ },+ {+ "id": "marketplace-integration-docs",+ "title": "How the AWS Marketplace integration identifies a buyer",+ "surface": "https://three.ws/docs/aws-marketplace",+ "covers": [+ "/docs/aws-marketplace",+ "api/_lib/aws-marketplace.js",+ "api/_lib/aws-marketplace-bridge.js",+ "api/_lib/aws-marketplace-store.js"+ ],+ "lane": "developer",+ "summary": "The AWS Marketplace integration is open source and documented end to end. ResolveCustomer returns a license ARN and the buyer's AWS account id, and under Concurrent Agreements the license ARN, not the account id, is the per-grant identity. Lifecycle events arrive on Amazon EventBridge and are relayed to a webhook that revokes the x402 key when an agreement ends. When an end event cannot be matched to exactly one agreement, the webhook revokes nothing. The integration ships inert without credentials, so nothing can fabricate an entitlement. It is written for engineers who integrate Marketplace SaaS products.",+ "docs": [+ "docs/aws-marketplace.md",+ "docs/aws-builder-center-marketplace-x402.md"+ ],+ "scenario": {+ "format": "square",+ "steps": [+ {+ "goto": "https://three.ws/docs/aws-marketplace",+ "settle": 4000+ },+ {+ "scroll": "Subscribing via AWS Marketplace",+ "ms": 1000,+ "caption": "The subscription flow, step by step"+ },+ {+ "hold": 3000+ },+ {+ "scroll": "How a buyer is identified",+ "ms": 1400,+ "caption": "Buyers are keyed by license ARN"+ },+ {+ "expect": "LicenseArn"+ },+ {+ "hold": 3500+ },+ {+ "scroll": "Lifecycle notifications",+ "ms": 1400,+ "caption": "Lifecycle events arrive over EventBridge"+ },+ {+ "expect": "Purchase Agreement Ended"+ },+ {+ "hold": 5500+ }+ ]+ },+ "facts": [+ {+ "says": "ResolveCustomer returns LicenseArn and CustomerAWSAccountId",+ "evidence": [+ {+ "type": "page",+ "url": "https://three.ws/docs/aws-marketplace",+ "contains": "It returns LicenseArn and CustomerAWSAccountId"+ }+ ]+ },+ {+ "says": "one AWS account can hold several simultaneous agreements for the same product",+ "evidence": [+ {+ "type": "page",+ "url": "https://three.ws/docs/aws-marketplace",+ "contains": "one AWS account can hold several simultaneous agreements for the same product"+ }+ ]+ },+ {+ "says": "the license ARN is the per-grant identity",+ "evidence": [+ {+ "type": "page",+ "url": "https://three.ws/docs/aws-marketplace",+ "contains": "the license ARN is the per-grant identity"+ }+ ]+ },+ {+ "says": "lifecycle events arrive on Amazon EventBridge",+ "evidence": [+ {+ "type": "page",+ "url": "https://three.ws/docs/aws-marketplace",+ "contains": "New listings receive lifecycle events on Amazon EventBridge"+ }+ ]+ },+ {+ "says": "Purchase Agreement Ended revokes the x402 key and marks the record cancelled",+ "evidence": [+ {+ "type": "page",+ "url": "https://three.ws/docs/aws-marketplace",+ "contains": "Purchase Agreement Ended"+ },+ {+ "type": "page",+ "url": "https://three.ws/docs/aws-marketplace",+ "contains": "Revoke the x402 key and mark the record cancelled"+ }+ ]+ },+ {+ "says": "the webhook refuses to guess, and revokes nothing when an end event is ambiguous",+ "evidence": [+ {+ "type": "page",+ "url": "https://three.ws/docs/aws-marketplace",+ "contains": "The webhook refuses to guess."+ },+ {+ "type": "page",+ "url": "https://three.ws/docs/aws-marketplace",+ "contains": "revokes nothing"+ }+ ]+ },+ {+ "says": "the plaintext key is returned once, on first issue",+ "evidence": [+ {+ "type": "page",+ "url": "https://three.ws/docs/aws-marketplace",+ "contains": "The plaintext key is returned once, on first issue"+ }+ ]+ },+ {+ "says": "nothing fabricates an entitlement AWS did not grant",+ "evidence": [+ {+ "type": "page",+ "url": "https://three.ws/docs/aws-marketplace",+ "contains": "nothing fabricates an entitlement AWS did not grant"+ }+ ]+ }+ ],+ "probes": [+ {+ "type": "api",+ "name": "the Marketplace integration doc answers",+ "url": "https://three.ws/docs/aws-marketplace"+ }+ ]+ }+ ]+}diff --git a/data/x-content/partners/ibm.json b/data/x-content/partners/ibm.jsonnew file mode 100644index 000000000..342c80521--- /dev/null+++ b/data/x-content/partners/ibm.json@@ -0,0 +1,215 @@+{+ "id": "ibm",+ "name": "IBM",+ "order": 2,+ "designation": "IBM Business Partner",+ "designationEvidence": [+ {+ "type": "page",+ "url": "https://three.ws/blog/three-ws-ibm-business-partner",+ "contains": "independent IBM Business Partner"+ }+ ],+ "page": "https://three.ws/blog/three-ws-ibm-business-partner",+ "handle": "IBM",+ "mark": null,+ "forbidden": [+ "endorsed by IBM",+ "IBM endorses",+ "IBM-endorsed",+ "certified by IBM",+ "IBM-certified",+ "IBM recommends",+ "IBM-recommended",+ "official IBM",+ "IBM's official",+ "official partnership",+ "partnership deliverable",+ "IBM partnership work",+ "strategic partner",+ "strategic partnership",+ "IBM Strategic",+ "joint solution",+ "co-developed with IBM",+ "co-built with IBM",+ "built with IBM",+ "built by IBM",+ "an IBM release",+ "IBM release",+ "IBM-built",+ "powered by IBM",+ "IBM-powered",+ "powered by Granite",+ "Granite powers",+ "runs on IBM",+ "IBM Cloud-hosted",+ "IBM-hosted",+ "watsonx Orchestrate Agent Catalog",+ "dedicated page on the IBM domain",+ "IBM co-sell",+ "co-sell with IBM",+ "IBM customers",+ "IBM's customers",+ "IBM Gold",+ "IBM Platinum",+ "IBM Premier"+ ],+ "guidance": "three.ws is an IBM Business Partner, an independent member of IBM's partner program. That is a designation, not an endorsement, certification or strategic partnership, and three.ws is not an IBM product. The public /api/ibm tools, the Granite demo pages and the community-built npm connectors are independent developer tools built on IBM's publicly available Granite models, so never present them as IBM partnership deliverables or as the partnership itself. Stories here are about community work with IBM's user-group program, so describe what three.ws built and ran, never what IBM does, and never speak for IBM.",+ "docs": [+ "docs/partners.md",+ "docs/ibm.md",+ "docs/ibm-community.md",+ "docs/partners/ibm-partner-plus.md",+ "marketing/ibm-partner-plus/badge-usage.md"+ ],+ "features": [+ {+ "id": "user-group-in-world-meetup",+ "title": "A nine-hour IBM Community meetup held inside a 3D world",+ "surface": "https://three.ws/blog/ibm-user-group-first-in-world-meetup-recap",+ "covers": [+ "/blog/ibm-user-group-first-in-world-meetup-recap",+ "/docs/ibm-community"+ ],+ "lane": "community",+ "summary": "three.ws runs the Three.ws User Group on IBM Community, a public group for developers building AI agents with 3D capabilities. Its first meetup ran nine hours, held entirely inside a persistent three.ws 3D world rather than on a call. The world was open to anyone with the link and peaked at 3,145 concurrent avatars. The agenda was a live tour of the platform from inside the world, community demos and open Q&A, and attendees received a permanent in-world Meetup Laurel. It was organized with the group's organizer on IBM's side.",+ "docs": [+ "docs/ibm-community.md",+ "docs/ibm.md"+ ],+ "scenario": {+ "format": "square",+ "steps": [+ {+ "goto": "https://three.ws/blog/ibm-user-group-first-in-world-meetup-recap",+ "settle": 4000+ },+ {+ "read": "hours",+ "match": "it ran (nine hours)"+ },+ {+ "read": "peak",+ "match": "peaked at ([\\d,]+) concurrent avatars"+ },+ {+ "hold": 2500,+ "caption": "A user-group meetup held inside a 3D world"+ },+ {+ "scroll": "What the day looked like",+ "ms": 1200,+ "caption": "Live tour, demos and Q&A, all in-world"+ },+ {+ "hold": 3500+ },+ {+ "scroll": "What it proved, beyond the vibe",+ "ms": 1200,+ "caption": "The open room held for a full workday"+ },+ {+ "expect": "15 Hz binary delta sync"+ },+ {+ "hold": 5500+ }+ ]+ },+ "facts": [+ {+ "says": "the first meetup of the Three.ws User Group on IBM Community",+ "evidence": [+ {+ "type": "page",+ "url": "https://three.ws/blog/ibm-user-group-first-in-world-meetup-recap",+ "contains": "the first meetup of the Three.ws User Group on IBM Community"+ }+ ]+ },+ {+ "says": "it ran nine hours, entirely inside three.ws",+ "evidence": [+ {+ "type": "proof",+ "fact": "hours",+ "equals": "nine hours"+ },+ {+ "type": "page",+ "url": "https://three.ws/blog/ibm-user-group-first-in-world-meetup-recap",+ "contains": "entirely inside three.ws itself"+ }+ ]+ },+ {+ "says": "anyone with the link could walk in",+ "evidence": [+ {+ "type": "page",+ "url": "https://three.ws/blog/ibm-user-group-first-in-world-meetup-recap",+ "contains": "anyone with the link could walk in"+ }+ ]+ },+ {+ "says": "the open room peaked at 3,145 concurrent avatars",+ "evidence": [+ {+ "type": "proof",+ "fact": "peak",+ "equals": "3,145"+ }+ ]+ },+ {+ "says": "a live tour of the platform from inside the world, community demos, and open Q&A",+ "evidence": [+ {+ "type": "page",+ "url": "https://three.ws/blog/ibm-user-group-first-in-world-meetup-recap",+ "contains": "a live tour of the platform from inside the world"+ }+ ]+ },+ {+ "says": "an authoritative Colyseus server on Cloud Run with 15 Hz binary delta sync and proximity-gated spatial voice",+ "evidence": [+ {+ "type": "proof",+ "saw": "15 Hz binary delta sync"+ }+ ]+ },+ {+ "says": "everyone who walked in while it was live got a Meetup Laurel, granted server-side",+ "evidence": [+ {+ "type": "page",+ "url": "https://three.ws/blog/ibm-user-group-first-in-world-meetup-recap",+ "contains": "Meetup Laurel"+ }+ ]+ },+ {+ "says": "organized with the group's organizer on IBM's side",+ "evidence": [+ {+ "type": "page",+ "url": "https://three.ws/blog/ibm-user-group-first-in-world-meetup-recap",+ "contains": "the group's organizer on IBM's side"+ }+ ]+ }+ ],+ "probes": [+ {+ "type": "api",+ "name": "the meetup recap page answers",+ "url": "https://three.ws/blog/ibm-user-group-first-in-world-meetup-recap"+ }+ ]+ }+ ]+}diff --git a/tests/x-content-partners.test.js b/tests/x-content-partners.test.jsnew file mode 100644index 000000000..a6228393e--- /dev/null+++ b/tests/x-content-partners.test.js@@ -0,0 +1,163 @@+import { describe, expect, it } from 'vitest';+import { buildBrief, claimsFor, draftFindings, draftSpotlight, itemFor, nextDay, parseDraft, partnerProblems, pickNext, seriesFindings, spotlights } from '../api/_lib/x-content/partners.js';+import { validateItem } from '../api/_lib/x-content/queue.js';++const scenario = { format: 'square', steps: [{ goto: 'https://three.ws/openai', caption: 'Eleven keyless 3D tools' }, { expect: 'Connect' }, { hold: 3000 }] };+const page = (contains) => [{ type: 'page', url: 'https://three.ws/openai', contains }];++const openai = {+ id: 'openai',+ name: 'OpenAI',+ order: 1,+ designation: 'OpenAI Select Partner',+ designationEvidence: page('OpenAI Select Partner'),+ page: 'https://three.ws/openai',+ handle: 'OpenAI',+ mark: null,+ forbidden: ['endorsed by OpenAI', 'official OpenAI'],+ guidance: 'three.ws is an OpenAI Select Partner. Never imply endorsement.',+ docs: ['docs/partners.md'],+ features: [+ {+ id: 'studio',+ title: 'Free 3D tools inside ChatGPT',+ surface: 'https://three.ws/openai',+ covers: ['/openai'],+ lane: 'community',+ summary: 'A connector that brings 3D tools into ChatGPT.',+ docs: [],+ scenario,+ facts: [+ { says: 'eleven keyless 3D tools', evidence: page('eleven keyless 3D tools') },+ { says: 'runs inside ChatGPT', evidence: page('runs inside ChatGPT') },+ { says: 'no sign-up', evidence: page('no sign-up') },+ { says: 'answers in 2 seconds', evidence: page('answers in 2 seconds') },+ ],+ },+ { id: 'ar', title: 'AR in ChatGPT', surface: 'https://three.ws/openai/ar', lane: 'developer', summary: 'AR.', scenario, facts: [] },+ ],+};+const nvidia = { ...openai, id: 'nvidia', name: 'NVIDIA', order: 6, designation: 'NVIDIA Inception member', page: 'https://three.ws/nvidia', features: [{ ...openai.features[0], id: 'gpu' }] };++const GOOD = {+ post: 'OpenAI models sit behind eleven keyless 3D tools we built for ChatGPT: three.ws/openai\n\nDescribe a model, and it appears in the chat with no sign-up.',+ thread: [+ 'The connector runs inside ChatGPT. Ask for a chair, a robot or a whole room, and the tools build it, render it, and hand back a GLB you can download.',+ 'We are an OpenAI Select Partner, and grateful to OpenAI for the platform that lets a conversation become a working 3D studio: three.ws/openai',+ 'Agents get the same tools over MCP, so an assistant can model, preview and export without a person opening a page.',+ ],+ headline: 'Describe it.\nChatGPT builds it in 3D.',+ body: 'Keyless 3D tools that run inside ChatGPT, with no sign-up.',+ prompt: '',+ why: 'Leads on the tools.',+};++describe('partner registry', () => {+ it('accepts a complete partner and names every missing piece of an incomplete one', () => {+ expect(partnerProblems({ ...openai, features: [openai.features[0]] })).toEqual([]);+ const problems = partnerProblems({ id: 'x', features: [{ id: 'y', lane: 'nope', facts: [] }] });+ expect(problems.join('\n')).toMatch(/designation is required/);+ expect(problems.join('\n')).toMatch(/a scenario is required/);+ expect(problems.join('\n')).toMatch(/lane must be one of/);+ });+});++describe('rotation', () => {+ it('features the least recently seen partner in page order, then its least recent feature, rotating heads and patterns', () => {+ const first = pickNext([nvidia, openai], []);+ expect(first.partner.id).toBe('openai');+ expect(first.feature.id).toBe('studio');+ const history = [{ partner: 'openai', feature: 'studio', head: first.head, pattern: first.pattern, day: '2026-10-12' }];+ const second = pickNext([openai, nvidia], history);+ expect(second.partner.id).toBe('nvidia');+ expect(second.head).not.toBe(first.head);+ expect(second.pattern).not.toBe(first.pattern);+ const third = pickNext([openai, nvidia], [...history, { partner: 'nvidia', feature: 'gpu', head: second.head, pattern: second.pattern, day: '2026-10-13' }]);+ expect(third.partner.id).toBe('openai');+ expect(third.feature.id).toBe('ar');+ });++ it('only leads on a number when the feature has one', () => {+ const plain = { ...openai, features: [{ ...openai.features[0], facts: openai.features[0].facts.filter((fact) => !/\d/.test(fact.says)) }] };+ const used = ['mechanism', 'walkthrough', 'clip'].map((pattern, index) => ({ partner: 'x', feature: 'y', head: 'reel', pattern, day: `2026-10-0${index + 1}` }));+ expect(pickNext([plain], used).pattern).not.toBe('number');+ expect(pickNext([openai], used).pattern).toBe('number');+ });++ it('gives each spotlight its own day, after every day already held', () => {+ const items = [+ { id: 'a', series: 'partners', spotlight: { partner: 'openai', feature: 'studio' }, notBefore: '2026-10-12T00:00:00.000Z', status: 'approved' },+ { id: 'b', series: 'partners', spotlight: { partner: 'nvidia', feature: 'gpu' }, notBefore: '2026-10-13T00:00:00.000Z', status: 'draft' },+ { id: 'c', tier: 1, notBefore: '2026-10-14T00:00:00.000Z' },+ ];+ const history = spotlights(items);+ expect(history.map((row) => row.partner)).toEqual(['openai', 'nvidia']);+ expect(nextDay(history, Date.parse('2026-10-12T09:00:00Z'))).toBe('2026-10-14');+ });+});++describe('series lint', () => {+ it('passes a thread that states the designation, quotes the facts and tags no one', () => {+ expect(seriesFindings(openai, openai.features[0], GOOD, { partners: [openai, nvidia] })).toEqual([]);+ expect(draftFindings({ partner: openai, feature: openai.features[0], head: 'card', draft: GOOD, partners: [openai, nvidia] })).toEqual([]);+ });++ it('refuses a paraphrased designation, an overstatement, a tag, and a partner the feature does not involve', () => {+ const bad = {+ ...GOOD,+ thread: [GOOD.thread[0], 'Proud to be an official OpenAI partner, thanks @OpenAI: three.ws/openai', 'It also runs on NVIDIA GPUs.'],+ };+ const findings = seriesFindings(openai, openai.features[0], bad, { partners: [openai, nvidia] }).join('\n');+ expect(findings).toMatch(/"OpenAI Select Partner", word for word/);+ expect(findings).toMatch(/"official OpenAI" overstates/);+ expect(findings).toMatch(/@openai: the spotlight tags no one/i);+ expect(findings).toMatch(/NVIDIA is another partner/);+ });++ it('holds every number to a fact the registry can prove', () => {+ const draft = { ...GOOD, thread: [...GOOD.thread, 'It answers in 2 seconds and served 40,000 models last month.'] };+ const findings = draftFindings({ partner: openai, feature: openai.features[0], head: 'reel', draft, partners: [openai] }).join('\n');+ expect(findings).toMatch(/"40,000" is an unverified number/);+ expect(findings).not.toMatch(/"2 seconds"/);+ });+});++describe('the item', () => {+ it('builds its claims from the registry and the run, never from the model', () => {+ const texts = [GOOD.post, ...GOOD.thread, 'The run counted 214 avatars.'];+ const claims = claimsFor(openai, openai.features[0], texts, { facts: { avatars: '214' } });+ expect(claims.map((claim) => claim.says)).toEqual(['OpenAI Select Partner', 'eleven keyless 3D tools', 'runs inside ChatGPT', 'no sign-up', '214']);+ expect(claims[0].evidence).toBe(openai.designationEvidence);+ expect(claims[4].evidence).toEqual([{ type: 'proof', fact: 'avatars', equals: '214' }]);+ });++ it('becomes a tier 1 partners-series draft the queue accepts, with the reel moved behind a card', () => {+ const item = itemFor({ partner: openai, feature: openai.features[0], head: 'card', pattern: 'mechanism', day: '2026-10-12', draft: GOOD });+ expect(item).toMatchObject({ id: 'partner-openai-studio-20261012', tier: 1, series: 'partners', spotlight: { partner: 'openai', feature: 'studio', head: 'card' }, notBefore: '2026-10-12T00:00:00.000Z', mentions: {} });+ expect(item.head).toEqual({ as: 'card', headline: GOOD.headline, body: GOOD.body });+ item.posts[0].media = [{ path: 'public/x-media/stand-in.png', alt: 'A frame of three.ws/openai with the eleven tools listed beside a ChatGPT window' }];+ const problems = validateItem(item, process.cwd(), { quality: { maximumLength: 1000 } }).filter((problem) => !/^head:|stand-in/.test(problem));+ expect(problems).toEqual([]);+ });+});++describe('drafting', () => {+ it('feeds the findings back and returns the draft that passes', async () => {+ const replies = [JSON.stringify({ ...GOOD, thread: GOOD.thread.slice(0, 1) }), JSON.stringify(GOOD)];+ const requests = [];+ const call = async (request, { parse }) => {+ requests.push(request);+ return { value: parse(replies.shift()), model: 'stand-in' };+ };+ const brief = buildBrief({ partner: openai, feature: openai.features[0], head: 'card', pattern: 'mechanism', day: '2026-10-12', otherPartners: [nvidia] });+ const result = await draftSpotlight(brief, { partner: openai, feature: openai.features[0], partners: [openai, nvidia] }, { call });+ expect(result.ok).toBe(true);+ expect(result.attempts).toHaveLength(2);+ expect(requests[1].parts[0].text).toMatch(/the thread has 1 replies/);+ expect(requests[0].system).toMatch(/No @mentions anywhere/);+ });++ it('refuses a reply with no JSON in it', () => {+ expect(() => parseDraft('no')).toThrow(/no JSON/);+ });+});