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,405 @@
1
+ <purpose>
2
+ Learn workflow for /ttm-learn. Extracts lessons from campaign measurement data
3
+ and campaign history. Proposes reference file edits as narratives with per-edit
4
+ human approval gates (per D-07, D-08). Logs root-cause taxonomy entries to
5
+ LEARNINGS.md (per D-10, LIFE-17). Runs pattern extraction across campaigns when
6
+ 3+ campaigns have lessons (LRNG-03). Updates campaign state with learn.* fields.
7
+
8
+ This workflow closes the learning loop: lessons from each campaign compound into
9
+ reference file improvements and pattern libraries that make future campaigns
10
+ better. LEARNINGS.md is already loaded as Tier 1 context in the brief workflow
11
+ (LRNG-04), so future campaigns automatically benefit from past learnings.
12
+ </purpose>
13
+
14
+ <required_reading>
15
+ @${CLAUDE_PLUGIN_ROOT}/references/context-loading.md
16
+ @${CLAUDE_PLUGIN_ROOT}/references/learnings-extraction.md
17
+ </required_reading>
18
+
19
+ <constraints>
20
+ ## POSITIONING.md is READ-ONLY
21
+
22
+ **Do NOT modify `.marketing/POSITIONING.md` during this workflow.**
23
+
24
+ POSITIONING.md is an architectural invariant. If you identify a lesson that implies
25
+ a POSITIONING.md edit:
26
+ - Do NOT offer to apply the edit directly
27
+ - Instead, offer to launch /ttm-positioning-shift with the proposal
28
+ - Only /ttm-positioning-shift and /ttm-init may modify POSITIONING.md
29
+
30
+ **POSITIONING.md edits MUST be routed through /ttm-positioning-shift.** Do NOT apply
31
+ POSITIONING.md edits directly even if the user approves. Instead, display:
32
+ "This edit targets POSITIONING.md. Launch /ttm-positioning-shift to apply it?" (per D-09).
33
+
34
+ ## Reference File Edit Targets
35
+
36
+ Only the following files may be edited via this workflow (per D-09):
37
+ - `.marketing/BRAND.md`
38
+ - `.marketing/ICP.md`
39
+ - `.marketing/CHANNELS.md`
40
+ - `.marketing/POSITIONING.md` (via /ttm-positioning-shift only -- never directly)
41
+ - `.marketing/METRICS.md`
42
+ - `.marketing/COMPETITORS.md`
43
+
44
+ ## Append-Only LEARNINGS.md
45
+
46
+ Lessons are appended after the `<!-- LESSONS BELOW THIS LINE -->` marker.
47
+ Existing lesson rows must never be deleted or modified. Summary counters are
48
+ updated atomically with the append.
49
+ </constraints>
50
+
51
+ <process>
52
+
53
+ ## Text-Mode Detection
54
+
55
+ **Text mode (`--text` flag):** Set `TEXT_MODE=true` if `--text` is present in `$ARGUMENTS`
56
+ or if the runtime is not Claude Code. When TEXT_MODE is active, replace every
57
+ `AskUserQuestion` call with a plain-text numbered list.
58
+
59
+ Detection:
60
+ ```bash
61
+ if echo "$ARGUMENTS" | grep -q -- '--text'; then TEXT_MODE=true; fi
62
+ ```
63
+
64
+ If `AskUserQuestion` tool is not available in the current runtime, set `TEXT_MODE=true`.
65
+
66
+ When TEXT_MODE is active, replace each AskUserQuestion with a plain-text numbered list:
67
+ ```
68
+ [HEADER]
69
+ [QUESTION]
70
+ 1. [OPTION_1_LABEL] -- [OPTION_1_DESCRIPTION]
71
+ 2. [OPTION_2_LABEL] -- [OPTION_2_DESCRIPTION]
72
+ ...
73
+ Type the number of your choice:
74
+ ```
75
+
76
+ ---
77
+
78
+ ## Step 1: Load Context
79
+
80
+ ```
81
+ takeToMarket > LOADING CAMPAIGN CONTEXT FOR LEARNING
82
+ ```
83
+
84
+ Extract SLUG from $ARGUMENTS (strip `--text` flag if present):
85
+ ```bash
86
+ SLUG=$(echo "$ARGUMENTS" | sed 's/--text//g' | xargs)
87
+ ```
88
+
89
+ If SLUG is empty, error: "Usage: /ttm-learn [campaign-slug]. Provide a campaign slug." Exit.
90
+
91
+ **Load Tier 1 summaries** from all 9 reference files (lines 1 to `<!-- END_SUMMARY -->`):
92
+ - `.marketing/POSITIONING.md`
93
+ - `.marketing/BRAND.md`
94
+ - `.marketing/ICP.md`
95
+ - `.marketing/CHANNELS.md`
96
+ - `.marketing/STATE.md` (frontmatter only)
97
+ - `.marketing/CALENDAR.md`
98
+ - `.marketing/COMPETITORS.md`
99
+ - `.marketing/METRICS.md`
100
+ - `.marketing/LEARNINGS.md`
101
+
102
+ **Load Tier 2 (full content)** for learning analysis:
103
+ - `.marketing/LEARNINGS.md` (existing lessons and patterns)
104
+ - `.marketing/METRICS.md` (metric definitions for delta interpretation)
105
+ - `.marketing/BRAND.md` (brand guidelines for edit proposals)
106
+ - `.marketing/ICP.md` (ICP data for edit proposals)
107
+ - `.marketing/CHANNELS.md` (channel data for edit proposals)
108
+ - `.marketing/COMPETITORS.md` (competitor data for edit proposals)
109
+ - `.marketing/POSITIONING.md` (read-only -- for positioning drift detection)
110
+
111
+ **Load campaign artifacts** per the scan order from learnings-extraction.md:
112
+ - `.marketing/CAMPAIGNS/${SLUG}/STATE.md` (frontmatter for gate results, run counts)
113
+ - `.marketing/CAMPAIGNS/${SLUG}/MEASUREMENT.md` (measurement report with outcome data)
114
+ - `.marketing/CAMPAIGNS/${SLUG}/BRIEF.md` (original strategy and targets)
115
+ - `.marketing/CAMPAIGNS/${SLUG}/VERIFICATION.md` (gate details if it exists)
116
+ - `.marketing/CAMPAIGNS/${SLUG}/FIX-BRIEF-*.md` (fix details if they exist)
117
+ - `.marketing/CAMPAIGNS/${SLUG}/REVIEW-FEEDBACK-*.md` (reviewer comments if they exist)
118
+
119
+ If `.marketing/CAMPAIGNS/${SLUG}/` does not exist, error: "Campaign '${SLUG}' not found. Check the slug and try again." Exit.
120
+
121
+ If `.marketing/CAMPAIGNS/${SLUG}/MEASUREMENT.md` does not exist, error: "No measurement data found for '${SLUG}'. Run /ttm-measure first." Exit.
122
+
123
+ ---
124
+
125
+ ## Step 2: Validate Campaign State
126
+
127
+ ```bash
128
+ node "${CLAUDE_PLUGIN_ROOT}/bin/ttm-tools.cjs" campaign state ${SLUG} --raw
129
+ ```
130
+
131
+ - Verify campaign is in `measured` or `learned` phase (re-learning is allowed)
132
+ - If not measured: display error:
133
+ ```
134
+ takeToMarket > ERROR
135
+ Campaign must be measured before learning. Current phase: ${PHASE}.
136
+ Run /ttm-measure first.
137
+ ```
138
+ Exit.
139
+
140
+ ---
141
+
142
+ ## Step 3: Extract Outcome Deltas (per LRNG-02)
143
+
144
+ Compare measurement results from MEASUREMENT.md against brief targets from BRIEF.md:
145
+
146
+ - For each metric in MEASUREMENT.md, find the corresponding target from BRIEF.md
147
+ - Calculate delta: `((actual - target) / target) * 100`
148
+ - Classify each delta:
149
+ - **overperformed**: more than 10% above target
150
+ - **met**: within +/-10% of target
151
+ - **underperformed**: more than 10% below target
152
+
153
+ Display:
154
+ ```
155
+ takeToMarket > OUTCOME DELTAS
156
+
157
+ | Metric | Target | Actual | Delta | Classification |
158
+ |--------|--------|--------|-------|----------------|
159
+ | [outcome metric] | [target] | [actual] | [+/-X%] | [over/met/under] |
160
+ | [output metric 1] | ... | ... | ... | ... |
161
+ ```
162
+
163
+ ---
164
+
165
+ ## Step 4: Classify Lessons per Root-Cause Taxonomy (per LRNG-01, LIFE-17)
166
+
167
+ For each underperforming or failing element, classify using the 7-category root-cause
168
+ taxonomy from learnings-extraction.md:
169
+
170
+ | Category | Description |
171
+ |----------|-------------|
172
+ | positioning-drift | Asset deviated from POSITIONING.md -- used competitor language, wrong value prop, or off-brand messaging |
173
+ | weak-hook | Opening failed to capture attention -- generic intro, no specific pain addressed, buried lede |
174
+ | wrong-channel | Content published on ineffective channel for target ICP or content type |
175
+ | bad-timing | Published at wrong time, wrong cadence, or conflicted with external events |
176
+ | unverifiable-claim | Claim lacked proof point, source, or measurable evidence |
177
+ | broken-funnel | CTA or conversion path was broken, misaligned, or missing |
178
+ | creative-fatigue | Repeated format or angle with diminishing returns -- audience saturation |
179
+
180
+ For each overperforming element, classify as `success` with a description of what
181
+ pattern drove the win.
182
+
183
+ **Artifact scan order** (per learnings-extraction.md):
184
+ 1. STATE.md gate fields for pass/fail patterns
185
+ 2. VERIFICATION.md for specific gate failure details
186
+ 3. FIX-BRIEF files for root-cause analysis already performed
187
+ 4. REVIEW-FEEDBACK files for human reviewer signals
188
+ 5. BRIEF.md for strategic context
189
+
190
+ Generate 1 lesson per notable delta (both successes and failures). Each lesson is
191
+ one specific, actionable sentence -- not a generic observation.
192
+
193
+ Display each lesson:
194
+ ```
195
+ takeToMarket > LESSONS EXTRACTED
196
+
197
+ ${N} lessons identified:
198
+
199
+ 1. [${CATEGORY}] ${LESSON_TEXT}
200
+ 2. [${CATEGORY}] ${LESSON_TEXT}
201
+ ...
202
+ ```
203
+
204
+ ---
205
+
206
+ ## Step 5: Propose Reference File Edits (per D-07, D-08, D-09, LIFE-16)
207
+
208
+ For each lesson that implies a systemic change to a reference file, propose an edit
209
+ using the narrative + apply approach (per D-07).
210
+
211
+ If no lessons imply systemic changes, display:
212
+ ```
213
+ takeToMarket > REFERENCE FILE EDITS
214
+ No systemic reference file edits identified. All lessons logged as observations.
215
+ ```
216
+
217
+ For each proposed edit:
218
+
219
+ ### 5a. Present the narrative
220
+
221
+ Display the reasoning in plain language:
222
+ ```
223
+ takeToMarket > PROPOSED EDIT ${N} of ${TOTAL}
224
+
225
+ Based on campaign "${SLUG}" results, [specific observation from measurement data].
226
+ [Reasoning derived from the data and campaign artifacts].
227
+ Therefore, [specific edit proposal describing the change].
228
+
229
+ File: .marketing/${TARGET_FILE}.md
230
+ Section: [section name where the edit applies]
231
+ Change: [specific addition, modification, or removal]
232
+ ```
233
+
234
+ ### 5b. Ask for approval (per D-08)
235
+
236
+ Each edit gets its own approval gate. No batch-apply.
237
+
238
+ **If AskUserQuestion is available (TEXT_MODE=false):**
239
+ Use AskUserQuestion with options:
240
+ - Apply -- Update ${TARGET_FILE}.md with this change
241
+ - Skip -- Keep ${TARGET_FILE}.md unchanged, log lesson only
242
+ - Modify -- Edit the proposed change before applying
243
+
244
+ **If TEXT_MODE=true:**
245
+ ```
246
+ Apply this edit to .marketing/${TARGET_FILE}.md?
247
+ 1. Apply -- Update ${TARGET_FILE}.md with this change
248
+ 2. Skip -- Keep ${TARGET_FILE}.md unchanged, log lesson only
249
+ 3. Modify -- Edit the proposed change before applying
250
+ Type the number of your choice:
251
+ ```
252
+
253
+ ### 5c. POSITIONING.md special handling (per D-09)
254
+
255
+ If the proposed edit targets POSITIONING.md, do NOT offer direct apply. Instead:
256
+
257
+ **If AskUserQuestion is available (TEXT_MODE=false):**
258
+ Use AskUserQuestion with header "POSITIONING.md Edit Detected":
259
+ - Launch positioning shift -- Start /ttm-positioning-shift with this proposal
260
+ - Skip -- Log the lesson but do not change POSITIONING.md
261
+
262
+ **If TEXT_MODE=true:**
263
+ ```
264
+ This edit targets POSITIONING.md, which is locked during campaigns.
265
+ This change requires /ttm-positioning-shift.
266
+ 1. Launch positioning shift -- Start /ttm-positioning-shift with this proposal
267
+ 2. Skip -- Log the lesson but do not change POSITIONING.md
268
+ Type the number of your choice:
269
+ ```
270
+
271
+ ### 5d. Apply the user's choice
272
+
273
+ - **If user selects "Apply":** Read the target file, find the specified section, apply
274
+ the edit, write the updated file. Track as edits_applied.
275
+ - **If user selects "Modify":** Ask user for the modified version (via AskUserQuestion
276
+ or text prompt), then apply the modified edit. Track as edits_applied.
277
+ - **If user selects "Skip":** Set Action Taken for this lesson to "none -- skipped by user."
278
+ - **If user selects "Launch positioning shift":** Note in the lesson log Action Taken:
279
+ "Deferred to /ttm-positioning-shift." Do NOT apply the edit.
280
+
281
+ Track counts: `edits_proposed` (total proposed), `edits_applied` (Apply + Modify selections).
282
+
283
+ ---
284
+
285
+ ## Step 6: Append Lessons to LEARNINGS.md (per LRNG-01, LIFE-17)
286
+
287
+ 1. Read `.marketing/LEARNINGS.md`
288
+ 2. Find the marker line: `<!-- LESSONS BELOW THIS LINE -->`
289
+ 3. Insert new lesson rows immediately after the marker, one row per lesson from Step 4:
290
+ ```
291
+ | ${DATE} | ${SLUG} | ${CATEGORY} | ${LESSON_TEXT} | ${ACTION_TAKEN} |
292
+ ```
293
+ Where:
294
+ - `${DATE}` is today's ISO date (e.g., 2024-03-15)
295
+ - `${SLUG}` is the campaign slug
296
+ - `${CATEGORY}` is the root-cause taxonomy category (or `success`)
297
+ - `${LESSON_TEXT}` is the one-sentence lesson
298
+ - `${ACTION_TAKEN}` is what was done (e.g., "Updated BRAND.md hook guidelines",
299
+ "none -- skipped by user", "Deferred to /ttm-positioning-shift")
300
+
301
+ 4. Update the Summary section counters at the top of the file:
302
+ - **Total lessons:** increment by number of new lessons
303
+ - **Last lesson date:** set to today's date
304
+ - **Top pattern:** recalculate the most frequent category across all lesson rows
305
+
306
+ 5. Write updated LEARNINGS.md
307
+
308
+ **Important:** Do not delete or modify any existing lesson rows. Append only.
309
+
310
+ ---
311
+
312
+ ## Step 7: Pattern Extraction (per LRNG-03)
313
+
314
+ Count the number of distinct campaign slugs in the LEARNINGS.md Lessons Log table
315
+ (the Campaign column).
316
+
317
+ **If fewer than 3 campaigns have entries:**
318
+ ```
319
+ takeToMarket > PATTERN EXTRACTION
320
+
321
+ Pattern extraction requires 3+ campaigns with lessons. Current: ${N}.
322
+ Skipping pattern extraction -- will run automatically after ${3 - N} more campaigns.
323
+ ```
324
+
325
+ **If 3 or more campaigns have entries:**
326
+
327
+ Scan all lesson rows in the Lessons Log for frequency patterns across campaigns:
328
+
329
+ 1. **Winning Hooks:** Identify hooks or openings that appeared in `success` lessons
330
+ across 2+ campaigns. Extract the common pattern or approach.
331
+
332
+ 2. **Winning Angles:** Identify positioning angles or themes that showed consistent
333
+ overperformance across campaigns.
334
+
335
+ 3. **Winning Formats:** Identify content formats that produced the best outcome
336
+ metric results across campaigns.
337
+
338
+ 4. **Anti-Patterns:** Identify approaches that appeared in failure lessons (any
339
+ root-cause category except `success`) across 2+ campaigns.
340
+
341
+ Update the Pattern Extraction sections in LEARNINGS.md:
342
+ - Replace the `[Populated after 3+ campaigns...]` placeholder text with actual patterns
343
+ - Each pattern entry should include: the pattern description, which campaigns exhibited
344
+ it, and the measured impact
345
+
346
+ Write updated LEARNINGS.md.
347
+
348
+ ---
349
+
350
+ ## Step 8: Update Campaign State
351
+
352
+ ```bash
353
+ node "${CLAUDE_PLUGIN_ROOT}/bin/ttm-tools.cjs" campaign update ${SLUG} phase learned
354
+ node "${CLAUDE_PLUGIN_ROOT}/bin/ttm-tools.cjs" campaign update ${SLUG} phase.learned "${ISO_DATE}"
355
+ node "${CLAUDE_PLUGIN_ROOT}/bin/ttm-tools.cjs" campaign update ${SLUG} learn.run_count ${RUN_COUNT}
356
+ node "${CLAUDE_PLUGIN_ROOT}/bin/ttm-tools.cjs" campaign update ${SLUG} learn.last_run ${ISO_DATE}
357
+ node "${CLAUDE_PLUGIN_ROOT}/bin/ttm-tools.cjs" campaign update ${SLUG} learn.lessons_extracted ${LESSON_COUNT}
358
+ node "${CLAUDE_PLUGIN_ROOT}/bin/ttm-tools.cjs" campaign update ${SLUG} learn.edits_proposed ${PROPOSED_COUNT}
359
+ node "${CLAUDE_PLUGIN_ROOT}/bin/ttm-tools.cjs" campaign update ${SLUG} learn.edits_applied ${APPLIED_COUNT}
360
+ ```
361
+
362
+ Where:
363
+ - `${RUN_COUNT}` is the previous learn.run_count + 1 (or 1 if first run)
364
+ - `${ISO_DATE}` is today's ISO date
365
+ - `${LESSON_COUNT}` is the number of lessons extracted in Step 4
366
+ - `${PROPOSED_COUNT}` is the number of reference file edits proposed in Step 5
367
+ - `${APPLIED_COUNT}` is the number of edits the user approved (Apply + Modify)
368
+
369
+ ---
370
+
371
+ ## Step 9: Display Summary and Next Steps
372
+
373
+ ```
374
+ takeToMarket > LEARN PHASE COMPLETE
375
+
376
+ Campaign: ${SLUG}
377
+ Lessons extracted: ${LESSON_COUNT} (${SUCCESS_COUNT} successes, ${FAILURE_COUNT} failures)
378
+ Reference edits proposed: ${PROPOSED_COUNT}
379
+ Reference edits applied: ${APPLIED_COUNT}
380
+ Pattern extraction: ${PATTERN_STATUS}
381
+
382
+ Lessons appended to: .marketing/LEARNINGS.md
383
+
384
+ Next: Run /ttm-archive ${SLUG} to finalize the campaign, or start a new campaign.
385
+ Future campaigns will load these lessons via /ttm-brief to prevent repeating mistakes.
386
+ ```
387
+
388
+ Where `${PATTERN_STATUS}` is one of:
389
+ - "Completed -- ${PATTERN_COUNT} patterns identified" (if 3+ campaigns)
390
+ - "Skipped -- ${N} of 3 campaigns needed" (if fewer than 3)
391
+
392
+ </process>
393
+
394
+ <checklist>
395
+ - [ ] Campaign is in measured or learned phase
396
+ - [ ] Campaign artifacts scanned in correct order (STATE > VERIFICATION > FIX-BRIEF > REVIEW-FEEDBACK > BRIEF)
397
+ - [ ] Outcome deltas calculated for all metrics
398
+ - [ ] Each lesson classified with root-cause taxonomy category
399
+ - [ ] Reference file edits proposed as narratives with per-edit human approval
400
+ - [ ] POSITIONING.md edits routed through /ttm-positioning-shift (not direct edit)
401
+ - [ ] Lessons appended to LEARNINGS.md after marker line
402
+ - [ ] Summary counters updated in LEARNINGS.md
403
+ - [ ] Pattern extraction runs only if 3+ campaign slugs in lessons log
404
+ - [ ] Campaign state updated with learn.* fields
405
+ </checklist>