ARCHITECTURE MIND MAP • 2026-04-17 • CURRENT-STATE OVERLAY 2026-04-30

The Brain · The Site · The UI

Three repos, one flow. Where data lives, where skills execute, where operators click. The complete picture for team onboarding and future-Claude-session context.

Current State — 2026-04-30

Three-repo separation survived 49 sessions. Architecture intent below holds — only operator UI cadence shifts.

3Repos
9/9SKILLs
16ADRs
54Pages
🧠 THE BRAIN

campaign-forge Phase 5 SHIPPED

Source of truth. Every schema, every piece of research, every pipeline skill, every ADR. 9 of 9 SKILLs deployed against v0.3.0 input layer. 329/337 pytest passing. Drives MVP via Claude Code SKILLs today.

🌐 THE SITE

contentforge Conversion-ready

Shipped past the original "execution surface" framing into fully conversion-ready MVP locally: 54 pages, 10 tool islands, Lighthouse 95+ desktop, 291 parity tests, complete tracking contract. Production DNS cutover operator-gated.

🏛️ THE UI

campaignforge-app Operator-deferred

Spine + Phase 1B scaffold. Where this page describes "operator clicks a button in UI", MVP path runs brain via Claude Code today. UI rebuild is post-revenue. Target-state preserved on Platform.

📖 How to read this page: The Brain · Site · UI architecture below is the load-bearing decision that survived 49 sessions. The state-table at the bottom shows current vs. target state per surface. Jump to Broader Vision Preserved for what each surface activates next.
The three repos at a glance
PYTHON · CLAUDE SKILLS
🧠
The Brain
campaign-forge
Source of truth. Every schema, every piece of research, every pipeline skill, every ADR. Nothing else has canonical data.
Owns
  • Pipeline skills (Stages 1-7, Retro)
  • Canonical JSON schemas (docs/schemas/)
  • Vertical research (EDU, auto, Medicare...)
  • Psychology trigger library (148 triggers)
  • Compliance configs per vertical
  • Winners vault per vertical
  • Swipe vault (UGC library + proven creative)
  • ADRs (architectural decisions)
Runs locally · Schema source for all subscribers
ASTRO · SVELTE ISLANDS
🌐
The Site
ContentForge
The execution surface. Articles, tools, quizzes, landers. Reads brain data at build time. Deploys to the public web.
Owns
  • Site templates & components
  • Tool UX (EFC Calculator, Quizzes, etc.)
  • Article + tool content (.mdx files)
  • SEO infrastructure (sitemaps, robots)
  • Build pipeline → Cloudflare Pages
  • Future: Content/SEO skills (.claude/skills/)
Deploys to degreesources.com + future vertical domains
SVELTEKIT · DRIZZLE
🎛️
The UI
campaignforge-app
Operator control surface. Wraps the pipeline today; will wrap content production tomorrow. Team's only touchpoint — no terminal required.
Owns
  • Pipeline UI (brief → campaign → export)
  • Pipeline orchestrator (SSE streaming)
  • Session management + cost tracking
  • Integrations (Everflow, Meta, Google, TikTok)
  • Scaffolded: Content UI routes (stubbed)
  • Pending: /api/content/build endpoint
Deploys to Coolify · Pending production deploy
The flow — visually
Operator / Team You + 2-3 media buyers CAMPAIGNFORGE-APP • THE UI SvelteKit Operator Console /api/pipeline/* execute · approve · status (BUILT) /api/content/* build · articles · tools (STUB) CAMPAIGN-FORGE • THE BRAIN Source of truth for all data + pipeline skills RESEARCH verticals/edu/ verticals/auto/ buyer intel, gov data state by state PSYCHOLOGY trigger-library 148 triggers Papers 1+2+3 synth + schema SCHEMAS docs/schemas/ 13 .json files canonical contracts ADR 0005 COMPLIANCE config/compliance/ per vertical restricted claims scan patterns SKILLS .claude/ skills/ Stages 1-7, R CONTENTFORGE • THE SITE Astro + Svelte Islands CONTENT articles + tools FUTURE SKILLS .claude/skills/ DEPLOY Cloudflare Pages CAMPAIGN OUTPUT verticals/<v>/campaigns/<name>/ brief → strategy → copy → creatives → structure → export (CSVs, XLSX) → Meta / Google / TikTok / Taboola click invoke pipeline skills future: invoke content skills reads research, schemas, compliance pipeline writes campaign artifacts
Built & live
Scaffolded, wiring pending
Planned next
Human action
Where skills live

campaign-forge/.claude/skills/

Pipeline · Built
  • /orchestrator flow ctl
  • /brief-validator Stage 1
  • /strategy-engine Stage 2
  • /copy-factory Stage 3
  • /copy-review Stage 3B
  • /creative-director Stage 4
  • /campaign-architect Stage 5
  • /landing-page Stage 7
  • /export-packager Stage 6
  • /campaign-retro Stage R
  • /content-writer legacy — move?
  • /content-site legacy — move?

ContentForge/.claude/skills/

Content + SEO · To build
  • /article-writer Tier 1
  • /tool-page-builder Tier 1
  • /quiz-builder Tier 1
  • /content-brief-builder Tier 1
  • /page-seo-audit Tier 1
  • /keyword-research Tier 2
  • /internal-link-planner Tier 2
  • /schema-markup-generator Tier 2
  • /content-gap-analyzer Tier 2
  • /cwv-audit Tier 3
  • /conversion-audit Tier 3
  • /content-refresh Tier 3
  • /edu-financial-aid-writer Tier 4
  • /auto-quote-funnel-builder Tier 4
  • /medicare-enrollment-content Tier 4

campaignforge-app/src/lib/server/

Orchestration · SvelteKit
  • pipeline/orchestrator.ts built
  • pipeline/state.ts built
  • pipeline/validator.ts built
  • agent/executor.ts built
  • agent/session-manager.ts built
  • agent/cost-tracker.ts built
  • agent/prompts.ts built
  • integrations/meta-api.ts built
  • integrations/google-ads.ts built
  • integrations/tiktok-api.ts built
  • integrations/everflow.ts built
  • integrations/capi.ts built
  • /api/content/build (wire up) STUB
  • /api/content/articles TODO
  • /api/content/tools TODO
Data flow paths
1

Campaign generation (today, built)

Operator launches a full campaign from brief → export. Pipeline skills live in brain, UI wraps them.

Operatorapp UI/api/pipeline/execute
agent/executor.tsbrain/.claude/skills/
reads vertical research + compliance + triggers
writes verticals/<v>/campaigns/<name>/
validates with scripts/validate-stage-output.py
SSE stream back to UI for display
2

Content production (target state)

Operator requests a new article or tool. Skill lives in ContentForge, reads brain data, writes content in-repo.

Operatorapp UI/api/content/build
invokes ContentForge/.claude/skills/article-writer
skill reads brain research + triggers + compliance
writes src/content/<v>/articles/<slug>.mdx
ContentForge build runs (Astro)
deploys to Cloudflare Pages
UI shows status + preview URL
3

Schema evolution (always)

A data contract needs to change. Brain owns the schema; subscribers adapt. ADR required first.

New requirement surfacesADR drafted in brain/docs/adr/
operator approves ADR
schema edited in brain/docs/schemas/
ContentForge pins new SHA + adapts types
campaignforge-app pins new SHA + adapts types
validators updated, CI passes
CROSS-REPO.md updated
4

Vertical expansion (repeatable pattern)

Adding auto insurance, Medicare, etc. The shell grows in brain first; execution surface follows.

Identify new verticalbrain/verticals/<v>/ created
research + compliance + brand config added
trigger library extended if needed
ContentForge/src/content/<v>/ scaffolded
Tier 4 skill added: /<v>-<function>
campaigns can generate; site can publish
Vertical expansion — EDU today, every vertical after
SHIPPED
STEP 1 · BRAIN SHELL

Vertical research in brain

Create verticals/<name>/. Drop in research docs, buyer intel, compliance config, brand.json, tracking.json. This is the data that every downstream skill will consume.

EDU complete. Auto insurance + Medicare research partially ported.

NEXT
STEP 2 · CONTENT SKILLS

Tier 4 skills in ContentForge

Add ContentForge/.claude/skills/<vertical>-*/. Each skill wraps Tier 1-3 primitives with vertical-specific context loaders (which research files, which compliance rules, which triggers apply).

Starting with EDU — then repeatable per vertical.

REPEAT
STEP 3 · CAMPAIGNS + SITE

Execute across both surfaces

Campaigns generate from brain (already works — no changes needed per vertical). ContentForge deploys a new domain (autoinsurancesources.com, etc.). Everflow offer + tracking wired once. Loop closes.

Same brain, new surface. No duplication.

Team operator journey

Today — Terminal + Claude Code

OPERATOR ONLY
  • YouOpen Claude Code in campaign-forge repo
  • YouRun /orchestrator verticals/edu/campaigns/<name>
  • YouReview Stage 2 angles, approve/edit
  • YouReview Stage 3 copy after auto /copy-review
  • YouLaunch exports to Meta / Google manually
  • YouFor content: open Claude Code in ContentForge repo

Target — UI for everything

YOU + 2-3 TEAM MEMBERS
  • TeamLogs into campaignforge-app in browser
  • TeamClicks "New campaign" → fills brief form
  • TeamWatches stages stream in real time (SSE)
  • TeamReviews + approves at pause points (UI buttons)
  • TeamClicks "New article" → picks vertical + topic
  • TeamArticle auto-builds + deploys; preview URL back
  • YouOnly touch terminal for skill work + ADRs
Current state vs. target state
Surface Today Target Gap
Pipeline (brain) ✓ Stages 1-7 + Retro all shipped — 9 of 9 SKILLs deployed against v0.3.0 input layer + 7 schemas + 16 ADRs + HALT-MARKERS v1.3.0; 329/337 pytest passing Same + Stage R signal hierarchy live 5.6.1 (routing_quality_metrics populator) + 5.9.1 (build-export-package.py) deferred to post-Phase-7
Pipeline UI (app) ◆ Spine + Phase 1B scaffold (~18-22% of full plan per 2026-04-29 audit) — agent executor uses bare messages.stream, no SKILL-invocation harness; Phase 2B detail routes empty Deployed to Coolify + team access wrapping brain SKILLs Operator-deferred for MVP. ~80% rebuild needed: Agent SDK harness OR shell-out to claude --skill; Phase 2B detail routes; Coolify deploy. Post-revenue work.
ContentForge site ✓ 54 Astro pages, 10 Svelte tool islands, Lighthouse 95+ desktop, 291 parity tests, a11y 0 critical/serious. Conversion-ready MVP locally complete 2026-04-29. Same + multi-vertical subdomains + truth-layer result variants per ADR 0018 Production DNS cutover of degreesources.com operator-gated. Auto-insurance / Medicare sites = future-quarter (research partially ported).
Content skills ◐ Phase 1 Foundation CLOSED 2026-04-19 (/content + /context-refresh + edu.md + ssd.md operator-approved); Phase 2 blocked on ADR 0016 authoring Tier 1-4 skills in ContentForge/.claude/skills/ Phase 2: Core writers (article + tool + quiz + brief). Activates as ContentForge production cutover lands.
Content UI (app) ○ Routes stubbed, 501 endpoint Wired to ContentForge skills via API Operator-deferred for MVP launch (same gating as Pipeline UI rebuild).
Tracking infrastructure ◐ Code-complete (ContentForge tracking.ts + offer-routing.ts + email capture endpoint; capi-relay /events + /events/single + /postback all typechecked) Live Pixel + Everflow + Worker secrets + Zaraz auto-inject = first-dollar attribution Operator provisioning (2-3 hrs): Meta Pixel + System User token + Everflow offer + Cloudflare secrets + Zaraz dashboard. ~1 working day to first tracked dollar.
Schema subscription ◐ Docs exist in docs/schemas/, pinning manual via SHA. 7 canonical schemas at v0.3.0+ + ADR 0018 sub-schema (school_attributes) + tool_registry v0.2.0. Versioned npm/pip package Post-Phase 5 per CROSS-REPO.md. ContentForge + campaignforge-app pin SHA today; package mode triggers when consumer count crosses team-of-3 threshold.
Vertical coverage ✓ EDU live EDU + auto + Medicare + SSD + solar + more Tier 4 skills per vertical (repeatable). Auto-insurance + Medicare research partially ported. Brain shell pattern is the same; ContentForge multi-brand via CSS custom properties.
Team access ○ Operator only 2-3 team members in UI App deployed + auth + training. Activates with operator UI rebuild post-revenue.

The governing rule

Logic lives in repos. UI is orchestration only. Skills always live next to the code they operate on (pipeline skills in brain, content skills in ContentForge). The app is a dumb (but beautiful) operator surface that invokes skills via HTTP. If the app breaks, power users still ship via Claude Code. If Claude Code changes, the UI still works. Neither dependency direction inverts — no component owns another's code.

References: docs/adr/0010-content-skills-in-contentforge.md (drafted, not yet written), docs/psychology-engine/CROSS-REPO.md, docs/adr/0005-shared-schemas-in-campaign-forge.md.

CampaignForge Architecture Mind Map · v1 · 2026-04-17 · specs.fourthright.io/architecture.html