@sellable/mcp 0.1.368 → 0.1.370

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.
@@ -51,11 +51,462 @@ Default evergreen plan per workspace (override only if the prompt specifies diff
51
51
  3. **`<Workspace/Team> - Shared Cold Fallback`** — one shared cold/fallback campaign lane across senders
52
52
  </inputs>
53
53
 
54
+ <command_backed_workflow>
55
+ For full/customer-visible setup, the first operational command is always
56
+ `setup_evergreen_campaigns({ mode:"plan", yolo })`. Inventory can happen first
57
+ for operator understanding, but do not create/reuse/repair campaign shells,
58
+ source rows, messages, sequence, approvals, or cleanup before the command-backed
59
+ plan returns lane packets.
60
+ If `setup_evergreen_campaigns` is unavailable, returns 404, throws an API
61
+ error, or does not return a current `planRevision` with lane packets, stop
62
+ immediately with `blocked: setup_evergreen_campaigns_unavailable`. Do not fall
63
+ back to ad hoc create-campaign calls, inventory-only guesses, or direct shell
64
+ creation when the command-backed plan is missing.
65
+
66
+ Plan shape:
67
+
68
+ - one Post Engagers lane per sender in the **Post Engagers sender scope**;
69
+ - one shared Signal Discovery lane for the **shared lane sender scope**;
70
+ - one shared Cold Fallback lane for the **shared lane sender scope**;
71
+ - explicit existing campaign/table bindings when the user points at a canonical
72
+ lane. Pass those exact ids to the plan and reuse/verify them instead of
73
+ creating duplicates.
74
+ - If a user supplies canonical ids, reuse/verify them instead of creating duplicates.
75
+
76
+ The command-backed unbound plan is authoritative. If
77
+ `setup_evergreen_campaigns({ mode:"plan", ... })` returns a lane packet with
78
+ `intent:"create"`, execute that create packet exactly. Do not convert it into an
79
+ explicit binding because `list_tables`, `get_campaigns`, a waterfall, or old
80
+ inventory shows an `ARCHIVED` campaign/table with a matching name. Archived
81
+ campaigns are not reusable evergreen targets. Only pass an archived
82
+ campaign/table as an explicit binding when the user supplied those exact ids and
83
+ explicitly allowed dashboard visibility repair; otherwise ignore archived
84
+ matches for execution and let the create packet proceed.
85
+
86
+ Use `selectedSenderIds` only as a legacy shorthand when the same senders should
87
+ get sender-owned Post Engagers lanes and attach to shared lanes. When the scopes
88
+ differ, pass both explicit arrays:
89
+
90
+ - `postEngagerSenderIds`: only senders that should have sender-owned Post
91
+ Engagers campaigns.
92
+ - `sharedSenderIds`: senders attached to the shared Signal Discovery and Shared
93
+ Cold Fallback campaigns.
94
+
95
+ If the operator says a sender is shared-only, do not create a Post Engagers lane
96
+ for that shared-only sender. Example: if Justin already has a Post Engagers
97
+ campaign and Jell/Hulan should only participate in the two shared campaigns,
98
+ call `setup_evergreen_campaigns` with `postEngagerSenderIds:["<justin id>"]`
99
+ and `sharedSenderIds:["<justin id>","<jell or hulan id>"]`.
100
+
101
+ When senders are ambiguous, ask which sender ids belong in the Post Engagers
102
+ sender scope and which belong in the shared lane sender scope before planning.
103
+ If the operator says all connected senders for both scopes, pass
104
+ `allConnectedSenders` and let the command return exact selected sender ids or
105
+ blockers.
106
+
107
+ `--yolo` is supported, but it is a safety-scoped execution mode, not a cleanup
108
+ or launch permission. With `--yolo`, pass `yolo:true` to
109
+ `setup_evergreen_campaigns({ mode:"plan", yolo })` and proceed without
110
+ intermediate approval only when every selected lane packet returns
111
+ `autoExecutable:true`. `--yolo` does not authorize archive/delete cleanup,
112
+ launch/start, schedule/send, broad approve-all, wrong workspace work, stale
113
+ plan execution, paid InMail spend, or ambiguous target choice. Stop on wrong
114
+ workspace, cleanup/archive/delete need, stale plan, disconnected sender,
115
+ duplicate candidate, unsafe side effect, missing source proof, or missing
116
+ message proof.
117
+
118
+ When safe-yolo is blocked only because the plan needs normal setup work, ask
119
+ for a **bounded delegated approval** over the rendered current plan instead of
120
+ asking for each substep. The approval packet must name the workspace id, sender
121
+ ids, lane keys, campaign/table ids or create intents, source/import caps,
122
+ generate-message caps, route-proof approval policy, selectedActionIds,
123
+ planRevision, allowed side-effect classes, and stop conditions. After that one
124
+ approval covers the current planRevision, the parent may act on behalf of the
125
+ operator and execute the selectedActionIds end to end. Do not ask again for
126
+ substep approvals for source import, create-campaign choices, Message Drafting,
127
+ sequence attach/precheck, or exactly one route-proof approval when those actions
128
+ are within the lane packet, approved caps, approved side-effect classes, and
129
+ route-proof approval policy. Stop and re-plan if any fresh reread changes the
130
+ workspace id, sender ids, source/list id, campaign/table id, new campaign/table
131
+ id, planRevision, actionId, selectedActionIds, allowed side effects, caps,
132
+ status, or blocker set outside the approved packet.
133
+ The short rule: one approval covers the current planRevision and selectedActionIds.
134
+ The execution rule: act on behalf of the operator; do not ask again for substep approvals while work stays within the lane packet, approved caps, approved side-effect classes, and route-proof approval policy.
135
+ The drift rule: stop and re-plan when ids, caps, blockers, side-effect classes, or any new campaign/table id leave the approved packet.
136
+
137
+ After bounded delegated approval or safe `--yolo`, fan out lane worker tasks
138
+ only from the current plan. Each worker receives the complete lane packet:
139
+ workspace id, sender ids, lane key/type, existing campaign/table binding or
140
+ create intent, source hints, caps, planRevision, actionId, allowed side effects,
141
+ postconditions, and the packet's `workerDispatch` policy. Treat
142
+ `workerDispatch.requiresVisibleThreadOrDurableReceipt:true` as a hard
143
+ execution boundary, not guidance. Read and preserve `workerDispatch.acceptedRuntimes`,
144
+ `workerDispatch.rejectedRuntimes`, and `workerDispatch.receiptArtifactHint`
145
+ before dispatch.
146
+
147
+ Worker fan-out must use visible or durable execution. Preferred in local Codex
148
+ is a visible Codex thread created with `codex_app.create_thread`; the parent
149
+ must record the returned thread id, pass exactly one lane packet into that
150
+ thread, and require the worker to write the lane receipt at the artifact path
151
+ named by `workerDispatch.receiptArtifactHint`. A streaming worker or branch
152
+ worker is acceptable only when it writes a durable per-lane receipt artifact as
153
+ it works. `multi_agent_v1.spawn_agent`, raw `spawn_agent`, or any opaque
154
+ Task/subagent runtime that cannot expose a visible thread id or durable receipt
155
+ artifact is not accepted as command-level UAT proof and must not be used for
156
+ mutating evergreen setup.
157
+
158
+ Run this preflight before the first irreversible product mutation in any lane:
159
+ the parent must have recorded either a visible Codex thread id or a durable
160
+ `receiptArtifactPath` for that lane. If the runtime cannot provide this, stop
161
+ with `blocked: missing_visible_or_durable_lane_worker_runtime` before calling
162
+ `create_campaign`, `update_campaign`, `import_leads`, `confirm_lead_list`, or
163
+ any source/message/sequence mutation. Do not downgrade this to
164
+ `missing_parallel_lane_worker_runtime` when an opaque runtime exists: an
165
+ opaque runtime is still missing visible/durable proof. If a worker creates
166
+ partial product state without receipts, the run is blocked; created objects exist
167
+ is not equivalent to command completion.
168
+
169
+ Workers must explicitly load and use the installed visible
170
+ `$sellable:create-campaign` wrapper as the nested workflow entrypoint, then
171
+ load `create-campaign-v2` and `create-campaign-v2/core/flow.v2.json` through
172
+ the packaged MCP prompt/asset loaders before campaign creation or repair. The
173
+ worker then uses that create-campaign workflow/subskills for campaign
174
+ creation/setup, source/import, filter choice, Message Drafting, packaged
175
+ `generate-messages`, sequence attachment, and send-review readiness. Do not
176
+ rebuild those steps ad hoc in the parent thread or from a copied receipt
177
+ checklist. The parent thread is only the planner, dispatcher, verifier, and
178
+ receipt collector: it must not call `create_campaign`, `import_leads`,
179
+ `start_campaign_message_preparation`, `update_cell`, or sequence-attach tools
180
+ for a lane that was assigned to a worker. When the host supports visible Codex
181
+ threads, branch execution with durable receipts, or a streaming durable worker,
182
+ assign one lane packet per worker and run the lane workers in parallel. If the
183
+ host cannot run parallel workers with visible/durable receipts, report
184
+ `blocked: missing_visible_or_durable_lane_worker_runtime` instead of silently
185
+ doing all lane creation sequentially in the parent thread.
186
+ Short form: the parent thread is the planner, dispatcher, verifier, and receipt collector.
187
+ Before the first mutating lane action, complete an execution-runtime preflight:
188
+ name the callable worker surface/tool that will run lane packets and the proof
189
+ it gives (`thread id`, `receiptArtifactPath`, or both). If you cannot name a
190
+ real callable visible/durable worker runtime, stop with
191
+ `blocked: missing_visible_or_durable_lane_worker_runtime` before calling
192
+ `create_campaign`, `update_campaign`, `import_leads`, `confirm_lead_list`, or
193
+ any source/message/sequence mutation. Creating campaign shells first and then
194
+ discovering the worker runtime is missing is a failed run.
195
+ Legacy reports may mention `blocked: missing_parallel_lane_worker_runtime`;
196
+ for new command runs, use the visible/durable blocker above.
197
+
198
+ For any lane with `intent:"create"`, the worker must satisfy the normal
199
+ net-new create-campaign preflight before shell creation: load
200
+ `get_subskill_prompt({ subskillName:"research-sender" })`, run the sender/team
201
+ identity research needed for the brief, call `complete_sender_research(...)`,
202
+ then call `create_campaign`. Do not bypass this with a parent-thread brief or
203
+ by directly setting campaign state.
204
+
205
+ Workers return worker receipts. Each customer-visible lane receipt must include
206
+ one durable `createCampaignStepReceipt` built from actual tool calls or worker receipts,
207
+ not a parent-thread summary. The receipt must include:
208
+
209
+ - `setupPlanCall`: the exact `setup_evergreen_campaigns({ mode:"plan", ... })`
210
+ planRevision, selected actionId, lane key, workspace id, sender ids, and
211
+ campaign/table binding or create intent used before work started. For a
212
+ create lane, this receipt must explicitly include `createIntent:true`; for a
213
+ reuse lane, do not report `createIntent:true`.
214
+ - `createCampaignWorkflowReceipt`: proof the worker loaded the actual installed
215
+ `$sellable:create-campaign` wrapper instead of doing ad hoc MCP calls. It must
216
+ include `skillCommand:"$sellable:create-campaign"`,
217
+ `skillName:"create-campaign"`, `wrapperSkillLoaded:true`,
218
+ `workflowPromptName:"create-campaign-v2"`,
219
+ `workflowPromptLoadedToHasMoreFalse:true`,
220
+ `workflowAssetPath:"create-campaign-v2/core/flow.v2.json"`,
221
+ `workflowAssetLoaded:true`, the real `workerRuntime`, a visible
222
+ `workerThreadId` or durable `receiptArtifactPath`, `durableReceiptWritten:true`
223
+ when using a receipt file, and `notAdHoc:true`.
224
+ - `researchSenderReceipt`: `research-sender` prompt load proof,
225
+ `complete_sender_research` result, sender LinkedIn identity basis, and the
226
+ notes/proof counts used before the net-new `create_campaign` call.
227
+ - `campaignBriefReceipt`: the CampaignOffer/campaign id, current
228
+ workflowTableId, brief hash or updated-at marker, delivery format, token
229
+ rules, hard avoids, source-use rules, and first-message template state.
230
+ - `sourceDecisionReceipt`: selected source/list id, provider, cursor/inventory
231
+ state, import/copy caps, explicit `dedupeDncProviderExclusions:true` or an
232
+ equivalent exclusions object, row ids or row-count evidence (`rowCount`,
233
+ `readyRowCount`, or `rowEvidence`), and the reason no colder source was used
234
+ before the current source was proven exhausted or insufficient.
235
+ - `filterDecisionReceipt`: saved/applied filter ids or explicit skip-filter
236
+ decision with current campaign/table basis.
237
+ - `messageDraftingReceipt`: the Message Drafting proof described below,
238
+ including packaged `generate-messages` prompt/assets and validation.
239
+ - `reviewBatchReceipt`: review-batch row ids/hash, generated row count,
240
+ quality-valid route-proof row id when approved, and proof that no broad
241
+ approve-all occurred.
242
+ - `sequenceReceipt`: exact current workflowTableId, recommended non-paid
243
+ sequence attach/precheck result, and readback showing `hasSequence:true` when
244
+ completion is claimed.
245
+ - final paused-send proof: if the current campaign table is `DRAFT` after the
246
+ sequence is attached, call the product `pause_campaign({ campaignId })`
247
+ endpoint/tool to put the unlaunched campaign into `PAUSED` review state, then
248
+ reread the campaign/table. Do not raw-write `campaignStatus`, do not start or
249
+ launch, and do not schedule/send. Completion requires reread proof of
250
+ `currentStep:"send"` and `campaignStatus:"PAUSED"`.
251
+ - `verifyCall`: the exact `setup_evergreen_campaigns({ mode:"verify",
252
+ planRevision, selectedActionIds, receipts })` call/result used before the
253
+ parent reports completion.
254
+
255
+ Before writing the durable receipt, run a receipt self-check. The top-level
256
+ receipt must include top-level `planRevision`, `actionId`, `laneKey`,
257
+ `laneType`, `workspaceId`, and `senderIds`, plus campaign/table/source ids and
258
+ row/message/approval counts. Inside
259
+ `createCampaignStepReceipt.messageDraftingReceipt`, `sampleMessages[]` must
260
+ include `rowId`, `generatedMessageText`, `verdict`, and `issues`. Do not
261
+ substitute `message` for `generatedMessageText`. Do not substitute
262
+ `passVerdict` for `verdict`. If the self-check fails, fix the receipt before
263
+ ending; do not leave the parent to infer canonical fields from top-level
264
+ aliases or narrative text.
265
+ Self-check shorthand: top-level `planRevision`, `actionId`, `laneKey`, `laneType`, `workspaceId`, and `senderIds` must exist before worker completion.
266
+ Self-check shorthand: `sampleMessages[]` must include `rowId`, `generatedMessageText`, `verdict`, and `issues`.
267
+ Self-check shorthand: Do not substitute `message` for `generatedMessageText`.
268
+ Self-check shorthand: Do not substitute `passVerdict` for `verdict`.
269
+ Self-check shorthand: If the self-check fails, fix the receipt before ending.
270
+
271
+ Use these canonical receipt leaf names exactly. Do not substitute looser aliases
272
+ like `generateMessagesPromptLoad`, `requiredAssetLoads`,
273
+ `validationPromptLoad`, `reviewBatchBasisHash`, `reviewRowIds`,
274
+ `sequenceActionTypes`, or `pass:true` unless you also include the canonical
275
+ fields below:
276
+
277
+ The receipt status must be `status:"succeeded"` or `status:"completed"` when
278
+ the lane is complete. Do not use `status:"passed"` or
279
+ `status:"passed_with_warnings"` as the primary success status. Warnings may go
280
+ in a separate `warnings` array, but the completion status stays canonical.
281
+
282
+ All step proof objects must live under `createCampaignStepReceipt`. Do not put
283
+ `createCampaignWorkflowReceipt`, `campaignBriefReceipt`,
284
+ `sourceDecisionReceipt`, `filterDecisionReceipt`, `messageDraftingReceipt`,
285
+ `reviewBatchReceipt`, or `sequenceReceipt` only as top-level siblings;
286
+ top-level copies are useful for humans but are not enough for command
287
+ verification unless the same object also appears inside
288
+ `createCampaignStepReceipt`.
289
+
290
+ ```json
291
+ {
292
+ "status": "succeeded",
293
+ "planRevision": "<original planRevision>",
294
+ "laneKey": "<lane key>",
295
+ "laneType": "<lane type>",
296
+ "workspaceId": "<workspace id>",
297
+ "senderIds": ["<sender id>"],
298
+ "campaignId": "<campaign id>",
299
+ "tableId": "<workflow table id>",
300
+ "createCampaignStepReceipt": {
301
+ "createCampaignWorkflowReceipt": {
302
+ "skillCommand": "$sellable:create-campaign",
303
+ "skillName": "create-campaign",
304
+ "wrapperSkillLoaded": true,
305
+ "workflowPromptName": "create-campaign-v2",
306
+ "workflowPromptLoadedToHasMoreFalse": true,
307
+ "workflowAssetPath": "create-campaign-v2/core/flow.v2.json",
308
+ "workflowAssetLoaded": true,
309
+ "workerRuntime": "separate-codex-thread",
310
+ "workerThreadId": "<visible local Codex thread id>",
311
+ "receiptArtifactPath": ".planning/artifacts/uat/69/lane-receipts/<planRevision>/<actionId>-<laneKey>.json",
312
+ "durableReceiptWritten": true,
313
+ "notAdHoc": true
314
+ },
315
+ "campaignBriefReceipt": {
316
+ "campaignId": "<campaign id>",
317
+ "workflowTableId": "<workflow table id>",
318
+ "briefHash": "<brief/currentApprovedBriefHash>",
319
+ "deliveryFormat": "single message",
320
+ "tokenRules": true,
321
+ "hardAvoids": true,
322
+ "sourceUseRules": true,
323
+ "firstMessageTemplate": "<template or template state>"
324
+ },
325
+ "sourceDecisionReceipt": {
326
+ "sourceId": "<source id>",
327
+ "sourceListId": "<source/list id>",
328
+ "cursorOrInventoryState": "<cursor/inventory/import state>",
329
+ "dedupeDncProviderExclusions": true,
330
+ "sourceLadderReason": "<why the current source is valid before colder sources>"
331
+ },
332
+ "filterDecisionReceipt": {
333
+ "status": "skipped",
334
+ "workflowTableId": "<workflow table id>"
335
+ },
336
+ "messageDraftingReceipt": {
337
+ "statusSource": "branch",
338
+ "promptLoadedToHasMoreFalse": true,
339
+ "requiredAssetsLoaded": true,
340
+ "validationLoaded": true,
341
+ "validationResult": "passed",
342
+ "qualityReview": {"passed": true, "checkedSampleCount": 3, "issues": []},
343
+ "campaignId": "<campaign id>",
344
+ "workflowTableId": "<workflow table id>",
345
+ "selectedLeadListId": "<source/list id>",
346
+ "reviewBatchRowHash": "<review row ids hash>",
347
+ "messageDraftRecommendation": {"basis": "generate-messages"},
348
+ "sampleMessages[].verdict": "pass",
349
+ "sampleMessages": [
350
+ {"rowId": "<row id>", "generatedMessageText": "<message>", "verdict": "pass"}
351
+ ]
352
+ },
353
+ "reviewBatchReceipt": {
354
+ "rowIdsHash": "<review row ids hash>",
355
+ "generatedCount": 3
356
+ },
357
+ "sequenceReceipt": {
358
+ "workflowTableId": "<workflow table id>",
359
+ "hasSequence": true,
360
+ "sequenceReceipt.actionTypes": ["send_invite"],
361
+ "sequenceReceipt.nonPaid": true,
362
+ "actionTypes": ["send_invite"],
363
+ "nonPaid": true
364
+ },
365
+ "finalPausedSendProof": {
366
+ "currentStep": "send",
367
+ "campaignStatus": "PAUSED"
368
+ },
369
+ "verifyCall": {
370
+ "mode": "verify",
371
+ "planRevision": "<original planRevision>",
372
+ "selectedActionIds": ["<all original selected action ids>"]
373
+ }
374
+ }
375
+ }
376
+ ```
377
+
378
+ Verification always uses the original execution planRevision and original
379
+ selectedActionIds from the plan packets that were dispatched before mutation.
380
+ The parent must preserve the original selectedActionIds exactly.
381
+ Do not replace them with a later reuse planRevision/actionIds after the
382
+ campaigns exist. After workers complete, attach or patch `verifyCall` on each
383
+ lane receipt with that original execution planRevision, original
384
+ selectedActionIds, same sender scopes, and the verify result. Only after verify
385
+ succeeds should the parent perform the idempotency rerun.
386
+
387
+ If any required field is missing, report
388
+ `blocked: missing_create_campaign_step_receipt` for that lane and do not call it
389
+ complete.
390
+ If `createCampaignWorkflowReceipt.workerRuntime` is
391
+ `multi_agent_v1.spawn_agent`, `spawn_agent`, or another opaque worker runtime,
392
+ or if it lacks both `workerThreadId` and a durable receipt artifact proof, treat
393
+ the lane as `blocked: missing_create_campaign_step_receipt` with detail
394
+ `createCampaignWorkflowReceipt.workerRuntime.visible_or_durable`; do not call
395
+ verify and do not repair by summarizing product readback in the parent.
396
+
397
+ Message Drafting runtime rule: the preferred proof source is the normal
398
+ create-campaign branch handoff (`watchNarration.workerDetails.messageDraftBuilder`
399
+ or equivalent) with `statusSource:"branch"`. If that internal branch handoff is
400
+ not callable or not exposed in the packaged MCP runtime, do **not** stop after
401
+ creating/importing rows. The lane worker must run the packaged message-drafting
402
+ path itself in the worker thread:
403
+
404
+ 1. Load `get_subskill_prompt({ subskillName:"generate-messages" })` until
405
+ `hasMore:false`.
406
+ 2. Load the required message assets and `create-campaign-v2-validation`.
407
+ 3. Call `start_campaign_message_preparation({ campaignId, tableId,
408
+ targetPreparedMessages, maxRowsToCheck, approvalMode:"mark_ready",
409
+ autoContinue:true })` inside the same lane worker, with bounded caps from the
410
+ lane packet.
411
+ Never call `start_campaign_message_preparation` with `approvalMode:"approve"`
412
+ for evergreen setup. Generate/readiness and approval are separate safety
413
+ steps: first mark rows ready, then inspect generated copy, then approve
414
+ exactly one semantic Approved cell through `select_campaign_cells` and
415
+ `update_cell`.
416
+ Approval shorthand: approve exactly one semantic Approved cell.
417
+ 4. Poll `get_campaign_message_preparation_status` until no queued/active cells
418
+ remain or a bounded stop reason is returned.
419
+ 5. Use `get_campaign_messages_preview` or `select_campaign_cells` to inspect
420
+ generated rows, quality-review at least 3 samples, approve exactly one
421
+ quality-valid route-proof row when none is already approved, and prove no
422
+ broad approve-all happened.
423
+ If a packaged worker or earlier run left more than one generated row
424
+ approved, set any extra approved cells back to false through semantic
425
+ Approved-cell selection before completion. Final proof must show
426
+ approvedGeneratedMessageCount exactly 1. Do not report completion with 2+
427
+ approved rows.
428
+ Approval shorthand: Do not report completion with 2+ approved rows.
429
+ 6. Continue to `attach_recommended_sequence({ campaignId, currentStep:"send" })`
430
+ and, if the campaign is still `DRAFT`, `pause_campaign({ campaignId })`.
431
+ Reread the campaign/table before claiming completion.
432
+
433
+ That packaged worker path must return `messageDraftingReceipt.statusSource:
434
+ "packaged-generate-messages-worker"`. It is accepted only when the receipt
435
+ includes the same prompt/assets/validation proof, current campaign/table/source
436
+ basis, generated review rows, sample messages, quality review, route-proof
437
+ approval evidence, sequence proof, and final paused-send proof required of the
438
+ branch handoff. `statusSource:"parent-thread-fallback"` is still invalid.
439
+
440
+ One lane may produce exactly one CampaignOffer/campaign id and one current
441
+ workflow table id. For `intent:"create"`, the first successful
442
+ `create_campaign` result establishes the lane's only allowed campaign/table
443
+ target. Every later source/import/confirm/message/filter/sequence/readback call
444
+ must use that same campaign id and current workflow table id. If any tool
445
+ returns or creates a different CampaignOffer, workflow table, "Campaign from
446
+ Source" campaign, or shell for the same lane, stop immediately with
447
+ `blocked: duplicate_campaign_offer_created`, include both ids in the receipt,
448
+ and do not report completion. Do not hide the earlier shell by reporting only
449
+ the later imported campaign.
450
+
451
+ Each customer-visible lane receipt must also include message proof from
452
+ `watchNarration.workerDetails.messageDraftBuilder`, the worker's equivalent
453
+ branch handoff record, or the packaged message-prep worker path above. Valid
454
+ evergreen message proof names the current campaign id, workflowTableId,
455
+ selected lead-list or source id, filter choice, and review-batch row ids/hash,
456
+ and it must use `statusSource:"branch"` or
457
+ `statusSource:"packaged-generate-messages-worker"`.
458
+ `statusSource:"parent-thread-fallback"` is not accepted for evergreen
459
+ customer-visible completion because it can be a parent summary rather than proof
460
+ that the create-campaign Message Drafting branch actually ran. The proof must
461
+ show the worker loaded the full packaged prompt with
462
+ `get_subskill_prompt({ subskillName:"generate-messages"` until `hasMore:false`,
463
+ loaded the required message assets, and loaded `create-campaign-v2-validation`
464
+ before returning a `messageDraftRecommendation`.
465
+ The receipt must also include `validationResult:"passed"`, a passed
466
+ quality-review object, and at least 3 concrete reviewed sample messages with
467
+ row ids, generated message text, pass verdicts, and no issues. Shared Cold
468
+ Fallback samples must not open with a standalone name line followed by
469
+ "Hey there" or another generic greeting; that pattern means the lane did not
470
+ finish the create-campaign message workflow to customer quality.
471
+ Shared Signal Discovery samples must not use sender-owned post-engager language
472
+ such as "my post", "thanks for showing support", "saw you pop up", or any copy
473
+ that implies the sending sender authored the source post or personally received
474
+ the prospect's engagement unless the selected source evidence proves that exact
475
+ sender authored the post.
476
+ The generated-message cells are not prompt proof: `currentRevisionGeneratedMessages`,
477
+ Generate Message column counts, `messagesCount`, or rendered row previews prove
478
+ only that table cells exist from the current brief/template, not that the
479
+ create-campaign Message Drafting branch ran. If this receipt is missing, report
480
+ `blocked: missing_message_drafting_receipt` and do not call the lane complete.
481
+
482
+ The parent then calls
483
+ `setup_evergreen_campaigns({ mode:"verify", postEngagerSenderIds,
484
+ sharedSenderIds, planRevision, selectedActionIds, receipts })` using the same
485
+ sender scopes as the plan call and the original execution planRevision/actionIds,
486
+ and reports only verified completion. A verify call without the same sender scopes can recompute an empty or different plan and is invalid proof. A verify call that uses a later reuse planRevision instead of the original execution planRevision is also invalid proof. Only after verify succeeds, rerun
487
+ `setup_evergreen_campaigns({ mode:"plan", postEngagerSenderIds,
488
+ sharedSenderIds, yolo:true })` without explicit campaign/table bindings. That
489
+ idempotency rerun must return `intent:"reuse"` for every completed lane and no
490
+ duplicate-lane blockers before you call the command finished. If verify blocks,
491
+ report the blocker and repair only the missing postconditions from the same
492
+ current plan.
493
+
494
+ Message proof for every customer-visible lane must come from the current
495
+ campaign/table basis and include at least 3 generated review rows from the
496
+ packaged `generate-messages` path before completion is reported.
497
+ Parent-thread handwritten copy or setting `currentStep` is not proof.
498
+ </command_backed_workflow>
499
+
54
500
  <objective>
55
501
  1. **Inventory first**: `get_campaigns` + `list_tables` + `get_campaign_waterfall` in the active workspace. Treat `list_tables` and the managed waterfall as authoritative for older managed slots; `get_campaigns` is a recent campaign page and may miss canonical evergreen lanes. Match existing campaigns/tables/waterfall slots to the plan by name (case-insensitive, ignore suffixes like "(Copy)") and stored slot identity. `list_tables.campaignStatus` and `list_tables.dashboardBucket` are part of the identity check: a matching `ARCHIVED` table/campaign is not a plain `REUSE`. If it is the canonical prod slot and the invocation explicitly allows dashboard visibility repair, repair it to `PAUSED`; otherwise mark it `flagged`/`blocked` and do not create a duplicate. A matching non-archived campaign/table/waterfall slot = REUSE; record it and move on. Never create a second campaign for a slot that already has one in any of those inventories.
56
- 2. **Create only the missing slots** with `create_on_demand_campaign({ name, senderIds, campaignBrief })`:
502
+ 2. **Create only the missing slots** through the full `$sellable:create-campaign`
503
+ workflow path for each lane, using the lane packet as the setup basis:
57
504
  - Post Engagers lanes: that sender's ID only. Shared lanes: all the senders' IDs.
58
- - The brief must include the warm post-engager first-message template style — short, casual, references the post they engaged with, closed question, **no internal vocabulary, no pitch, no meeting ask** in message one:
505
+ - The brief and message direction are lane-specific. Never reuse the Post
506
+ Engagers opening for Shared Cold Fallback.
507
+ - **Post Engagers** first-message style: short, casual, references the
508
+ sender-authored post they engaged with, closed question, **no internal
509
+ vocabulary, no pitch, no meeting ask** in message one:
59
510
 
60
511
  ```
61
512
  {{first_name}}
@@ -65,6 +516,33 @@ Default evergreen plan per workspace (override only if the prompt specifies diff
65
516
  Saw you pop up on my post about {{post_topic_line}}
66
517
  ```
67
518
 
519
+ - **Shared Signal Discovery** first-message style: short, casual, references
520
+ the real observed signal/theme or public conversation. It may mention the
521
+ engagement source only when the source evidence supports it. Do not say
522
+ "my post" unless the selected source post was actually authored by the
523
+ sending sender. Do not thank the prospect for showing support, reacting,
524
+ commenting, or popping up unless this is a sender-owned Post Engagers lane
525
+ with sender-authored source evidence.
526
+ - **Shared Cold Fallback** first-message style: cold, direct, and cohesive.
527
+ It must not pretend there was engagement, must not say "saw you pop up",
528
+ and must not use a standalone name line followed by "Hey there" or other
529
+ generic greeting. It should open with a light role/company/problem
530
+ observation, avoid awkward phrases like "looks like a team where", and ask
531
+ one clear problem question. This is a single-message
532
+ cold path unless the approved create-campaign message workflow proves a
533
+ better delivery format.
534
+ - Every customer-visible lane must run Message Drafting from the current
535
+ campaign/table basis after source rows exist. The worker must load the full
536
+ packaged `generate-messages` prompt, every required asset, and
537
+ `create-campaign-v2-validation`; if the internal branch handoff is not
538
+ callable in the packaged runtime, the worker must call
539
+ `start_campaign_message_preparation` and poll
540
+ `get_campaign_message_preparation_status` from the lane worker. The
541
+ returned receipt must include `statusSource:"branch"` or
542
+ `statusSource:"packaged-generate-messages-worker"`, at least 3 concrete
543
+ reviewed sample messages, a passed validation result, and a passed quality
544
+ review. Row/message counts alone are not enough.
545
+
68
546
  - **The brief must declare the delivery format** so Generate Message writes copy suited to how it actually sends:
69
547
  - DM lanes: add a `Delivery format:` line — either `multiline (each paragraph sends as its own DM message)` or `single message`. When multiline, the template's blank-line paragraphs ARE the message boundaries — write each one as a standalone typed message.
70
548
  - **InMail lanes can never be multiline**: an InMail is one message and the recipient must reply before anything else can be sent. InMail-bound templates must read as one cohesive message — declare `Delivery format: single message (InMail — no follow-up until reply)` and never structure the copy to depend on multi-message pacing.
@@ -90,26 +568,73 @@ Default evergreen plan per workspace (override only if the prompt specifies diff
90
568
  - Message Drafting has run from the current campaign/table basis, using the
91
569
  create-campaign message prompt/assets and validation gate. Updating
92
570
  `currentStep:"messages"` is not proof. Parent-thread handwritten copy is
93
- not a substitute.
571
+ not a substitute. The proof receipt must show
572
+ `get_subskill_prompt({ subskillName:"generate-messages"` was loaded until
573
+ `hasMore:false`, required message assets were loaded, and
574
+ `create-campaign-v2-validation` ran through
575
+ `workerDetails.messageDraftBuilder` with `statusSource:"branch"` or
576
+ through the lane worker's packaged message-prep path with
577
+ `statusSource:"packaged-generate-messages-worker"`,
578
+ `start_campaign_message_preparation`, and
579
+ `get_campaign_message_preparation_status`. The generated-message cells are
580
+ not prompt proof; `currentRevisionGeneratedMessages` and row previews are
581
+ only downstream cell evidence. The proof must include
582
+ `validationResult:"passed"`, a passed quality review, and at least 3
583
+ reviewed sample messages. For Shared Cold Fallback, reject samples that
584
+ open with a standalone name followed by "Hey there" or a similarly generic
585
+ greeting.
94
586
  - The first review batch exists and at least 3 review rows have generated
95
587
  messages from the approved brief. If fewer than 3 usable rows exist, report
96
588
  the actual count and why.
589
+ If a bounded preparation job requested more than the minimum but already
590
+ met the minimum generated-message floor, do not stall on a single bad review row once a fresh status/readiness check shows no queued, processing, or active cells; record the shortfall, name the failed/empty-row reason when
591
+ available, and continue with route-proof review rather than expanding source
592
+ or waiting forever.
97
593
  - At least one generated row is approved as a route-proof gate. If zero rows
98
594
  are approved and the prompt explicitly asked for full/customer-ready
99
595
  completion, approve exactly one quality-valid generated row. If one or more
100
596
  rows are already approved, do not add more approvals during evergreen
101
597
  completion. Never broad approve all rows.
102
- - The recommended non-paid sequence is attached, and the watched campaign is
103
- on Send. Use `attach_recommended_sequence({ campaignId, currentStep:"send" })`
104
- when a safe attach is needed. Existing sequence proof may come from
105
- `SEQUENCE_EXISTS`; do not replace it without explicit user confirmation.
106
- - No scheduled, queued outbound, sent outbound, campaign launch, or paid
107
- InMail spend is created by this skill.
598
+ - The recommended non-paid sequence is attached to the current campaign
599
+ table, and the watched campaign is on Send. Use
600
+ `attach_recommended_sequence({ campaignId, currentStep:"send" })` when a
601
+ safe attach is needed. After `confirm_lead_list` or any source-list copy,
602
+ immediately reread `get_campaign({ campaignId })`; the returned
603
+ `workflowTableId` is the current campaign table. Cross-check that exact
604
+ current workflowTableId with `list_tables` and require `hasSequence:true`
605
+ before reporting completion. If a stale shell table has sequence columns but
606
+ the current campaign table does not, `SEQUENCE_EXISTS` is not enough:
607
+ record the stale shell table id, then repair the current workflowTableId
608
+ with `attach_sequence` using the same non-paid product template
609
+ `attach_recommended_sequence` would have selected. Never use a paid-InMail
610
+ template and never attach/replace sequence outside the current table unless
611
+ the current lane packet explicitly allowed sequence repair.
612
+ - If the current campaign table is still `DRAFT` after sequence/readiness
613
+ proof, call `pause_campaign({ campaignId })` and reread. `pause_campaign`
614
+ is the product-native review-state transition; it is not a launch and does
615
+ not schedule or send. Never raw-write campaign status.
616
+ - No scheduled, queued outbound, sent outbound, campaign launch, or paid
617
+ InMail spend is created by this skill.
108
618
  4. **Verify each slot** after create/reuse/repair:
109
619
  - `get_campaign` shows the campaign exists, remains unlaunched, and has the expected workflow table.
110
620
  - Builder truth must match dashboard truth. `currentStep:"running"` is valid only when the linked table has `campaignStatus:"ACTIVE"`. For a `PAUSED` or `ARCHIVED` campaign/table, repair or flag stale `currentStep:"running"` back to launch review (`send` / review-ready) before reporting the slot done. Never call `start_campaign` just to make a stale `running` step true.
111
- - Send/action lanes such as Post Engagers have a sequence attached. Use `list_tables({ hasSequence: true })` as a quick cross-check, but do not treat that filter as the only proof. If the canonical campaign/table is missing from the sequence-filtered table list but a safe `attach_recommended_sequence({ campaignId })` repair/precheck returns `SEQUENCE_EXISTS`, record `sequence attached (verified by SEQUENCE_EXISTS precheck; list_tables.hasSequence mismatch)` and do not retry.
112
- - Only use `attach_recommended_sequence({ campaignId })` for a send-lane sequence repair/precheck when the target is a canonical prod slot and the invoking prompt allows sequence repair. Call it at most once without `confirmed`; a successful response is `repaired`, and `SEQUENCE_EXISTS` is non-mutating proof that a sequence already exists. Never call `attach_recommended_sequence` or `attach_sequence` with `confirmed:true` in evergreen automation unless the user explicitly asks to replace an existing sequence.
621
+ - Send/action lanes such as Post Engagers have a sequence attached on the
622
+ exact current campaign table. Use `list_tables({ hasSequence: true })` as a
623
+ quick cross-check, but do not treat that filter as the only proof. If the
624
+ canonical current campaign table is missing from the sequence-filtered
625
+ table list and `attach_recommended_sequence({ campaignId })` returns
626
+ `SEQUENCE_EXISTS`, inspect whether a stale shell table owns the sequence.
627
+ For a customer-visible completion run, stale shell proof is not completion:
628
+ rerun the current-table repair above or report `blocked: stale_shell_sequence`.
629
+ - Only use `attach_recommended_sequence({ campaignId })` for a send-lane
630
+ sequence repair/precheck when the target is a canonical prod slot and the
631
+ invoking prompt allows sequence repair. Call it at most once without
632
+ `confirmed`; a successful response is `repaired`. Treat `SEQUENCE_EXISTS` as
633
+ non-mutating proof only when the current table also has `hasSequence:true`.
634
+ Never call `attach_recommended_sequence` or `attach_sequence` with
635
+ `confirmed:true` in evergreen automation unless the user explicitly asks to
636
+ replace an existing sequence or the approved lane packet allows current
637
+ table stale-shell repair.
113
638
  - Do not report `source-only/no sequence expected` for any named evergreen
114
639
  campaign that appears in Campaigns, has a CampaignOffer ID, or is backed by
115
640
  a campaign dashboard table. Shared Signal Discovery and Shared Cold
@@ -9,6 +9,9 @@ allowed-tools:
9
9
  - mcp__sellable__get_campaign_refill_state
10
10
  - mcp__sellable__fill_campaign_horizon
11
11
  - mcp__sellable__get_campaign
12
+ - mcp__sellable__get_campaign_context
13
+ - mcp__sellable__update_campaign
14
+ - mcp__sellable__get_provider_prompt
12
15
  - mcp__sellable__get_campaign_message_preparation_status
13
16
  - mcp__sellable__start_campaign_message_preparation
14
17
  - mcp__sellable__cancel_campaign_message_preparation
@@ -16,6 +19,7 @@ allowed-tools:
16
19
  - mcp__sellable__wait_for_lead_list_ready
17
20
  - mcp__sellable__confirm_lead_list
18
21
  - mcp__sellable__search_signals
22
+ - mcp__sellable__select_promising_posts
19
23
  - mcp__sellable__fetch_post_engagers
20
24
  - mcp__sellable__search_sales_nav
21
25
  - mcp__sellable__lookup_sales_nav_filter
@@ -29,6 +33,10 @@ allowed-tools:
29
33
  - mcp__sellable__get_rows
30
34
  - mcp__sellable__get_rows_minimal
31
35
  - mcp__sellable__get_table_rows
36
+ - mcp__sellable__get_campaign_table_schema
37
+ - mcp__sellable__select_campaign_cells
38
+ - mcp__sellable__wait_for_campaign_processing
39
+ - mcp__sellable__get_sender
32
40
  ---
33
41
 
34
42
  # Refill Sends