@sellable/mcp 0.1.427 → 0.1.429
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index-dev.js +0 -0
- package/dist/index.js +0 -0
- package/dist/tools/prompts.js +1 -1
- package/dist/tools/refill-sends.js +3 -3
- package/dist/tools/setup-evergreen-campaigns.d.ts +6 -0
- package/dist/tools/setup-evergreen-campaigns.js +6 -0
- package/package.json +1 -1
- package/skills/create-evergreen-campaigns/SKILL.md +41 -74
- package/skills/refill-sends/SKILL.md +11 -5
- package/skills/refill-sends-workflow/SKILL.md +42 -15
package/dist/index-dev.js
CHANGED
|
File without changes
|
package/dist/index.js
CHANGED
|
File without changes
|
package/dist/tools/prompts.js
CHANGED
|
@@ -373,7 +373,7 @@ export function getPostFindLeadsScoutRegistry() {
|
|
|
373
373
|
codex: 'After confirm_lead_list copies source rows and the initial campaign-table execution slice exists, ask the filter-choice question immediately. Do not spawn anything before that question. After the answer, launch only Message Drafting. The filter-choice answer is the post-import user gate for this single worker; do not ask another question about starting it in step-wise or YOLO mode. The registry lookup is not a launch: after get_post_find_leads_scout_registry, immediately invoke Task/spawn_agent or the host background-agent mechanism before loading filter-leads.md, before saving rubrics, and before treating skip-filters as ready for message review. Both choices route through this kickoff; do not let filters_skipped jump straight from filter-choice to message-generation. If filters are chosen, the parent stays on Filter Rules and drafts/saves rubrics with MCP tools while Message Drafting runs in the background. If filters are skipped, move to Messages/message review only after Message Drafting has started or is ready; update_campaign(currentStep=messages) is not proof of launch. If the named Message Drafting custom agent is unavailable, spawn a generic gpt-5.5 xhigh Message Drafting background agent with the same lean campaign/table basis. When the background worker starts, persist workerDetails.messageDraftBuilder with statusSource "branch", status "branch-running", runId, startedAt, updatedAt, basisToken when known, and basis containing campaignId, selectedLeadListId, workflowTableId, filterChoice, and reviewBatchRowHash or reviewBatchRowIds; workerStatuses.messageDraftBuilder may be "running" as a simple badge only. Never put rich proof under workerStatuses and never use workerStatuses.messageDrafting. If no background-agent tool is callable, start the same full message branch inline before filter drafting or before skip-filter message review, record workerDetails.messageDraftBuilder with statusSource "parent-thread-fallback" and status "fallback-active", and require the same live context, prompt, assets, and validation gate before message review; do not wait until filters are saved and then call the registry.',
|
|
374
374
|
claude: "After confirm_lead_list copies source rows and the initial campaign-table execution slice exists, ask the filter-choice question immediately. Do not invoke any Task/Agent before that question. After the answer, invoke only Message Drafting. If filters are chosen, parent drafts/saves rubrics with MCP tools while Message Drafting runs, asks filter approval, then joins Message Drafting. If filters are skipped, invoke only Message Drafting and move to Messages/message review.",
|
|
375
375
|
parentThreadRule: 'Named agents are optional acceleration, but message drafting is not optional. The only normal background worker is Message Drafting. The filter-choice answer is the campaign-scoped go-ahead for this single post-import worker; do not ask another question to start it in step-wise or YOLO mode. If a named agent is unavailable, use a generic gpt-5.5 xhigh Message Drafting background agent. source work and filter work stay in the parent thread with MCP tools. If post-find-leads-message-scout is available, run it as the background Message Draft Builder after the filter-choice answer. The registry lookup is not a launch: get_post_find_leads_scout_registry only identifies the worker, and Message Drafting counts as started only after Task/spawn_agent or the host background-agent tool is invoked, or after the parent begins the same full message branch inline because no background-agent tool is callable. This launch must happen before loading filter-leads.md, save_rubrics, filter approval, or skip-filter message review; currentStep=messages is not proof of launch. If post-find-leads-message-scout is absent, do not customer-surface install status. Do not silently treat message drafting as started; the main thread must either launch the background worker or execute the same message branch from CampaignOffer state, selected source state, workflowTableId, and initial campaign-table execution slice rows. For a spawned worker, record workerDetails.messageDraftBuilder with statusSource branch / status branch-running, runId, startedAt, updatedAt, and basis containing campaignId, selectedLeadListId, workflowTableId, filterChoice, and reviewBatchRowHash or reviewBatchRowIds. workerStatuses.messageDraftBuilder is optional simple badge text only ("running", "ready", "blocked", "idle"); never put runId/statusSource/basis under workerStatuses and never use workerStatuses.messageDrafting. If no background-agent tool is callable, start that same full message branch inline before filter drafting or before skip-filter message review, record workerDetails.messageDraftBuilder with statusSource parent-thread-fallback / status fallback-active then ready, and require the same live context, prompt, assets, and validation gate before message review; do not report that as a background worker failure. If neither branch nor inline fallback can run, return blocked/retry-needed; do not wait until filters are saved and then call the registry. The Message Drafting handoff must be lean. Do not paste copied row counts, brief hashes, review-batch hashes, full reviewBatchRowIds, broad row data, or local debug artifacts into the spawn prompt. Local markdown/json files are not normal-path inputs. The filter-choice question is the first post-import user gate; do not load post-lead registries or filter references before it. Message drafting starts after the filter-choice answer, must load get_subskill_prompt({ subskillName: "generate-messages" }), and must load every required message asset named by generate-messages Mode 0 through get_subskill_asset before drafting. Reference Asset Loading means loading the required pre-draft reference pack before drafting; return blocked/retry-needed if required assets cannot be loaded; load ai-tells.md because it is never optional. The branch or parent-thread fallback loads the full generate-messages prompt and every referenced asset through get_subskill_asset. After generating/revising the candidate and before returning ready, must load get_subskill_prompt({ subskillName: "create-campaign-v2-validation" }) as the final internal validation gate, must read live campaign table state through scoped MCP/product tools, and must reject mismatched selectedLeadListId/workflowTableId/campaign/workspace input. Do not block when filters were chosen but leadScoringRubrics are not yet visible in the branch read; the parent owns save_rubrics and filter approval in parallel, so Message Drafting should return status ready with basisStatus usable_initial when campaign/list/table identity and the non-empty execution slice match. Do not use any alternate, local-artifact, or examples-only message prompt. User copy feedback, message QA, or rewrite requests before approve-message must be routed back to Message Drafting with the current recommendation, lean campaign/table basis, and latest user text; the parent must not rewrite or QA the template from memory and must not call update_campaign_brief before approve-message. The worker validates internally and returns only templateRecommendation, tokenFillRules, renderedGoodSample, status, approveOrReviseRecommendation, validationStatus, outputAt, outputHash, and blocked/retry detail. Do not render renderedFallbackSample, risk notes, or a qaReceipt on the normal happy path. On the filter path, save_rubrics keeps the browser on Filter Rules after save_rubrics so the user can approve the saved criteria; after saved-filter approval, move to Filter Leads with currentStep=apply-icp-rubric whether Message Drafting is ready or still running. Wait there for message approval. Enrichment, filtering, Generate Message cells, sender setup, sequence attach, and launch wait for template approval on the Use Template path. On the skip path, move to Messages/message review after Message Drafting has started or is ready and wait for message approval before enrichment or Settings. Do not render message review from checklist or shortcut instructions; message review requires a messageDraftRecommendation whose basis proves the generate-messages prompt, required message assets, and validation gate ran for the current campaign/table execution slice. Do not automatically rerun Message Drafting after filters/enrichment finish; show the initial draft by default and offer an enriched rewrite only with explicit user opt-in. Handoff and recommendation output are Markdown with labeled fields, not raw JSON.',
|
|
376
|
-
prepareMessagesRule: `Default create-campaign stays on the existing reviewBatchLimit:15 first campaign-table execution slice. For plain post-mint fill/load/refill requests, load get_subskill_prompt({ subskillName: "refill-sends-workflow" }), then call resolve_campaign_fill_route({ intent:"plain" }), list_senders, and get_campaign_refill_state for enough candidate campaigns to identify the campaign that most recently had scheduler-owned sends for the relevant sender set before any mutation. Route outcomes are route:"evergreen_horizon", route:"active_campaigns", and route:"ask_create"; stay in the same campaignOfferId/campaignId context after minting. Plain fill is not an alias for fill_campaign_horizon or campaign creation. fill_campaign_horizon is evergreen-only and is not the generic regular-campaign fill path. Campaign creation is allowed only after route:"ask_create" and explicit user selection; it is never the default response to plain fill. Treat "fill up/load sends" as capacity-fill preparation, and treat "refill senders", "fill senders", "max out senders", and "load everyone up" as sender-scoped capacity-fill preparation. For sender-scoped requests with no named senders, --yolo means all eligible healthy senders enrolled in active campaign-backed sequence campaigns in the active workspace; without --yolo, ask which eligible enrolled senders to refill before choosing campaigns or mutating. In non-yolo interactive Codex or Claude Code sessions, the sender/campaign/action approval packet must be asked through request_user_input/AskUserQuestion with exactly Accept and Decline; do not use plain chat approval. The approval question body must show workspace, sender scope, a campaign-by-campaign table, exact ids/caps/dates, side effects, forbidden actions, and stop condition before mutation. Default --yolo horizon is a two-send-day horizon: two sender-local send days, skipping no-send-hour days. For campaign-scoped fill/refill, select the best recent-send campaign and calculate the bounded gap from healthy sender daily capacity minus future scheduler-owned scheduled sends and ready-to-schedule rows, then prepare only that gap. For sender-scoped fill/refill, calculate the bounded gap per eligible sender across active enrolled campaigns, counting future scheduled and ready-to-schedule rows across those campaigns, then choose the best same-sender campaign to fill each sender gap: prefer recent/future scheduler-owned sends for that sender, then strongest recent result evidence, then source health. Do not stop after filling only one sender when the request was sender-scoped. Use the refill workflow to decide whether to enrich/prep more rows in that same recent-send/best-result campaign, add/import more rows to that same campaign/source path, use a different existing campaign only when the selected same-sender lane is blocked/exhausted/already loaded while the sender still has a gap, or ask what to create. Do not create warm-post-engager side campaigns. Surface sender-health blockers separately from prepared/approved/scheduled counts. User-facing refill decisions must be campaign-name-first and sender-name-first, with ids as proof/execution targets only. For already-running regular campaigns that need Signal Discovery source replenishment, use the guarded currentStep clear with clearCurrentStepIfMatches:"running", campaign-scoped provider prompt/search/select, and import_leads with the existing sourceLeadListId when a newly approved selected-post scrape would otherwise return reusedExistingSourceList. After confirm_lead_list copies rows into an existing table, avoid fixed maxRowsToCheck:100; if confirm_lead_list returns USER_ADDED_ROWS_LIMIT_EXCEEDED, create a bounded same-source split from selectedLeadListId with get_rows_minimal/load_csv_linkedin_leads, confirm that smaller source list into the same campaign, and operate on the reviewBatch first; inspect reviewBatch/table selectors or use adaptive/wider bounded prep so appended rows are included. Do not interpret checkedRows as enriched rows; it is only the table cursor. Prepared, approved, and ready_to_schedule rows are intermediate states; never call them scheduled unless a re-read proves scheduler-owned scheduled cells with non-null scheduledFor. Before source import, prep, or
|
|
376
|
+
prepareMessagesRule: `Default create-campaign stays on the existing reviewBatchLimit:15 first campaign-table execution slice. For plain post-mint fill/load/refill requests, load get_subskill_prompt({ subskillName: "refill-sends-workflow" }), then call resolve_campaign_fill_route({ intent:"plain" }), list_senders, and get_campaign_refill_state for enough candidate campaigns to identify the campaign that most recently had scheduler-owned sends for the relevant sender set before any mutation. Route outcomes are route:"evergreen_horizon", route:"active_campaigns", and route:"ask_create"; stay in the same campaignOfferId/campaignId context after minting. Plain fill is not an alias for fill_campaign_horizon or campaign creation. fill_campaign_horizon is evergreen-only and is not the generic regular-campaign fill path. Campaign creation is allowed only after route:"ask_create" and explicit user selection; it is never the default response to plain fill. Treat "fill up/load sends" as capacity-fill preparation, and treat "refill senders", "fill senders", "max out senders", and "load everyone up" as sender-scoped capacity-fill preparation. For sender-scoped requests with no named senders, --yolo means all eligible healthy senders enrolled in active campaign-backed sequence campaigns in the active workspace; without --yolo, ask which eligible enrolled senders to refill before choosing campaigns or mutating. In non-yolo interactive Codex or Claude Code sessions, the sender/campaign/action approval packet must be asked through request_user_input/AskUserQuestion with exactly Accept and Decline; do not use plain chat approval. The approval question body must show workspace, sender scope, a campaign-by-campaign table, exact ids/caps/dates, side effects, forbidden actions, and stop condition before mutation. Default --yolo horizon is a two-send-day horizon: two sender-local send days, skipping no-send-hour days. For campaign-scoped fill/refill, select the best recent-send campaign and calculate the bounded gap from healthy sender daily capacity minus future scheduler-owned scheduled sends and ready-to-schedule rows, then prepare only that gap. For sender-scoped fill/refill, calculate the bounded gap per eligible sender across active enrolled campaigns, counting future scheduled and ready-to-schedule rows across those campaigns, then choose the best same-sender campaign to fill each sender gap: prefer recent/future scheduler-owned sends for that sender, then strongest recent result evidence, then source health. Do not stop after filling only one sender when the request was sender-scoped. Use the refill workflow to decide whether to enrich/prep more rows in that same recent-send/best-result campaign, add/import more rows to that same campaign/source path, use a different existing campaign only when the selected same-sender lane is blocked/exhausted/already loaded while the sender still has a gap, or ask what to create. Do not create warm-post-engager side campaigns. Surface sender-health blockers separately from prepared/approved/scheduled counts. User-facing refill decisions must be campaign-name-first and sender-name-first, with ids as proof/execution targets only. For already-running regular campaigns that need Signal Discovery source replenishment, use the guarded currentStep clear with clearCurrentStepIfMatches:"running", campaign-scoped provider prompt/search/select, and import_leads with the existing sourceLeadListId when a newly approved selected-post scrape would otherwise return reusedExistingSourceList. After confirm_lead_list copies rows into an existing table, avoid fixed maxRowsToCheck:100; if confirm_lead_list returns USER_ADDED_ROWS_LIMIT_EXCEEDED, create a bounded same-source split from selectedLeadListId with get_rows_minimal/load_csv_linkedin_leads, confirm that smaller source list into the same campaign, and operate on the reviewBatch first; inspect reviewBatch/table selectors or use adaptive/wider bounded prep so appended rows are included. Do not interpret checkedRows as enriched rows; it is only the table cursor. Prepared, approved, and ready_to_schedule rows are intermediate states; never call them scheduled unless a re-read proves scheduler-owned scheduled cells with non-null scheduledFor. Before source import, prep, approval, or selected paused campaign start, require exact visible approval or --yolo packet auto-accept and a fresh get_campaign_refill_state reread; stop if freshness.stateHash or exact ids changed. For "approve X messages", use approvalMode:approve only when explicitly requested. For "schedule X sends" or "fill sender sends", approve only when explicitly requested, then re-read campaign/table scheduled counts; if scheduler-owned scheduledFor cells are not present, report prepared/approved/ready - awaiting scheduler instead of success. start_campaign is allowed in refill only for exact selected PAUSED, dashboard-active, campaign-backed sequence targets named in the bounded packet, and the packet must state that starting can let the product scheduler schedule/send approved eligible sequence actions. Never start unrelated, archived, completed, draft, direct, or non-selected campaigns, never broad approve-all, and never use direct scheduler writes. campaignId is CampaignOffer.id. If the user asks to stop preparation, the target is wrong, or status shows the wrong campaign/table, use cancel_campaign_message_preparation only for the exact active job. Low-level selectors are diagnostics and recovery only for this lane.`,
|
|
377
377
|
},
|
|
378
378
|
};
|
|
379
379
|
}
|
|
@@ -151,13 +151,13 @@ export function refillSendsCommand(input = {}) {
|
|
|
151
151
|
"Fresh reread get_campaign_refill_state immediately before any import, prep, approval, or horizon-fill mutation.",
|
|
152
152
|
],
|
|
153
153
|
approvalContract: yolo
|
|
154
|
-
? "Auto-accept only the rendered bounded refill packet after fresh reread. Stop if sender set, route, ids, caps, dates, blockers, or side-effect class drift."
|
|
154
|
+
? "Auto-accept only the rendered bounded refill packet after fresh reread. This may include start_campaign only for exact selected PAUSED campaign-backed sequence refill targets named in the packet. Stop if sender set, route, ids, caps, dates, blockers, or side-effect class drift."
|
|
155
155
|
: hasSenderSelectors
|
|
156
156
|
? "Ask the final Accept/Decline structured approval question before mutation, including workspace, sender scope, campaign table, exact ids, caps/dates, side effects, forbidden actions, and stop condition."
|
|
157
157
|
: "Ask which eligible enrolled senders to refill first, then ask the final Accept/Decline structured approval question before mutation.",
|
|
158
158
|
forbiddenActions: [
|
|
159
|
-
"start_campaign",
|
|
160
|
-
"launch or
|
|
159
|
+
"start_campaign outside an exact selected PAUSED campaign-backed refill packet",
|
|
160
|
+
"manual launch/send or direct sending outside product scheduler side effects",
|
|
161
161
|
"archive or delete cleanup",
|
|
162
162
|
"direct scheduler writes",
|
|
163
163
|
"sender reassignment",
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
type SetupEvergreenCampaignsInput = {
|
|
2
2
|
mode?: "plan" | "verify";
|
|
3
3
|
depth?: "structure_only" | "customer_visible";
|
|
4
|
+
handoffMode?: "create_campaign_goals";
|
|
4
5
|
yolo?: boolean;
|
|
5
6
|
allConnectedSenders?: boolean;
|
|
6
7
|
selectedSenderIds?: string[];
|
|
@@ -31,6 +32,11 @@ export declare const setupEvergreenCampaignsToolDefinitions: {
|
|
|
31
32
|
enum: string[];
|
|
32
33
|
description: string;
|
|
33
34
|
};
|
|
35
|
+
handoffMode: {
|
|
36
|
+
type: string;
|
|
37
|
+
enum: string[];
|
|
38
|
+
description: string;
|
|
39
|
+
};
|
|
34
40
|
yolo: {
|
|
35
41
|
type: string;
|
|
36
42
|
description: string;
|
|
@@ -20,6 +20,11 @@ export const setupEvergreenCampaignsToolDefinitions = [
|
|
|
20
20
|
enum: ["structure_only", "customer_visible"],
|
|
21
21
|
description: 'Use "customer_visible" for full setup proof or "structure_only" when only ensuring lane shells/config.',
|
|
22
22
|
},
|
|
23
|
+
handoffMode: {
|
|
24
|
+
type: "string",
|
|
25
|
+
enum: ["create_campaign_goals"],
|
|
26
|
+
description: 'plan mode only. When set to "create_campaign_goals", returns concise per-lane `$sellable:create-campaign` goal prompts and required inputs for testing simplified worker handoffs without changing verification behavior.',
|
|
27
|
+
},
|
|
23
28
|
yolo: {
|
|
24
29
|
type: "boolean",
|
|
25
30
|
description: "plan mode only. Requests auto-executable lane packets when state is safe; never authorizes cleanup, launch, scheduling, sending, or ambiguous target choice.",
|
|
@@ -88,6 +93,7 @@ export function setupEvergreenCampaigns(input) {
|
|
|
88
93
|
mode: input.mode,
|
|
89
94
|
yolo: input.mode === "verify" ? undefined : input.yolo,
|
|
90
95
|
depth: input.depth,
|
|
96
|
+
handoffMode: input.mode === "verify" ? undefined : input.handoffMode,
|
|
91
97
|
allConnectedSenders: input.allConnectedSenders,
|
|
92
98
|
selectedSenderIds: input.selectedSenderIds,
|
|
93
99
|
postEngagerSenderIds: input.postEngagerSenderIds,
|
package/package.json
CHANGED
|
@@ -926,48 +926,32 @@ verify and do not repair by summarizing product readback in the parent.
|
|
|
926
926
|
Message Drafting runtime rule: the preferred proof source is the normal
|
|
927
927
|
create-campaign branch handoff (`watchNarration.workerDetails.messageDraftBuilder`
|
|
928
928
|
or equivalent) with `statusSource:"branch"`. If that internal branch handoff is
|
|
929
|
-
not callable or not exposed in the packaged MCP runtime, do **not**
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
`mode:"create-campaign-v2"`, and lane type.
|
|
938
|
-
2. Load `get_subskill_prompt({ subskillName:"generate-messages" })` until
|
|
939
|
-
`hasMore:false`, all required message assets, and
|
|
940
|
-
`create-campaign-v2-validation`.
|
|
941
|
-
3. Produce a concrete `messageDraftRecommendation` before row generation. It
|
|
942
|
-
must include the selected message approach/template recommendation,
|
|
943
|
-
token/fill rules, source-use rules, hard avoids, at least one rendered good
|
|
944
|
-
sample, current campaign/table/source basis, and validation status. Shared
|
|
945
|
-
lanes still use `firstMessageTemplateState:"not preset; generate-messages
|
|
946
|
-
branch selected the final message approach"`; do not set
|
|
947
|
-
`firstMessageTemplate` for shared lanes.
|
|
948
|
-
4. Persist the recommendation into the campaign brief/message generation basis
|
|
949
|
-
with the packaged create-campaign tools before generating rows. If the
|
|
950
|
-
generated copy fails review, update the campaign brief/message template with
|
|
951
|
-
`update_campaign_brief` or `revise_message_template_and_rerun`, then rerun
|
|
952
|
-
Generate Message and review current-revision generated output.
|
|
953
|
-
5. Only after the scout recommendation and persisted basis exist, call
|
|
954
|
-
`start_campaign_message_preparation({ campaignId, tableId,
|
|
929
|
+
not callable or not exposed in the packaged MCP runtime, do **not** stop after
|
|
930
|
+
creating/importing rows. The lane worker must run the packaged message-drafting
|
|
931
|
+
path itself in the worker thread:
|
|
932
|
+
|
|
933
|
+
1. Load `get_subskill_prompt({ subskillName:"generate-messages" })` until
|
|
934
|
+
`hasMore:false`.
|
|
935
|
+
2. Load the required message assets and `create-campaign-v2-validation`.
|
|
936
|
+
3. Call `start_campaign_message_preparation({ campaignId, tableId,
|
|
955
937
|
targetPreparedMessages, maxRowsToCheck, approvalMode:"mark_ready",
|
|
956
938
|
autoContinue:true })` inside the same lane worker, with bounded caps from the
|
|
957
|
-
lane packet.
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
Approved cell through `select_campaign_cells` and `update_cell`.
|
|
939
|
+
lane packet.
|
|
940
|
+
Never call `start_campaign_message_preparation` with `approvalMode:"approve"`
|
|
941
|
+
for evergreen setup. Generate/readiness and approval are separate safety
|
|
942
|
+
steps: first mark rows ready, then inspect generated copy, then approve
|
|
943
|
+
exactly one semantic Approved cell through `select_campaign_cells` and
|
|
944
|
+
`update_cell`.
|
|
964
945
|
Approval shorthand: approve exactly one semantic Approved cell.
|
|
965
946
|
In this message-drafting path, `update_cell` is allowed only for the semantic
|
|
966
947
|
Approved checkbox. Do not use `update_cell` or any row/cell write to edit
|
|
967
948
|
generated message text, sample copy, or final message bodies in automation.
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
949
|
+
If generated copy fails review, update the campaign brief/message template
|
|
950
|
+
with `update_campaign_brief` or `revise_message_template_and_rerun`, then
|
|
951
|
+
rerun Generate Message and review current-revision generated output. Receipt
|
|
952
|
+
`sampleMessages` must come from generated current-revision cells after the
|
|
953
|
+
brief/template rerun, not from hand-edited message cell overrides. If a lane
|
|
954
|
+
used a generated-message body override, report
|
|
971
955
|
`blocked: generated_message_cell_override` instead of success.
|
|
972
956
|
Do not repair by overwriting bad generated message cells and then calling the
|
|
973
957
|
overwritten cells `sampleMessages`.
|
|
@@ -978,9 +962,9 @@ plain row generation. The lane worker must inline the same
|
|
|
978
962
|
Short form: `update_cell` is allowed only for the semantic Approved checkbox.
|
|
979
963
|
Short form: Do not use `update_cell` to edit generated message text.
|
|
980
964
|
Short form: Bad copy requires brief/template revision plus Generate Message rerun.
|
|
981
|
-
|
|
965
|
+
4. Poll `get_campaign_message_preparation_status` until no queued/active cells
|
|
982
966
|
remain or a bounded stop reason is returned.
|
|
983
|
-
|
|
967
|
+
5. Use `get_campaign_messages_preview` or `select_campaign_cells` to inspect
|
|
984
968
|
generated rows, quality-review at least 3 samples, approve exactly one
|
|
985
969
|
quality-valid route-proof row when none is already approved, and prove no
|
|
986
970
|
broad approve-all happened.
|
|
@@ -990,21 +974,16 @@ plain row generation. The lane worker must inline the same
|
|
|
990
974
|
approvedGeneratedMessageCount exactly 1. Do not report completion with 2+
|
|
991
975
|
approved rows.
|
|
992
976
|
Approval shorthand: Do not report completion with 2+ approved rows.
|
|
993
|
-
|
|
977
|
+
6. Continue to `attach_recommended_sequence({ campaignId, currentStep:"send" })`
|
|
994
978
|
and, if the campaign is still `DRAFT`, `pause_campaign({ campaignId })`.
|
|
995
979
|
Reread the campaign/table before claiming completion.
|
|
996
980
|
|
|
997
981
|
That packaged worker path must return `messageDraftingReceipt.statusSource:
|
|
998
982
|
"packaged-generate-messages-worker"`. It is accepted only when the receipt
|
|
999
|
-
includes
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
quality review, route-proof approval evidence, sequence proof, and final
|
|
1004
|
-
paused-send proof required of the branch handoff. `statusSource:
|
|
1005
|
-
"parent-thread-fallback"` is still invalid. If neither branch handoff nor
|
|
1006
|
-
inline scout proof can run, stop with `blocked:
|
|
1007
|
-
missing_message_drafting_branch`; do not shortcut through row prep.
|
|
983
|
+
includes the same prompt/assets/validation proof, current campaign/table/source
|
|
984
|
+
basis, generated review rows, sample messages, quality review, route-proof
|
|
985
|
+
approval evidence, sequence proof, and final paused-send proof required of the
|
|
986
|
+
branch handoff. `statusSource:"parent-thread-fallback"` is still invalid.
|
|
1008
987
|
The only accepted statusSource values are exactly `branch` and
|
|
1009
988
|
`packaged-generate-messages-worker`; descriptive aliases such as
|
|
1010
989
|
`package-readback-local-thread` are rejected.
|
|
@@ -1358,25 +1337,16 @@ Message, and verify current-revision sample messages before final completion.
|
|
|
1358
1337
|
Short form: missing or skipped filter proof is `blocked: missing_filter_setup`.
|
|
1359
1338
|
Short form: run Message Drafting only after saved filters are applied.
|
|
1360
1339
|
- Every customer-visible lane must run Message Drafting from the current
|
|
1361
|
-
campaign/table basis after source rows exist
|
|
1362
|
-
|
|
1363
|
-
`
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
into the campaign brief/message generation basis. Only then may the
|
|
1372
|
-
worker call `start_campaign_message_preparation` and poll
|
|
1373
|
-
`get_campaign_message_preparation_status` from the lane worker. The
|
|
1374
|
-
returned receipt must include `statusSource:"branch"` or
|
|
1375
|
-
`statusSource:"packaged-generate-messages-worker"`, at least 3 concrete
|
|
1376
|
-
reviewed sample messages, a passed validation result, and a passed quality
|
|
1377
|
-
review. Row/message counts alone are not enough. If the branch handoff and
|
|
1378
|
-
inline scout contract are both unavailable, report
|
|
1379
|
-
`blocked: missing_message_drafting_branch`.
|
|
1340
|
+
campaign/table basis after source rows exist. The worker must load the full
|
|
1341
|
+
packaged `generate-messages` prompt, every required asset, and
|
|
1342
|
+
`create-campaign-v2-validation`; if the internal branch handoff is not
|
|
1343
|
+
callable in the packaged runtime, the worker must call
|
|
1344
|
+
`start_campaign_message_preparation` and poll
|
|
1345
|
+
`get_campaign_message_preparation_status` from the lane worker. The
|
|
1346
|
+
returned receipt must include `statusSource:"branch"` or
|
|
1347
|
+
`statusSource:"packaged-generate-messages-worker"`, at least 3 concrete
|
|
1348
|
+
reviewed sample messages, a passed validation result, and a passed quality
|
|
1349
|
+
review. Row/message counts alone are not enough.
|
|
1380
1350
|
|
|
1381
1351
|
- **The brief must declare the delivery format** so Generate Message writes copy suited to how it actually sends:
|
|
1382
1352
|
- 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.
|
|
@@ -1414,15 +1384,12 @@ Message, and verify current-revision sample messages before final completion.
|
|
|
1414
1384
|
`hasMore:false`, required message assets were loaded, and
|
|
1415
1385
|
`create-campaign-v2-validation` ran through
|
|
1416
1386
|
`workerDetails.messageDraftBuilder` with `statusSource:"branch"` or
|
|
1417
|
-
through the lane worker's
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
`messageDraftRecommendation`, template/basis persistence proof before row
|
|
1421
|
-
generation, `start_campaign_message_preparation`, and
|
|
1387
|
+
through the lane worker's packaged message-prep path with
|
|
1388
|
+
`statusSource:"packaged-generate-messages-worker"`,
|
|
1389
|
+
`start_campaign_message_preparation`, and
|
|
1422
1390
|
`get_campaign_message_preparation_status`. The generated-message cells are
|
|
1423
1391
|
not prompt proof; `currentRevisionGeneratedMessages` and row previews are
|
|
1424
|
-
only downstream cell evidence.
|
|
1425
|
-
proof must include
|
|
1392
|
+
only downstream cell evidence. The proof must include
|
|
1426
1393
|
`validationResult:"passed"`, a passed quality review, and at least 3
|
|
1427
1394
|
reviewed sample messages. For Shared Cold Fallback, reject samples that
|
|
1428
1395
|
open with a standalone name followed by "Hey there" or a similarly generic
|
|
@@ -24,6 +24,7 @@ allowed-tools:
|
|
|
24
24
|
- mcp__sellable__get_provider_prompt
|
|
25
25
|
- mcp__sellable__get_campaign_message_preparation_status
|
|
26
26
|
- mcp__sellable__start_campaign_message_preparation
|
|
27
|
+
- mcp__sellable__start_campaign
|
|
27
28
|
- mcp__sellable__cancel_campaign_message_preparation
|
|
28
29
|
- mcp__sellable__import_leads
|
|
29
30
|
- mcp__sellable__wait_for_lead_list_ready
|
|
@@ -130,11 +131,16 @@ the active workspace. Without `--yolo`, if Christian did not name senders, ask
|
|
|
130
131
|
which eligible enrolled senders to refill before choosing campaigns or mutating.
|
|
131
132
|
|
|
132
133
|
`--yolo` only covers the exact sender set, per-sender target campaigns, caps,
|
|
133
|
-
approval mode, and side effects in the packet. It
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
134
|
+
approval mode, and side effects in the packet. It may authorize `start_campaign`
|
|
135
|
+
only for selected `PAUSED`, dashboard-active, campaign-backed sequence refill
|
|
136
|
+
targets when the rendered packet names the exact campaign ids and start side
|
|
137
|
+
effect. Starting a paused campaign can let the product scheduler schedule/send
|
|
138
|
+
approved eligible sequence actions, so include that expected side effect in the
|
|
139
|
+
packet. It does not authorize starting unrelated, archived, completed, draft, or
|
|
140
|
+
direct campaigns, separate launch/send actions, archive or delete cleanup,
|
|
141
|
+
direct scheduler writes, sender reassignment, or campaigns outside those
|
|
142
|
+
selected for the eligible sender set. Stop and re-plan if the route, sender set,
|
|
143
|
+
ids, caps, blockers, or side-effect class drift before mutation.
|
|
138
144
|
|
|
139
145
|
In `--yolo`, the default two-day fill horizon is two send days unless
|
|
140
146
|
`--until`/`untilDate` is provided. If an until date is provided, compute bounded
|
|
@@ -15,6 +15,7 @@ allowed-tools:
|
|
|
15
15
|
- mcp__sellable__get_provider_prompt
|
|
16
16
|
- mcp__sellable__get_campaign_message_preparation_status
|
|
17
17
|
- mcp__sellable__start_campaign_message_preparation
|
|
18
|
+
- mcp__sellable__start_campaign
|
|
18
19
|
- mcp__sellable__cancel_campaign_message_preparation
|
|
19
20
|
- mcp__sellable__import_leads
|
|
20
21
|
- mcp__sellable__wait_for_lead_list_ready
|
|
@@ -118,9 +119,10 @@ Use the refill-state response as the current facts receipt:
|
|
|
118
119
|
- `freshness.stateHash` and exact campaign/table/workspace ids.
|
|
119
120
|
|
|
120
121
|
Empty or unsafe states stop with the blocker: no fillable target, missing or deleted campaign,
|
|
121
|
-
missing table,
|
|
122
|
-
|
|
123
|
-
|
|
122
|
+
missing table, archived/completed campaign, paused campaign without an explicit
|
|
123
|
+
selected-start packet, zero sender capacity, zero source candidates, zero viable
|
|
124
|
+
rows, no approved/preparable rows, active prep job, awaiting scheduler, or
|
|
125
|
+
unsupported direct campaign type.
|
|
124
126
|
|
|
125
127
|
## Regular Campaign Decision
|
|
126
128
|
|
|
@@ -300,7 +302,27 @@ Approval mode:
|
|
|
300
302
|
- default is `approvalMode:"mark_ready"`, not approve;
|
|
301
303
|
- use `approvalMode:"approve"` only when the user explicitly asks to approve
|
|
302
304
|
messages or schedule sends and has approved the exact bounded cohort;
|
|
303
|
-
-
|
|
305
|
+
- `start_campaign` is allowed only as a bounded start/resume step for a
|
|
306
|
+
selected `PAUSED`, dashboard-active, campaign-backed sequence refill target;
|
|
307
|
+
- never launch/start unrelated, archived, completed, draft, direct, or
|
|
308
|
+
non-selected campaigns from refill.
|
|
309
|
+
|
|
310
|
+
Paused campaign start discipline:
|
|
311
|
+
|
|
312
|
+
- `PAUSED`, dashboard-active campaign-backed sequence campaigns are existing
|
|
313
|
+
refill targets, not archived inventory.
|
|
314
|
+
- If the selected refill target is `PAUSED` and has healthy senders, sequence,
|
|
315
|
+
source/list, and ready/preparable rows or a bounded source/prep packet, the
|
|
316
|
+
final packet may include `start_campaign` when starting is needed for the
|
|
317
|
+
scheduler to schedule/send approved eligible rows.
|
|
318
|
+
- In non-yolo mode, the `Accept` choice must say that starting the paused
|
|
319
|
+
campaign can let the product scheduler schedule/send approved eligible
|
|
320
|
+
sequence actions.
|
|
321
|
+
- In `--yolo`, `start_campaign` is auto-accepted only for the exact selected
|
|
322
|
+
paused campaign ids, sender scope, caps, approval mode, and start side effect
|
|
323
|
+
named in the packet after the final reread.
|
|
324
|
+
- Do not start if the campaign is archived, completed, draft, direct, lacks a
|
|
325
|
+
sequence/senders/source, has no viable row path, or state drifts.
|
|
304
326
|
|
|
305
327
|
Before prep or approval mutation, reread `get_campaign_refill_state` and compare
|
|
306
328
|
`freshness.stateHash`, campaign id, table id, workspace id, source id, and caps.
|
|
@@ -346,13 +368,15 @@ same refill request, do not ask the `Accept` / `Decline` question. Instead:
|
|
|
346
368
|
packet;
|
|
347
369
|
4. execute only the exact packet.
|
|
348
370
|
|
|
349
|
-
`--yolo`
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
371
|
+
`--yolo` authorizes `start_campaign` only for selected `PAUSED` refill targets
|
|
372
|
+
named in the exact packet. It never authorizes starting unrelated, archived,
|
|
373
|
+
completed, draft, or direct campaigns, separate launch/send actions,
|
|
374
|
+
archive/delete cleanup, raw scheduler writes, sender reassignment, extra senders
|
|
375
|
+
beyond the eligible sender set, or higher caps than the packet named. In
|
|
376
|
+
sender-scoped `--yolo`, a bounded packet containing all eligible enrolled
|
|
377
|
+
senders and at most one best campaign per sender is covered; arbitrary expanded
|
|
378
|
+
campaign sets are not. If any state or scope drifts, stop and re-plan instead of
|
|
379
|
+
auto-accepting the changed action.
|
|
356
380
|
Short form: all eligible enrolled senders are covered by sender-scoped `--yolo`; arbitrary expanded campaign sets are not.
|
|
357
381
|
Short form: direct scheduler writes are not covered by `--yolo`.
|
|
358
382
|
Short form: stop and re-plan instead of auto-accepting the changed action.
|
|
@@ -413,7 +437,9 @@ the current source or ask for more research instead of walking the ladder.
|
|
|
413
437
|
|
|
414
438
|
## Hard Safety Rules
|
|
415
439
|
|
|
416
|
-
- Never call start
|
|
440
|
+
- Never call launch/start tools except `start_campaign` for an exact selected
|
|
441
|
+
`PAUSED`, dashboard-active, campaign-backed sequence refill target in the
|
|
442
|
+
rendered packet.
|
|
417
443
|
- Never raw-write `scheduledFor`, `scheduledAt`, scheduled status, or sender
|
|
418
444
|
assignment fields.
|
|
419
445
|
- Never expose internal direct campaign types as an operator refill path.
|
|
@@ -425,8 +451,8 @@ the current source or ask for more research instead of walking the ladder.
|
|
|
425
451
|
- In interactive Codex or Claude Code, that explicit approval must be collected
|
|
426
452
|
through the host-native `Accept` / `Decline` question gate.
|
|
427
453
|
- `--yolo` in the current refill request is explicit auto-accept for the
|
|
428
|
-
rendered bounded refill packet only; it does not loosen the
|
|
429
|
-
scheduler-write, archive/delete, or drift rules above.
|
|
454
|
+
rendered bounded refill packet only; it does not loosen the unrelated-campaign
|
|
455
|
+
start/send, scheduler-write, archive/delete, or drift rules above.
|
|
430
456
|
|
|
431
457
|
## Report
|
|
432
458
|
|
|
@@ -442,4 +468,5 @@ Report in campaign-name-first language:
|
|
|
442
468
|
freshness hash used.
|
|
443
469
|
|
|
444
470
|
Keep ids visible but secondary: show them under "Exact target" or "Proof", not
|
|
445
|
-
as the main decision text. Say explicitly
|
|
471
|
+
as the main decision text. Say explicitly whether a selected paused campaign was
|
|
472
|
+
started; otherwise say nothing was started and nothing was sent.
|