taketomarket 0.1.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.
Files changed (123) hide show
  1. package/.claude-plugin/plugin.json +10 -0
  2. package/LICENSE +21 -0
  3. package/README.md +419 -0
  4. package/agents/ttm-producer.md +53 -0
  5. package/bin/lib/campaign.cjs +553 -0
  6. package/bin/lib/commit.cjs +105 -0
  7. package/bin/lib/core.cjs +172 -0
  8. package/bin/lib/deviation.cjs +149 -0
  9. package/bin/lib/drift-log.cjs +219 -0
  10. package/bin/lib/health.cjs +438 -0
  11. package/bin/lib/slug.cjs +59 -0
  12. package/bin/lib/state.cjs +96 -0
  13. package/bin/ttm-tools.cjs +157 -0
  14. package/gates/base-gates.md +266 -0
  15. package/gates/discipline/.gitkeep +0 -0
  16. package/gates/gate-evaluation.md +341 -0
  17. package/gates/meta-gates.md +19 -0
  18. package/install.js +307 -0
  19. package/package.json +53 -0
  20. package/playbooks/.gitkeep +0 -0
  21. package/playbooks/aeo.md +223 -0
  22. package/playbooks/affiliate.md +272 -0
  23. package/playbooks/base.md +110 -0
  24. package/playbooks/email.md +306 -0
  25. package/playbooks/events.md +320 -0
  26. package/playbooks/linkedin.md +263 -0
  27. package/playbooks/paid-ads.md +318 -0
  28. package/playbooks/pr-media.md +296 -0
  29. package/playbooks/seo.md +284 -0
  30. package/playbooks/social.md +305 -0
  31. package/playbooks/youtube.md +325 -0
  32. package/references/context-loading.md +107 -0
  33. package/references/learnings-extraction.md +94 -0
  34. package/references/measurement-template.md +48 -0
  35. package/references/meta-gate-evaluation.md +169 -0
  36. package/references/positioning-check-report.md +197 -0
  37. package/references/review-checklist.md +78 -0
  38. package/references/ship-checklist-items.md +94 -0
  39. package/settings.json +4 -0
  40. package/skills/ttm-aeo-check/SKILL.md +20 -0
  41. package/skills/ttm-affiliate-kit/SKILL.md +19 -0
  42. package/skills/ttm-archive/SKILL.md +13 -0
  43. package/skills/ttm-brand-refresh/SKILL.md +19 -0
  44. package/skills/ttm-brief/SKILL.md +14 -0
  45. package/skills/ttm-competitor-scan/SKILL.md +19 -0
  46. package/skills/ttm-email-preflight/SKILL.md +19 -0
  47. package/skills/ttm-fix/SKILL.md +13 -0
  48. package/skills/ttm-health/SKILL.md +12 -0
  49. package/skills/ttm-icp-refresh/SKILL.md +19 -0
  50. package/skills/ttm-init/SKILL.md +12 -0
  51. package/skills/ttm-keyword-map/SKILL.md +19 -0
  52. package/skills/ttm-learn/SKILL.md +14 -0
  53. package/skills/ttm-measure/SKILL.md +14 -0
  54. package/skills/ttm-new-campaign/SKILL.md +13 -0
  55. package/skills/ttm-next/SKILL.md +12 -0
  56. package/skills/ttm-positioning-check/SKILL.md +19 -0
  57. package/skills/ttm-positioning-shift/SKILL.md +19 -0
  58. package/skills/ttm-produce/SKILL.md +14 -0
  59. package/skills/ttm-repurpose/SKILL.md +20 -0
  60. package/skills/ttm-research/SKILL.md +13 -0
  61. package/skills/ttm-resume/SKILL.md +13 -0
  62. package/skills/ttm-review/SKILL.md +13 -0
  63. package/skills/ttm-seo-audit/SKILL.md +20 -0
  64. package/skills/ttm-ship/SKILL.md +13 -0
  65. package/skills/ttm-state/SKILL.md +13 -0
  66. package/skills/ttm-verify/SKILL.md +14 -0
  67. package/templates/agents-md.md +65 -0
  68. package/templates/campaign-brief.md +74 -0
  69. package/templates/campaign-research.md +39 -0
  70. package/templates/campaign-state.md +40 -0
  71. package/templates/claude-md.md +65 -0
  72. package/templates/deviation-log.md +12 -0
  73. package/templates/drift-log.md +17 -0
  74. package/templates/fix-brief.md +59 -0
  75. package/templates/fix-log.md +22 -0
  76. package/templates/measurement-report.md +75 -0
  77. package/templates/migration-plan.md +24 -0
  78. package/templates/production-manifest.json +20 -0
  79. package/templates/reference-files/brand.md +45 -0
  80. package/templates/reference-files/calendar.md +30 -0
  81. package/templates/reference-files/channels.md +40 -0
  82. package/templates/reference-files/competitors.md +40 -0
  83. package/templates/reference-files/icp.md +50 -0
  84. package/templates/reference-files/learnings.md +40 -0
  85. package/templates/reference-files/metrics.md +42 -0
  86. package/templates/reference-files/positioning.md +38 -0
  87. package/templates/reference-files/state.md +27 -0
  88. package/templates/verification-report.md +59 -0
  89. package/workflows/discipline/.gitkeep +0 -0
  90. package/workflows/discipline/aeo-check.md +180 -0
  91. package/workflows/discipline/affiliate-kit.md +147 -0
  92. package/workflows/discipline/email-preflight.md +150 -0
  93. package/workflows/discipline/keyword-map.md +125 -0
  94. package/workflows/discipline/repurpose.md +329 -0
  95. package/workflows/discipline/seo-audit.md +169 -0
  96. package/workflows/lifecycle/.gitkeep +0 -0
  97. package/workflows/lifecycle/brief-positioning-check.md +90 -0
  98. package/workflows/lifecycle/brief.md +355 -0
  99. package/workflows/lifecycle/fix.md +495 -0
  100. package/workflows/lifecycle/learn.md +405 -0
  101. package/workflows/lifecycle/measure.md +379 -0
  102. package/workflows/lifecycle/produce.md +383 -0
  103. package/workflows/lifecycle/research.md +264 -0
  104. package/workflows/lifecycle/review.md +432 -0
  105. package/workflows/lifecycle/ship.md +521 -0
  106. package/workflows/lifecycle/verify.md +507 -0
  107. package/workflows/reference-mgmt/.gitkeep +0 -0
  108. package/workflows/reference-mgmt/brand-refresh.md +193 -0
  109. package/workflows/reference-mgmt/competitor-scan.md +228 -0
  110. package/workflows/reference-mgmt/icp-refresh.md +200 -0
  111. package/workflows/reference-mgmt/positioning-check.md +339 -0
  112. package/workflows/reference-mgmt/positioning-shift.md +368 -0
  113. package/workflows/setup/.gitkeep +0 -0
  114. package/workflows/setup/init-questions.md +225 -0
  115. package/workflows/setup/init-validation.md +155 -0
  116. package/workflows/setup/init.md +449 -0
  117. package/workflows/setup/new-campaign.md +134 -0
  118. package/workflows/utility/.gitkeep +0 -0
  119. package/workflows/utility/archive.md +334 -0
  120. package/workflows/utility/health.md +166 -0
  121. package/workflows/utility/next.md +187 -0
  122. package/workflows/utility/resume.md +249 -0
  123. package/workflows/utility/state.md +207 -0
@@ -0,0 +1,507 @@
1
+ <purpose>
2
+ Verification workflow for /ttm-verify. Evaluates every produced asset against
3
+ 10 base quality gates (per D-06) with structured PASS/WARN/FAIL output and
4
+ line-level feedback (per D-05). Runs in a separate context from produce via
5
+ context:fork (per LIFE-09, D-10). Tier 1 failures prompt for deviation action
6
+ (per D-04, D-09). Writes verification report and updates campaign state.
7
+ </purpose>
8
+
9
+ <required_reading>
10
+ @${CLAUDE_PLUGIN_ROOT}/references/context-loading.md
11
+ @${CLAUDE_PLUGIN_ROOT}/gates/base-gates.md
12
+ @${CLAUDE_PLUGIN_ROOT}/gates/gate-evaluation.md
13
+ </required_reading>
14
+
15
+ <constraints>
16
+ ## POSITIONING.md is READ-ONLY
17
+
18
+ **Do NOT modify `.marketing/POSITIONING.md` during this workflow.**
19
+
20
+ POSITIONING.md is an architectural invariant. If you detect positioning drift:
21
+ - In verify: use the Escalate option to launch /ttm-positioning-shift
22
+ - In other workflows: flag the issue and recommend running /ttm-positioning-check
23
+
24
+ Only /ttm-positioning-shift and /ttm-init may modify POSITIONING.md.
25
+ </constraints>
26
+
27
+ <process>
28
+
29
+ ## Text-Mode Detection
30
+
31
+ **Text mode (`--text` flag):** Set `TEXT_MODE=true` if `--text` is present in `$ARGUMENTS`
32
+ or if the runtime is not Claude Code. When TEXT_MODE is active, replace every
33
+ `AskUserQuestion` call with a plain-text numbered list.
34
+
35
+ Detection:
36
+ ```bash
37
+ if echo "$ARGUMENTS" | grep -q -- '--text'; then TEXT_MODE=true; fi
38
+ ```
39
+
40
+ If `AskUserQuestion` tool is not available in the current runtime, set `TEXT_MODE=true`.
41
+
42
+ When TEXT_MODE is active, replace each AskUserQuestion with a plain-text numbered list:
43
+ ```
44
+ [HEADER]
45
+ [QUESTION]
46
+ 1. [OPTION_1_LABEL] -- [OPTION_1_DESCRIPTION]
47
+ 2. [OPTION_2_LABEL] -- [OPTION_2_DESCRIPTION]
48
+ ...
49
+ Type the number of your choice:
50
+ ```
51
+
52
+ ---
53
+
54
+ ## Step 1: Load Context
55
+
56
+ ```
57
+ takeToMarket > LOADING CONTEXT
58
+ ```
59
+
60
+ Extract SLUG from $ARGUMENTS (strip `--text` flag if present):
61
+ ```bash
62
+ SLUG=$(echo "$ARGUMENTS" | sed 's/--text//g' | xargs)
63
+ ```
64
+
65
+ If SLUG is empty, error: "Usage: /ttm-verify [campaign-slug]. Provide a campaign slug." Exit.
66
+
67
+ **Load Tier 1 summaries** from all 9 reference files (lines 1 to `<!-- END_SUMMARY -->`):
68
+ - `.marketing/POSITIONING.md`
69
+ - `.marketing/BRAND.md`
70
+ - `.marketing/ICP.md`
71
+ - `.marketing/CHANNELS.md`
72
+ - `.marketing/STATE.md` (frontmatter only)
73
+ - `.marketing/CALENDAR.md`
74
+ - `.marketing/COMPETITORS.md`
75
+ - `.marketing/METRICS.md`
76
+ - `.marketing/LEARNINGS.md`
77
+
78
+ **Load Tier 2 (full content)** for gate evaluation:
79
+ - `.marketing/POSITIONING.md` (needed for GATE-01 Positioning Drift)
80
+ - `.marketing/BRAND.md` (needed for GATE-02 Claim Accuracy, GATE-03 Voice Drift)
81
+ - `.marketing/ICP.md` (needed for GATE-09 ICP Fit)
82
+ - `.marketing/COMPETITORS.md` (needed for GATE-08 Competitor Collision)
83
+ - `.marketing/CHANNELS.md` (needed for GATE-06 UTM Hygiene)
84
+
85
+ **Load campaign-specific files** (always full-load per context-loading.md rule 4):
86
+ - `.marketing/CAMPAIGNS/${SLUG}/STATE.md`
87
+ - `.marketing/CAMPAIGNS/${SLUG}/BRIEF.md` (needed for GATE-04, GATE-05)
88
+
89
+ **Load MANIFEST.json:**
90
+ ```bash
91
+ MANIFEST_PATH=".marketing/CAMPAIGNS/${SLUG}/MANIFEST.json"
92
+ ```
93
+
94
+ Read `.marketing/CAMPAIGNS/${SLUG}/MANIFEST.json`. If the file does not exist, error:
95
+ "No production manifest found for campaign '${SLUG}'. Run /ttm-produce first."
96
+ Exit.
97
+
98
+ ---
99
+
100
+ ## Step 2: Validate Campaign State
101
+
102
+ ```
103
+ takeToMarket > VALIDATING CAMPAIGN
104
+ ```
105
+
106
+ Check campaign exists:
107
+ ```bash
108
+ node "${CLAUDE_PLUGIN_ROOT}/bin/ttm-tools.cjs" campaign state "${SLUG}" --raw
109
+ ```
110
+
111
+ If result shows `exists: false`: Tell the user the campaign does not exist and suggest
112
+ running `/ttm-new-campaign` first. Exit.
113
+
114
+ Read campaign state. Check the `phase` field:
115
+ - If phase is NOT `"produced"`: Warn the user:
116
+ "Campaign is in phase '${PHASE}'. Expected 'produced' before verification.
117
+ Running /ttm-verify now may produce incomplete results. Proceed?"
118
+ Wait for user confirmation. If user declines, exit.
119
+
120
+ **Determine verify run number:**
121
+ Read `verify.run_count` from state. If null or 0, set `RUN_NUMBER=1`.
122
+ Otherwise set `RUN_NUMBER` to `verify.run_count + 1`.
123
+
124
+ ---
125
+
126
+ ## Step 3: Load Assets from Disk
127
+
128
+ ```
129
+ takeToMarket > LOADING ASSETS
130
+ ```
131
+
132
+ Parse MANIFEST.json to get the list of asset files. The manifest contains a `hero` object
133
+ and a `derivatives` array. Collect all asset file paths:
134
+
135
+ ```
136
+ ASSETS = []
137
+ if manifest.hero:
138
+ ASSETS.push({ name: manifest.hero.name, file: manifest.hero.file, type: manifest.hero.type })
139
+ for each derivative in manifest.derivatives:
140
+ ASSETS.push({ name: derivative.name, file: derivative.file, type: derivative.type })
141
+ ```
142
+
143
+ For each asset, read the file from `.marketing/CAMPAIGNS/${SLUG}/${asset.file}`.
144
+
145
+ If any asset file is missing from disk:
146
+ - Display warning: "Asset file not found: ${asset.file} -- skipping this asset"
147
+ - Remove it from the ASSETS list
148
+ - Continue with remaining assets
149
+
150
+ If ALL asset files are missing: Error: "No asset files found on disk. Re-run /ttm-produce."
151
+ Exit.
152
+
153
+ **CRITICAL:** Assets are loaded from DISK only. Never from produce context memory. This is
154
+ the self-evaluation bias prevention required by LIFE-09 and D-10. The context:fork in
155
+ SKILL.md ensures verify runs in a completely separate context from produce.
156
+
157
+ ---
158
+
159
+ ## Step 4a: Apply Base Gate Overrides
160
+
161
+ For each asset in ASSETS:
162
+
163
+ 1. Check if the asset's playbook was loaded (from MANIFEST.json `playbook` field)
164
+ 2. If playbook is "none", skip -- all base gates keep default tiers
165
+ 3. If playbook exists, read `## Base Gate Overrides` from `${CLAUDE_PLUGIN_ROOT}/playbooks/<type>.md`
166
+ 4. Parse the override table: record each base gate ID and its override tier
167
+ 5. Adjust tier classification for overridden gates for this asset's evaluation
168
+ 6. If section reads "None -- all base gates keep default tiers", no adjustments needed
169
+
170
+ **IMPORTANT:** Overrides MUST be applied BEFORE Step 4 base gate evaluation so that
171
+ overridden gates (e.g., GATE-10 to Tier 1 for SEO) use correct deviation handling.
172
+
173
+ ---
174
+
175
+ ## Step 4: Evaluate Gates Per Asset
176
+
177
+ ```
178
+ takeToMarket > EVALUATING QUALITY GATES
179
+ ```
180
+
181
+ For each asset in ASSETS:
182
+ Using the effective tiers from Step 4a (defaults if no overrides):
183
+ For each of the 10 gates (in order from base-gates.md):
184
+
185
+ Evaluate each gate per gate-evaluation.md instructions. Record structured output per gate: gate, tier, result, findings[].
186
+
187
+ | # | Gate | Tier | Reference Data |
188
+ |---|------|------|----------------|
189
+ | 1 | GATE-01: Positioning Drift | T1 | POSITIONING.md |
190
+ | 2 | GATE-02: Claim Accuracy | T1 | BRAND.md |
191
+ | 3 | GATE-03: Voice Drift | T2 | BRAND.md (voice archetype + banned words) |
192
+ | 4 | GATE-04: Outcome Alignment | T1 | CAMPAIGNS/${SLUG}/BRIEF.md (outcome metric) |
193
+ | 5 | GATE-05: Funnel Integrity | T2 | CAMPAIGNS/${SLUG}/BRIEF.md (funnel/CTA) |
194
+ | 6 | GATE-06: UTM Hygiene | T2 | CHANNELS.md (UTM schema) |
195
+ | 7 | GATE-07: Compliance | T2 | Industry-standard requirements |
196
+ | 8 | GATE-08: Competitor Collision | T2 | COMPETITORS.md |
197
+ | 9 | GATE-09: ICP Fit | T2 | ICP.md |
198
+ | 10 | GATE-10: Format Correctness | T2 | Playbook or general platform guidelines |
199
+
200
+ After all 10 gates evaluated for this asset, aggregate:
201
+ - Count total PASS, WARN, FAIL results
202
+ - Record overall asset result: FAIL if any gate FAIL, WARN if any WARN (no FAIL), PASS if all PASS
203
+
204
+ **IMPORTANT per RESEARCH.md Pitfall 4:** Evaluate each gate SEPARATELY. Do not bundle
205
+ multiple gates into a single evaluation pass. Load gate-specific reference data for each
206
+ evaluation. This prevents shallow evaluation and ensures each gate gets full attention.
207
+
208
+ ---
209
+
210
+ ## Step 4b: Evaluate Discipline Gates
211
+
212
+ For each asset in ASSETS:
213
+
214
+ 1. Check if the asset's playbook was loaded (from MANIFEST.json `playbook` field)
215
+ 2. If playbook is "none": display "No discipline playbook -- base gates only" and skip
216
+ 3. If playbook exists, read `## Discipline Gates` section from the loaded playbook
217
+ 4. Parse each `### DISC-*` subsection as a gate definition
218
+ 5. For each discipline gate: evaluate using gate-evaluation.md structured output format,
219
+ using the tier from the gate definition. Record gate ID, tier, result, findings[]
220
+ 6. Append discipline gate results to the asset's gate results array
221
+ 7. Update the asset's aggregate to include discipline gate outcomes
222
+
223
+ Same rules as base gates: evaluate each discipline gate SEPARATELY.
224
+
225
+ ---
226
+
227
+ ## Step 4c: Evaluate Meta-Gates
228
+
229
+ Meta-gates evaluate portfolio-level concerns across all active campaigns. All 4 meta-gates
230
+ are **Tier 2 advisory** -- they produce findings in the report but do NOT block verification.
231
+
232
+ Load detailed evaluation instructions:
233
+ @${CLAUDE_PLUGIN_ROOT}/references/meta-gate-evaluation.md
234
+
235
+ 1. Fetch all campaign data:
236
+ ```bash
237
+ node "${CLAUDE_PLUGIN_ROOT}/bin/ttm-tools.cjs" campaign list --raw
238
+ ```
239
+ 2. Include the current campaign (${SLUG}) in the evaluation even if not yet in "active" list
240
+ 3. Read `.marketing/CALENDAR.md` for quarterly theme and launch dates
241
+ 4. Evaluate each meta-gate per the criteria in meta-gate-evaluation.md:
242
+ - META-01: Portfolio Balance (funnel stage + channel diversity)
243
+ - META-02: Calendar Collision (launch date overlap + audience collision)
244
+ - META-03: Theme Consistency (quarterly theme alignment)
245
+ - META-04: Learning Plan (measurement plan + testable hypothesis)
246
+ 5. Record each result as: { gate_id: "META-XX", tier: 2, result: PASS|WARN|FAIL, findings: [] }
247
+ 6. Append meta-gate results to a separate PORTFOLIO_RESULTS array (not mixed with per-asset gates)
248
+
249
+ Meta-gate results are displayed in a separate section of the verification report, after the
250
+ per-asset summary table.
251
+
252
+ ---
253
+
254
+ ## Step 5: Build Summary Table
255
+
256
+ ```
257
+ takeToMarket > BUILDING VERIFICATION REPORT
258
+ ```
259
+
260
+ Construct the summary table following the templates/verification-report.md format:
261
+
262
+ ```
263
+ ## Verification Report: ${SLUG}
264
+
265
+ **Run:** ${RUN_NUMBER} | **Date:** ${ISO_DATE} | **Assets:** ${ASSET_COUNT}
266
+
267
+ | # | Gate | Tier | ${ASSET_1_NAME} | ${ASSET_2_NAME} | ... |
268
+ |---|------|------|-----------------|-----------------|-----|
269
+ | 1 | Positioning Drift (GATE-01) | T1 | [PASS|WARN|FAIL] | ... |
270
+ | 2 | Claim Accuracy (GATE-02) | T1 | [PASS|WARN|FAIL] | ... |
271
+ | 3 | Voice Drift (GATE-03) | T2 | [PASS|WARN|FAIL] | ... |
272
+ | 4 | Outcome Alignment (GATE-04) | T1 | [PASS|WARN|FAIL] | ... |
273
+ | 5 | Funnel Integrity (GATE-05) | T2 | [PASS|WARN|FAIL|N/A] | ... |
274
+ | 6 | UTM Hygiene (GATE-06) | T2 | [PASS|WARN|FAIL|N/A] | ... |
275
+ | 7 | Compliance (GATE-07) | T2 | [PASS|WARN|FAIL|N/A] | ... |
276
+ | 8 | Competitor Collision (GATE-08) | T2 | [PASS|WARN|FAIL] | ... |
277
+ | 9 | ICP Fit (GATE-09) | T2 | [PASS|WARN|FAIL] | ... |
278
+ | 10 | Format Correctness (GATE-10) | T2 | [PASS|WARN|FAIL] | ... |
279
+ | 11 | DISC-{DISC}-01: {Name} | T{n} | [PASS|WARN|FAIL] | [N/A] |
280
+ | .. | ... | ... | ... | ... |
281
+
282
+ Discipline gate rows appear after base gates. Show N/A for assets without a matching playbook.
283
+
284
+ **Result:** [FAIL_COUNT] FAIL (Tier 1), [WARN_COUNT] WARN -- [action required | all clear]
285
+ ```
286
+
287
+ Display the summary table to the user.
288
+
289
+ If PORTFOLIO_RESULTS is not empty, add a portfolio-level section after the per-asset table:
290
+
291
+ ### Portfolio Assessment (Tier 2 Advisory)
292
+
293
+ | Meta-Gate | Result | Finding |
294
+ |-----------|--------|---------|
295
+ | META-01: Portfolio Balance | [PASS|WARN|FAIL] | [one-line finding] |
296
+ | META-02: Calendar Collision | [PASS|WARN|FAIL] | [one-line finding] |
297
+ | META-03: Theme Consistency | [PASS|WARN|FAIL] | [one-line finding] |
298
+ | META-04: Learning Plan | [PASS|WARN|FAIL] | [one-line finding] |
299
+
300
+ > These are advisory findings. No action is required to proceed with verification.
301
+
302
+ Below the summary table, display drill-down detail for every WARN and FAIL finding
303
+ using the structured output format from gate-evaluation.md:
304
+
305
+ ```
306
+ ### [ASSET_NAME] -- [GATE_NAME] ([RESULT])
307
+
308
+ **Evidence:** "[exact quote from asset]" (section reference)
309
+ **Reference:** "[quote from reference file]"
310
+ **Recommendation:** [specific change to resolve]
311
+ ```
312
+
313
+ ---
314
+
315
+ ## Step 6: Handle Tier 1 Deviations
316
+
317
+ **Note:** Meta-gates are Tier 2 advisory and are NOT included in Tier 1 deviation handling.
318
+
319
+ For each Tier 1 gate (base or discipline, including overridden) that returned WARN or FAIL on any asset:
320
+
321
+ Display the detailed finding (evidence + reference + recommendation).
322
+
323
+ Present 3 options using AskUserQuestion (or text-mode numbered list):
324
+
325
+ ```
326
+ Gate [name] returned [WARN|FAIL] for [asset]:
327
+
328
+ [Finding detail with evidence and reference]
329
+
330
+ Choose an action:
331
+ 1. Correct -- Record this for /ttm-fix to address
332
+ 2. Accept+log -- Document exception and proceed
333
+ 3. Escalate -- Launch /ttm-positioning-shift
334
+ ```
335
+
336
+ **Process user's choice:**
337
+
338
+ ### Option 1: Correct
339
+
340
+ Record the finding as needing fix. Update campaign state:
341
+ ```bash
342
+ node "${CLAUDE_PLUGIN_ROOT}/bin/ttm-tools.cjs" campaign update "${SLUG}" gate.[gate_field] "fix_needed"
343
+ ```
344
+
345
+ Display: "Recorded for /ttm-fix. Continue verifying remaining gates."
346
+ Verification continues -- does not pause for Correct.
347
+
348
+ ### Option 2: Accept+log
349
+
350
+ Prompt for justification using AskUserQuestion (or text-mode prompt):
351
+ ```
352
+ Why are you accepting this deviation? (This will be logged to DEVIATIONS.md)
353
+ ```
354
+
355
+ Record the deviation using the deterministic CLI:
356
+ ```bash
357
+ node "${CLAUDE_PLUGIN_ROOT}/bin/ttm-tools.cjs" deviation append \
358
+ --slug "${SLUG}" \
359
+ --gate "[gate name]" \
360
+ --gate-id "[GATE-XX]" \
361
+ --tier [1|2] \
362
+ --result "[WARN|FAIL]" \
363
+ --asset "[asset file path]" \
364
+ --finding "[exact finding text]" \
365
+ --action "Accept+log" \
366
+ --justification "[user's justification]" \
367
+ --run "${RUN_NUMBER}"
368
+ ```
369
+
370
+ Also update STATE.md gate field:
371
+ ```bash
372
+ node "${CLAUDE_PLUGIN_ROOT}/bin/ttm-tools.cjs" campaign update "${SLUG}" gate.[gate_field] "accepted"
373
+ ```
374
+
375
+ Display: "Deviation logged to DEVIATIONS.md. Proceeding."
376
+
377
+ **IMPORTANT:** ALWAYS use `ttm-tools.cjs deviation append` for DEVIATIONS.md writes.
378
+ Never write to DEVIATIONS.md directly. This ensures consistent formatting across runs
379
+ (per RESEARCH.md Pitfall 6).
380
+
381
+ ### Option 3: Escalate
382
+
383
+ Record the escalation in campaign state before exiting:
384
+ ```bash
385
+ node "${CLAUDE_PLUGIN_ROOT}/bin/ttm-tools.cjs" campaign update "${SLUG}" verify.overall_result "escalated"
386
+ ```
387
+
388
+ Display: "Launching /ttm-positioning-shift. Verification paused. After positioning
389
+ is resolved, re-run /ttm-verify ${SLUG}."
390
+
391
+ Stop verification immediately (per D-08). Do not evaluate remaining gates or assets.
392
+ Exit the workflow.
393
+
394
+ ---
395
+
396
+ ## Step 7: Display Tier 2 Findings
397
+
398
+ For each Tier 2 gate (base or discipline, excluding overridden-to-Tier-1) that returned WARN or FAIL:
399
+
400
+ Display as advisory:
401
+ ```
402
+ [Advisory] Gate [name] ([GATE-XX]): [finding summary]
403
+ Recommendation: [recommendation from finding]
404
+ ```
405
+
406
+ No action required for Tier 2 findings. User may optionally request action on any
407
+ Tier 2 finding, in which case apply the same Correct/Accept+log/Escalate flow
408
+ from Step 6.
409
+
410
+ ---
411
+
412
+ ## Step 8: Write Verification Report
413
+
414
+ Write VERIFICATION.md to `.marketing/CAMPAIGNS/${SLUG}/VERIFICATION.md`.
415
+
416
+ Use the templates/verification-report.md format. Include:
417
+ - YAML frontmatter: campaign slug, run number, date, total assets, overall result
418
+ - Summary table (gate x asset matrix from Step 5)
419
+ - Detail findings for every WARN and FAIL (evidence, reference, recommendation)
420
+ - Actions taken (Correct, Accept+log, or Escalate per finding)
421
+ - Run metadata: verify command, manifest path, gate definitions path, previous run count
422
+
423
+ If VERIFICATION.md already exists from a prior run, overwrite it. The verification
424
+ report reflects the current state, not history. DEVIATIONS.md is the append-only
425
+ historical record.
426
+
427
+ ---
428
+
429
+ ## Step 9: Update Campaign State and Summary
430
+
431
+ **Update all 10 gate result fields:**
432
+ ```bash
433
+ node "${CLAUDE_PLUGIN_ROOT}/bin/ttm-tools.cjs" campaign update "${SLUG}" gate.positioning_drift [pass|warn|fail|fix_needed|accepted]
434
+ node "${CLAUDE_PLUGIN_ROOT}/bin/ttm-tools.cjs" campaign update "${SLUG}" gate.claim_accuracy [pass|warn|fail|fix_needed|accepted]
435
+ node "${CLAUDE_PLUGIN_ROOT}/bin/ttm-tools.cjs" campaign update "${SLUG}" gate.voice_drift [pass|warn|fail]
436
+ node "${CLAUDE_PLUGIN_ROOT}/bin/ttm-tools.cjs" campaign update "${SLUG}" gate.outcome_alignment [pass|warn|fail|fix_needed|accepted]
437
+ node "${CLAUDE_PLUGIN_ROOT}/bin/ttm-tools.cjs" campaign update "${SLUG}" gate.funnel_integrity [pass|warn|fail]
438
+ node "${CLAUDE_PLUGIN_ROOT}/bin/ttm-tools.cjs" campaign update "${SLUG}" gate.utm_hygiene [pass|warn|fail]
439
+ node "${CLAUDE_PLUGIN_ROOT}/bin/ttm-tools.cjs" campaign update "${SLUG}" gate.compliance [pass|warn|fail]
440
+ node "${CLAUDE_PLUGIN_ROOT}/bin/ttm-tools.cjs" campaign update "${SLUG}" gate.competitor_collision [pass|warn|fail]
441
+ node "${CLAUDE_PLUGIN_ROOT}/bin/ttm-tools.cjs" campaign update "${SLUG}" gate.icp_fit [pass|warn|fail]
442
+ node "${CLAUDE_PLUGIN_ROOT}/bin/ttm-tools.cjs" campaign update "${SLUG}" gate.format_correctness [pass|warn|fail]
443
+ ```
444
+
445
+ For each gate, use the worst result across all assets. If user chose Correct, use
446
+ "fix_needed". If user chose Accept+log, use "accepted".
447
+
448
+ **Discipline gates:** DISC-* results appear in the report/table but have no individual
449
+ state fields. A Tier 1 discipline gate FAIL counts toward the overall result.
450
+
451
+ **Update verification metadata:**
452
+ ```bash
453
+ TIMESTAMP=$(node "${CLAUDE_PLUGIN_ROOT}/bin/ttm-tools.cjs" timestamp --raw)
454
+ node "${CLAUDE_PLUGIN_ROOT}/bin/ttm-tools.cjs" campaign update "${SLUG}" verify.run_count "${RUN_NUMBER}"
455
+ node "${CLAUDE_PLUGIN_ROOT}/bin/ttm-tools.cjs" campaign update "${SLUG}" verify.last_run "$TIMESTAMP"
456
+ node "${CLAUDE_PLUGIN_ROOT}/bin/ttm-tools.cjs" campaign update "${SLUG}" verify.overall_result [pass|accepted|warn|fail]
457
+ ```
458
+
459
+ **Overall result logic:**
460
+ - `pass` -- all gates PASS across all assets
461
+ - `accepted` -- one or more Tier 1 FAILs exist but ALL were Accept+logged (deviation documented, no outstanding action)
462
+ - `warn` -- any gate WARN but no unresolved FAIL
463
+ - `fail` -- any Tier 1 FAIL exists that was marked Correct (fix_needed) or is otherwise unresolved
464
+
465
+ **Update campaign phase** (only if no Escalate was triggered):
466
+ ```bash
467
+ node "${CLAUDE_PLUGIN_ROOT}/bin/ttm-tools.cjs" campaign update "${SLUG}" phase verified
468
+ node "${CLAUDE_PLUGIN_ROOT}/bin/ttm-tools.cjs" campaign update "${SLUG}" phase.verified "$TIMESTAMP"
469
+ ```
470
+
471
+ If Escalate was triggered in Step 6, do NOT update the phase. The campaign remains
472
+ in "produced" state until positioning is resolved and verify is re-run.
473
+
474
+ **Display completion banner:**
475
+ ```
476
+ takeToMarket > VERIFICATION COMPLETE
477
+
478
+ Run: ${RUN_NUMBER} | Result: [PASS/WARN/FAIL]
479
+ Assets verified: ${ASSET_COUNT}
480
+ Tier 1 failures: [count] ([count] corrected, [count] accepted, [count] escalated)
481
+ Tier 2 advisories: [count]
482
+
483
+ Report: .marketing/CAMPAIGNS/${SLUG}/VERIFICATION.md
484
+ Deviations: .marketing/CAMPAIGNS/${SLUG}/DEVIATIONS.md
485
+
486
+ Next: Run /ttm-review ${SLUG} to conduct human review
487
+ ```
488
+
489
+ </process>
490
+
491
+ <success_criteria>
492
+ - [ ] All assets from MANIFEST.json evaluated against all 10 base gates plus discipline gates from playbooks
493
+ - [ ] Summary table displayed with PASS/WARN/FAIL per gate (base + discipline) per asset
494
+ - [ ] Tier 1 failures prompted for Correct/Accept+log/Escalate
495
+ - [ ] Accept+log deviations recorded in DEVIATIONS.md via ttm-tools.cjs CLI and STATE.md
496
+ - [ ] VERIFICATION.md written with full report (summary table + detail findings)
497
+ - [ ] Campaign STATE.md updated with all gate results and verification metadata
498
+ - [ ] Verify context never accessed produce's internal reasoning (file-based asset loading only)
499
+ - [ ] Meta-gates evaluated against portfolio data (campaign list --raw)
500
+ - [ ] Meta-gate results are Tier 2 advisory (not blocking)
501
+ - [ ] Portfolio Assessment section included in verification report
502
+ </success_criteria>
503
+
504
+ <output>
505
+ - `.marketing/CAMPAIGNS/${SLUG}/VERIFICATION.md` (verification report -- overwritten per run)
506
+ - `.marketing/CAMPAIGNS/${SLUG}/DEVIATIONS.md` (deviation log -- append-only, created on first Accept+log)
507
+ </output>
File without changes
@@ -0,0 +1,193 @@
1
+ <purpose>
2
+ Update BRAND.md with new proof points, deprecate expired ones, and refresh voice
3
+ guidelines. Validates all changes against POSITIONING.md invariant before writing.
4
+ Single-pass workflow per D-06.
5
+ </purpose>
6
+
7
+ <required_reading>
8
+ @${CLAUDE_PLUGIN_ROOT}/references/context-loading.md
9
+ @${CLAUDE_PLUGIN_ROOT}/templates/reference-files/brand.md
10
+ </required_reading>
11
+
12
+ <constraints>
13
+ ## POSITIONING.md is READ-ONLY
14
+
15
+ **Do NOT modify `.marketing/POSITIONING.md` during this workflow.**
16
+
17
+ POSITIONING.md is an architectural invariant. If you detect positioning drift:
18
+ - Flag the issue and recommend running /ttm-positioning-check
19
+ - Recommend /ttm-positioning-shift if a deliberate change is needed
20
+
21
+ Only /ttm-positioning-shift and /ttm-init may modify POSITIONING.md.
22
+ </constraints>
23
+
24
+ <process>
25
+
26
+ ## Text-Mode Detection
27
+
28
+ **Text mode (`--text` flag):** Set `TEXT_MODE=true` if `--text` is present in `$ARGUMENTS`
29
+ or if the runtime is not Claude Code. When TEXT_MODE is active, replace every
30
+ `AskUserQuestion` call with a plain-text numbered list.
31
+
32
+ Detection:
33
+ ```bash
34
+ if echo "$ARGUMENTS" | grep -q -- '--text'; then TEXT_MODE=true; fi
35
+ ```
36
+
37
+ If `AskUserQuestion` tool is not available in the current runtime, set `TEXT_MODE=true`.
38
+ When TEXT_MODE is active, replace each AskUserQuestion with a plain-text numbered list.
39
+
40
+ ---
41
+
42
+ ## Step 1: Load Context
43
+
44
+ ```
45
+ takeToMarket > LOADING CONTEXT
46
+ ```
47
+
48
+ **Load Tier 1 summaries** from all 9 reference files (lines 1 to `<!-- END_SUMMARY -->`):
49
+ - `.marketing/POSITIONING.md`
50
+ - `.marketing/BRAND.md`
51
+ - `.marketing/ICP.md`
52
+ - `.marketing/CHANNELS.md`
53
+ - `.marketing/STATE.md` (frontmatter only)
54
+ - `.marketing/CALENDAR.md`
55
+ - `.marketing/COMPETITORS.md`
56
+ - `.marketing/METRICS.md`
57
+ - `.marketing/LEARNINGS.md`
58
+
59
+ **Load Tier 2 (full content)** for the file being refreshed:
60
+ - `.marketing/BRAND.md`
61
+
62
+ If `.marketing/BRAND.md` does not exist, error:
63
+ "BRAND.md not found. Run /ttm-init first to set up your marketing system."
64
+ Exit.
65
+
66
+ Parse the current BRAND.md into structured sections:
67
+ - `CURRENT_VOICE_ARCHETYPE` -- from `## Voice Archetype`
68
+ - `CURRENT_TONE_TABLE` -- from `## Tone per Context`
69
+ - `CURRENT_BANNED_WORDS` -- from `## Banned Words` table rows
70
+ - `CURRENT_PROOF_POINTS` -- from `## Proof Points` table rows
71
+ - `CURRENT_BRAND_EXAMPLES` -- from `## Brand Examples`
72
+
73
+ ---
74
+
75
+ ## Step 2: Present Current State and Gather Updates
76
+
77
+ Display current BRAND.md sections to the user:
78
+
79
+ ```
80
+ takeToMarket > BRAND REFRESH
81
+
82
+ Current Voice Archetype: ${CURRENT_VOICE_ARCHETYPE}
83
+ Current Proof Points: ${count} entries
84
+ Current Banned Words: ${count} entries
85
+ ```
86
+
87
+ Ask user via AskUserQuestion (or text-mode numbered list) -- collect as freeform responses:
88
+
89
+ **Question 1:**
90
+ - header: "Expired Proof Points"
91
+ - question: "Which proof points are now expired or outdated? List numbers from the table above, or type 'none'."
92
+
93
+ **Question 2:**
94
+ - header: "New Proof Points"
95
+ - question: "What new proof points should be added? For each, provide: claim, source, and verification date. Or type 'none'."
96
+
97
+ **Question 3:**
98
+ - header: "Voice and Tone Updates"
99
+ - question: "Any voice archetype or tone updates needed? Describe changes, or type 'none'."
100
+
101
+ **Question 4:**
102
+ - header: "Banned Words"
103
+ - question: "Any new banned words to add? List each with reasoning, or type 'none'."
104
+
105
+ If ALL four answers are "none": display "No changes requested. BRAND.md is unchanged." Exit.
106
+
107
+ ---
108
+
109
+ ## Step 3: Validate Against Positioning
110
+
111
+ Load the primary differentiator, target audience, category, and must-not-say terms from
112
+ the POSITIONING.md Tier 1 summary (already loaded in Step 1).
113
+
114
+ For each proposed change, validate:
115
+
116
+ **New proof points:**
117
+ - Check each new proof point does not contradict the primary differentiator
118
+ - Check claims do not use must-not-say terms from POSITIONING.md
119
+
120
+ **Voice/tone updates:**
121
+ - Check new voice attributes do not conflict with the positioning category or audience
122
+ - Check tone changes do not soften or contradict the brand's positioning stance
123
+
124
+ **New banned words:**
125
+ - Check no proposed banned word conflicts with required positioning language
126
+ (e.g., banning a word that appears in the differentiator statement)
127
+
128
+ If conflict detected:
129
+ ```
130
+ takeToMarket > POSITIONING CONFLICT DETECTED
131
+
132
+ Conflict: [specific description]
133
+ Affected field: [which BRAND.md section]
134
+ POSITIONING.md reference: [the conflicting positioning element]
135
+
136
+ Please resolve this conflict before proceeding.
137
+ Recommendation: Adjust the proposed change, or run /ttm-positioning-shift if the
138
+ positioning itself needs updating.
139
+ ```
140
+
141
+ Ask user to revise the conflicting item or skip it.
142
+
143
+ ---
144
+
145
+ ## Step 4: Write Updated BRAND.md
146
+
147
+ Apply validated changes to `.marketing/BRAND.md`:
148
+
149
+ - **Deprecated proof points:** Mark with `[DEPRECATED: YYYY-MM-DD, reason]` suffix in
150
+ the Claim column. Do NOT delete rows -- preserve history.
151
+ - **New proof points:** Add new rows to the `## Proof Points` table with claim, source,
152
+ and current date as verification date.
153
+ - **Voice/tone updates:** Update the `## Voice Archetype` section and/or
154
+ `## Tone per Context` table with new values.
155
+ - **New banned words:** Add rows to the `## Banned Words` table with word and reasoning.
156
+
157
+ **CRITICAL:** Preserve the `<!-- _SUMMARY -->` and `<!-- END_SUMMARY -->` delimiters
158
+ exactly as they are. Update the summary block between these markers to reflect new
159
+ voice archetype and banned words if changed.
160
+
161
+ Preserve all existing file structure, frontmatter, and section ordering.
162
+
163
+ Write the updated file via the Write tool.
164
+
165
+ ---
166
+
167
+ ## Step 5: Completion Banner
168
+
169
+ ```
170
+ ========================================
171
+ takeToMarket > BRAND REFRESH COMPLETE
172
+ ========================================
173
+
174
+ Updated sections:
175
+ - [list of changed sections, e.g., "Proof Points (2 added, 1 deprecated)"]
176
+ - [e.g., "Banned Words (3 added)"]
177
+
178
+ Next: Run /ttm-positioning-check to verify alignment across recent assets
179
+ ```
180
+
181
+ </process>
182
+
183
+ <success_criteria>
184
+ - [ ] Tier 1 summaries loaded from all 9 reference files
185
+ - [ ] Tier 2 full content loaded for BRAND.md
186
+ - [ ] Current brand state displayed to user
187
+ - [ ] User provided updates for at least one section (or exited with "no changes")
188
+ - [ ] All proposed changes validated against POSITIONING.md
189
+ - [ ] Conflicts flagged and resolved before writing
190
+ - [ ] BRAND.md updated with deprecated markers, new entries, and preserved structure
191
+ - [ ] Summary markers (<!-- _SUMMARY --> / <!-- END_SUMMARY -->) preserved
192
+ - [ ] Completion banner displayed with changed sections
193
+ </success_criteria>