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(announce): let the owner name the projects that put a pack under the commit gate

ni3a593d930394d8
diff --git a/api/_lib/announce/kit.js b/api/_lib/announce/kit.js
index 8c73f00d4..cbb685c5f 100644
--- a/api/_lib/announce/kit.js
+++ b/api/_lib/announce/kit.js
@@ -11,8 +11,30 @@
// Everything in a rendered pack is either a fact from the brief, a decision
// from the plan, or the drafter's own reasoning. Nothing is invented here.
+import { existsSync, readFileSync } from 'node:fs';
+import { resolve } from 'node:path';
+
import { weightedLength } from '../x-content/quality.js';
+// Project names the owner has put under the commit gate (see
+// data/announce-gate-terms.json). A changelog title is repository text the pack
+// quotes verbatim, so a title naming one of them would pull a gated name into
+// a pack that is otherwise clear, and scripts/check-announce.mjs would then
+// refuse the pack for a sentence nobody wrote. The quote is context, not a
+// claim, so it is left out instead.
+function gateTerms(root) {
+ const path = resolve(root || process.cwd(), 'data/announce-gate-terms.json');
+ if (!existsSync(path)) return [];
+ try {
+ return (JSON.parse(readFileSync(path, 'utf8')).terms || []).map(String).filter(Boolean);
+ } catch {
+ return [];
+ }
+}
+
+export const gated = (text, terms) =>
+ terms.some((term) => new RegExp(`\\b${term.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')}\\b`, 'i').test(String(text || '')));
+
const SITE = 'https://three.ws';
const SIGNALS = {
@@ -53,7 +75,7 @@ export function renderPostFile(draft) {
return `${String(draft.post || '').trim()}\n`;
}
-export function renderPack({ brief, draft, slot, ledgerEntry = {}, rank = null, total = null, model = null, verification = null }) {
+export function renderPack({ brief, draft, slot, ledgerEntry = {}, rank = null, total = null, model = null, verification = null, root = process.cwd() }) {
const id = brief.id;
const url = brief.url || SITE;
const campaign = `announce-${id}`;
@@ -103,9 +125,11 @@ export function renderPack({ brief, draft, slot, ledgerEntry = {}, rank = null,
}
if (ledgerEntry.curatedWhy) push(`The coverage audit's note on it: ${ledgerEntry.curatedWhy}`, '');
if (brief.surface.shipped) push(`It shipped on ${brief.surface.shipped} and has never been posted about.`, '');
- if (brief.changelog?.length) {
+ const terms = gateTerms(root);
+ const quotable = (brief.changelog || []).filter((entry) => !gated(entry.title, terms));
+ if (quotable.length) {
push(
- `The changelog has ${brief.changelog.length} entr${brief.changelog.length === 1 ? 'y' : 'ies'} about it, the most recent from ${brief.changelog[0].date}: "${brief.changelog[0].title}".`,
+ `The changelog has ${quotable.length} entr${quotable.length === 1 ? 'y' : 'ies'} about it, the most recent from ${quotable[0].date}: "${quotable[0].title}".`,
'',
);
}
diff --git a/data/announce-gate-terms.json b/data/announce-gate-terms.json
new file mode 100644
index 000000000..b928d2664
--- /dev/null
+++ b/data/announce-gate-terms.json
@@ -0,0 +1,4 @@
+{
+ "$comment": "Names that put an announcement pack under the operating rules' commit gate on content referencing a crypto project other than $THREE. The gate in scripts/check-announce.mjs already catches a $TICKER; a project written by name is what it cannot infer, so the owner keeps that list here. Each term is matched case-insensitively against the post and the whole pack, including the changelog titles the pack quotes, and a match fails check:announce until the owner clears it. api/_lib/announce/kit.js reads the same list and leaves a matching changelog title out of a pack it renders, so the factory stops producing packs that need clearing. Empty by default: adding a term is the owner's call, because the term itself is the name being gated.",
+ "terms": []
+}
diff --git a/docs/announcement-factory.md b/docs/announcement-factory.md
index 799325565..519c0ac81 100644
--- a/docs/announcement-factory.md
+++ b/docs/announcement-factory.md
@@ -56,6 +56,14 @@ slots the factory cannot fill on its own, and because the gated surfaces score h
the flagship slot every day, which is how the packable backlog ended up weeks behind slots it
could have had. Clearing a frame puts that surface back in the next plan.
+**The gate on named projects.** [`data/announce-gate-terms.json`](../data/announce-gate-terms.json)
+holds the project names the owner has put under the operating rules' commit gate. `check:announce`
+already catches a `$TICKER` from its shape; a project written by name is what it cannot infer, so
+that list is maintained rather than derived. A pack naming one fails the check until the owner
+clears it, and the pack renderer leaves a matching changelog title out of the context it quotes, so
+the factory stops producing packs that need clearing. It ships empty, because adding a term is
+itself the decision being recorded.
+
**Deferrals.** The ledger is rebuilt from the repository on every run, so it cannot remember a
judgement someone made by looking at a captured frame. `data/announce-deferred.json` is where that
judgement lives, with the reason, and it is committed for exactly that reason.
diff --git a/scripts/announce-kit.mjs b/scripts/announce-kit.mjs
index 11299dfd2..af1865bbd 100644
--- a/scripts/announce-kit.mjs
+++ b/scripts/announce-kit.mjs
@@ -292,7 +292,7 @@ try {
// captured separately). The queue validator decides which, not this
// script's optimism.
const candidate = itemFor(brief, draft, { mediaPath });
- const pack = renderPack({ brief, draft, slot, ledgerEntry: entry, rank: rank || null, total: (ledger.totals?.never ?? null), model });
+ const pack = renderPack({ brief, draft, slot, ledgerEntry: entry, rank: rank || null, total: (ledger.totals?.never ?? null), model, root });
// The pack is written before the item is judged, because the item points
// at the pack's `.post.txt` and the validator checks that file exists.
// Judging first failed every brand-new pack on a file this same run was
diff --git a/scripts/check-announce.mjs b/scripts/check-announce.mjs
index 32b6f6877..651357491 100644
--- a/scripts/check-announce.mjs
+++ b/scripts/check-announce.mjs
@@ -123,6 +123,21 @@ try {
notes.push('data/pages.json unreadable: the coin gate could not classify surfaces');
}
+// Project names the owner has put under the commit gate. A ticker is
+// detectable from its shape; a name is not, so the list is maintained rather
+// than inferred, and it ships empty because writing a name into it is itself
+// the decision being recorded.
+const gateTerms = (() => {
+ const path = join(root, 'data/announce-gate-terms.json');
+ if (!existsSync(path)) return [];
+ try {
+ return (JSON.parse(readFileSync(path, 'utf8')).terms || []).map(String).filter(Boolean);
+ } catch {
+ notes.push('data/announce-gate-terms.json is unreadable: named projects were not checked');
+ return [];
+ }
+})();
+
const packs = readdirSync(PACK_DIR)
.filter((f) => f.endsWith('.md'))
// README.md documents the directory; it is not a pack.
@@ -197,6 +212,13 @@ for (const file of packs) {
if (!/alt text/i.test(body)) fail(name, 'pack does not state the alt text the post must carry');
// The coin gate. Copy first, then the surfaces the media came from.
+ const named = gateTerms.filter((term) => new RegExp(`\\b${term.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')}\\b`, 'i').test(`${post}\n${body}`));
+ if (named.length) {
+ fail(
+ name,
+ `pack names a crypto project other than $THREE (${named.join(', ')}); owner approval is required before committing or posting`,
+ );
+ }
const tickers = [...`${post}\n${body}`.matchAll(/\$([A-Z][A-Z0-9]{1,9})\b/g)]
.map((m) => m[1])
.filter((t) => t !== 'THREE');
diff --git a/tests/announce-factory.test.js b/tests/announce-factory.test.js
index fe84119db..d4bbdadfb 100644
--- a/tests/announce-factory.test.js
+++ b/tests/announce-factory.test.js
@@ -7,7 +7,7 @@ import { languageProblems } from '../api/_lib/x-content/editorial.js';
import { harvestFacts, harvestStats, quotableLines } from '../api/_lib/announce/brief.js';
import { draftFindings, itemFor, parseDraft } from '../api/_lib/announce/draft.js';
import { cardFacts, cardHtml, commandFrom, namesFrom } from '../api/_lib/announce/card.js';
-import { renderPack } from '../api/_lib/announce/kit.js';
+import { gated, renderPack } from '../api/_lib/announce/kit.js';
const CADENCE = { windowMinutes: 90, minimumMinutesApart: 240, dailyCap: 3, quietHoursUtc: ['05:00', '12:00'] };
const QUALITY = { maximumSameLaneInARow: 2, maximumSamePatternInARow: 1 };
@@ -418,3 +418,14 @@ describe('the committed packs this factory produced', () => {
}
});
});
+
+describe('the commit gate on named projects', () => {
+ it('leaves a changelog title naming a gated project out of the pack it quotes', () => {
+ expect(gated('A plugin marketplace for wallet, 3D and someproject tools', ['someproject'])).toBe(true);
+ expect(gated('A plugin marketplace for wallet and 3D tools', ['someproject'])).toBe(false);
+ // The term is matched whole, so a surface whose own name contains it is
+ // not gated by coincidence.
+ expect(gated('someprojection of the map', ['someproject'])).toBe(false);
+ expect(gated('anything at all', [])).toBe(false);
+ });
+});