Skip to content

Spec-Driven Toolkit for Marketing Operations (SDM) - Transform marketing chaos into structured, AI-driven workflows

License

Notifications You must be signed in to change notification settings

ACNet-AI/marketing-spec-kit

Repository files navigation

marketing-spec-kit

Specification Toolkit for Marketing Operations - Transform marketing chaos into structured, AI-driven workflows.

Version Python License


🌟 What is marketing-spec-kit?

A Spec-Driven Toolkit that enables marketing teams to:

βœ… Define marketing operations as structured YAML specifications
βœ… Validate plans, campaigns, and content against 45 business rules
βœ… Execute with 10 SDM workflow commands for guided specification creation
βœ… Analyze performance with AI-generated insights and optimization recommendations

v0.3.0 introduces a complete 10-command SDM (Spec-Driven Marketing) workflow system with closed-loop optimization:

Strategic Planning β†’ Campaign Design β†’ Content Creation β†’ Execution β†’ Analytics & Optimization

πŸš€ Quick Start

Installation

# Using pip
pip install marketing-spec-kit

# Using uv (recommended)
uv pip install marketing-spec-kit

Create Your First Marketing Plan

# Initialize a new specification
marketing_spec_kit init my-marketing-spec.yaml

# Validate the specification
marketing_spec_kit validate my-marketing-spec.yaml

Use SDM (Spec-Driven Marketing) Commands

New in v0.3.0: Complete 10-command workflow system with closed-loop optimization!

# Quick workflow (3 steps) - Simple campaign
/marketspec.discover "Grow user base in Q1 2025"
/marketspec.strategy
/marketspec.create
β†’ Output: marketing-spec.yaml

# Standard workflow (8 steps) - Recommended for quality
/marketspec.constitution
/marketspec.discover "Grow user base in Q1 2025"
/marketspec.clarify
/marketspec.strategy
/marketspec.checklist
/marketspec.tasks
/marketspec.analyze
/marketspec.create
β†’ Output: marketing-spec.yaml + quality reports

# Complete workflow (10 steps) - With feedback loop
# Phase 1: Specification (Core + Quality Gates)
/marketspec.constitution
/marketspec.discover "Q1 2025 Growth"
/marketspec.clarify
/marketspec.strategy
/marketspec.checklist
/marketspec.tasks
/marketspec.analyze
/marketspec.create

# Phase 2: Execution (AI Agent + MCP Tools)
# [AI Agent reads marketing-spec.yaml and executes campaign]

# Phase 3: Optimization (Feedback Loop)
/marketspec.review         # Analyze actual vs planned
/marketspec.optimize       # Generate optimization recommendations

See SDM Workflow Example for complete walkthrough!


πŸ“‹ Core Entities (9)

marketing-spec-kit v0.3.0 manages 9 marketing entities:

Entity Purpose Fields New in v0.2.0
Project Brand identity and core values 9
Product Feature offerings and positioning 8
MarketingPlan Strategic marketing plan 14 βœ…
Campaign Time-bound marketing activities 15 ✨ Updated
Channel Distribution platforms 9
Tool Integration automation 7
ContentTemplate Brand guidelines and constraints 9
Milestone Timeline markers and events 9
Analytics Performance analytics report 9 βœ…

New in v0.2.0:

  • MarketingPlan: Strategic planning with objectives, budget, KPIs
  • Analytics: AI-powered performance analysis and optimization
  • Campaign.plan_id: Now REQUIRED (links campaigns to plans)

πŸ”§ CLI Commands

Command Description
init <file> Create a new marketing specification from template
validate <file> Validate specification against 45 rules
info Show toolkit version and statistics

🎯 SDM Command System (10)

New in v0.3.0: Complete Spec-Driven Marketing workflow with closed-loop optimization!

Core Flow (5) - Essential Workflow

# Command Purpose Type Output
1 /marketspec.constitution Establish marketing principles πŸ”΄ Core marketing-constitution.md
2 /marketspec.discover Discover marketing needs πŸ”΄ Core *-discovery.md
4 /marketspec.strategy Plan marketing strategy πŸ”΄ Core *-strategy.md
6 /marketspec.tasks Break down implementation tasks πŸ”΄ Core *-tasks.md
8 /marketspec.create Generate specification YAML πŸ”΄ Core marketing-spec.yaml ⭐

Quality Gates (3) - Recommended for Quality Assurance

# Command Purpose Type Output
3 /marketspec.clarify Clarify ambiguities and details 🟑 Quality Gate *-clarification.md
5 /marketspec.checklist Validate completeness 🟑 Quality Gate *-checklist.md
7 /marketspec.analyze Check consistency 🟑 Quality Gate consistency-report.md

Extension (2) - Feedback Loop

# Command Purpose Type Output
9 /marketspec.review Analyze actual vs. planned πŸ”΅ Extension campaign-review.md
10 /marketspec.optimize Generate optimization recommendations πŸ”΅ Extension optimization-plan.md

Workflow Patterns

Quick (3 steps - Core only):

discover β†’ strategy β†’ create

Use when: Simple campaign, tight deadline

Standard (8 steps - Core + Quality Gates):

constitution β†’ discover β†’ clarify β†’ strategy β†’ 
checklist β†’ tasks β†’ analyze β†’ create

Use when: Standard project, quality matters (Recommended)

Complete (10 steps - With Feedback Loop):

constitution β†’ discover β†’ clarify β†’ strategy β†’ 
checklist β†’ tasks β†’ analyze β†’ create β†’
[AI Agent executes] β†’ review β†’ optimize

Use when: Complex campaign, continuous improvement needed


πŸ€– Spec-Driven Marketing Architecture

SDM's Role: Create and manage marketing specifications (YAML files)

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  Phase 1: Specification Creation (SDM Commands 1-8)         β”‚
β”‚  β†’ Output: marketing-spec.yaml                              β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                      ↓
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  Phase 2: Execution (AI Agent + MCP Tools)                  β”‚
β”‚  β†’ AI Agent reads specification                             β”‚
β”‚  β†’ Generates content per Campaign + ContentTemplate         β”‚
β”‚  β†’ Publishes to Channels using MCP tools/APIs               β”‚
β”‚  β†’ Tracks Analytics and collects data                       β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                      ↓
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  Phase 3: Analysis & Optimization (SDM Commands 9-10)       β”‚
β”‚  β†’ Compares planned vs. actual results                      β”‚
β”‚  β†’ Generates optimization recommendations                    β”‚
β”‚  β†’ Feeds into next cycle's planning                         β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
        ↓
    [Continuous Improvement Loop]

Key Insight: SDM defines WHAT (specification), AI Agents execute HOW (using MCP tools), SDM analyzes RESULTS (review & optimize).

Documentation


βœ… Validation Rules (45)

marketing-spec-kit enforces 45 business rules across all entities:

Entity Rules Key Validations
Project 6 Brand voice, website HTTPS, target audience
Product 5 Pricing, launch date, feature list
MarketingPlan 10 Budget balance, approval, objectives, date ranges, KPIs [NEW]
Campaign 11 Budget, dates, channels, plan linkage (REQUIRED) [UPDATED]
Channel 6 Platform, constraints, tool integration
Tool 6 Credentials, rate limits, integration
ContentTemplate 5 Brand compliance, format, examples
Milestone 5 Date validity, product/campaign links
Analytics 5 Entity reference, metrics, insights, data integrity [NEW]

Performance: Validation completes in <250ms for typical specifications.


πŸ“Š Example Specification

# my-marketing-spec.yaml
project:
  name: "AwesomeApp"
  tagline: "Ship faster with AI"
  brand_voice: "Technical"
  website: "https://awesomeapp.com"
  target_audience:
    - "Developers"
    - "DevOps Engineers"
  value_propositions:
    - "10x faster deployment"
    - "AI-powered automation"

plans:
  - id: "q4-2025-growth"
    name: "Q4 2025 Growth Plan"
    project_id: "awesomeapp"
    period:
      start_date: "2025-10-01"
      end_date: "2025-12-31"
      duration_weeks: 13
    objectives:
      - "Increase brand awareness by 50%"
      - "Drive 10,000 new signups"
      - "Achieve $100K revenue"
    budget:
      total: 5000
      currency: "USD"
      allocation:
        content_creation: 2000
        paid_promotion: 2500
        tools: 300
        contingency: 200
    kpis:
      - name: "Brand Awareness"
        target: 50000
        unit: "impressions"
        measurement: "Social media + website"
        priority: "P0"
    status: "draft"
    created_at: "2025-11-15T10:00:00Z"
    updated_at: "2025-11-15T10:00:00Z"

campaigns:
  - id: "q4-awareness-launch"
    name: "Product Launch Campaign"
    goal: "awareness"
    plan_id: "q4-2025-growth"  # REQUIRED in v0.2.0
    project_id: "awesomeapp"
    target_audience: ["Developers"]
    budget: 2000
    start_date: "2025-10-01"
    end_date: "2025-10-21"
    channels: ["twitter", "dev-to", "reddit"]
    expected_kpis:
      impressions: 30000
      engagement_rate: 0.03
    status: "draft"

See examples/ for complete examples.


πŸ—οΈ Project Structure

marketing-spec-kit/
β”œβ”€β”€ README.md                   # This file
β”œβ”€β”€ CHANGELOG.md                # Version history
β”œβ”€β”€ AGENTS.md                   # AI Agent guide (v0.3.0 SDM workflow)
β”œβ”€β”€ pyproject.toml              # Python project config
β”œβ”€β”€ LICENSE                     # MIT License
β”‚
β”œβ”€β”€ .metaspec/                  # MetaSpec commands (speckit development)
β”‚   β”œβ”€β”€ commands/               # 19 MetaSpec SDS/SDD commands
β”‚   └── README.md               # MetaSpec usage guide
β”‚
β”œβ”€β”€ memory/
β”‚   └── constitution.md         # Core principles (v0.3.0)
β”‚
β”œβ”€β”€ specs/
β”‚   β”œβ”€β”€ domain/
β”‚   β”‚   └── 001-marketing-operations-spec/
β”‚   β”‚       β”œβ”€β”€ spec.md         # Domain specification (v0.3.0)
β”‚   β”‚       β”œβ”€β”€ analysis/       # Quality analysis reports
β”‚   β”‚       β”‚   β”œβ”€β”€ full-analysis.md
β”‚   β”‚       β”‚   └── quick-analysis.md
β”‚   β”‚       └── checklists/     # Quality checklists
β”‚   β”‚           └── comprehensive-quality.md
β”‚   └── toolkit/
β”‚       └── 001-marketing-spec-kit-implementation/
β”‚           β”œβ”€β”€ spec.md         # Toolkit specification (v0.3.0)
β”‚           β”œβ”€β”€ plan.md         # Implementation plan
β”‚           β”œβ”€β”€ tasks.md        # Task breakdown
β”‚           β”œβ”€β”€ analysis/       # Quality analysis reports
β”‚           └── checklists/     # Quality checklists
β”‚
β”œβ”€β”€ examples/
β”‚   β”œβ”€β”€ complete-example.yaml           # Complete v0.3.0 example
β”‚   β”œβ”€β”€ metaspec-marketing.yaml         # MetaSpec format example
β”‚   β”œβ”€β”€ metaspec-marketing-plan.md      # Plan documentation
β”‚   └── sdm-workflow-example.md         # SDM workflow walkthrough
β”‚
β”œβ”€β”€ templates/
β”‚   β”œβ”€β”€ entity_templates/       # Init templates (minimal/default/full)
β”‚   └── sdm/
β”‚       β”œβ”€β”€ README.md           # SDM system documentation
β”‚       └── commands/           # 10 SDM workflow commands
β”‚
β”œβ”€β”€ docs/
β”‚   └── internal/               # Internal documentation (gitignored)
β”‚       └── architecture-decisions-2025-11-16.md
β”‚
└── src/marketing_spec_kit/
    β”œβ”€β”€ __init__.py             # Package exports (v0.3.0)
    β”œβ”€β”€ models.py               # 9 entities + 11 nested models
    β”œβ”€β”€ parser.py               # YAML/JSON parser
    β”œβ”€β”€ validator.py            # 45 validation rules
    β”œβ”€β”€ cli.py                  # CLI commands (init, validate, info)
    └── exceptions.py           # Custom exceptions

πŸ“š Documentation


🀝 Contributing

This project follows Spec-Driven Development using MetaSpec:

  1. Specify First: Define changes in specs/ before coding
  2. Validate Early: Run validation before implementation
  3. Document Changes: Use Evolution Proposals for breaking changes
  4. Test Thoroughly: Validate against all 45 rules

See .metaspec/README.md for development guide.


πŸ” Use Cases

For Marketing Teams

  • βœ… Standardize marketing operations across campaigns
  • βœ… Ensure brand consistency with validated templates
  • βœ… Track performance with built-in analytics

For AI Agents

  • βœ… Structured access to marketing context via 22 Slash Commands
  • βœ… Generate on-brand content with brand guidelines
  • βœ… Automate campaign execution and scheduling

For Developers

  • βœ… Integrate marketing data into apps via validated specs
  • βœ… Build marketing automation tools on top of spec-kit
  • βœ… Extend with custom entities and validation rules

πŸ“ License

MIT License - see LICENSE for details.


πŸ™ Acknowledgments

Built with:


Generated by: MetaSpec 0.6.2
Version: 2.0.0
Release Date: 2025-11-15

For questions or issues, please open an issue.

About

Spec-Driven Toolkit for Marketing Operations (SDM) - Transform marketing chaos into structured, AI-driven workflows

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published