Internal build spec · From course to system · August 2026

The AI Content Engine

One hour a week in. Content, leads and learning out.

A developer roadmap for an automated Instagram machine: AI-avatar reels sourced from proven ideas, DM funnels that capture leads, and an analytics loop that makes every week smarter than the last.

Owner
Michele De Filippo · Midas
Build
One developer · 10 weeks · 6 phases
Core stack
n8n · Claude · HeyGen · ManyChat
Human load
≈ 1.5 h / week at steady state
01 / The goal

Attention in. Clients out.

Five stages, each with a machine behind it. Every number on this slide comes from the course — and becomes a metric the engine tracks.

Reach

Reels

Proven ideas, avatar-produced, published daily-ish.

algo test: followers → Explore → feed
Convert

Profile

3-line bio, one link. The page that earns the follow.

follows: 0.1–1% of non-follower views
Audience

Followers

Dream-follower audience — broad, never ICP-narrow.

stories harvest it: 4–6 slide sequences
Capture

DMs

Comment a keyword → lead magnet → email → CRM.

delivery: < 60 s, hands-free
Sell

Clients

Human closes the conversations the machine opens.

attributed: content_source on every link
The engagement objective
A machine where content compounds — every reel earns attention, every follower can become a conversation, every metric rewrites next week's prompts.
02 / The source material

Ten lessons become four subsystems.

The course is the spec. Every module maps to a component — nothing taught is dropped, nothing built is invented from scratch.

Grow — foundations
Lesson 2 · AlgorithmRanking rules→ hard design constraints Lesson 3 · Niche · ICPDream Follower→ the Brand Bible config Lesson 4 · ProfileConversion point→ profile pack + checklist lint
Feeds Phase 0
Create — production
Lesson 5 · IdeasOutlier research→ idea radar, ≥5× only Lesson 6 · ScriptingCCC structure→ script factory + QA lints Lesson 8 · CaptionsSecond hook→ caption composer + publisher
Feeds Phases 1–3
Convert — funnel
Lesson 7 · ManyChatDM automations→ keyword → magnet → email Lesson 9 · StoriesLead sequences→ 5-slide story generator Lesson 10 · Trial reelsA/B distribution→ variant testing, data-picked winner
Feeds Phase 4
Learn — flywheel
Lesson 11 · AnalyticsRetention diagnosis→ 4 curve shapes, prescribed fixes Lesson 11 · RepurposingWinner matrix→ 8–15 variants per outlier Lesson 1 · MethodPost → Analyze → Improve→ the weekly operating loop
Feeds Phase 5

Ships with this deck: COURSE-SPEC.md — every rule, template, benchmark and checklist from the course, distilled and machine-readable. The deck plans the build; the spec fills the prompts.

03 / Design constraints

The rules the machine obeys.

Course rules, encoded as automated checks. Every card is a hard, testable gate in the pipeline — not advice.

Shares first
Metric hierarchy

Watch time → shares → saves → comments → likes. 2026–27: shares lead. Gate: "would you send this to a friend?"

Grade ≤ 6
Readability lint

Every script and caption at 5th–6th-grade level. Simple travels; complexity is a distribution bug.

Outlier threshold

An idea is proven only at 5×+ the creator's own average. An idea = topic + format — never one without the other.

3-layer hook
Copy all three

Visual + spoken + on-screen text, all taken from the proven outlier. One layer missing = weak hook.

One CTA
Per video, exactly

Follow, comment a keyword, or share. Two next steps confuse; the QA lint hard-fails a second CTA.

36 chars
Caption first line

A second hook, emoji counted. Caption CTA must match the video's CTA exactly — same keyword, same offer.

0.1–1%
Follower conversion

Expected follows per non-follower view. Below 0.1% = value alarm: watched, but no reason to follow.

70 / 30
Fresh vs repurposed

70–80% new tests, 20–30% repurposed winners — enforced by the scheduler. Niche consistency on every post.

04 / The engine

One loop. Eight stations. Four human gates.

Brand Bibleniche · ICP · dream follower · voice · offer · keywords — one JSON every prompt reads
01 · Research

Outlier radar

Nightly scrape of 30–50 niche creators (few k–500k). Score = views ÷ their average. Keep ≥5×.

gate02 · Ideate

Idea backlog

Claude filters: dream-follower fit, education value, reproducible format. Monday: human approves in one tap.

gate03 · Script

Script factory

Keep the outlier's hook + structure, swap value + CTA, your voice. QA lints before approval.

gate04 · Produce

Avatar render

HeyGen digital twin + ElevenLabs voice, 9:16, burned captions. Human previews every video.

create zone hands off to distribution measurement feeds the loop back
05 · Publish

Scheduler

Graph API: reels, trial reels, stories. Caption composer, cover pick, original quality, cadence 4–5/wk.

06 · Convert

DM funnels

ManyChat: comment keyword → magnet → email → HubSpot. Keywords synced from the script factory.

07 · Measure

Metrics spine

Nightly insights via API + weekly app screenshots (retention curve, follower split) parsed by vision.

08 · Repurpose

Winner matrix

≥5× winners → 8–15 planned videos, duplicates first. Losers → diagnosed, fixed, retried.

Station 08 feeds station 02 — every Friday the prompts get smarter
Create Convert Learn Human gate — approval required
05 / Solution architecture

The same loop, as wiring.

Sources
Creator poolreels · views · baselinesapify · scraped
IG insightsviews · shares · watch timemeta api
App screenshotsretention · follower splitfrom you · weekly
Brand Bibleniche · ICP · voice · offerfrom you · once
Lead magnets2–3 deliverablesfrom you
nightly ingestn8n workflows
Data spine · Airtable
Content DBone row per reel · state machine
Keyword registryone keyword = one automation
Metrics historynightly time series
reads configwrites states
The brain · n8n + Claude
Outlier radar≥5× filter + 3 judges
Script factoryrewrite + QA lints
Judges & visionscores · shapes · diagnoses
Approval bot · Telegramyour 1.5 h/week live here
approvedscripts only
Production
HeyGen rendertwin · voice · captions
Variant rendersA/B · one variable
Asset storefiles tied to the row
preview-okassets only
Distribution & return
Publisherreels · trials · stories
ManyChat funnelskeyword → magnet → email
HubSpotleads · calls · sources
↓ what happened flows back ↓
The return loopmetrics → prompts, weekly
hover any node for the detail · tags show where each input comes from — amber = what only you can provide · every arrow is an n8n workflow with retries + alerts
06 / One reel, end to end

What a week actually looks like.

Mon 08:00Outlier radar01
@aiworkflow.guy — 412k views vs 38k avg = 10.8×
topic: "3 AI tools that replace an editing team"
format: talking head + screen b-roll · hooks captured ✓

The radar found it overnight; both judges passed it. It's waiting in your Monday digest.

Mon 09:15Approval bot02
🎬 Script #0142 ready · outlier 10.8×
"You're still paying an editor for things AI does free."
lints: grade 4.9 ✓ · 41s vs 43s ✓ · 1 CTA ✓ · kw TOOLKIT
✓ Approve✎ Reject + note

One tap in Telegram. The hook and structure came from the outlier; the value and CTA are yours.

Mon 09:45Production03
HeyGen render 41 s · captions burned · cover @ 00:07
cost $2.90 · angle-B variant queued for trial A/B
preview → approved from your phone at 09:52

Thirty-seven minutes from approval to a finished, previewed reel. No editor, no timeline.

Thu 18:00Publisher04
Reel live · first line "AI can replace your editor ⚠️" (31 chars)
caption CTA: comment TOOLKIT — automation confirmed live ✓
trial pair posted together · 48 h freeze on

Same CTA in video and caption, keyword pre-cleared in the registry — nothing can mismatch.

Thu → FriManyChat + HubSpot05
comments 214 · keyword DMs 96 → magnet sent <60 s
emails captured 61 → HubSpot, source reel_0142
2 calls booked — those conversations are yours

The funnel ran itself while you slept. You only stepped in for the two hot conversations.

Fri 17:00The return loop06
retention: stable-then-fades @ 62% → cut-filler note filed
follower conv. 0.4% of 208k non-follower views — in band ✓
10.8× outlier → 12-video plan queued, duplicate first

Friday's report turns this reel into next month's calendar — and re-weights what the radar hunts for.

Numbers are illustrative; the artifacts, checks and timings are exactly what the engine produces at each station.

07 / Division of labor

The machine does the work. You keep the judgment.

The engine — every day, unattended
  • Research & scoring — outlier radar over the creator pool, nightly
  • Scripts, captions, QA lints — drafted, checked, queued for approval
  • Avatar renders — video, voice, subtitles, covers, variants
  • Publishing — reels, trial A/Bs, sticker-less stories, on schedule
  • Lead capture — DM delivery, email collection, CRM sync, attribution
  • Learning — metrics, diagnoses, repurpose plans, Friday report
You — the judgment, ≈ 1.5 h / week
  • Monday batch — approve ideas & scripts from Telegram30′
  • Daily glance — preview renders, publish nudges10′/day
  • Story poll slide — post slide 1 in-app (stickers are app-only)5′
  • Hot DMs — the sales conversations the funnel opensas they come
  • Friday report — read, steer, done15′
Never delegated: your niche, your proof claims, your closing conversations.
Four platform walls — known up front, each with its workaround
Story stickers

API posts stories but no polls/stickers. Hook slide with poll → human posts in-app; rest auto-publishes.

Retention graph

Curve + per-reel follower split are app-only. Weekly screenshot drop → vision model parses both.

Profile fields

Bio/name not editable via API. Engine generates a one-tap copy pack; human pastes once.

AI disclosure

Meta requires labeling photorealistic AI content. We disclose, keep C2PA metadata — labels don't cut reach; penalties do.

08 / The roadmap

Ten weeks. Six phases. Each one ships alone.

Progressive: every phase leaves a working tool even if we stop there. Iterative: the account goes live in week 3 — the engine upgrades around a running channel.

Phase
W1
W2
W3
W4
W5
W6
W7
W8
W9
W10
P0 · Foundation
identity · avatar · rails
P1 · Idea Engine
outlier radar · backlog
P2 · Script Factory
scripts · QA
P3 · Production Line
avatar renders · previews
P4 · Publish & Convert
publisher · DM funnels
P5 · Learn & Scale
flywheel · repurposing
Live from week 3 — posting starts manually-assisted, automation absorbs it step by step Phases map 1:1 to lesson order — the course insists the sequence matters; so does the build
Phase 0 · FoundationWeeks 1–2

Identity before automation.

Brand Bible

Niche (problem ∩ enjoy ∩ paid), Expert-vs-Documenter flag, 10-question ICP, dream-follower profile, voice + banned phrases, offer + lead magnets. One JSON, consumed by every downstream prompt.

ClaudeAirtable

Profile pack

Clean username candidates, name field ≤64 chars (Name | What + Keywords), 3-line bio (hook / proof / verb-first CTA, ≤35 chars each), one branded short link. API can't edit profiles — ships as a one-tap copy panel.

ClaudeDub / Short.io

Avatar + voice twin

2 min of footage + consent video → HeyGen digital twin. ElevenLabs professional voice clone (30+ min audio) plugged into HeyGen. AI-disclosure setting decided and recorded.

HeyGenElevenLabs

The rails

IG professional account, Meta app with publish + insights permissions — review filed day 1, advanced access has lead time. ManyChat connected, n8n on the existing VPS, Airtable base, Telegram approval bot.

n8nMeta Graph v26Telegram
Done when — tested
  • brand_bible.json validates against schema; fills every prompt template
  • Profile passes the course's 5-point checklist as an automated lint
  • Avatar blind test: 3 of 5 strangers don't flag it in a reel-length clip
  • Test post publishes via API and insights read back
  • AI-disclosure decision recorded; C2PA metadata kept
Ships alone: a sharp niche, an optimized profile, a working avatar — value even if we stopped here.
Human gate · niche choice & proof claims are never generated
Phase 1 · Idea EngineWeeks 2–3

Ideas from evidence, not brainstorms.

Source pool

30–50 niche creators, few k – 500k followers only — fame contaminates the signal. Rolling baseline per creator: median views of last ~20 posts, refreshed weekly.

Apify

Outlier radar

Nightly scrape → score = views ÷ creator average. Keep ≥5× only — raw view counts are a trap. Capture the full idea: topic + format + all 3 hook layers.

Apifyn8n

Two-gate filter

Claude judges every outlier: dream-follower fit? Real education value — entertainment inflates views, not clients. Avatar-reproducible format? High-production formats auto-rejected — right topic, wrong idea.

Claude

Backlog + approvals

Idea cards in Airtable: topic, format, hook, score, source link, pillar, funnel stage. Monday Telegram digest — approve or kill each card in one tap.

AirtableTelegram
Done when — tested
  • Pool seeded with ≥30 creators inside the follower band
  • Outlier math spot-checked vs 10 hand-computed cases
  • ≥20 approved ideas queued, each with pillar + funnel stage
  • Niche filter: <10% false-accepts on a 30-idea decoy set
  • Monday digest → approvals round-trip works from the phone
Ships alone: a permanent ranked feed of proven ideas — the account starts posting this week, manually assisted.
Human gate · Monday 15′ — you pick the winners
Phase 2 · Script FactoryWeek 4

Model the proven. Never invent from zero.

Outlier decomposition

Download the source reel → Whisper transcript, OCR the text hook, grab the opening frame. Claude labels every line against the CCC structure: hook / sell / principle / applicable / CTA.

WhisperClaude

Rewrite engine

Keep the outlier's hook + structure (its structure overrides the blueprint), swap in your value + CTA, written in Brand-Bible voice with all five sell-the-solution levers: proof, FOMO, hype, novelty, reassurance.

Claude

QA lints — hard gates

Readability ≤ grade 6 · duration ≈ outlier ±10% · exactly 1 CTA · shareability judge ("send to a friend?") · keyword unique across all live automations. Fail = regenerate, never publish.

n8nClaude

Caption composer

First line ≤36 chars echoing the hook (emoji counted as rendered). CTA copied from the script exactly — same keyword, same offer. Spaced middle weaving the script's key terms. No heavy caption SEO — the algorithm reads the video.

Claude
Done when — tested
  • Golden set: 10 outliers rescripted, blind human rating ≥7/10 on 8
  • 100% of approved scripts pass every lint
  • Keyword collision test blocks a duplicate before it ships
  • Script JSON carries all 3 hook layers into production
  • Approval shows outlier vs rewrite side by side in Telegram
Ships alone: paste any viral reel → a ready-to-shoot script in your voice, caption included.
Human gate · every script approved before render
Phase 3 · Production LineWeeks 5–6

Scripts in. Finished reels out.

Render pipeline

Script JSON → HeyGen digital twin, 1080×1920, ElevenLabs voice. Webhook on completion, automatic retries, and a cost meter that alerts at 80% of the monthly render budget.

HeyGenn8n

Captions & hook burn-in

HeyGen's styled captions + SRT first (ZapCap later only if needed). Text-hook overlay on the first 3 seconds. Cover = a clean on-screen-text frame from the video — never a custom cover.

HeyGenffmpeg

Variant renders

The same script rendered as two real videos differing in one variable — the avatar's camera angle — everything else identical, for clean trial A/Bs. Never the same file re-uploaded: duplicates get zero push.

HeyGen

Asset store + preview gate

Finished files land on Drive/S3, tied to the Airtable card. Telegram preview: approve → eligible to schedule; reject with a note → automatic re-render with the fix.

AirtableTelegram
Done when — tested
  • Idea → finished reel, zero manual editing, in <30 machine-minutes
  • 10/10 test renders pass QA: lip-sync, captions legible at phone size, hook overlay ≤3 s
  • Cost per finished reel ≤ US$5 at 60 s
  • Forced render failure triggers the alert + retry path
Ships alone: a video factory — approve a script at 9:00, preview a finished reel by 9:30.
Human gate · every video previewed before it can schedule
Phase 4 · Publish & ConvertWeeks 7–8

Distribution and lead capture, wired together.

Publisher

Graph API v26: reels at 4–5/wk, original quality preserved. Trial A/B pairs via trial_params past 1k followers — posted together, identical metadata, frozen 48 h; the composite winner graduates, the loser stays parked. Stories publish sticker-less; poll slides go in-app.

Meta Graph v26n8n

DM funnels

ManyChat, cloned from the course's templates: keyword → magnet, or opt-in tap → email (consent on) → HubSpot. One automation per lead magnet — any-post trigger, no per-reel builds. 4–5 rotating replies; retry ≤3.

ManyChatHubSpot

Story sequences

5-slide lead-gen packs from winning reels: hook + poll → insight → proof (real, human-verified) → resource → keyword CTA. Slide QA: readable in <1 s, one message, real context + movement. Slide 1 posted in-app with its poll.

ClaudeHeyGen

Attribution

Every link tagged content_source per placement — bio, DM, story. Leads land in HubSpot knowing which reel or sequence produced them; booked calls close the loop.

HubSpotDub
Done when — tested
  • 7/7 scheduled posts publish on time, one full week
  • Comment on a seeded post → DM lands in <60 s
  • E2E: comment → magnet → email → HubSpot contact with correct source
  • Caption CTA == script CTA on 100% of posts (automated check)
  • Trial A/B pair posts together; after 48 h the winner graduates, the loser stays locked
Ships alone: views now convert — every reel has a wired funnel behind it.
Human gate · the machine opens conversations, you close them
Phase 5 · Learn & ScaleWeeks 9–10

The flywheel: measure, diagnose, repurpose.

Metrics spine

Nightly per-reel insights via API: views, reach, watch time, shares, saves. Weekly app-screenshot drop for what the API can't give — retention curve + follower split — parsed by a vision model.

Meta GraphClaude vision

Diagnosis

Four retention shapes → prescribed fix: instant drop = rework all 3 hook layers · fades = cut filler · mid-video cliff = reshoot that one line · CTA drop = swap the CTA. Conversion vs the 0.1–1% band.

Claude

Repurpose engine

≥5× the rolling average (outliers excluded) → 8–15 videos per winner: 1–2 duplicates first, 3–5 hook, 2–3 format, 2–3 topic variants — one variable at a time. Scheduler enforces the 70/30 mix.

ClaudeAirtable

Friday report + feedback

Telegram digest: winners, diagnoses, next week's plan. Winning hooks, formats and topics up-weight the ideation prompts — station 08 literally rewrites station 02.

Telegramn8n
Done when — tested
  • API metrics match the app ±5% on 10 posts
  • Retention classifier ≥85% on 20 labeled graphs
  • Seeded outlier → auto-plan with per-axis quotas, duplicates first
  • Scheduler blocks a 4th repurpose in any 10-post window
  • Two consecutive Friday reports with ≥3 actionable calls each
Ships alone: the engine now improves itself — every week's data rewrites next week's prompts.
Human gate · Friday 15′ — read the report, steer
09 / The data spine

Every reel is a row that never forgets.

One record per piece of content, from idea to learning. The row is the API between phases — each phase reads the fields before it, writes its own.

IDEA APPROVED SCRIPTED SCRIPT_OK RENDERED PREVIEW_OK SCHEDULED PUBLISHED MEASURED REPURPOSED
// content_item — the one record everything shares
{ id, status, pillar, funnel_stage,   // TOFU | MOFU | BOFU
  source: { creator, url, outlier_score }, // proven origin, ≥5×
  idea: { topic, format },             // inseparable pair
  hook: { visual, spoken, text },       // all 3 layers travel
  script, caption, keyword,          // keyword unique per automation
  assets: { video_a, video_b, cover },
  publish: { at, type: reel | trial | story },
  metrics: { views, shares, saves, watch_avg,
            followers_gained, retention_shape },
  learn: { diagnosis, repurpose_of, variant_axis } }
Nothing publishes without PREVIEW_OK. Approvals are status flips in Airtable — auditable, revertible, phone-friendly.
One keyword, one automation. The registry collision-checks every script's keyword against all live ManyChat flows.
Variants stay traceable. repurpose_of + variant_axis let the leaderboard prove which hook, format or topic drives results.
10 / Tools & run cost

Boring tools, wired well.

Layer
Tool
Why
Alternative
$ / mo
Orchestration
n8n · self-hosted
Verified HeyGen + ManyChat nodes; Airtable & Telegram native; runs on the existing VPS
Make
0
Brain
Claude API
Scripts, judges, vision parsing, weekly reports
~30
Content DB
Airtable Team
Calendar + approval interfaces; 5 rps is plenty
Notion
20
Research
Apify scrapers
Outlier radar, ~$1–2.7 per 1k results; no-login (ToS-grey, no account at risk)
Sandcastle
~15
Avatar
HeyGen PAYG
Digital twin ~$4/min · 9:16 · captions + SRT · webhooks · consent flow
Argil $39 all-in
~80
Voice
ElevenLabs Creator
Professional voice clone, plugs straight into HeyGen
HeyGen voices
22
Publishing
Meta Graph API v26
Reels + stories + trial_params · 100 posts/day cap · free
Upload-Post $24
0
DM funnels
ManyChat Pro
Keyword triggers, email capture, API export, native HubSpot sync
39
CRM
HubSpot · existing
Leads, calls, attribution — already in place
0
Run cost at 4–5 reels / week ≈ US$ 210 – 260 / month

Build vs buy: 2026's SaaS engines generate and post — none combine outlier research, DM funnels and human approval gates. The glue is the moat.

11 / How we know it works

Three loops keep it honest.

per feature

Build loop

Every component lands with its own proof.

  • Golden sets — 10 rescripted outliers, 20 labeled retention graphs, 30 niche-decoy ideas
  • Hard lints — grade ≤6, ≤36-char first line, 1 CTA, keyword unique
  • E2E dry runs on a private test account before anything touches the real one
  • Kill-switch drills — forced failures must alert, retry, and stop cleanly
weekly

Content loop

The course's own method — Post → Analyze → Improve — run on schedule.

  • Every reel scored on the hierarchy: watch time · shares · saves
  • Each diagnosis becomes one concrete change in the next batch
  • The Friday report ships, or the week failed — consistency beats perfection
monthly

System loop

Keep the machine calibrated, cheap, and patient.

  • Judge calibration — LLM scores re-checked against human ratings for drift
  • Cost per reel / per lead trend reviewed against budget
  • Patience policy — no strategy pivots on early flat numbers; the zero-weeks are expected
  • Niche & offer review — 30′ with the owner
The iteration contract
Ship on schedule, learn on schedule — done beats perfect, and the loop is what makes it better.
12 / Targets

What good looks like.

Gates measure the machine first, the audience second — growth is exponential, not linear, and the early flat zone is expected.

Day 30
The engine is online
  • 100% of posts flow through the pipeline
  • 4–5 reels / week, sustained
  • Human time ≤ 2 h / week
  • Cost per reel ≤ $5
  • Funnel verified E2E: comment → CRM
Day 60
The signal appears
  • Baselines set; conversion inside the 0.1–1% band on half of reels
  • First ≥5× outlier found and repurposed — duplicate first
  • ≥50 emails captured via DM funnels
  • First booked call attributed to a reel
Day 90
The flywheel compounds
  • Repurposed winners fill 20–30% of the calendar
  • Prompts re-weighted by data 4+ times
  • Leads / week rising 3 weeks straight; cost per lead falling
  • Scale decision: cadence up, second language, or second account
13 / Before week one

Six decisions, then we build.

Each comes with a default so kickoff is a confirmation, not a workshop. Correct me where the defaults are wrong.

Niche & offer
Does it pass the Venn — real problem, enjoyable for years, people pay? Default: AI-for-business authority content feeding Midas offers — the Expert path, proof exists.
Avatar identity
Your digital twin or a synthetic persona? Default: real twin, AI disclosure on — Meta requires it for photorealistic content, and trust survives labels; fakes don't.
Lead magnets
Which 2–3 resources do the DM funnels deliver? They must exist before any CTA airs. Default: repurpose the existing Midas playbooks.
Cadence & budget
4–5 reels/week ≈ $250/mo run cost. Approve the ceiling — the cost meter alerts at 80% and the cadence never silently drops.
Language & market
English global, or EN + IT from day one? Default: EN first — translate proven winners in Phase 5, not guesses in Phase 1.
The account
New handle or an existing one? Default: decide at kickoff. Either way: trial reels unlock at 1k followers; below that the publisher runs standard posts only.
AI Content Engine · build spec

Thank you.

One hour a week of your judgment. The engine does the rest — and gets smarter every Friday.

Built on the course's system, verified against August 2026 platform capabilities.

midasanalytics.ai
01 / 19
← → to navigate