Skip to content

situhacks/agentframe-marketing

Repository files navigation

AgentFrame: Marketing

AgentFrame: Marketing — a full-stack marketing workspace inside your AI coding agent

A full-stack marketing workspace inside your AI coding agent. File-native. Built for solo operators. Evolves with your workflow. Two AGENTS.md modes carry the work — CMO ships campaigns, Builder evolves the system. Plan a campaign and publish your first post in an hour, without leaving your IDE.

License Works with Status

agentframe-trailer-v0.1.mp4

Jump to: Quick start · Why · Walkthrough · Harness · Architecture · Roadmap

Table of contents

Quick start

  1. Clone the repo:

    git clone https://github.com/situhacks/agentframe-marketing.git
    cd agentframe-marketing
  2. Open the folder in your coding agent — Claude Code, Codex, Cursor, VS Code, Antigravity, anything that respects AGENTS.md.

  3. Setup. Copy .env.example to .env and drop in optional connector keys for Gemini and Composio (both have generous free tiers and are optional — the system still runs without them, you just lose Deep Research and direct publishing). If you plan to use Open Design locally, run corepack pnpm install inside system/skills/open-design/source/.

  4. Start your first campaign. Tell the agent "Start a new campaign" and run it end-to-end.

Mode swaps

AgentFrame ships with two AGENTS.md modes. You swap depending on what you're doing:

  • Swap to CMO when you're running a campaign — drafting copy, generating images, publishing, doing a retro. CMO is scoped to workspace/campaigns/ so it can't accidentally edit your templates or processes mid-campaign.
  • Swap to Builder when you're improving the system itself — editing a template, adding a process, swapping a skill, applying retro patches. Builder is scoped to system/ and library/.

You don't run shell commands by hand. Just tell the agent swap to Builder or swap to CMO. It handles the file swap and logs the transition to the audit DB.

Updating your copy

This repo keeps evolving after you clone it. To pull updates into your customized copy, swap to Builder and tell the agent "pull upstream updates". It fetches this repo, walks you through what changed commit by commit with a recommendation per change, re-applies your own template/process customizations on top where they collide, and asks before anything is written. Your personal layer — operator context, campaigns, backlog, audit history — is gitignored and never touched by a sync.

Back to top

Why this exists

I used to run my marketing campaigns out of Claude Chat. For a while I tried doing it all in chat sessions: write the post here, paste the voice rules there, ask for a rewrite, lose the thread, start over tomorrow. It works for something small, but for multi-post campaigns, things get lost and context starts to degrade. The voice rules I'd "saved" were forgotten by next session. State lived in scrollback. I spent more time retyping my instructions than I wanted.

I looked around for alternatives. What I found was prompt wrappers sitting on top of the same models I'm already paying for, and marketing repos with horrible token efficiency — one of them burned through my whole session before the first post was even done.

I didn't like what I saw. So I built my ideal system myself.

AgentFrame Marketing is a file-native marketing workspace that sits inside the coding agent I already use. Two AGENTS.md modes carry the work — CMO ships campaigns, Builder evolves the system. Campaign state lives in markdown files under workspace/campaigns/. Your voice, templates, and processes live in library/. Skills and connectors are swappable; when something sharper ships, I replace the skill and the system keeps working. See the walkthrough below for what an end-to-end campaign actually looks like.

I've been dogfooding AgentFrame for a while and it's gone through multiple major revisions. The repo evolves with my workflow, not on a release schedule. It's free to fork — take what's useful.

It stands on excellent shoulders — Composio, Gemini Deep Research and image generation, Open Design, HyperFrames, the humanizer — wired up under Recommended connectors and credited in References and lineage.

Back to top

A real campaign, step by step

A compact walkthrough using the example campaign at workspace/campaigns/example-ai-automation-pov/. One operator, six moves, no team handoffs.

01 · CMO kickoff
01 · CMO kickoff — Tell your coding agent start a new campaign. CMO reads your operator profile, scaffolds the campaign folder, and calls Composio to pull workplace context — recent emails, meeting notes, doc activity — so the campaign starts from what you actually care about that week, not a cold prompt.
02 · Gemini Deep Research
02 · Gemini Deep Research — Deep Research runs against your chosen direction and lands a structured artifact at phase-1-research/research-artifact-v{N}.md.
03 · Post copy versioning
03 · Post copy in your voice — Drafts inherit your voice system from library/context/operator/voice/ (identity, anti-patterns, a profile, and annotated example pairs), then run through the humanizer skill before lock to strip AI tells. Every revision snapshots as its own -v{N}.md file so you can roll back, compare, or read why the copy changed.
04 · Open Design handoff
04 · Media creation, your pick — Pick the path that fits the deliverable: HTML render in your coding agent for slide-shaped visuals, Gemini Nano Banana 2/Pro for raster image variants, Open Design for higher-fidelity decks and carousels, or HyperFrames for HTML-to-video. For Open Design specifically, AgentFrame stages the project for you — design language, selected mode, and first prompt already loaded. Just open it and press send. (I usually take the OD export into Figma to clean it up. Optional — most people finish inside OD and ship.)
05 · Published via Composio
05 · Published via Composio — Composio's connector to LinkedIn (or X, Instagram, TikTok) sends or schedules the post. Live URL and shipped frontmatter land back in the post folder.
06 · Retro
06 · Retro — The agent suggests patches to your voice, templates, processes, and skill behavior based on what actually happened during the run. You approve or reject each one. AgentFrame tracks the small details throughout the campaign so you don't have to remember them.

Back to top

What makes it a harness

Three systems separate AgentFrame from a folder of prompt files.

The deterministic spine

Models are strong writers and weak clerks — benchmarks have frontier models failing exact bookkeeping constraints 30–90% of the time, and my own agent skipped its lock procedure three times in one night. So campaign state transitions don't rely on the model remembering procedure: they run through system/af.py. Five buttons — lock, publish, version, new-campaign, doctor — each does its bookkeeping atomically (frontmatter, tracker, post assembly, activity trail) and prints back the judgment checklist the agent still owns: humanizer pass, voice check, reconciliation. doctor audits the books and never auto-fixes. It's plain stdlib Python, so the spine works identically in Claude Code, Cursor, Codex, or Antigravity; agent-native hooks stay optional seatbelts, never the foundation.

A voice system that generates, not corrects

Most "brand voice" setups are a rules file the agent forgets by the third draft. AgentFrame compiles your actual writing into annotated contrastive pairs — generic version, your version, and the move that separates them — grouped by register. Drafting starts from the pairs: extract three or four concrete markers first, write the content pass, then a separate style pass with those markers mandated. Anti-patterns are weighted preferences with per-piece budgets (one contrastive negation per post, not zero) rather than flat bans that flatten the writing. A humanizer pass runs last, before anything locks.

A learning loop with teeth

Every campaign closes with a harvest. Two skills read the version trails and your edit-diffs: one mines new voice pairs from what you actually changed, the other mines template and process patch candidates from how the work actually ran. You approve each patch, the library evolves, and the builder backlog plus audit DB keep the receipts. This isn't aspirational — every major feature in v1 traces back to a logged failure from a real campaign.

Back to top

At a glance

In the box: 12 deliverable templates, 15 process files, 16 skill bundles, 3 campaign flows, a two-mode persona model, a deterministic state-transition CLI, a local preview server, and a two-layer audit trail (activity.md + SQLite DB).

Everything in the library and skills layer is meant to be edited. Set voice and positioning once in library/context/operator/ (copy from operator.example/ on first run) and reuse them everywhere.

Campaign flows

Add or edit any flow under library/process/campaign-flows/ to match how you actually ship.

Flow Purpose
solo-flow (default) Lightweight campaign workflow for one operator moving fast
open-flow Build-as-you-go — the agent proposes a plan scaled to the objective (phases, deliverables, runway); the operator narrows and sets the tempo
standard-flow Heavier flow with broader deliverable coverage and more review gates — closer to an enterprise-style campaign

Deliverable templates

Edit, duplicate, or add new deliverable types under library/deliverables/.

Template Output
business-brief Business context and objective framing
research-artifact Research synthesis with sources and implications
campaign-brief Campaign-level strategy and constraints
campaign-architecture Post-by-post execution plan + the campaign's post manifest
design-language Visual and style direction
slide-copy Carousel slide-by-slide copy
body-copy Platform caption that ships with the post
post-final Per-post assembly record — locked ingredients + publish block
image-prompts Per-post generation prompts — treatment block + per-slide deltas
video-spec Video concept, scenes, and production plan
campaign-retro Campaign-level learnings and improvements
system-retro System-level process and architecture improvements

Process files

Process files load on demand — only when the workflow they describe is in play. They stay out of context until they're needed.

Process Purpose
campaign-flow-authoring How to design or evolve campaign flows
process-authoring How to design or evolve process files
video-production Video workflow from spec to renders
image-production Image generation workflow
deck-production Deck/presentation path selection (PPTX skill, PPT Master, Open Design)
preview-server When and how to use the local preview hub
lock-event Lock trigger and judgment gates — mechanics run through the af CLI
humanizer-integration Humanization pass integration
campaign-frontmatter Frontmatter schema and state handling
browser-fallback Browser automation fallback strategy
composio-notes Connector usage notes and caveats
voice-setup Build your voice system from your own writing (samples → interview → compiled profile + example pairs)
voice-mini-retro Lock-time eligibility gate that routes your edit-diffs to the voice-harvest skill
deliverable-versioning Surgical-vs-replacement judgment for *-v{N}.md deliverables — bumps run through af version
research-and-signals Shared kickoff for campaign research: workspace-context definition, live MCP scan, research-method offer

Skills

My current production stack. Swap any of them for a sharper tool without touching templates or processes.

Skill Source
agentframe-structure Project skill
deliverable-scaffolding Project skill
system-improvement Project skill
upstream-sync Project skill — pulls upstream AgentFrame updates into your customized copy, commit by commit with approval per change
voice-harvest Project skill — mines finished work and operator edit-diffs into annotated voice example pairs
deliverable-harvest Project skill — same sources, structure lens: routes template/process patch candidates out of finished campaigns
docx Project skill
pptx Project skill
humanizer Vendored from blader/humanizer
hyperframes Vendored from heygen-com/hyperframes
hyperframes-cli Vendored from heygen-com/hyperframes
gsap Vendored animation skill for HyperFrames workflows
ppt-master Vendored from hugohe3/ppt-master — designed, native-editable deck generation via SVG→PPTX; boundary notes in the skill's AGENTS.md
extract-design Thin skill over Manavarya09/design-extract's npx designlang — measures design tokens off a live reference site; distillation rules in the skill's AGENTS.md
open-design Vendored local-first runtime from nexu-io/open-design for image/deck visual production; staging and import rules in the skill's SKILL.md
browser-harness Vendored from browser-use/browser-harness for CDP-driven browser workflows via Edge; boundary notes in the skill's AGENTS.md

Everything else that ships in the box

  • Two-mode routing via AGENTS.cmo.md and AGENTS.builder.md
  • A deterministic state-transition CLI at system/af.py — lock, publish, version, new-campaign, doctor. The buttons do the bookkeeping atomically and write the paper trail; the agent keeps the judgment. Models are strong writers and weak clerks, so the clerking is code.
  • YAML frontmatter and campaign artifacts under workspace/campaigns/
  • activity.md per campaign for human-readable history, plus an append-only SQLite audit DB at system/audit/agentframe.db
  • Local preview server at system/server/ for HTML, image, video, PDF, PPTX, and DOCX previews
  • Browser harness at system/browser/ using browser-use, with documented fallbacks when a workflow needs a hand-driven Chromium session

Back to top

Five architectural principles

P1 — File-native state

Campaign state lives in markdown files: frontmatter, deliverables, activity.md. Not in a chat window. Change models, change machines, come back next week — the campaign picks up where it left off.

P2 — Token efficiency at its core

AGENTS.md is the only always-on router; flows, processes, templates, and skills load on demand. Small focused context means longer sessions, fewer tokens per campaign, and less "agent forgets what we were doing" drift.

P3 — The library is the product

Templates, processes, flows, and personas are the durable layer that improves over time. Skills and connectors are swappable — replace one when something sharper ships; the campaign system is untouched.

P4 — Two modes, one operator

CMO ships campaigns. Builder evolves the system. The split means CMO can't accidentally edit library/ mid-campaign, and Builder can't accidentally touch a locked deliverable mid-refactor.

P5 — Buttons own mechanics, prose owns judgment

State changes run through the deterministic spine and write their own paper trail (activity.md per campaign, append-only SQLite for system events). The model never hand-edits campaign state; you can always reconstruct what happened and why.

Back to top

Recommended connectors

External services AgentFrame integrates with. Recommended for the full loop, but all optional — both Gemini and Composio have generous free tiers, and the system still runs campaigns without any of them. You just lose the automation each connector provides.

Gemini Deep Research

  • Deep research artifacts at campaign start — sources, implications, audience signals — saved as structured markdown under phase-1-research/.
  • Free credits from Google AI Studio cover solo-operator usage.
  • Key: GEMINI_API_KEY.

Gemini image generation (Nano Banana 2 / Pro)

  • Fast A/B/C variants for standard illustrations (Nano Banana 2: gemini-3.1-flash-image-preview).
  • High-fidelity hero and text-in-image visuals (Nano Banana Pro: gemini-3-pro-image-preview).
  • Routed through system/server/lib/image_generate.py; per-post prompt records save as image-prompts-v{N}.md.
  • Shares the same GEMINI_API_KEY as Deep Research.

Composio

  • All-in-one MCP hub. One connection exposes 100+ tools (Gmail, Calendar, Drive, LinkedIn, X, Instagram, TikTok, etc.) instead of installing a separate MCP server for each.
  • Workplace signal collection (email, calendar, docs, notes) feeds campaign research and retros.
  • Publishing — schedule or send directly to LinkedIn, X, Instagram, TikTok, and others.
  • Analytics pullback to feed performance data into campaign retros.
  • Get started at composio.dev.

Open Design

  • Bundled local-first visual runtime at system/skills/open-design/source/.
  • Used for higher-fidelity images, carousels, decks, and template-style visual work.
  • Fresh clones may need runtime dependency setup (corepack, pnpm install, Node 24). Not a separate Open Design product install.
  • Uses a local code-agent CLI on PATH (Claude Code, Codex, Gemini CLI, etc.), or BYOK provider keys as a fallback.
  • AgentFrame stages the handoff through the OD daemon API: campaign design system, selected OD mode/skill, project creation, and the first unsent prompt.
  • Operator flow: open the prepared OD project, press Send, revise or export inside OD, then bring the locked asset back into the campaign.

.env shape

GEMINI_API_KEY=
COMPOSIO_API_KEY=
COMPOSIO_MCP_URL=https://connect.composio.dev/mcp

Your coding agent provides the LLM. These keys power the non-LLM tools (research generation, image generation, publishing).

Back to top

Architecture

Mode boundary

                                  ┌─── owns ──▶  workspace/campaigns
                  ┌──── CMO ─────┤
                  │              └─── reads ─▶  system + library
   Operator ──────┤
                  │              ┌─── owns ──▶  system + library
                  └─── Builder ──┤
                                 └─── reads ──▶  workspace/campaigns

   ── swap AGENTS.md to flip between modes ──

Load path for a task

   AGENTS.md
       │
       ▼
   campaign-flow
       │
       ▼
   process file ──────────────┐
       │                      │
       ├──▶ deliverable template
       │         │
       │         ▼
       │     campaign artifact
       │         │
       │         ▼
       │     activity.md
       │
       ├──▶ skill
       │
       └──▶ audit DB

File-memory data flow

                          ┌──▶ artifact frontmatter ──┐
                          │                           │
                          ├──▶ deliverable markdown ──┤
   Operator Input ──▶ Agent                           │
   (CMO or Builder)       ├──▶ activity.md ───────────┤
                          │                           │
                          └──▶ audit writer ──▶ audit DB
                                                      │
                                                      ▼
                                              Retro deliverables
                                                      │
                                                      ▼
                                       Template / process / skill patches
                                              (library evolves)

Architecture summary:

  • AGENTS.md is the only always-on router.

  • Everything else is loaded on demand to preserve context efficiency.

  • Campaign state and outputs live in files; system events are append-only in SQLite.

  • State transitions (lock, publish, version, scaffold) run through system/af.py — deterministic mechanics and an automatic paper trail; the model never hand-edits campaign state.

Back to top

Repository structure

agentframe-marketing/
├── AGENTS.md
├── AGENTS.cmo.md
├── AGENTS.builder.md
├── README.md
├── .env.example
├── library/
│   ├── deliverables/
│   ├── process/
│   │   └── campaign-flows/
│   └── context/operator.example/
├── system/
│   ├── af.py
│   ├── skills/
│   ├── server/
│   ├── audit/
│   ├── browser/
│   └── builder-backlog.md
└── workspace/
    └── campaigns/
        └── example-ai-automation-pov/

Back to top

Preview server

Show preview server details
  • Local preview hub at system/server/
  • Previews HTML, images, video, PDF, PPTX, and DOCX
  • Folder-tree navigation with hide rules to keep noise down
  • Run with py -3 system/server/run.py

Auditability and state

Show auditability details
  • Campaign layer: activity.md in each campaign for the human-readable timeline — state transitions through system/af.py write it automatically.
  • System layer: append-only SQLite audit DB at system/audit/agentframe.db.
  • Writer: system/audit/writer.py.
  • Books check: python system/af.py doctor <campaign> verifies schema, head pointers, and counters; it surfaces drift and never auto-fixes.
  • Useful for reconstructing what happened, timing a phase, or tracing why a template changed.

Back to top

Roadmap

  • Preview server v2: improved search, nested live reload, stronger video UX

  • Additional campaign flows beyond solo/standard/open (newsletter, short-form video series, podcast launch)

Status

The full loop runs today — kickoff, research, drafting, image/video production, publication, and retro all working end-to-end. I run real campaigns through it.

Contributing

  • PRs for templates, processes, and skills are welcome.

  • Open an issue first for major architecture changes.

References and lineage

License

MIT. See LICENSE.

Contact

Built by Brandon Situ over many weekends — and likely many more.

Back to top