X (Twitter) Engine

RoboCo can draft posts for the company's X (Twitter) account — a release announcement whenever you publish a version, replies to mentions, and periodic spotlights on your own shipped-but-under-publicized capabilities — voiced as the Head of Marketing. It never posts anything on its own: every draft is held in the X Post Queue on the panel's Social page for you to edit, approve, or reject.

The engine is off by default, and even armed it does nothing until you've stored real X API credentials.

What it does

Three independent sources feed the same held queue:

  • Release posts are event-driven: ReleaseProposalService.approve()'s publish-success path calls the hook directly — there's no polling for this half. One draft per version (idempotent on retry); nothing drafts if the open-post cap (ROBOCO_X_MAX_OPEN_POSTS) is already reached.
  • Mention replies are a periodic poll (ROBOCO_X_MENTIONS_INTERVAL_SECONDS, default 1800s) gated by a second switch, ROBOCO_X_REPLIES_ENABLED — reading mentions needs a paid X API tier, so replying is a deliberate opt-in on top of the base engine. A mention only gets drafted if it's "meaningful" (not a bare retweet, and at or above ROBOCO_X_MENTIONS_MIN_ENGAGEMENT combined likes+replies+retweets) and hasn't been seen before (deduped by mention id in x_seen_mentions).
  • Feature spotlights are a third, independent switch (ROBOCO_X_FEATURE_SPOTLIGHT_ENABLED) covered in its own section below — unlike the two sources above, this one spawns a real agent rather than drafting off a template.
  • Release and reply drafting run on the local LLM only — never a cloud model in the hot path — using a fixed Head-of-Marketing voice prompt (confident, concise, no hashtag spam, speaks as "we"). A failed local-model call falls back to a plain template rather than drafting nothing.
  • Every draft is clamped to 280 characters and, without stored credentials, the X client degrades to a no-op NullXClient — the same graceful-null pattern as an unconfigured research provider. No credentials, no draft, no API call.
  • The held task is owned by the Secretary (confirmed_by_human=False), the same held-artifact pattern the gated release manager uses — skipped by every dispatcher, acted on only through the CEO's approve/reject.

Feature spotlight: an agent that finds its own good stories

The release and reply drafts write themselves off a template; the spotlight is different. On its own interval (ROBOCO_X_FEATURE_SPOTLIGHT_INTERVAL_SECONDS, base 1 day — a quiet-week guard stretches that to 3× when nothing new has shipped since the last spotlight, so it doesn't fire daily against a stale codebase), RoboCo spawns the Head of Marketing with real read access — the changelog, feature flags, docs, the codebase map, the charter, and the knowledge base — to go find a capability that's actually shipped but nobody's talked about yet, and write it up.

  • A real cloud-LLM spawn, not a template fill. This is the one part of the X engine that costs an agent turn per cycle, which is why it's gated behind its own sub-switch (ROBOCO_X_FEATURE_SPOTLIGHT_ENABLED) on top of the base engine rather than bundled into it.
  • One call, one draft. The Head of Marketing investigates, then makes exactly one propose_feature_spotlight call — which marks the feature it picked as "seen" (so the same capability doesn't get spotlighted twice) and drops a new held draft into the same X Post Queue everything else here lands in.
  • Same review, same voice. The draft is edited, approved, or rejected exactly like a release post or a reply — and it shares the same brand-voice charter every other draft on this page does.
Now rides the Board Programs registry, and has new siblings

The feature spotlight was the second engine folded into the generic Board Programs registry — same flag, same cadence, same queue, nothing about it changed. What's new is company: the Head of Marketing now also runs Megaphone (a standing editorial calendar) and Barfly (adjacent-conversation replies), both of which drop their own held drafts into this same X Post Queue once armed — so a draft you didn't expect from a release or a mention might be one of those instead. War Room (release campaigns) lands here too, as a set of drafts with a suggested posting order.

Nothing posts without you

Even fully armed with credentials, a draft sits in the queue until you explicitly approve it — optionally editing the body first, up to the 280-character limit.

Rejecting with a reason redrafts (parity with the video engine)

Rejecting a draft always cancels it — it's never posted. But if you give a non-blank reason, that reason schedules a fresh redraft of the same source once the rejection commits: the engine re-drafts using your feedback instead of leaving the slot empty. A blank rejection is a plain cancel with no follow-up, exactly as before. This mirrors the video engine's own reject-with-feedback re-authoring loop. The redraft is best-effort and deferred — a redraft failure never blocks or delays the reject itself, and a stale/replayed reject (e.g. a double-tapped Telegram button) on an already-cancelled draft is a no-op rather than scheduling a second redraft.

Bounds on origination

SettingDefaultMeaning
ROBOCO_X_MAX_OPEN_POSTS10Rolling cap on concurrently-open held posts/replies (both sources combined); the engine originates nothing more past it.
ROBOCO_X_MENTIONS_MAX_PER_CYCLE5Most reply drafts the mentions poll may originate in one cycle.
ROBOCO_X_MENTIONS_MIN_ENGAGEMENT0Minimum combined like+reply+retweet count for a mention to count as worth replying to.

Required configuration

Credentials are the four OAuth 1.0a user-context secrets from your X developer app — entered in the panel, never in .env:

SettingWhere it livesNotes
ROBOCO_X_ENGINE_ENABLEDEnvironment / panel flagMaster switch. Off ⇒ no draft is ever originated and no X API call is made.
ROBOCO_X_REPLIES_ENABLEDEnvironment / panel flagSub-switch for mention replies specifically. Off ⇒ only release posts draft, even with the master switch on.
ROBOCO_X_FEATURE_SPOTLIGHT_ENABLEDEnvironment / panel flagSub-switch for the feature-spotlight half. Off ⇒ the master switch above only ever drafts release posts and mention replies — no Head-of-Marketing spawn happens.
API key, API key secret, access token, access token secretSettings → X (Twitter) Credentials card in the panelFernet-encrypted at rest, exactly like a project's git token. Write-only — once saved, the panel never displays them again.
ROBOCO_X_ACCOUNT_USER_IDEnvironment (optional)The account's own numeric X user id. Leave empty and the engine resolves it once per mentions cycle via GET /2/users/me.
ROBOCO_X_REQUEST_TIMEOUT_SECONDSEnvironment (default 15.0)Per-request timeout for outbound X API calls.
Credentials are panel-only by design

Unlike most settings on this page, the four OAuth secrets are never read from environment variables — they live only in the x_credentials database table, encrypted the same way a project's git token is. Set them from Settings → X (Twitter) Credentials.

Enable it

Settings → Feature Flags carries "X (Twitter) engine", "X mention replies (needs a paid X API tier)", and "X feature-spotlight marketing" as three separate switches. Then scroll to the X (Twitter) Credentials card (same Settings page) and enter the four OAuth 1.0a secrets from your X developer app.

Takes effect on the next backend restart

The feature flags persist in the settings store and apply on the next backend restart. Credentials take effect as soon as they're saved — no restart needed for those.

See the environment reference for the full flag list.

What changes when it's on

  • Publishing a release (via the gated release manager) drafts one held announcement post, visible in the X Post Queue on the Social page.
  • With replies also on, a background poll checks mentions on its interval and drafts held replies to the meaningful ones, subject to the caps above.
  • With feature-spotlight also on, the Head of Marketing periodically investigates the codebase and drafts one spotlight post per cycle for a capability that hasn't been spotlit yet.
  • With no credentials stored, all three paths still run but produce nothing — the client is a no-op until you save real secrets.

Next

Social — where the X Post Queue lives. → Board Programs — the registry this program rides, including Megaphone, Barfly, and War Room, its new X-drafting siblings. → Board roadmap engine — the other Board-facing held-queue capability. → Video engine — an approved feature-spotlight draft can also trigger a companion video. → Settings — where the credentials card lives. → back to Optional subsystems.

llms.txt