SHARED AI INFRASTRUCTURE

The Drafting Engine

One local LLM, my-llama31 on Ollama — free, private, no quota — writes the first draft of everything the business sends: outreach messages, resumes and application documents, comment/DM replies today. Not built for one niche — the same profile-in, tailored-document-out mechanism applies to any industry a real template exists for. Cloud (Gemini/DeepSeek) stays as a fallback when Ollama is down or a language it isn't fluent in shows up.

What's live today

4,260
Outreach messages drafted (lifetime, Baserow)
72
Documents generated (lifetime, Baserow)
5,865
Leads scored (lifetime, Baserow)
6,377
Leads discovered (lifetime, Baserow)

Daily counts below are log-derived — read from each script's own run log, not a dedicated "date drafted" field (doesn't exist yet in Baserow). Only as complete as the logs currently on disk.

System map — surface → file

Which real-world surface each system actually talks to, and the exact file that does it. Kept accurate on purpose (not aspirational) — this is what Hermes and CC both read to know where to make a change. Verified 16 Aug against live logs, not just code comments.

SystemReal surfaces (verified live)FileStatus
Comment / DM Reply Engine Instagram — commentsInstagram — DMFacebook — commentsFacebook Messenger — DM growth-engine/src/webhooks/meta-controller.ts
growth-engine/src/automation/llm-reply.ts
Live
Message Drafting EmailInstagram DMWhatsAppLinkedInDiscord outreach-engine/scripts/draft-outreach.mjs Live
Lead Scoring none — Baserow-internal only outreach-engine/scripts/score-leads.mjs Live
Document Generation Email — job applications (current use) job-engine/scripts/tailor-and-draft.mjs Live
Content / Blog drafting Instagram / Facebook / blog — script writing today is manual see Content Engine page Not on shared engine

Reply Engine's code also defines WhatsApp and Website chat as valid channels (db/schema.ts's Channel type) but neither saw any real traffic in today's logs — listed as defined, not claimed as live. YouTube is mentioned in the system's own written summary doc but has no actual code path in meta-controller.ts — not wired, despite the doc.

Systems using the Drafting Engine

Each system keeps its own script and rules (different prompt, different output, different Baserow table) — all route their LLM calls through the same shared _shared/ollama-client.mjs or _shared/gemini-key-pool.mjs.

Comment / DM Reply EngineLive
llm-reply.ts — IG/FB comment + DM auto-replies, 5 channel personas, Safe Reply Bank first (free/instant). LLM backstop order (16 Aug): Gemini (6-key rotation) primary → DeepSeek → Groq → Ollama (last resort) — reordered after Ollama showed inconsistent quality on real conversations. FACTS isolation + stripRomantic guardrail kept intact. Per-sender 3-replies/24h cap now enforced on comments too (was DM-only, closed a real gap — one commenter got 22 replies in a day before this fix).
Replies
288
08-29
38
08-30
21
08-31
15
09-01
22
09-02
43
09-03
16
09-04

By source (lifetime, log-derived): deepseek=1797 · groq=215 · safe-bank=654 · ollama=92 · gemini=471

Message DraftingLive
draft-outreach.mjs — cold outreach messages for scored leads, real sender per lead, Arabic/Bilingual routed to Gemini.
Drafted
637
08-16
247
08-18
63
08-20
1
08-21
Lead ScoringLive
score-leads.mjs Pass 2 — ICP-fit scoring against ICP_PROFILE.md.
Scored
2310
08-14
87
08-15
532
08-16
36
08-26
24
08-28
41
08-29
200
09-01
Document GenerationLive
tailor-and-draft.mjs — profile + template + a target brief → LLM-tailored content → compiled PDF, real anti-fabrication rules enforced (only facts already in the source profile ever appear; no invented numbers/metrics). The mechanism is general by design; resumes/cover-letters/application emails are simply the one real use-case built so far. Same Ollama-primary → DeepSeek → Gemini fallback chain as the rest of the Drafting Engine.
Documents
12
08-17
9
08-18
3
08-19
13
08-28
11
08-30
9
09-01
1
09-02

Detailed pipeline view: engine.arisegulf.com/job-dashboard/ ↗

Content / Blog draftingNot on shared engine
Script/caption writing today is manual (Shabiha, via ChatGPT/Grok) — not yet routed through the shared Ollama engine. The real production pipeline (Flux images, Remotion assembly, Baserow 936–951, publish policy) already exists and is documented on its own page, not here.

Full pipeline: command.arisegulf.com/content-engine/ ↗

How it flows

Ollama — my-llama31 (local, free)
Gemini (6-key rotation)
DeepSeek

Primary → fallback → fallback. Arabic/Bilingual content skips straight to Gemini (Ollama's Arabic wasn't reliably fluent, caught live 16 Aug).

Comment/DM Repliesgrowth-engine/src/automation/llm-reply.ts
Message Draftingoutreach-engine/scripts/draft-outreach.mjs
Lead Scoringoutreach-engine/scripts/score-leads.mjs
Document Generationjob-engine/scripts/tailor-and-draft.mjs
Content / Blog draftingmanual today — see /content-engine/