Specification Toolkit for Marketing Operations - Transform marketing chaos into structured, AI-driven workflows.
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
# Using pip
pip install marketing-spec-kit
# Using uv (recommended)
uv pip install marketing-spec-kit# Initialize a new specification
marketing_spec_kit init my-marketing-spec.yaml
# Validate the specification
marketing_spec_kit validate my-marketing-spec.yamlNew 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 recommendationsSee SDM Workflow Example for complete walkthrough!
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)
| Command | Description |
|---|---|
init <file> |
Create a new marketing specification from template |
validate <file> |
Validate specification against 45 rules |
info |
Show toolkit version and statistics |
New in v0.3.0: Complete Spec-Driven Marketing workflow with closed-loop optimization!
| # | 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 β |
| # | 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 |
| # | 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 |
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
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).
- π SDM Layer Overview
- π Complete Workflow Example
- ποΈ Architecture Decisions
- β Implementation Report
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.
# 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.
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
- AGENTS.md - Complete AI Agent workflow guide
- CHANGELOG.md - Version history and changes
- memory/constitution.md - Core principles (v1.3.0)
- specs/domain/ - Domain specification (v0.3.0)
- changes/ - Evolution proposals
This project follows Spec-Driven Development using MetaSpec:
- Specify First: Define changes in
specs/before coding - Validate Early: Run validation before implementation
- Document Changes: Use Evolution Proposals for breaking changes
- Test Thoroughly: Validate against all 45 rules
See .metaspec/README.md for development guide.
- β Standardize marketing operations across campaigns
- β Ensure brand consistency with validated templates
- β Track performance with built-in analytics
- β Structured access to marketing context via 22 Slash Commands
- β Generate on-brand content with brand guidelines
- β Automate campaign execution and scheduling
- β Integrate marketing data into apps via validated specs
- β Build marketing automation tools on top of spec-kit
- β Extend with custom entities and validation rules
MIT License - see LICENSE for details.
Built with:
- MetaSpec - Spec-Driven Development framework
- Pydantic - Data validation
- Typer - CLI framework
- Rich - Terminal formatting
Generated by: MetaSpec 0.6.2
Version: 2.0.0
Release Date: 2025-11-15
For questions or issues, please open an issue.