Systems3 minute read

Build a Marketing AI Operating System on GitHub

Chat history disappears. Repositories preserve context, tests, decisions, and reusable marketing workflows.

GitHub can hold more than code. For a marketing team, a repository can preserve research, brand context, briefs, scoring rules, agent instructions, and approved outputs in one reviewable system.

CXL describes the useful shift well: repository context lets tools such as Claude Code and Codex start from shared knowledge instead of asking marketers to paste the same instructions into every chat. This guide turns that idea into a small operating model.

Minimum structure

marketing-ai-system/
├── README.md
├── AGENTS.md
├── context/
├── skills/
├── agents/
├── workflows/
├── evidence/
├── outputs/
└── tests/

Each directory has one job.

  • README.md explains purpose, audience, and how to start.
  • AGENTS.md tells coding agents how to navigate and change repository.
  • context/ stores durable business knowledge.
  • skills/ contains focused instructions for repeatable tasks.
  • agents/ composes skills into goal-oriented sequences.
  • workflows/ documents triggers, inputs, approvals, and outputs.
  • evidence/ stores research packets and claim sources.
  • outputs/ holds examples worth reviewing or reusing.
  • tests/ checks structure, links, forbidden claims, and expected formats.

What belongs in context

Context should be stable enough to help many tasks:

  • Audience and buying situations
  • Positioning and product facts
  • Voice and editorial rules
  • Approved terminology
  • Claims requiring proof
  • Channel constraints
  • Legal and compliance boundaries

Do not turn context into a dump of every document. Agents perform worse when critical rules compete with stale meeting notes and duplicate messaging.

Skills stay narrow

A useful skill has one clear job, defined inputs, output contract, evaluation criteria, and stop conditions.

Example:

skills/source-verification/
├── SKILL.md
├── references/source-policy.md
└── examples/verified-claim.json

One skill can support several agents. Source verification belongs in article writing, comparison updates, trend analysis, and product profiles. Reusing it prevents four slightly different evidence standards.

Agents compose work

Agent file should describe sequence and decisions, not duplicate full prompts.

Research article agent
1. Read approved brief.
2. Build evidence map.
3. Reject unsupported angle.
4. Draft from verified evidence.
5. Run factual and editorial checks.
6. Open pull request.

Publishing remains separate. Agent prepares change; reviewer decides whether it ships.

Commits create memory

Repository history answers questions chat cannot:

  • Which claim changed?
  • Who approved new wording?
  • Which source supported it?
  • Did traffic change after update?
  • Can prior version be restored?

Small commits make that history useful. One article or workflow change per pull request works better than a weekly dump from an automated writer.

Branches support experiments

Branches let teams test a new rubric, skill, or page structure without changing current system. Compare output quality before merging. Keep benchmark inputs fixed when testing instruction changes.

Automation with GitHub Actions

GitHub Actions can run deterministic checks:

  • Validate frontmatter and schemas
  • Detect duplicate slugs and titles
  • Check internal links
  • Flag stale evidence
  • Build site
  • Compare generated indexes
  • Prevent direct agent publishing

AI judgment should not decide whether deterministic validation passed. Let normal code perform those checks.

First build sequence

  1. Write one-page scope and audience context.
  2. Convert one repeated task into a skill.
  3. Add one workflow using that skill.
  4. Save one strong example output.
  5. Add a test describing acceptable result.
  6. Run workflow several times.
  7. Improve rules based on observed failures.

System compounds when each run leaves better context, evidence, examples, or tests behind. Volume alone does not create that effect.

Sources

Evidence used in this guide

  1. CXL: GitHub for marketing AI workflows
  2. GitHub repository documentation
  3. GitHub Actions workflow concepts