The single source of truth for what the automation engine is, what it is for, what has been built, every decision behind it, and everything a future session needs to troubleshoot or rebuild it. Updated as work proceeds. Companion to the Fable Automation Blueprint v2.3 (the plan of record).
Last updated: 2026-07-23 · Phase: 9 of 10 blueprint items built (UAT pack + telemetry-to-fix added; item 8 parked, item 11 Explore queued) · Overall: ahead of plan
Where things stand
Scheduled routines
3 live
social · health · content
Supabase watchdog
865 green
866 runs, ~99.9%, laptop-closed
Independent backend
2 projects
ops + staging, live
Staging clone
579 migs
76 tables · 56 fns · 32 secrets
Blueprint items built
9 / 10
only item 8 (Home Dashboard) parked; item 11 Explore queued
Command Center
KPIs LIVE
hourly push landing in ops_metrics
Three automations run on schedule. An independent Supabase organisation now exists outside Lovable, with an always-on ops database (already logging production health every 15 minutes, laptop open or closed) and a full staging clone of the app rebuilt from the repo. The Command Center’s data foundation is live; the app that renders it is the next major build. The remaining blueprint items (guardrails, sweeps, UAT, fix pipeline) are queued behind this foundation.
Objectives & goals
The engine exists to let a solo founder run a live product like a much larger team, by moving the watching, checking, diagnosing and drafting off the founder’s plate while keeping every judgement call on it.
Product maintenance & monitoring
Catch data-integrity drift, broken cascades, OTA regressions and silent delivery failures before a user reports them. Turn any signal into a verified forensic card and a drafted fix.
Quality gates
Block the recurring bug classes at commit time, and run the top user journeys automatically before every ship instead of by hand.
Marketing at scale
Drive a weekly content engine off the Notion calendar — research, draft, produce, name and stage everything to a review gate — and watch social comments for anything needing a reply.
One control room
A founder-only Command Center that shows product, customer, technical and commercial truth plus the agent ops feed in one place, on the Mac Dock and phone home screen.
Emergent fifth goal (added 13 Jul): stand up an independent Supabase backend outside Lovable, with a staging environment, as the foundation the Command Center and safe future migrations depend on. This became active work this cycle and is largely done.
Tracks & progress
The blueprint’s ten items plus the infrastructure track that emerged. Status reflects reality as of the last update.
I
Independent Supabase backend
Own org outside Lovable: skwaddy-ops (Command Center data plane + health watchdog) and skwaddy-staging (full app clone from the repo’s 580 migrations). Official Supabase MCP server registered for all future sessions.
Live
1
Daily production health brief
Morning green/amber/red across Sentry, Capgo, Play review and repo. Scheduled 07:00 daily.
Live
2
Data-integrity sweep
Weekly scan for orphans, broken cascades, constraint drift. Not yet built; the staging clone now gives it a safe place to run.
Queued
4
Post-OTA watch
Watch the fleet 24–48h after every Capgo push. Not yet built. The 15-min ops watchdog is a first cousin, already live.
Queued
3
Guardrail lint pack
LIVE. Lints the staged diff only: blocks em dashes and dynamic Capacitor imports, warns on action_url/notification-type drift. Installed as a pre-commit hook; committed on branch chore/commit-guardrails (not pushed).
Live
5
Automated UAT pack
Run the P0 journeys automatically. Now has a target: run against staging, not production. Needs the owner’s confirmed P0 journey list.
Queued
6
Telemetry-to-fix pipeline
Signal → forensic card → drafted fix awaiting approval. Not yet built.
Queued
7
Command Center
Cockpit v1 LIVE at ~/Developer/skwaddy-command-center (own repo). Technical lens + agent ops desk read live data; the app links to this report. Phase A SHIPPED to production 22 Jul (migration 20260722071438): MAU corrected from 682 to 36, KPI snapshot function + dormant hourly push installed. The 3 business lenses light up as soon as ops_push_config is seeded.
1 step left
8
Home Dashboard phases 2–5
Product-side retention feed. Waits on the Command Center Phase A metrics fix so it builds on true numbers.
Deferred
9
Content engine
Weekly Notion-driven content + video. Scheduled Mondays 06:00. First campaign demo approved; Notion calendar backfilled and re-dated; Strategy Brief page live. Social checks are browser-only, never scrapers (owner rule).
Live
S
Social comment monitor
Reads Instagram + TikTok comments via Chrome twice daily; Slack ping only when a reply is needed. Scheduled 07:30 & 16:30.
Live
10
Routines & agents audit
Inventory and de-duplicate everything on a schedule; retire the old CODEX SOCIAL launchd system. Last, deliberately.
Queued
How the Command Center fits
The Command Center is founder/business infrastructure, not part of the customer app. Decision (8 Jul, refined 13 Jul): a standalone web app in its own repo, never inside skwaddy25, reading from three sources. Its data foundation already exists.
Data plane · LIVE
skwaddy-ops Supabase project. ops_runs + ops_actions tables. A pg_cron watchdog logs prod health every 15 min — 305 green so far, laptop-closed.
Reads · product + commercial
Prod Supabase KPIs via your admin login through existing RLS-gated queries, after the Phase A metrics fix (the one remaining Lovable job).
Reads · technical + content
Sentry (errors) + the ops watchdog (uptime); content calendar state from Notion; agent runs from the routines.
↓
The app · next major build
Standalone founder web app (own repo). Four lenses on top — product, customer, technical, commercial — the agent ops desk below (what ran, what needs you, what agents finished). Mobile-first.
↓
Mac
“Add to Dock” web app pointing at the private URL. One click, always there.
Phone
Home-screen link to the same responsive URL. No native app involved in admin.
Alerts
Severity-routed pushes for needs-you items and key Sentry events.
Why standalone, not in-app: your business tooling shouldn’t be coupled to the customer product’s deploys or to Lovable’s pipeline. The ops store lives in your own skwaddy-ops project; Lovable’s footprint shrinks to exactly one job (the Phase A metrics fix), forever. The interim feed already works — routines log to ops-runs.jsonl and the watchdog writes ops_runs — so nothing is lost while the app gets built.
Notion content operation mapped; video tool stack settled on ElevenLabs
Done
08 Jul
Campaign Demo 01 approved; 3 routines created; Notion backfill + Strategy Brief; Play Store approved
Done
13 Jul
Independent Supabase live: skwaddy-ops watchdog + full skwaddy-staging replay (40 self-healing rounds); MCP server registered; blueprint v2.3
Done
15–16 Jul
Staging secrets wired (Twilio, Resend, RevenueCat, Maps, Firebase push, Sentry config); this status record created; files organised
Done
16 Jul
Commit guardrail lint pack built + installed (blocks recurring bug classes at commit time)
Done
20 Jul
Command Center cockpit v1 live (technical lens + ops desk); status-report link wired; Lovable Phase A prompt drafted
Done
22 Jul
Phase A SHIPPED to production (migration 20260722071438): MAU corrected 682 to 36; KPI snapshot function + dormant hourly push; guardrail pack committed
Done
next
Seed ops_push_config (1 step) to light the 3 KPI lenses; ship the frontend half of Phase A; deploy cockpit for phone
Planned
Key decisions
The calls that shape everything downstream. Do not re-litigate without cause.
02 Jul · Read every handoff personally.
Digest-based synthesis was not acceptable for the strategy; the full read grounded the blueprint in citable evidence.
03 Jul · ElevenLabs is the whole video stack.
One vendor hosts Seedance/Kling/Veo plus voiceover and lip-sync. Higgsfield lapses, HeyGen dropped, Google Flow stays paused. Verify per-clip credit cost before the first batch.
03 Jul · Command Center is web-only, founder-only.
Mac Dock web app + phone home-screen link. The native app is out of the admin picture.
08 Jul · Command Center is standalone, not in the app.
Business tooling must not be coupled to product deploys. Ops store in its own Supabase project; Lovable reduced to the Phase A metrics fix.
08 Jul · Engine write ceiling = Ready for Approval.
The content engine may move status only up to Ready for Approval. Approved and Posted are owner-only, forever. Nothing auto-posts.
12 Jul · Browser, never scrapers, for own-account social.
All social comment checks and audits go through the logged-in Chrome, not Apify or any scraper.
Build skwaddy-ops + skwaddy-staging immediately. The production app migration is a separate, later project, rehearsed on staging and gated on the UAT pack + guardrails being live.
22 Jul · Include the App Reviewer account in KPIs.
Owner: "rather than hardcode you can include the review account and proceed." Only @skwaddy-demo.com accounts are excluded; no user id is hardcoded anywhere.
22 Jul · Push from production, never pull.
Production computes its own KPI snapshot and posts finished numbers outward. It never exposes an externally callable aggregate endpoint, and no production key ever reaches a browser.
To get staging functional fast, prod Twilio/Resend/Maps/RevenueCat/Firebase values were used. These passed through plaintext + transcript and should be rotated (see Needs-you).
Live infrastructure
Thing
Identifier
Notes
Supabase org
BP Skwaddy · edyoykgkalpjnoyihmfg
Personal account, Personal Access Token auth
Prod (Lovable-managed)
igssfvtteazcdadefgvs
The app’s live backend. Lovable is the ONLY interface. Not reachable via the PAT.
skwaddy-ops
kuxidyalfqfsjmnmaalo · eu-west-2
Command Center data plane. ops_runs/ops_actions + pg_cron watchdog. 305 green health checks since 13 Jul.
Local install, registered user-scope with the PAT. Available to all future sessions.
Routines
~/.claude/scheduled-tasks/
3 SKILL.md task files. Run only while the Claude app is open; missed slots fire on next launch.
Ops feed (interim)
~/SkwaddyWorkspace/ops/ops-runs.jsonl
Routines append here until the Command Center app reads ops_runs directly.
Troubleshooting, debugging & rebuild
What a future session needs to fix, extend, or reconstruct any of this.
The health watchdog (skwaddy-ops)
Function ops.watchdog(), scheduled by pg_cron job ops-watchdog every 15 min. It GETs prod /auth/v1/health with the prod anon key as the apikey header (that endpoint 401s without it), records the previous request’s status into public.ops_runs, then fires the next check via pg_net.
To inspect: query select * from public.ops_runs order by ts desc on skwaddy-ops. To pause: select cron.unschedule('ops-watchdog').
If it starts logging red: check whether prod is actually down, or whether the anon key rotated (update the key baked into the function).
Rebuilding staging from scratch
The staging schema was rebuilt from the repo’s 580 migration files via a self-healing replay loop (40 rounds). The loop’s repair catalogue is STAGING_REPLAY_DRIFT_REPORT_2026-07-13.md — it lists every place the migration files disagree with production, and doubles as the future prod-migration checklist.
To re-run: supabase link --project-ref jbzsnvxyypwdpsjoincb -p "$(security find-generic-password -a aphiwebevu -s supabase-skwaddy-staging-db-password -w)" then supabase db push --linked. Expect the same drift classes; the report explains each.
The replay loop script itself was in the session scratchpad and has since been cleaned; the drift report documents everything it did, so it is reconstructable if ever needed.
Two functions exist only on prod — staging runs permissive stubs.check_phone_search_rate_limit (phone-search rate limiting is DISABLED on staging until ported) and set_availability_expiry (a passthrough trigger stub). To port each: in the Lovable SQL editor run select pg_get_functiondef(oid) from pg_proc where proname = '<name>'; and apply the output to staging.
Repo bug: two migration files share version 20260323172350, which breaks history recording. A background task was raised to rename the second to ...351. On staging it was renamed + repair-marked in the session worktree only; the fix is not yet committed to the repo.
Secrets & keys
Staging secret names and their sources: SECRETS_INVENTORY_2026-07-08.md. Values live only in the staging project (hashed in listings) and the owner’s Passwords app / provider consoles.
Template (no secret values): ~/SkwaddyWorkspace/secrets/skwaddy-staging.env. The filled plaintext copy was pushed and deleted.
Push a secret without it touching chat: supabase secrets set --env-file <file> --project-ref jbzsnvxyypwdpsjoincb, or POST to /v1/projects/<ref>/secrets with the value piped via stdin.
Firebase push uses the skwaddy-prod Admin SDK key (id 03529e…). Seven service-account JSONs exist on disk; only one is needed — revoke the stale ones in the Firebase console. skwaddy-prod-personal is a different project, not the app’s.
Access model
The independent projects are reached with a Supabase Personal Access Token via the CLI / MCP server / Management API. The token is held in the MCP server registration; treat it as sensitive and rotate if exposed.
Prod Supabase is NOT reachable this way — Lovable is its only interface. Any future prod data/auth export must go through Lovable (paste-SQL) or a support-mediated transfer. This is the hard part of an eventual migration; the schema is not (it is all in the repo).
File index — where everything lives
This folder (~/SkwaddyWorkspace/automation-engine/) is the home of the engine. A few files stay outside it because live routines read them by path (noted below).
Rotate the reused prod keys when convenient (Twilio auth token first, then Resend, Google Maps restriction, RevenueCat). They passed through plaintext + this session’s transcript. No evidence of compromise; just hygiene.
Sign in to Instagram + TikTok in the Claude-connected Chrome so the social monitor can read comments.
Create #skwaddy-social in Slack (the routines auto-detect it) — or say to keep using #skwaddy-observability.
Click “Run now” once on each of the 3 routines (Scheduled sidebar) to pre-approve their tools so future runs don’t pause on prompts.
Confirm the P0 journey list for the UAT pack (proposed: gate, RSVP, multi-child, block, public RSVP).
ONE STEP LEFT for real KPIs: seed ops_push_config on production (endpoint + token) so the hourly push starts delivering. Decide first how it should authenticate (see the handoff, section 12).
Ship the frontend half of Phase A so the in-app admin dashboard stops showing the old inflated MAU.
Unlock the 3 KPI lenses: approve the Lovable Phase A prompt (automation-engine/specs/LOVABLE_PHASE_A_METRICS_PROMPT.md). It fixes the wrong active-user numbers AND publishes a safe KPI snapshot to skwaddy-ops so the cockpit reads real numbers with no master key in the browser. Alternative: a local snapshot script you run yourself with your prod key.
Deploy the cockpit to a free static host so the phone home-screen link works (5-minute step).
Port the 2 prod-only functions when you next have the Lovable SQL editor open (one pg_get_functiondef each).
Changelog
2026-07-22 — Phase A shipped to production via Lovable: MAU corrected from 682 to 36 (18.9x inflation removed), get_command_center_snapshot() + ops_push_config + hourly cron job 89 installed (dormant until seeded). Guardrail lint pack committed. Full handoff written.
2026-07-22 (evening) — Phase A.2 shipped (migration 20260722150107): metric counting rules corrected. Ghost-children exclusion via parent join, permanent 1 June 2026 floor on parties/playdates/accepted connections (Africa/Johannesburg), four month-to-date counters added (new users, children, connections, subs); 16 keys total. Verified independently from origin/main.
2026-07-22 (evening) — Phase A.3 shipped (migration 20260722160049) + receiver door installed on skwaddy-ops: KPI pipeline LIVE end to end. Live probe caught a header bug (gateway 401 on Authorization-only; apikey header added), config seeded with the ops PUBLIC anon key, insert-only RLS policy + shape check on ops_metrics, anon privileges tightened to INSERT+SELECT. First snapshot landed 16:00 UTC: mau_30d 36, new_users_mtd 7. Cockpit business lenses now have live data hourly. No secret material anywhere in the chain.
2026-07-23 — Blueprint items 5 and 6 built as routines. UAT pack: 12 owner-confirmed P0 journeys (including guest time proposals BR-226/BR-P-016, multi-guest finalisation BR-P-020/023, scheduled-notification timing BR-P-034) run Sundays 20:00 against staging only, API-level v1, fresh demo-domain fixtures created and destroyed per run, hard production-ref abort rail; UAT report regenerates in audit/uat/. Telemetry-to-fix: daily 07:45 sweep of integrity deltas, routine reds, Sentry and KPI anomalies into fingerprint-deduped forensic cards with DRAFT Lovable prompts (never sent, owner approves). Item 11 registered: Explore redesign and public surface (SWR location cache, pull-to-refresh forcing a fresh GPS fix, OTA-deliverable app side; web surface via Lovable). ElevenLabs API key installed by owner; engine primary provider switched. Cockpit registry now 27 routines (commit ced2d9c). 9 of 10 original items built; item 8 (May home-feed phases) parked pending owner re-ratification.
2026-07-22 (night) — Three more blueprint items shipped in one evening under the owner's standing blueprint approval. Item 2, data-integrity sweep: forensic found baseline 349 flags (120 dead connection-notifications, 41 connection_children orphans, 17 orphaned save-the-date recipients); one false-positive check (blocked_at vs status, by-design per BR-098) removed before ship; migration 20260722185832 live, weekly Mondays 05:00 UTC, first report landed on ops with total_flags 346. Item 4, post-OTA watch: twice-daily Capgo channel routine with 48h watch windows, Sentry cross-check, rollback suggestion on red; baseline 11.3.13. Item 10, routines audit: 25 routines inventoried across production (20), ops (1) and local (4); zero duplicates; registry live in the cockpit. Cockpit upgraded (commit 212433b): three business lenses now light from live ops_metrics, integrity panel, routines registry. Content engine corrected: ElevenLabs API primary (key pending owner install), Higgsfield explicit fallback. 7 of 10 blueprint items live; repairs of the 346 flags deliberately NOT authorised (detection only).
2026-07-22 (evening) — Content strategy rebuilt and made findable: @thefabstory style codified (grid + reels + POV anatomy) from live study, Calendly growth thesis + Explore/places pillar + guest conversion funnel folded in. CONTENT_STRATEGY_MASTER spec written, Notion Strategy Brief updated, skwaddy-content-engine skill created, claude.ai Marketing project instructions set. Calendar v3 fully reworked: 27 rows updated + 5 new rows, mix now 79% UGC-register vs 21% editorial, all AI rows on ElevenLabs. Weekly engine routine rewritten to draft in the new register and batch-generate within monthly quota. Lesson logged: a Lovable send can render optimistically, vanish, and still have been delivered; verify by reload + origin/main, never resend on sight.
2026-07-20 — Command Center cockpit v1 built (own repo, live technical lens + ops desk); status-report link wired via symlink; commit guardrail pack installed; Lovable Phase A metrics prompt drafted (awaiting owner go).
2026-07-16 — This living status record created; automation-engine folder set up and files organised; Firebase push key wired to staging; routines repointed to new spec paths.
How this stays current: ask in any session to “update the automation status report” and the changes land here, in this file, and re-publish alongside the blueprint.