Skip to content

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.

feat(x-content): rank the queue on the chance of a $THREE volume response and move every slot into the hours that produce one

nirholasc2db0ec514be
diff --git a/api/_lib/x-content/priority.js b/api/_lib/x-content/priority.js
index 92cf8f58d..f46a04a90 100644
--- a/api/_lib/x-content/priority.js
+++ b/api/_lib/x-content/priority.js
@@ -5,9 +5,15 @@
// A score is a sum of named, explainable parts, so `npm run x:content -- plan`
// can show exactly why one post outranks another:
//
-// engagement predicted lift from how @trythreews posts with the same signals
-// actually performed (data/x-archive/analysis), using the same
-// format, length, and topic classifiers that produced the report
+// volume the chance the post is followed by a volume response on the
+// $THREE pool, relative to the average post, from the model in
+// data/x-content/volume-model.json. Pool volume is what pays the
+// platform, so it outranks attention: it replaces the engagement
+// part whenever the model file is present
+// engagement the fallback when there is no volume model: predicted lift from
+// how @trythreews posts with the same signals actually performed
+// (data/x-archive/analysis), using the same format, length, and
+// topic classifiers that produced the report
// timely a post with `expiresAt` rises as its window closes, and is
// dropped once it has passed (stale news is worse than none)
// boost the owner's explicit `priority` on the item, -50 to +50
@@ -32,12 +38,58 @@ const SHRINK_K = 10;
const TIMELY_WINDOW_MS = 2 * DAY;
export const ENGAGEMENT_REPORT = 'data/x-archive/analysis/trythreews-engagement.json';
+export const VOLUME_MODEL = 'data/x-content/volume-model.json';
+
+// The model is fitted elsewhere (a logistic regression over every original post
+// moment against 1-minute pool candles) and shipped as plain JSON: an intercept,
+// a base rate, and one weight per attribute a draft can be checked for before it
+// is posted. Text attributes carry their own pattern, so a refit never needs a
+// code change here.
+export function loadVolumeModel(root) {
+ const path = resolve(root, VOLUME_MODEL);
+ if (!existsSync(path)) return null;
+ const model = JSON.parse(readFileSync(path, 'utf8'));
+ if (!Array.isArray(model.features) || !Number.isFinite(model.intercept) || !(model.baseRate > 0)) return null;
+ return { ...model, features: model.features.map((row) => ({ ...row, regex: row.pattern ? new RegExp(row.pattern.source, row.pattern.flags) : null })) };
+}
+
+// The attributes that are not a text pattern. Every slot sits inside the hours
+// the model calls `usHours` (schedule.js), and the queue only ever posts from the
+// company account, so both are true for every queued post: they move every score
+// by the same amount and are kept so the reported chance is an honest one.
+const VOLUME_CHECKS = {
+ video: (item) => (item.posts?.[0]?.media || []).some((row) => /\.(mp4|mov)$/i.test(row.path || '')),
+ thread: (item) => (item.posts?.length || 0) >= 2,
+ long: (item) => String(item.posts?.[0]?.text || '').length > 180,
+ usHours: () => true,
+ company: () => true,
+};
+
+// Chance that the post is followed by a volume response, and which attributes
+// the model found on it.
+export function volumeScore(item, model) {
+ if (!model) return null;
+ const head = item.posts?.[0] || {};
+ const text = String(item.kind === 'article' ? `${item.article?.title || ''}\n${head.text || ''}` : head.text || '');
+ let z = model.intercept;
+ const found = [];
+ for (const row of model.features) {
+ const has = row.regex ? row.regex.test(text) : Boolean(VOLUME_CHECKS[row.key]?.(item));
+ if (!has) continue;
+ z += row.weight;
+ found.push(row.key);
+ }
+ return { chance: 1 / (1 + Math.exp(-z)), found };
+}
export function loadLifts(root) {
const path = resolve(root, ENGAGEMENT_REPORT);
- if (!existsSync(path)) return null;
+ // The volume model rides along on the lifts map so every caller that already
+ // passes `lifts` into the ranking gets it without a new parameter.
+ const volumeModel = loadVolumeModel(root);
+ if (!existsSync(path)) return volumeModel ? Object.assign(new Map(), { volumeModel }) : null;
const report = JSON.parse(readFileSync(path, 'utf8')).report || {};
- const lifts = new Map();
+ const lifts = Object.assign(new Map(), { volumeModel });
const add = (group, row) => {
const lift = row.lift ?? row.with?.lift;
const count = row.count ?? row.with?.count ?? 0;
@@ -108,7 +160,11 @@ export function scoreItem(item, { lifts, published = [], quality = {}, review =
const signals = engagementSignals(item, lifts);
const predicted = Math.exp(combinedLog(signals));
- parts.engagement = Math.round(10 * Math.log2(predicted) * 10) / 10;
+ const volume = volumeScore(item, lifts?.volumeModel);
+ // Same scale as the engagement part it replaces: 10 points per doubling against
+ // the average post, so the other parts keep their relative weight.
+ if (volume) parts.volume = Math.round(10 * Math.log2(volume.chance / lifts.volumeModel.baseRate) * 10) / 10;
+ else parts.engagement = Math.round(10 * Math.log2(predicted) * 10) / 10;
if (item.expiresAt) {
const left = Date.parse(item.expiresAt) - now;
@@ -136,7 +192,7 @@ export function scoreItem(item, { lifts, published = [], quality = {}, review =
}
const score = Math.round(Object.values(parts).reduce((sum, value) => sum + value, 0) * 10) / 10;
- return { score, parts, signals, predictedLift: Math.round(predicted * 100) / 100 };
+ return { score, parts, signals, predictedLift: Math.round(predicted * 100) / 100, volumeChance: volume ? Math.round(volume.chance * 1000) / 1000 : null, volumeSignals: volume?.found || [] };
}
// Every ready candidate, best first. Ties go to the item that has been ready
diff --git a/api/_lib/x-content/schedule.js b/api/_lib/x-content/schedule.js
index 88efbffca..b4b17e1da 100644
--- a/api/_lib/x-content/schedule.js
+++ b/api/_lib/x-content/schedule.js
@@ -60,8 +60,12 @@ export function inQuietHours(now, quiet) {
// T1 flagship partner news, $THREE utility, major launches
// T2 features shipped features with proof
// T3 proof of work short demos, stats, build notes
-// Slot times come from the engagement report's hour-of-day data, and each slot
-// opens at a jittered minute only the seed can reproduce. A slot stays open for
+// Slot times come from the volume study: an original post between 12:00 and
+// 20:00 UTC (8 AM to 4 PM New York) is followed by a volume response on the
+// $THREE pool about 1.7 times as often as one outside it, and that is also when
+// the pool trades most, so all three slots sit inside that window with the
+// flagship slot at noon New York. Each slot opens at a jittered minute only the
+// seed can reproduce. A slot stays open for
// three hours, so a missed tick (deploy, outage) still posts, but a day never
// gets more than one post per slot and nothing spills into the small hours.
//
@@ -74,9 +78,9 @@ export function inQuietHours(now, quiet) {
export const TIERS = [1, 2, 3];
export const DEFAULT_SLOTS = [
- { tier: 3, at: '08:00' },
+ { tier: 3, at: '12:30' },
{ tier: 1, at: '16:00' },
- { tier: 2, at: '22:00' },
+ { tier: 2, at: '19:30' },
];
const dayKey = (timestamp) => new Date(timestamp).toISOString().slice(0, 10);
diff --git a/data/x-content/queue.json b/data/x-content/queue.json
index 1c034c27f..cac51dd4e 100644
--- a/data/x-content/queue.json
+++ b/data/x-content/queue.json
@@ -2,8 +2,8 @@
"version": 2,
"account": "trythreews",
"cadence": {
- "windowMinutes": 45,
- "minimumMinutesApart": 240,
+ "windowMinutes": 30,
+ "minimumMinutesApart": 180,
"dailyCap": 3,
"quietHoursUtc": [
"02:00",
@@ -12,7 +12,7 @@
"slots": [
{
"tier": 3,
- "at": "08:00"
+ "at": "12:30"
},
{
"tier": 1,
@@ -20,7 +20,7 @@
},
{
"tier": 2,
- "at": "22:00"
+ "at": "19:30"
}
]
},
diff --git a/data/x-content/volume-model.json b/data/x-content/volume-model.json
new file mode 100644
index 000000000..dad4a99fb
--- /dev/null
+++ b/data/x-content/volume-model.json
@@ -0,0 +1,127 @@
+{
+ "about": "Chance that a post is followed by a volume response on the pool: the first hour after it runs at least twice the hour before. Logistic model over original post moments; see analyze/volume-model.mjs in the study repo.",
+ "generatedAt": "2026-09-18T07:51:59.050Z",
+ "asset": "three",
+ "pool": "5ByL7MZoLABYnwMPZKPKjf4MGkZ7FeBzrAnos19Pre2z",
+ "accounts": [
+ "trythreews",
+ "nichxbt"
+ ],
+ "candles": {
+ "from": "2026-04-29T07:00:00.000Z",
+ "to": "2026-09-18T05:30:00.000Z",
+ "interval": "15m",
+ "pool": "5ByL7MZoLABYnwMPZKPKjf4MGkZ7FeBzrAnos19Pre2z"
+ },
+ "moments": 313,
+ "responses": 54,
+ "baseRate": 0.1725,
+ "intercept": -3.12632,
+ "excluded": [
+ "cryptoNative"
+ ],
+ "features": [
+ {
+ "key": "tier1",
+ "label": "Names a tier-1 company (@IBM, @OpenAI, @nvidia, @GoogleCloud, @awscloud ...)",
+ "pattern": {
+ "source": "@(ibm|openai|awscloud|aws_partners|nvidia|nvidiaai|googlecloud|anthropicai|claude|chatgpt|microsoft|github|githubcommunity|alibaba_cloud|voguemagazine)\\b",
+ "flags": "i"
+ },
+ "weight": 0.39622,
+ "oddsRatio": 1.486,
+ "low": 0.812,
+ "high": 2.53,
+ "postsWithIt": 37
+ },
+ {
+ "key": "recognition",
+ "label": "Says partner, listed, verified, accepted, featured or joined",
+ "pattern": {
+ "source": "partner|listed|listing|verified|accepted|featured|joined|joining|member of|named an?",
+ "flags": "i"
+ },
+ "weight": 0.4903,
+ "oddsRatio": 1.633,
+ "low": 0.893,
+ "high": 2.972,
+ "postsWithIt": 49
+ },
+ {
+ "key": "launch",
+ "label": "Announces something shipped (live, launched, introducing, shipped, now)",
+ "pattern": {
+ "source": "\\blive\\b|shipped|launch|introducing|\\bnow\\b",
+ "flags": "i"
+ },
+ "weight": 0.67034,
+ "oddsRatio": 1.955,
+ "low": 1.146,
+ "high": 3.267,
+ "postsWithIt": 90
+ },
+ {
+ "key": "token",
+ "label": "Talks about the token ($THREE, burn, holders, buyback, exchange)",
+ "pattern": {
+ "source": "\\$three\\b|burn|holders|buyback|exchange",
+ "flags": "i"
+ },
+ "weight": -0.03539,
+ "oddsRatio": 0.965,
+ "low": 0.484,
+ "high": 2.004,
+ "postsWithIt": 20
+ },
+ {
+ "key": "video",
+ "label": "Carries a video",
+ "pattern": null,
+ "weight": 0.11641,
+ "oddsRatio": 1.123,
+ "low": 0.687,
+ "high": 1.793,
+ "postsWithIt": 100
+ },
+ {
+ "key": "thread",
+ "label": "Two or more posts within the hour",
+ "pattern": null,
+ "weight": 0.29186,
+ "oddsRatio": 1.339,
+ "low": 0.737,
+ "high": 2.143,
+ "postsWithIt": 217
+ },
+ {
+ "key": "long",
+ "label": "Longer than 180 characters",
+ "pattern": null,
+ "weight": 0.3861,
+ "oddsRatio": 1.471,
+ "low": 0.823,
+ "high": 2.791,
+ "postsWithIt": 150
+ },
+ {
+ "key": "usHours",
+ "label": "Posted 12:00 to 20:00 UTC (8 AM to 4 PM New York)",
+ "pattern": null,
+ "weight": 0.54704,
+ "oddsRatio": 1.728,
+ "low": 1.067,
+ "high": 2.99,
+ "postsWithIt": 88
+ },
+ {
+ "key": "company",
+ "label": "From the company account rather than the founder alone",
+ "pattern": null,
+ "weight": 0.79138,
+ "oddsRatio": 2.206,
+ "low": 1.26,
+ "high": 3.257,
+ "postsWithIt": 160
+ }
+ ]
+}
diff --git a/docs/x-content-pipeline.md b/docs/x-content-pipeline.md
index 3a1b548cb..35e2d9dc7 100644
--- a/docs/x-content-pipeline.md
+++ b/docs/x-content-pipeline.md
@@ -109,9 +109,9 @@ Cadence lives at the top of the file: `slots` (each `{ tier, at }` in UTC), `win
## How the next post is chosen
-**When:** three slots a day, one per tier, at the hours this account's own posts performed best in the engagement report: T3 at 08:00 UTC (2.75x the account median), T1 at 16:00 UTC (2.71x), T2 at 22:00 UTC (2.75x). Each opens at a minute only the production seed can reproduce, and stays open for three hours (`slotOpenMinutes`), so a missed run or a deploy still posts, but no slot is ever spent twice and an evening slot never spills into the small hours. Quiet hours are 02:00 to 07:00 UTC.
+**When:** three slots a day, one per tier, all inside 12:00 to 20:00 UTC (8 AM to 4 PM New York): T3 at 12:30, T1 at 16:00 (noon New York), T2 at 19:30. The volume study measured every original post against 1-minute candles of the $THREE pool: a post inside that window was followed by a volume response about 1.7 times as often as one outside it, and it is also when the pool trades most. Each slot opens at a minute only the production seed can reproduce (up to `windowMinutes` late), and stays open for three hours (`slotOpenMinutes`), so a missed run or a deploy still posts, but no slot is ever spent twice. Slots are at least `minimumMinutesApart` apart even at their latest opening, so an earlier post never blocks a later slot. Quiet hours are 02:00 to 07:00 UTC.
-**What:** the slot's own tier first, highest priority first. An empty tier falls to the next tier down, so the best available post always gets the best time. A higher tier only fills a lower slot when it has more than one post ready, so the last flagship post is kept for prime time. When nothing is ready, nothing posts: three a day is a ceiling, not a quota.
+**What:** the slot's own tier first, highest priority first. Priority leads with **volume**, not engagement: [`data/x-content/volume-model.json`](../data/x-content/volume-model.json) is a logistic model fitted on every original post moment, and it gives each draft a chance of being followed by a volume response on the pool (the first hour after the post running at least twice the hour before). Pool volume is what pays creator rewards, so it outranks attention. The model rewards what the data rewarded: announcing something shipped, partner or recognition language, naming a tier-1 company, more than 180 characters, and a thread rather than a single post. `npm run x:content -- plan` prints each post's chance and the attributes found on it. If the model file is missing, the older engagement estimate takes over. Refit and re-export it from the study repo with `node analyze/volume-chart.mjs --asset three --export-model <this repo>/data/x-content/volume-model.json --export-exclude cryptoNative`. An empty tier falls to the next tier down, so the best available post always gets the best time. A higher tier only fills a lower slot when it has more than one post ready, so the last flagship post is kept for prime time. When nothing is ready, nothing posts: three a day is a ceiling, not a quota.
**Priority** is a sum of named parts, and `npm run x:content:plan` prints them for every post:
diff --git a/scripts/x-content.mjs b/scripts/x-content.mjs
index 1dfd91a3a..7f4cca249 100644
--- a/scripts/x-content.mjs
+++ b/scripts/x-content.mjs
@@ -123,7 +123,10 @@ async function plan() {
].filter(Boolean);
const parts = Object.entries(row.parts).map(([key, value]) => `${key} ${value > 0 ? '+' : ''}${value}`).join(', ');
console.log(` ${String(row.score).padStart(6)} ${item.id.padEnd(26)} ${flags.length ? `[${flags.join('; ')}]` : 'ready'}`);
- console.log(` ${parts} (predicted ${row.predictedLift}x the account median)`);
+ const outlook = row.volumeChance == null
+ ? `predicted ${row.predictedLift}x the account median`
+ : `${Math.round(row.volumeChance * 100)}% chance of a volume response${row.volumeSignals.length ? `: ${row.volumeSignals.join(', ')}` : ''}`;
+ console.log(` ${parts} (${outlook})`);
}
for (const item of waiting.filter((item) => !ranked.some((row) => row.item.id === item.id))) console.log(` gone ${item.id.padEnd(26)} [expired ${item.expiresAt}]`);
}
diff --git a/tests/x-content.test.js b/tests/x-content.test.js
index 4cbd72891..443bc2ca5 100644
--- a/tests/x-content.test.js
+++ b/tests/x-content.test.js
@@ -6,8 +6,8 @@ import { join } from 'node:path';
import { copyProblems, weightedLength } from '../api/_lib/x-content/quality.js';
import { attachmentProblems, mediaProblems, parseFfmpegProbe } from '../api/_lib/x-content/media.js';
import { markdownToContentState, attachArticleMedia } from '../api/_lib/x-content/articles.js';
-import { currentSlot, inQuietHours, jitterMinutes, pickDue, slotOpenings, tierOrder } from '../api/_lib/x-content/schedule.js';
-import { engagementSignals, loadLifts, rankItems, scoreItem } from '../api/_lib/x-content/priority.js';
+import { DEFAULT_SLOTS, currentSlot, inQuietHours, jitterMinutes, pickDue, slotOpenings, tierOrder } from '../api/_lib/x-content/schedule.js';
+import { engagementSignals, loadLifts, loadVolumeModel, rankItems, scoreItem, volumeScore } from '../api/_lib/x-content/priority.js';
import { activeHolds, inventory, isPostSpecific, placeHold, runTick } from '../api/_lib/x-content/runner.js';
import { memoryStore } from '../api/_lib/x-content/state.js';
import { validateItem, validateQueue, loadQueue } from '../api/_lib/x-content/queue.js';
@@ -212,6 +212,48 @@ describe('priority', () => {
expect(scored.predictedLift).toBeLessThan(10);
});
+ it('ranks on the chance of a volume response, not on engagement, when the volume model ships', () => {
+ const model = loadVolumeModel(root);
+ expect(model.baseRate).toBeGreaterThan(0);
+ expect(model.features.map((row) => row.key)).toEqual(expect.arrayContaining(['launch', 'recognition', 'tier1', 'long', 'thread', 'video']));
+
+ const plain = post('A short note about a tool: three.ws/x');
+ const partner = post('three.ws has been accepted into the @nvidia Inception program. The rendering pipeline that ships your agent is now live for every creator on the platform, and the partnership opens GPU capacity we could not reach before: three.ws/nvidia', { posts: [{ text: 'three.ws has been accepted into the @nvidia Inception program. The rendering pipeline that ships your agent is now live for every creator on the platform, and the partnership opens GPU capacity we could not reach before: three.ws/nvidia', media: [{ path: 'public/x.webp' }] }, { text: 'What it unlocks, in detail.', media: [] }] });
+ expect(volumeScore(partner, model).found).toEqual(expect.arrayContaining(['tier1', 'recognition', 'launch', 'long', 'thread']));
+ expect(volumeScore(partner, model).chance).toBeGreaterThan(volumeScore(plain, model).chance * 2);
+
+ const context = { lifts, now: Date.parse('2026-09-17T00:00:00Z') };
+ const scored = scoreItem(partner, context);
+ expect(scored.parts.volume).toBeGreaterThan(0);
+ expect(scored.parts.engagement).toBeUndefined();
+ expect(scoreItem(plain, context).parts.volume).toBeLessThan(0);
+ expect(rankItems([{ ...plain, id: 'plain' }, { ...partner, id: 'partner' }], context)[0].item.id).toBe('partner');
+ });
+
+ it('falls back to the engagement estimate when no volume model is present', () => {
+ const withoutModel = Object.assign(new Map(lifts), { volumeModel: null });
+ const scored = scoreItem(post('The $THREE layer, on @awscloud: three.ws/x'), { lifts: withoutModel, now: Date.parse('2026-09-17T00:00:00Z') });
+ expect(scored.parts.engagement).toBeGreaterThan(0);
+ expect(scored.parts.volume).toBeUndefined();
+ expect(scored.volumeChance).toBeNull();
+ });
+
+ it('keeps every daily slot inside the hours the volume study favours, far enough apart to all post', () => {
+ const queue = loadQueue(root);
+ const slots = queue.cadence.slots;
+ expect(slots).toEqual(DEFAULT_SLOTS);
+ const minutes = slots.map((slot) => Number(slot.at.slice(0, 2)) * 60 + Number(slot.at.slice(3))).sort((a, b) => a - b);
+ for (const at of minutes) {
+ expect(at).toBeGreaterThanOrEqual(12 * 60);
+ expect(at + queue.cadence.windowMinutes).toBeLessThanOrEqual(20 * 60);
+ }
+ // The latest a slot can open, to the earliest the next one can: never closer
+ // than the minimum gap, or the later slot would be blocked by the earlier post.
+ for (let index = 1; index < minutes.length; index++) {
+ expect(minutes[index] - (minutes[index - 1] + queue.cadence.windowMinutes)).toBeGreaterThanOrEqual(queue.cadence.minimumMinutesApart);
+ }
+ });
+
it('adds owner boost, timeliness, waiting, and review; penalizes repetition; drops expired posts', () => {
const now = Date.parse('2026-09-20T00:00:00Z');
const base = scoreItem(post('A plain update about avatars: three.ws/x'), { lifts, now });