Social Automation

How databayt drafts, approves, and broadcasts social posts across eight platforms — the Claude-native + Hermes pipeline, one brand at a time.

Social Automation

How databayt turns an idea into a published social post across eight platforms — with Claude writing the copy, /higgs making the media, and a thin gateway doing the broadcast. Each brand (databayt, Hogwarts, Mkan, Moallimee, Sijillee) runs its own presence off this shared pipeline. The brand rules every post obeys are in Brand & Voice; the build roadmap and credential plan are internal (docs/SOCIAL-AUTOMATION.md).

Business models → who we're talking to

databayt runs on four business models. Social marketing serves each one differently — B2B storytelling for the first three, B2C reach for the SaaS products.

ModelTypeWhat it sellsSocial job
Per ProjectB2BCustom automation builds for partnersShow the work — case studies, "automate the boring" proof
PartnersB2BOutsourced product dev + specialized talentAttract teams & talent — founder story, capability posts
CodebaseB2B / B2CReusable components, contributor revenue-share (the sharing economy)Grow the contributor community — open-source, dev-rel
SaaSB2C / B2BReady-to-deploy products (Hogwarts, Mkan, Souq, Shifa, …)Sell the product — per-brand consumer & buyer marketing

The first three are the databayt umbrella story (B2B, developer- and partner-facing). The fourth is where the product brands live — each with its own audience, channel mix, and voice.

Strategy

How we actually win is its own page — Strategy: six lenses (organic · viral · when · grow · pay off · moral), the create-once-repurpose-everywhere multiplier that makes 5 brands × 8 channels feasible for a small team, per-brand cadence, and the kill criteria that keep social honest against the cash-flow-first drive.

Brand pages

Every brand has its own presence. Its audience, channel mix, content pillars, and account status live on its page:

  • Databayt — the umbrella: open source, sharing economy, Kun & dev-rel (B2B)
  • Hogwarts — school management SaaS (B2B schools + B2C parents)
  • Mkan — property rentals (B2C renters + B2B hosts)
  • Moallimee — teachers & tutoring (pre-launch)
  • Sijillee — Sudan business accounting (pre-launch) (B2B)

Souq and Shifa are live SaaS products but are not in the current priority-5 social push. When they join, they get a page on this same template.

The pipeline

 idea ──► draft ──► media ──► approve ──► schedule ──► publish ──► measure
  │        │         │          │           │            │           │
content   Claude    /higgs    human      cron slot   telegram|fb   PostHog
calendar  native   text-free   gate    (one, 06:00)  direct|Hermes  + UTM
StageOwnerNotes
Ideacontent-calendar skill · weekly cadence · growth agent pillarsWhat to say, to whom, when
DraftClaude, nativelyArabic-first bilingual copy, written against Brand & Voice
Media/higgsText-free visuals, brand kit b0a3f528…; copy is overlaid in-post, never rendered
Approvehuman (Abdout / Ali / Samia)The gate — see Autonomy ladder
Scheduleone daily cron slotNo date-picker: 0 6 * * * + a 12h approval window. Real scheduling needs SocialPost/ScheduledPost persistence
PublishEgress layer — Telegram + Facebook direct APIs · other channels via the Hermes gatewayEgress only — dumb relays, never the LLM
MeasurePostHog + per-platform analyticsUTM-tagged links → attribution

Which of the three loops a post travels — Hub, cron draft-and-approve, or the inbound Hermes relay — plus the actor map, the cron inventory, and the keyword table, are on Architecture & Loops.

Layer boundaries

The one rule that keeps the architecture honest: Hermes is a broadcast relay, not a brain. Anthropic offers no native "post to X" primitive, so a self-hosted last-mile gateway is a legitimate egress — but the writing stays Claude-native. This is what reconciles a self-hosted gateway with the "anthropic-native over self-hosted" doctrine.

ConcernLayerWhy here
Write the copyClaude (in Claude Code / Cowork)Best model, brand-aware, bilingual — never Hermes' LLM
Make the image/video/higgs → Higgsfield CLIAlready governed by budget + brand kit
Decide it's goodHuman (→ automated gate at L4)Brand accounts are public and irreversible
Reach the platformEgress layer, routed per channelTelegram: direct Bot API (a plain HTTPS call — works from Vercel). Chat networks via the Hermes gateway (Slack today via SLACK_HOME_CHANNEL); more adapters as they land
Prove it workedPostHog + UTMAttribution back to site traffic / conversions

Done (Phase 2, 2026-07-10). The old generateAndPublishPost action drafted via the gateway's own LLM and never published — a name that lied twice. Rather than rename it, Phase 2 removed the in-app draft lane entirely: drafting is Claude-native via the /social skill, and the hub is compose → stage → publish only.

The eight channels

The full set: Facebook, Instagram, Telegram, TikTok, Snapchat, X, LinkedIn, WhatsApp. Each has a very different posting-API reality — some trivial, some paid, some with no organic-post API at all. Build order follows feasibility, not wish-list:

ChannelPosting APIEffortNote
TelegramBot APITrivialLive — wired direct (2026-07-10); needs the bot token + channel
XAPI v2Easy (paid)Pay-per-use since Feb 2026 (~$0.015/post) → /decide
FacebookGraph APIMediumApp review + business verification
InstagramGraph APIMediumBusiness account linked to a FB Page
LinkedInPosts APIMediumCommunity Management API approval + page admin
TikTokContent Posting APIHardApp audit (~1–4 wks); posts private until passed
SnapchatPublic Profile APILimitedAllowlist-only via a Snap contact
WhatsApp(none)LimitedNo official organic-post API — community broadcast only

Full matrix, costs, and the aggregator option (Ayrshare covers 7 of 8) are in the internal roadmap. Per-brand channel priorities are on each brand page.

Autonomy ladder

The north star is fully autonomous publishing. We climb to it in stages — not because autonomy is hard to code, but because handing a public brand account to an unsupervised bot needs guardrails first. We are at L2 on Telegram (staged: compose → one-click publish) and L1 elsewhere today.

LevelWhat runsHuman role
L0 — ManualHuman writes and postsEverything
L1 — AssistedClaude drafts + /higgs mediaHuman posts manually
L2 — Stagedkun stages copy+media to the dashboardOne-click approve → publish
L3 — Semi-autoAuto-publish low-risk channels (Telegram); gate brand channelsApproves brand posts only
L4 — Full-autoAutonomous end-to-endNone — replaced by an automated gate

L4 is gated behind /decide + credentials + an automated guardrail layer: an LLM-judge content + Arabic-correctness check, per-channel rate limits, and a kill switch. Autonomy without that layer is not a feature — it's an incident waiting to happen.

The /social keyword

Wired (2026-07-10) per the engine-parity recipe — skill + agent + vocabulary + counts + regenerated artifacts, health green:

  • Skill.claude/skills/social/SKILL.md: resolve brand + channels → draft (Claude, Arabic-first variants per channel) → media (/higgs) → human approval gate → publish via the composer or scripts/post-to-hermes.mjs.
  • Agent.claude/agents/growth.md gained a Social Automation section (it already owned "social media"); no new agent.
  • Vocabulary — the social spell lives in the Pensieve school next to higgs: order: [{familiar, growth}, {skill, /social}].

Saying "social post" (or «منشور تواصل») in prose activates it — no slash needed.

Current status

The Social Hub at /social is multi-product (Phase 3, 2026-07-23):

  • Works — bilingual (en/ar, RTL) composer with a config-driven channel registry (9 channels) × a product registry (hogwarts · mkan · databayt · sijillee · moalimee). A product select — same visual language as the shadcn theme selector — scopes the whole page: channel toggles, health checks, and publish all carry the chosen brand.
  • Per-product Facebook — each brand has its own Page and its own permanent Page token, read from FACEBOOK_PAGE_ID_<PRODUCT> / FACEBOOK_PAGE_ACCESS_TOKEN_<PRODUCT>. The Egress panel names the Page the token resolved to, which is how you catch a crossed token before publishing. Live for hogwarts, mkan, and databayt; sijillee and moalimee have no Page yet.
  • Per-product wiring — a channel is publishable only when the global transport and that brand's own destination are wired (productChannelWired). Telegram and Slack stay databayt-only: there is exactly one Telegram channel and one Slack channel, both org-level, so claiming them for a product brand would post "as Hogwarts" into the org channel.
  • Auto-post is draft-and-approve — a daily Vercel cron (/api/social/cron, CRON_SECRET-guarded) drafts per opted-in product and sends the draft to a private review channel with a signed, 12-hour, one-click Publish link. Nothing publishes unattended. Opt in per product with SOCIAL_AUTOPOST_PRODUCTS; empty (the default) means the cron does nothing.
  • Inbound relay — because Vercel can never reach Hermes on localhost, /api/social/relay inverts the arrow: Hermes drafts, a human approves in Slack, Hermes POSTs the approved text to kun, and kun delivers with its own tokens. Hermes never holds a Page token.
  • Drafting stays out of the relaysSOCIAL_DRAFT_SOURCE=hermes (default) hands the ask to Hermes; =anthropic drafts server-side via the API and is opt-in because the engine's billing posture is subscription-only.
  • Media — an optional public image URL (typically a /higgs render on the CDN) rides the whole chain: Facebook switches to the /photos edge with a caption, Telegram to sendPhoto (spilling over-long copy into a follow-up message rather than truncating it), and the signed approval token carries the media so approving a staged draft publishes the image, not just text.
  • Multi-channel, with per-channel truth — the picker selects any subset of a brand's wired channels, the three transports fan out in parallel, and the result names each channel individually. A half-landed post no longer reads as one flat failure.
  • Stage for review from the Hub — the composer can push your own copy down the cron's approval path (signed 12h link into the private review channel) instead of publishing directly, for when someone else signs off.
  • Removed — the in-app AI draft card: gateway-LLM drafting violated the layer boundary, so drafting now lives in the /social skill (Claude-native).
  • Still pending — adapters beyond Slack (see Hermes), persistence (SocialPost) and therefore real scheduling, per-brand Telegram/Slack channels, and metrics pull-back — tracked in docs/SOCIAL-AUTOMATION.md.

See also

  • Status — what is configured and live right now, versus what is merely wired.
  • Channel Setup — per-platform setup guides, written to be usable on your own accounts.
  • Brand & Voice — the rules every post obeys.
  • Connectors — the MCP-backed service integrations.
  • /higgs skill — media generation · content-calendar skill · growth agent.