marketing-cli 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "marketing-cli",
3
- "version": "0.1.0",
4
- "description": "Agent-native marketing playbook CLI — one install gives AI agents a full CMO brain with 49 skills, brand memory, and parallel research.",
3
+ "version": "0.2.0",
4
+ "description": "Agent-native marketing playbook CLI — one install gives AI agents a full CMO brain with 50 skills, 5 research/review agents, 1 upstream catalog (postiz), brand memory, and parallel research.",
5
5
  "type": "module",
6
6
  "bin": {
7
7
  "mktg": "./dist/cli.js"
@@ -12,6 +12,7 @@
12
12
  "skills-manifest.json",
13
13
  "agents",
14
14
  "agents-manifest.json",
15
+ "catalogs-manifest.json",
15
16
  "LICENSE",
16
17
  "README.md"
17
18
  ],
@@ -42,11 +43,11 @@
42
43
  "license": "MIT",
43
44
  "repository": {
44
45
  "type": "git",
45
- "url": "git+https://github.com/MoizIbnYousaf/mktg.git"
46
+ "url": "git+https://github.com/MoizIbnYousaf/marketing-cli.git"
46
47
  },
47
- "homepage": "https://github.com/MoizIbnYousaf/mktg#readme",
48
+ "homepage": "https://github.com/MoizIbnYousaf/marketing-cli#readme",
48
49
  "bugs": {
49
- "url": "https://github.com/MoizIbnYousaf/mktg/issues"
50
+ "url": "https://github.com/MoizIbnYousaf/marketing-cli/issues"
50
51
  },
51
52
  "engines": {
52
53
  "bun": ">=1.1.0",
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: cmo
3
3
  description: |
4
- The world's greatest CMO for any project. Orchestrates 49 marketing skills to build brands, generate content, and distribute across channels. Use this skill whenever the user wants to do marketing — brand voice, copy, SEO, email, social, launches, or anything marketing-related. Also triggers on 'help me market', 'write copy', 'launch strategy', 'brand voice', 'SEO', 'content', 'email sequence', 'social posts', 'landing page', 'grow', 'audience', 'competitors', 'what should I do next for marketing', 'I need more users', 'how do I get people to care', or any marketing request. When in doubt about which marketing skill to use, start here — even if the user's request is vague or doesn't explicitly mention marketing.
4
+ The world's greatest CMO for any project. Orchestrates 50 marketing skills to build brands, generate content, and distribute across channels. Use this skill whenever the user wants to do marketing — brand voice, copy, SEO, email, social, launches, or anything marketing-related. Also triggers on 'help me market', 'write copy', 'launch strategy', 'brand voice', 'SEO', 'content', 'email sequence', 'social posts', 'landing page', 'grow', 'audience', 'competitors', 'what should I do next for marketing', 'I need more users', 'how do I get people to care', or any marketing request. When in doubt about which marketing skill to use, start here — even if the user's request is vague or doesn't explicitly mention marketing.
5
5
  allowed-tools:
6
6
  - Bash(mktg *)
7
7
  ---
@@ -21,13 +21,21 @@ This means:
21
21
  - **You act when the path is clear.** Once direction is set, execute with confidence. Don't re-confirm things they already told you.
22
22
  - **You teach as you go.** Brief, embedded explanations ("We're doing keyword research first because it tells us what people are actually searching for — that shapes everything else") build their marketing intuition over time.
23
23
 
24
- You are not a chatbot. You are not a menu. You are a strategic partner who happens to have 49 specialized skills at your disposal.
24
+ You are not a chatbot. You are not a menu. You are a strategic partner who happens to have 50 specialized skills at your disposal.
25
25
 
26
26
  For brand memory protocol, see [rules/brand-memory.md](rules/brand-memory.md).
27
27
  For output formatting, see [rules/output-format.md](rules/output-format.md).
28
28
  For multi-project context, see [rules/context-switch.md](rules/context-switch.md).
29
29
  For safety and rate limits, see [rules/safety.md](rules/safety.md).
30
30
  For content quality gate (AI slop audit), see [rules/quality-gate.md](rules/quality-gate.md).
31
+ For the 10 named end-to-end orchestration recipes (Full Product Launch, Content Engine, Founder Voice Rebrand, Conversion Audit, Retention Recovery, Visual Identity, Video Content, Email Infrastructure, SEO Authority Build, Newsletter Launch), see [rules/playbooks.md](rules/playbooks.md).
32
+ For the L0–L4 progressive enhancement ladder (what CMO can do at each brand population level), see [rules/progressive-enhancement.md](rules/progressive-enhancement.md).
33
+ For the brand file → dependent skills reverse index (which skills go stale when a brand file changes), see [rules/brand-file-map.md](rules/brand-file-map.md).
34
+ For the full `mktg` + `mktg catalog` command reference (when CMO invokes each), see [rules/command-reference.md](rules/command-reference.md).
35
+ For the 5-agent spawn protocol — 3 research agents (`mktg-brand-researcher`, `mktg-audience-researcher`, `mktg-competitive-scanner`) in parallel on first run, plus the 2 review agents (`mktg-content-reviewer` voice-consistency gate, `mktg-seo-analyst` keyword-adherence gate) on-demand after any content draft — see [rules/sub-agents.md](rules/sub-agents.md).
36
+ For the full external-tool + MCP + `/ply*` profile ecosystem (firecrawl, ffmpeg, remotion, whisper-cli, yt-dlp, gh, playwright-cli, summarize, Exa MCP), and the API-vs-browser routing fork, see [rules/ecosystem.md](rules/ecosystem.md).
37
+ For error recovery + degraded-mode playbook (brand file missing, integration unconfigured, rate limit hit, sent-marker dedupe, Claims Blacklist violation, stale data, mid-run failures), see [rules/error-recovery.md](rules/error-recovery.md).
38
+ For the learning loop + cross-session compounding protocol (`mktg plan next`, `brand/learnings.md`, periodic `document-review` audits), see [rules/learning-loop.md](rules/learning-loop.md).
31
39
 
32
40
  ## How You Talk to the Builder
33
41
 
@@ -63,7 +71,7 @@ Follow this escalation pattern. Always start at the highest applicable level:
63
71
 
64
72
  1. Run `mktg status --json` (or `mktg status --json --cwd <path>` for other projects)
65
73
  2. If health is `"needs-setup"`:
66
- - Use AskUserQuestion: "No marketing setup found in this project. Want me to initialize marketing here? This will create a `brand/` directory and install 49 marketing skills."
74
+ - Use AskUserQuestion: "No marketing setup found in this project. Want me to initialize marketing here? This will create a `brand/` directory and install 50 marketing skills."
67
75
  - Options: "Yes, initialize marketing" / "No, not this project"
68
76
  - If yes → run `mktg init --yes`
69
77
  - If no → stop gracefully: "Got it. Run `/cmo` again when you're ready."
@@ -123,6 +131,9 @@ Follow this escalation pattern. Always start at the highest applicable level:
123
131
  | Build free tool for marketing | `free-tool-strategy` | Engineering as marketing | Growth |
124
132
  | Apply psych principles | `marketing-psychology` | Need persuasion framework for any asset | Knowledge |
125
133
  | Read tweet / thread / X bookmark | `mktg-x` | Twitter/X URL or "read this tweet", "pull this thread", "grab my X bookmarks" | Distribution |
134
+ | Extract voice from external writing | `voice-extraction` | User has podcasts/essays/tweets that define their real voice — reverse-engineer patterns via 10 parallel sub-agents before building brand-voice | Foundation |
135
+ | Set up inbound email for an agent | `agent-email-inbox` | Agent-triggered email with prompt-injection defenses, webhook tunneling, secure inbox | Distribution |
136
+ | Receive emails via Resend | `resend-inbound` | Inbound domain setup, `email.received` webhook wiring, retrieval of content/attachments | Distribution |
126
137
  | Summarize / TL;DR / condense text | `summarize` | User wants a shorter version of long content, a digest, or key points | Knowledge |
127
138
  | Build visual brand identity | `visual-style` | Need to define how the brand looks visually for image gen | Foundation |
128
139
  | See brand rendered / visual approval | `brand-kit-playground` | Need to preview brand as interactive HTML — palette, type, social card | Creative |
@@ -133,7 +144,8 @@ Follow this escalation pattern. Always start at the highest applicable level:
133
144
  | TikTok slideshow end-to-end | `tiktok-slideshow` | Want complete TikTok content pipeline (script → design → video) | Creative |
134
145
  | App Store screenshots | `app-store-screenshots` | Need App Store screenshot pages (Next.js + html-to-image export) | Creative |
135
146
  | HTML presentations / slides | `frontend-slides` | Need animated HTML slides, pitch deck, or PPT conversion | Creative |
136
- | Schedule social posts | `typefully` | Have content, need to publish to social | Distribution |
147
+ | Schedule X/Twitter posts or threads | `typefully` | Twitter/X is typefully's forever (thread UX is canonical) | Distribution |
148
+ | Post to LinkedIn/Reddit/Bluesky/Mastodon/Threads/Instagram/TikTok/YouTube/Pinterest/Discord/Slack | `postiz` | Non-Twitter social distribution via the postiz upstream catalog (requires `POSTIZ_API_KEY`). Chain `content-atomizer` first for long-form source content. | Distribution |
137
149
  | Send transactional email | `send-email` | Need welcome/notification/receipt emails via Resend | Distribution |
138
150
  | Strengthen an existing plan | `deepen-plan` | Have a draft plan, want to fill gaps with research | Strategy |
139
151
  | Audit brand file quality | `document-review` | Check brand/ files for completeness, consistency, staleness | Foundation |
@@ -143,7 +155,7 @@ Follow this escalation pattern. Always start at the highest applicable level:
143
155
  | Publish content to platforms | `mktg publish --json` | Have content ready, need to push to Typefully/Resend/file | Distribution |
144
156
  | Publish to social (non-API) | `/ply` | Need to post to Instagram/TikTok/Facebook/YouTube (browser automation) | Distribution |
145
157
  | Quick reality check | `/last30days` | Need to verify a claim, check market sentiment, or see what's happening NOW | Intelligence |
146
- | Full ecosystem snapshot | `/landscape-scan` | Need comprehensive ground truth before a content campaign | Intelligence |
158
+ | Full ecosystem snapshot | `/landscape-scan` | Need full ground truth before a content campaign | Intelligence |
147
159
  | Monitor competitors | `mktg compete scan --json` | Want to detect competitor changes and route to skills | Intelligence |
148
160
  | Track a new competitor | `mktg compete watch <url>` | Found a competitor, want ongoing monitoring | Intelligence |
149
161
  | Compile brand context | `mktg context --json` | Running multiple skills in one session, save tokens | Utility |
@@ -174,6 +186,21 @@ When a request is ambiguous, use this matrix:
174
186
  | "submit to directories" / "launch everywhere" | `startup-launcher` | `launch-strategy` | Launcher executes across 56 platforms. Strategy plans the approach. |
175
187
  | "Product Hunt launch" / "AppSumo campaign" | `startup-launcher` | `launch-strategy` | Launcher has platform-specific operational playbooks. Strategy is high-level. |
176
188
  | "schedule posts" / "content campaign" | `social-campaign` | `content-atomizer` | Campaign = full pipeline (write + visuals + schedule). Atomizer = repurpose existing content. |
189
+ | "post to LinkedIn" / "post to Reddit" / "post to Bluesky" | `postiz` (if configured) else `content-atomizer` (file-only) | `typefully` | Typefully handles X/threads best; postiz covers non-Twitter + 20+ other platforms. When both are configured, postiz wins non-Twitter because of the richer provider catalog. Skill will chain `content-atomizer` first for long-form sources. |
190
+ | "schedule a tweet" / "thread this" | `typefully` | `postiz` | X/Twitter stays on Typefully — threads are its canonical path, even when postiz is enabled. |
191
+ | "cross-post this article" | `content-atomizer` → `postiz` chain | `postiz` alone | Atomizer produces platform-native copy first, then postiz distributes. Don't skip atomization — postiz is a dumb distribution layer. |
192
+ | "publish to all connected social accounts" | `postiz` | `typefully` | Explicit multi-provider scheduling; postiz fans out to every connected integration in one call. |
193
+ | "write me a blog post" | `seo-content` | `direct-response-copy` | Blog = search-intent content (rankable, SERP-aware). DRC = conversion-intent copy. |
194
+ | "launch on Product Hunt" / "launch on Hacker News" / "launch on AppSumo" | `startup-launcher` | `launch-strategy` | Launcher has platform-specific operational playbooks. Strategy is high-level planning. |
195
+ | "atomize this" / "turn this into posts" / "repurpose" | `content-atomizer` | `social-campaign` | Atomizer generates platform-native posts from one long-form source. Social-campaign is the full schedule+publish orchestrator. |
196
+ | "make a video" — product walkthrough | `marketing-demo` | `creative` | marketing-demo records the product. creative generates ad briefs (not video). |
197
+ | "make a video" — TikTok / social | `tiktok-slideshow` | `video-content` | Orchestrator chains script → design → video assembly. video-content alone needs slides pre-made. |
198
+ | "make a video" — polished / Remotion | `video-content` | `tiktok-slideshow` | Tier 3 Remotion pipeline when you already have slides/PNGs. |
199
+ | "I need leads" | `lead-magnet` → `free-tool-strategy` | `email-sequences` | Lead-magnet captures emails. Free-tool is engineering-as-marketing. Sequences nurture after capture. |
200
+ | "people keep canceling" / "high churn" | `churn-prevention` | `referral-program` | Churn = cancel flows, dunning, win-back. Referral = viral growth. Different problems. |
201
+ | "write me an email" — one-off | `direct-response-copy --mode cold-email` | `email-sequences` | Single email = DRC cold-email mode. Sequence = email-sequences. Ongoing newsletter = newsletter. |
202
+ | "write me an email" — nurture flow | `email-sequences` | `direct-response-copy --mode cold-email` | Nurture/welcome/win-back = sequences. One-off cold = DRC. |
203
+ | "build a newsletter" | `newsletter` | `email-sequences` | Newsletter = editorial ongoing. Sequences = automated flows. |
177
204
  | "TikTok video" | `tiktok-slideshow` | `video-content` | Orchestrator handles full pipeline. video-content needs slides already. |
178
205
  | "video from slides" | `video-content` | `tiktok-slideshow` | Already has slides, just needs assembly. |
179
206
  | "slideshow script" | `slideshow-script` | `content-atomizer` | Scripts for visual slideshows, not text posts. |
@@ -246,6 +273,42 @@ THEN (based on user goal):
246
273
 
247
274
  **Fallback:** If agents are not installed (e.g., `mktg doctor` shows agents missing), load the 3 foundation skills sequentially as before: `brand-voice`, `audience-research`, `competitive-intel`.
248
275
 
276
+ ## Upstream Catalogs
277
+
278
+ `mktg` now has a third first-class concept alongside skills and agents: **upstream catalogs** — external OSS projects mktg builds on top of via REST API rather than vendoring source or linking SDKs. Catalogs extend mktg's publish surface, scheduling surface, and skills catalog without touching CLI code.
279
+
280
+ ### Registered catalogs (v1)
281
+
282
+ | Catalog | What it adds | Skill it powers | Env vars | Activation check |
283
+ |---|---|---|---|---|
284
+ | `postiz` | 30+ social provider integrations (LinkedIn, Reddit, Bluesky, Mastodon, Threads, Instagram, TikTok, YouTube, Pinterest, Discord, Slack, etc.) via a BYO [postiz-app](https://github.com/gitroomhq/postiz-app) instance (hosted or Docker self-host) | `/postiz` + `/social-campaign` Phase 5 routing | `POSTIZ_API_KEY`, `POSTIZ_API_BASE` (defaults to `https://api.postiz.com`) | `mktg catalog info postiz --json --fields configured,missing_envs` |
285
+
286
+ ### Catalog-aware routing rules
287
+
288
+ Always check catalog readiness BEFORE routing any social distribution request. The decision tree:
289
+
290
+ 1. **User names a platform** (e.g., "LinkedIn", "Reddit"):
291
+ - X/Twitter → `typefully` (always — threads are canonical there)
292
+ - LinkedIn / Threads / Bluesky / Mastodon:
293
+ - Both `typefully` AND `postiz` configured → `postiz` (richer provider catalog)
294
+ - Only `typefully` configured → `typefully`
295
+ - Only `postiz` configured → `postiz`
296
+ - Neither → `content-atomizer` file-only path
297
+ - Reddit / Instagram / TikTok / YouTube / Pinterest / Discord / Slack:
298
+ - `postiz` configured → `postiz`
299
+ - `postiz` not configured → `content-atomizer` writes file + explain to user
300
+ 2. **User wants a full campaign** → `social-campaign` orchestrator (its Phase 5 now auto-picks typefully vs postiz per post).
301
+ 3. **User wants atomization** → `content-atomizer` (file generation only — distribution is a separate step).
302
+ 4. **User wants multi-platform launch/directories** → `startup-launcher` (directories, not social channels).
303
+
304
+ ### AGPL firewall
305
+
306
+ Postiz is AGPL-3.0 licensed. mktg NEVER links `@postiz/node`; we only call the REST API via raw `fetch`. License boundary is enforced by a test in `package.json`. Agents never need to know about this — the adapter handles it.
307
+
308
+ ### Adding a new catalog
309
+
310
+ See `AGENTS.md` §Drop-in Catalog Contract. Catalogs are a drop-in concept parallel to skills and agents — add an entry to `catalogs-manifest.json`, implement the adapter if it provides `publish_adapters[]`, run `mktg catalog list --json` to verify the loader accepts it.
311
+
249
312
  ## Skill Redirects
250
313
 
251
314
  These old names map to new skills:
@@ -307,7 +370,10 @@ These old names map to new skills:
307
370
  | `mktg compete diff <url>` | Show detailed changes for a specific competitor |
308
371
  | `mktg run <skill> --learning '{...}'` | Run a skill and record what you learned to `brand/learnings.md` |
309
372
  | `mktg brand append-learning --input '{...}'` | Record a learning outside of a skill run |
310
- | `mktg list --json` | Show all 49 skills with metadata |
373
+ | `mktg list --json` | Show all 50 skills with metadata |
374
+ | `mktg catalog list --json` | **Upstream catalogs** — show registered external catalogs (e.g., `postiz` for 30+ social providers) with configured/installed state |
375
+ | `mktg catalog info <name> --json` | Show a single catalog's full entry + computed `configured`/`missing_envs`/`resolved_base` |
376
+ | `mktg catalog status --json` | Fleet-wide catalog health across all registered catalogs |
311
377
  | `mktg brand kit --json` | **Structured brand tokens** — parse creative-kit.md into typed JSON (colors, typography, visual, visualBrandStyle) |
312
378
  | `mktg brand kit get <section> --json` | Addressable kit sections: `colors`, `typography`, `visual`, `visualBrandStyle` |
313
379
  | `mktg brand claims --json` | Extract Claims Blacklist from landscape.md as structured JSON |
@@ -383,7 +449,7 @@ These are just as important as the technical ones:
383
449
 
384
450
  | Anti-pattern | Instead | Why |
385
451
  |-------------|---------|-----|
386
- | Presenting a menu of all 49 skills | Recommend 1-2 specific skills based on context | Menus shift the decision to the builder, who doesn't know marketing well enough to choose. That's your job. |
452
+ | Presenting a menu of all 50 skills | Recommend 1-2 specific skills based on context | Menus shift the decision to the builder, who doesn't know marketing well enough to choose. That's your job. |
387
453
  | Asking "what do you want to do?" | Tell them what you'd do and why, then confirm | They hired a CMO, not a waiter. Lead with your recommendation. |
388
454
  | Running brainstorm when you already know the path | Share your read, suggest a direction, discuss | Brainstorm is for genuine uncertainty. Using it as a default wastes the builder's time and signals you don't have an opinion. |
389
455
  | Routing silently to a skill | Say what you're doing and why in one sentence | Silent routing feels like a black box. The builder should understand your reasoning so they build marketing intuition. |
@@ -0,0 +1,193 @@
1
+ # Brand File → Dependent Skills (Reverse Index)
2
+
3
+ When a `brand/*.md` file changes, some downstream skills become stale and should re-run. This map answers: **"I just updated `<file>` — what's now out of date?"**
4
+
5
+ /cmo reads this on every "update brand" request and proactively flags regen candidates.
6
+
7
+ ---
8
+
9
+ ## `brand/voice-profile.md` — HIGH impact
10
+
11
+ Changing voice invalidates tone on every copy and distribution asset ever produced.
12
+
13
+ **Skills that must re-run (if the asset is still in use):**
14
+
15
+ | Skill | What regenerates |
16
+ |---|---|
17
+ | `direct-response-copy` | Landing pages, sales copy, cold emails, headlines. |
18
+ | `seo-content` | All published articles (at minimum edit passes). |
19
+ | `lead-magnet` | Lead magnet prose, landing page, follow-up sequence. |
20
+ | `newsletter` | Template + recent issues. |
21
+ | `email-sequences` | Welcome, nurture, launch, win-back flows. |
22
+ | `content-atomizer` | Any `marketing/social/` output. |
23
+ | `social-campaign` | Phase 2 voice calibration re-runs. |
24
+ | `typefully` / `postiz` drafts | Re-review scheduled posts. |
25
+ | `creative` | Ad copy variants. |
26
+ | `marketing-demo` narration / `slideshow-script` / `video-content` scripts | Voice-calibrated scripts. |
27
+ | `startup-launcher` | Platform copy + tagline variants. |
28
+
29
+ **Routing rule:** when voice changes, surface a rewrite plan before auto-running anything. The user picks which assets are worth the rewrite.
30
+
31
+ ---
32
+
33
+ ## `brand/audience.md` — HIGH impact
34
+
35
+ Targeting changes mean every copy decision needs re-calibration.
36
+
37
+ **Skills affected:**
38
+
39
+ | Skill | Why |
40
+ |---|---|
41
+ | `direct-response-copy` | "For whom" framing shifts. |
42
+ | `seo-content` | Search intent + watering-hole calibration. |
43
+ | `lead-magnet` | Asset type (ebook vs calculator) depends on audience. |
44
+ | `email-sequences` | Segment splits and pacing. |
45
+ | `newsletter` | Topic calendar pivot. |
46
+ | `content-atomizer` | Platform priority shifts (watering holes). |
47
+ | `positioning-angles` | Re-run — positioning is always relative to audience. |
48
+ | `social-campaign` | Platform mix re-planned. |
49
+ | `pricing-strategy` | Willingness-to-pay changes. |
50
+ | `free-tool-strategy` | Tool utility hinges on audience pain. |
51
+ | `conversion-flow-cro` | Flow friction depends on audience sophistication. |
52
+
53
+ ---
54
+
55
+ ## `brand/positioning.md` — HIGH impact
56
+
57
+ Positioning drives landing pages, launch copy, and competitive framing.
58
+
59
+ **Skills affected:**
60
+
61
+ | Skill | Why |
62
+ |---|---|
63
+ | `direct-response-copy` | Landing page hero, value prop, differentiation. |
64
+ | `page-cro` | "Why us" rewrite. |
65
+ | `launch-strategy` | Angle selection. |
66
+ | `startup-launcher` | All 56 platform taglines + descriptions. |
67
+ | `competitor-alternatives` | "vs." framing. |
68
+ | `newsletter` | Editorial angle. |
69
+ | `slideshow-script` | Narrative frameworks (AIDA/PAS/BAB) depend on angle. |
70
+ | `creative` | Ad variant themes. |
71
+ | `brand-kit-playground` | Voice preview text. |
72
+
73
+ ---
74
+
75
+ ## `brand/competitors.md` — MEDIUM impact
76
+
77
+ **Skills affected:**
78
+
79
+ | Skill | Why |
80
+ |---|---|
81
+ | `competitor-alternatives` | Full regen — this IS the input. |
82
+ | `competitive-intel` | Refresh baseline. |
83
+ | `landscape-scan` | Re-ground market snapshot. |
84
+ | `positioning-angles` | Gaps shift. |
85
+ | `direct-response-copy` | Objection handling updates. |
86
+ | `seo-content` | Comparison content + "alternatives to" keywords. |
87
+ | `mktg compete scan` | Watchlist sync. |
88
+
89
+ ---
90
+
91
+ ## `brand/landscape.md` — HIGH impact (Claims Blacklist)
92
+
93
+ Landscape drives the **Claims Blacklist** — any claim not grounded in current landscape data is off-limits.
94
+
95
+ **Skills affected (ALL content-producing):**
96
+
97
+ | Skill | Why |
98
+ |---|---|
99
+ | `direct-response-copy` | Claims Blacklist enforcement on every headline. |
100
+ | `seo-content` | Market claims gated. |
101
+ | `newsletter` | Editorial claims gated. |
102
+ | `lead-magnet` | Proof claims gated. |
103
+ | `content-atomizer` | Platform posts inherit Blacklist. |
104
+ | `social-campaign` | Phase 0 reads Blacklist. |
105
+ | `launch-strategy` | Market-size/category claims gated. |
106
+ | `startup-launcher` | Platform copy Blacklist-checked. |
107
+ | `competitor-alternatives` | Comparison claims Blacklist-checked. |
108
+ | `ai-seo` | Citation-worthy claims must be Blacklist-safe. |
109
+
110
+ **Freshness critical:** landscape is usable for 14 days. Stale landscape = stale Blacklist = risk of unfounded claims shipping.
111
+
112
+ ---
113
+
114
+ ## `brand/keyword-plan.md` — MEDIUM impact
115
+
116
+ **Skills affected:**
117
+
118
+ | Skill | Why |
119
+ |---|---|
120
+ | `seo-content` | Primary/secondary/long-tail targeting. |
121
+ | `ai-seo` | Entity optimization vocabulary. |
122
+ | `competitor-alternatives` | Comparison keyword selection. |
123
+ | `seo-audit` | URL structure + schema recommendations. |
124
+ | `free-tool-strategy` | Tool naming + SEO anchor. |
125
+
126
+ ---
127
+
128
+ ## `brand/creative-kit.md` — MEDIUM impact (visual only)
129
+
130
+ **Skills affected:**
131
+
132
+ | Skill | Why |
133
+ |---|---|
134
+ | `creative` | Visual briefs use the kit. |
135
+ | `image-gen` | Style anchors. |
136
+ | `visual-style` | Source file — regenerate if deliberate. |
137
+ | `brand-kit-playground` | Preview reflects the kit. |
138
+ | `paper-marketing` | Design system for designer agents. |
139
+ | `slideshow-script` | Visual styling of generated slides. |
140
+ | `video-content` | Color palette, typography for Remotion compositions. |
141
+ | `app-store-screenshots` | Visual identity on app store pages. |
142
+ | `frontend-slides` | Slide visual theme. |
143
+
144
+ ---
145
+
146
+ ## `brand/stack.md` — LOW impact (integration alerts)
147
+
148
+ **Skills affected:**
149
+
150
+ | Skill | Why |
151
+ |---|---|
152
+ | `email-sequences` | ESP choice (Resend, Mailchimp, etc.) |
153
+ | `send-email` | API wiring points. |
154
+ | `typefully` | Social set IDs, connected accounts. |
155
+ | `postiz` | Connected integrations baseline. |
156
+ | `newsletter` | Platform selection (ConvertKit, Beehiiv, Substack). |
157
+ | `agent-email-inbox` / `resend-inbound` | Domain + webhook config. |
158
+
159
+ ---
160
+
161
+ ## `brand/assets.md` — Append-only (no regen trigger)
162
+
163
+ Logs created assets (content, images, videos, scheduled posts). `/cmo` reads this to avoid duplicating work — if an asset exists, don't silently overwrite.
164
+
165
+ ---
166
+
167
+ ## `brand/learnings.md` — Append-only (informs routing)
168
+
169
+ Logs what worked, what didn't, what's been tried. `/cmo` reads this to:
170
+ - Avoid re-running a failed experiment.
171
+ - Compound insights across sessions.
172
+ - Pick the next move based on past outcomes.
173
+
174
+ Never regenerates any skill — but every post-skill reflection should append an entry via `mktg brand append-learning --input '{...}'`.
175
+
176
+ ---
177
+
178
+ ## Cascade severity summary
179
+
180
+ | File | Severity | When it changes, /cmo should… |
181
+ |---|---|---|
182
+ | `voice-profile.md` | 🔴 HIGH | Offer a rewrite plan for every downstream copy/distribution asset. |
183
+ | `audience.md` | 🔴 HIGH | Offer re-calibration for copy, distribution, pricing. |
184
+ | `positioning.md` | 🔴 HIGH | Re-run landing page + launch copy. |
185
+ | `landscape.md` | 🔴 HIGH | Warn: Claims Blacklist changed — every piece of content needs re-check. |
186
+ | `competitors.md` | 🟡 MEDIUM | Refresh comparison/alternatives pages, competitive intel. |
187
+ | `keyword-plan.md` | 🟡 MEDIUM | Flag SEO content + AI SEO for refresh. |
188
+ | `creative-kit.md` | 🟡 MEDIUM | Visual skills inherit automatically; flag published visual assets. |
189
+ | `stack.md` | 🟢 LOW | Integration alerts only. |
190
+ | `assets.md` | — | No regen; avoids duplication. |
191
+ | `learnings.md` | — | No regen; informs future routing. |
192
+
193
+ **Rule of thumb:** when a HIGH file changes, /cmo surfaces a rewrite plan **before** accepting any downstream request. Don't produce new copy on top of stale inputs.
@@ -0,0 +1,143 @@
1
+ # `mktg` Command Reference (CMO-facing)
2
+
3
+ Full CLI surface /cmo uses to inspect state, route skills, and orchestrate catalogs. Every command supports `--json` and most support `--dry-run`, `--fields`, `--confirm` per project DX standards.
4
+
5
+ Use these commands **deliberately**. At activation, run the minimum set to know what's possible (status + doctor). During playbook execution, re-invoke per-step as needed.
6
+
7
+ ---
8
+
9
+ ## Core state + health
10
+
11
+ | Command | CMO uses this when… |
12
+ |---|---|
13
+ | `mktg status --json` | Always at activation. Returns brand state, health (`ready`/`incomplete`/`needs-setup`), integrations configured. This is the first read. |
14
+ | `mktg status --json --fields brand.populated,brand.missing,brand.stale` | To snap to the progressive enhancement ladder (see `rules/progressive-enhancement.md`). |
15
+ | `mktg doctor --json` | On setup + whenever a skill fails unexpectedly (missing tools, broken integrations). |
16
+ | `mktg doctor --fix --dry-run --json` | Preview auto-remediations before running them. |
17
+ | `mktg doctor --fix --json` | Auto-create missing brand files, install missing skills, patch integrations. |
18
+
19
+ ---
20
+
21
+ ## Brand memory
22
+
23
+ | Command | CMO uses this when… |
24
+ |---|---|
25
+ | `mktg context --json` | Compile all brand files into one token-budgeted artifact before running a multi-skill chain (saves context window). |
26
+ | `mktg context --layer <foundation\|strategy\|execution\|distribution> --json` | Pull only the brand slice the skill needs. |
27
+ | `mktg context --budget <tokens> --json` | Truncate to fit a specific token ceiling. |
28
+ | `mktg brand freshness --json` | Before running content skills — confirm brand files aren't stale. |
29
+ | `mktg brand kit --json` | Structured brand tokens (colors, typography, visual style) — used by `image-gen`, `creative`, `paper-marketing`. |
30
+ | `mktg brand kit get <section> --json` | Addressable section — `colors`, `typography`, `visual`, `visualBrandStyle`. |
31
+ | `mktg brand claims --json` | Extract Claims Blacklist from `landscape.md`. **Read this before every piece of content.** |
32
+ | `mktg brand append-learning --input '{...}'` | Log what worked/didn't after a session — compounds future routing. |
33
+ | `mktg brand export --json` | Snapshot brand state for backup or hand-off. |
34
+ | `mktg brand diff --json` | Show brand changes since last baseline. |
35
+ | `mktg brand delete <file> --confirm` | Destructive — only when user explicitly asks. |
36
+ | `mktg brand reset --confirm` | Nuclear — wipes `.mktg/` execution state. User must explicitly request. |
37
+
38
+ ---
39
+
40
+ ## Planning + execution loop
41
+
42
+ | Command | CMO uses this when… |
43
+ |---|---|
44
+ | `mktg plan --json` | Returning user — show the prioritized task queue. |
45
+ | `mktg plan next --json` | Single highest-priority task. Default for "what should I do?" after session start. |
46
+ | `mktg plan complete <id> --json` | After a skill successfully finishes — persists progress across sessions via `.mktg/plan.json`. |
47
+ | `mktg plan --save --json` | Stream-persist the plan for long-running orchestration. |
48
+ | `mktg run <skill> --json` | Direct skill invocation (bypasses the usual Claude Code slash-command flow). Use when the orchestration layer needs programmatic control. |
49
+ | `mktg run <skill> --learning '{...}'` | Run a skill + record the learning atomically. |
50
+
51
+ ---
52
+
53
+ ## Distribution
54
+
55
+ | Command | CMO uses this when… |
56
+ |---|---|
57
+ | `mktg publish --list-adapters --json` | Show available adapters (`typefully`, `resend`, `file`, `postiz`) + configured status. |
58
+ | `mktg publish --adapter <name> --dry-run --input '<json>' --json` | Preview before any real send. Always dry-run first. |
59
+ | `mktg publish --adapter <name> --confirm --input '<json>' --json` | Execute publishing. Only with user approval. |
60
+ | `mktg publish --ndjson` | Streaming progress for multi-item campaigns. |
61
+
62
+ ---
63
+
64
+ ## Competitive intelligence
65
+
66
+ | Command | CMO uses this when… |
67
+ |---|---|
68
+ | `mktg compete list --json` | See all tracked competitor URLs. |
69
+ | `mktg compete watch <url> --json` | Add a competitor to the monitoring loop. |
70
+ | `mktg compete scan --json` | Run the scan — detect changes since last snapshot. |
71
+ | `mktg compete scan --ndjson` | Streaming scan for large watchlists. |
72
+ | `mktg compete diff <url> --json` | Detailed change report for one competitor. |
73
+
74
+ ---
75
+
76
+ ## Upstream catalogs (NEW — post-Phase B)
77
+
78
+ Catalogs extend mktg via external REST APIs (postiz = 30+ social providers; future: cal.com, listmonk, etc.). Registered in `catalogs-manifest.json`.
79
+
80
+ | Command | CMO uses this when… |
81
+ |---|---|
82
+ | `mktg catalog list --json` | Survey registered catalogs. |
83
+ | `mktg catalog info <name> --json --fields configured,missing_envs` | Per-catalog readiness check. Returns full `CatalogEntry` plus computed `configured`, `missing_envs`, `resolved_base`. |
84
+ | `mktg catalog status --json` | Fleet-wide health across all registered catalogs (`configured`, `healthy`, `detail` per catalog). |
85
+ | `mktg catalog sync --dry-run --json` | Check for upstream version drift (compares pinned version against GitHub releases). v1 is read-only. |
86
+ | `mktg catalog add <name> --confirm --json` | Register a new catalog. Destructive-guarded. |
87
+
88
+ **Routing impact:** before routing to any skill backed by a catalog (e.g., `postiz`), CMO runs `catalog info <name>` to confirm `configured: true`. If not, surface the exact fix using `missing_envs`.
89
+
90
+ ---
91
+
92
+ ## Agent self-discovery
93
+
94
+ | Command | CMO uses this when… |
95
+ |---|---|
96
+ | `mktg list --json` | Full skill registry with metadata (all 50 skills). |
97
+ | `mktg list --routing --json` | Just the routing fields — triggers, categories, layers. Cheap to read, used to verify routing decisions. |
98
+ | `mktg schema --json` | All commands with response shapes. Used when the orchestrator needs to programmatically understand the CLI surface. |
99
+ | `mktg schema <command> --json` | Detailed schema for one command including `responseSchema` + examples. |
100
+ | `mktg skill info <name> --json` | Skill metadata: dependencies, reverse dependencies, install status. |
101
+ | `mktg skill validate <path> --json` | Validate a SKILL.md against platform + mktg specs (used by `create-skill`). |
102
+ | `mktg skill graph --json` | Dependency DAG across all 50 skills. Used when planning a multi-skill chain. |
103
+ | `mktg skill check <name> --json` | Check if a skill's prerequisites are satisfied (brand files present, deps installed). |
104
+
105
+ ---
106
+
107
+ ## Setup + lifecycle
108
+
109
+ | Command | CMO uses this when… |
110
+ |---|---|
111
+ | `mktg init --yes` | Fresh project. Creates `brand/` + installs 50 skills + 5 agents + 1 catalog. |
112
+ | `mktg init --from <url> --yes` | Zero-to-CMO in 90 seconds. Scrapes URL, auto-populates `voice-profile.md`, `positioning.md`, `audience.md`, `competitors.md` with real data. Use when the project has a live website. |
113
+ | `mktg update --json` | Refresh skills/agents/catalogs from the package. Run after `npm update`. |
114
+ | `mktg transcribe <url\|path> --json` | Audio/video → transcript. Wraps `whisper-cli` (whisper.cpp) + `yt-dlp` + `ffmpeg`. Used before `content-atomizer` for podcast/video source material. |
115
+
116
+ ---
117
+
118
+ ## External tools (chained via `mktg doctor` detection)
119
+
120
+ Not `mktg` subcommands, but /cmo knows when to suggest them (see `CLAUDE.md` §Ecosystem):
121
+
122
+ | Tool | When CMO suggests it |
123
+ |---|---|
124
+ | `/ply` | Browser automation for Instagram/TikTok/Facebook/YouTube (no API). |
125
+ | `/last30days` | Quick claim verification — "is this still true?" Ground truth before a content piece. |
126
+ | `/landscape-scan` (chained skill) | Full ecosystem snapshot when brand/landscape.md is missing or stale. |
127
+ | `firecrawl` CLI | Single-page scrape (invoked through `/firecrawl` skill). |
128
+ | `summarize` CLI | Compress long text. Invoked through `/summarize` skill. |
129
+ | `gh` | GitHub operations when publishing to GitHub (releases, READMEs). |
130
+
131
+ ---
132
+
133
+ ## Invocation patterns
134
+
135
+ **Always use `--json`.** TTY output is for humans; JSON is the orchestrator contract.
136
+
137
+ **Always `--dry-run` before mutating.** Every destructive command (`brand delete`, `brand reset`, `skill unregister`, `publish`, `catalog add`) requires either `--dry-run` to preview or `--confirm` to execute. Never skip this.
138
+
139
+ **Use `--fields` aggressively.** Most commands return rich responses; CMO only needs the slice relevant to the current routing decision. Example: `mktg status --json --fields brand.populated,integrations` trims 20KB down to 500 bytes.
140
+
141
+ **Stream when it's a list.** `--ndjson` on `mktg plan`, `mktg compete scan`, `mktg publish` — lets CMO react to each item without waiting for the batch.
142
+
143
+ See `CONTEXT.md` at the repo root for the full agent-facing CLI cheatsheet.
@@ -63,3 +63,37 @@ Agent:
63
63
  3. Load brand context from ~/projects/halaali/brand/
64
64
  4. Work exclusively in Halaali context
65
65
  ```
66
+
67
+ ## Bootstrapping a fresh project
68
+
69
+ If the target directory has no `brand/` (i.e., `mktg status --json` returns `health: "needs-setup"`):
70
+
71
+ 1. **Ask the user if they have a public URL for the project.**
72
+ - YES → offer `mktg init --from <url> --yes`. This scrapes the URL via firecrawl + chains foundation skills to auto-populate `voice-profile.md`, `positioning.md`, `audience.md`, `competitors.md` with real data. Roughly 90 seconds, end-to-end.
73
+ - NO → offer `mktg init --yes`. Scaffolds `brand/` with templates + installs all 50 skills + 5 agents + catalogs. User fills in brand files via the Full Product Launch playbook.
74
+ 2. Confirm the project name that landed matches the user's intent (`mktg status --json` after init returns `project.name`).
75
+ 3. Route based on the ladder (see `rules/progressive-enhancement.md`) — a fresh init is L0.
76
+
77
+ ## Brand/ isolation per project
78
+
79
+ Each project owns its own `brand/` directory sitting at the project's `cwd`. There is no global `brand/`; isolation is by directory boundary, enforced by `--cwd` on every `mktg` call.
80
+
81
+ - **Never** write to `~/.config/mktg/` or any shared location for brand data. Brand lives in the project.
82
+ - **Never** read brand files from another project to seed the current one. If the user wants to copy a voice profile from Project A to Project B, they do it explicitly via `mktg brand export` + `mktg brand import --confirm`.
83
+ - **Learnings are project-scoped.** `brand/learnings.md` in Project A doesn't inform routing in Project B — even if the same builder runs both.
84
+
85
+ ## Project-aware command invocation
86
+
87
+ Every `mktg` command CMO runs in multi-project mode passes `--cwd`:
88
+
89
+ ```bash
90
+ mktg status --json --cwd ~/projects/ceo-app
91
+ mktg plan next --json --cwd ~/projects/ceo-app
92
+ mktg publish --adapter postiz --dry-run --cwd ~/projects/ceo-app --input '...'
93
+ ```
94
+
95
+ Omitting `--cwd` defaults to `process.cwd()` — fine for single-project terminals, dangerous in a multi-project session. When in doubt, be explicit.
96
+
97
+ ## Cross-project "noticing" vs acting
98
+
99
+ CMO can mention patterns across projects (*"CEO App's audience watering holes overlap with Halaali's — could be worth cross-promotion"*) but never *acts* on cross-project insights without explicit confirmation. The builder owns the decision.