@sellable/mcp 0.1.308 → 0.1.310
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/agents/post-find-leads-message-scout.md +5 -0
- package/dist/index-dev.js +0 -0
- package/dist/index.js +0 -0
- package/dist/tools/campaigns.d.ts +168 -0
- package/dist/tools/campaigns.js +95 -62
- package/dist/tools/prompts.js +5 -4
- package/dist/tools/registry.d.ts +168 -0
- package/package.json +1 -1
- package/skills/create-campaign/SKILL.md +14 -16
- package/skills/create-campaign-v2/SKILL.md +1 -1
- package/skills/create-campaign-v2/SOUL.md +7 -9
- package/skills/create-campaign-v2/core/flow.v2.json +1 -1
- package/skills/create-campaign-v2/references/watch-guide-narration.md +20 -0
- package/skills/create-campaign-v2-tail/SKILL.md +18 -32
- package/skills/generate-messages/SKILL.md +4 -9
|
@@ -165,10 +165,15 @@ When reporting branch runtime proof, use this shape under
|
|
|
165
165
|
- `runId` or `fallbackId`
|
|
166
166
|
- `startedAt` and `updatedAt`
|
|
167
167
|
- `basisToken` and `basis`
|
|
168
|
+
- `basis.selectedLeadListId`, `basis.workflowTableId`, and either
|
|
169
|
+
`basis.reviewBatchRowHash` or non-empty `basis.reviewBatchRowIds`
|
|
168
170
|
- optional `messageDraftOutputRef`, `messageDraftOutput`, and `error`
|
|
169
171
|
|
|
170
172
|
Do not tell the UI to show Message Draft Builder as running unless this proof
|
|
171
173
|
exists and points at the current non-empty campaign-table execution slice.
|
|
174
|
+
Use `workerStatuses.messageDraftBuilder` only for simple badge text such as
|
|
175
|
+
`running`; never put `runId`, `statusSource`, `status`, or `basis` under
|
|
176
|
+
`workerStatuses`, and never use a `messageDrafting` key.
|
|
172
177
|
If the host cannot launch a background branch and the parent thread runs this
|
|
173
178
|
same contract inline, report `statusSource: "parent-thread-fallback"` and
|
|
174
179
|
`status: "fallback-active"` while working, then `status: "ready"` when the
|
package/dist/index-dev.js
CHANGED
|
File without changes
|
package/dist/index.js
CHANGED
|
File without changes
|
|
@@ -416,6 +416,90 @@ export declare const campaignToolDefinitions: ({
|
|
|
416
416
|
};
|
|
417
417
|
workerStatuses: {
|
|
418
418
|
type: string;
|
|
419
|
+
description: string;
|
|
420
|
+
properties: {
|
|
421
|
+
leadFitBuilder: {
|
|
422
|
+
type: string[];
|
|
423
|
+
enum: (string | null)[];
|
|
424
|
+
};
|
|
425
|
+
messageDraftBuilder: {
|
|
426
|
+
type: string[];
|
|
427
|
+
enum: (string | null)[];
|
|
428
|
+
};
|
|
429
|
+
};
|
|
430
|
+
additionalProperties: boolean;
|
|
431
|
+
};
|
|
432
|
+
workerDetails: {
|
|
433
|
+
type: string;
|
|
434
|
+
description: string;
|
|
435
|
+
properties: {
|
|
436
|
+
messageDraftBuilder: {
|
|
437
|
+
type: string[];
|
|
438
|
+
description: string;
|
|
439
|
+
properties: {
|
|
440
|
+
statusSource: {
|
|
441
|
+
type: string;
|
|
442
|
+
enum: string[];
|
|
443
|
+
};
|
|
444
|
+
status: {
|
|
445
|
+
type: string;
|
|
446
|
+
enum: string[];
|
|
447
|
+
};
|
|
448
|
+
runId: {
|
|
449
|
+
type: string[];
|
|
450
|
+
};
|
|
451
|
+
fallbackId: {
|
|
452
|
+
type: string[];
|
|
453
|
+
};
|
|
454
|
+
startedAt: {
|
|
455
|
+
type: string;
|
|
456
|
+
};
|
|
457
|
+
updatedAt: {
|
|
458
|
+
type: string;
|
|
459
|
+
};
|
|
460
|
+
basisToken: {
|
|
461
|
+
type: string[];
|
|
462
|
+
};
|
|
463
|
+
basis: {
|
|
464
|
+
type: string;
|
|
465
|
+
properties: {
|
|
466
|
+
campaignId: {
|
|
467
|
+
type: string[];
|
|
468
|
+
};
|
|
469
|
+
selectedLeadListId: {
|
|
470
|
+
type: string[];
|
|
471
|
+
};
|
|
472
|
+
workflowTableId: {
|
|
473
|
+
type: string[];
|
|
474
|
+
};
|
|
475
|
+
reviewBatchRowHash: {
|
|
476
|
+
type: string[];
|
|
477
|
+
};
|
|
478
|
+
reviewBatchRowIds: {
|
|
479
|
+
type: string[];
|
|
480
|
+
items: {
|
|
481
|
+
type: string;
|
|
482
|
+
};
|
|
483
|
+
};
|
|
484
|
+
filterChoice: {
|
|
485
|
+
type: string[];
|
|
486
|
+
};
|
|
487
|
+
};
|
|
488
|
+
};
|
|
489
|
+
messageDraftOutputRef: {
|
|
490
|
+
type: string[];
|
|
491
|
+
};
|
|
492
|
+
messageDraftOutput: {
|
|
493
|
+
type: string[];
|
|
494
|
+
};
|
|
495
|
+
error: {
|
|
496
|
+
type: string[];
|
|
497
|
+
};
|
|
498
|
+
};
|
|
499
|
+
required: string[];
|
|
500
|
+
};
|
|
501
|
+
};
|
|
502
|
+
additionalProperties: boolean;
|
|
419
503
|
};
|
|
420
504
|
};
|
|
421
505
|
required: string[];
|
|
@@ -531,6 +615,90 @@ export declare const campaignToolDefinitions: ({
|
|
|
531
615
|
};
|
|
532
616
|
workerStatuses: {
|
|
533
617
|
type: string;
|
|
618
|
+
description: string;
|
|
619
|
+
properties: {
|
|
620
|
+
leadFitBuilder: {
|
|
621
|
+
type: string[];
|
|
622
|
+
enum: (string | null)[];
|
|
623
|
+
};
|
|
624
|
+
messageDraftBuilder: {
|
|
625
|
+
type: string[];
|
|
626
|
+
enum: (string | null)[];
|
|
627
|
+
};
|
|
628
|
+
};
|
|
629
|
+
additionalProperties: boolean;
|
|
630
|
+
};
|
|
631
|
+
workerDetails: {
|
|
632
|
+
type: string;
|
|
633
|
+
description: string;
|
|
634
|
+
properties: {
|
|
635
|
+
messageDraftBuilder: {
|
|
636
|
+
type: string[];
|
|
637
|
+
description: string;
|
|
638
|
+
properties: {
|
|
639
|
+
statusSource: {
|
|
640
|
+
type: string;
|
|
641
|
+
enum: string[];
|
|
642
|
+
};
|
|
643
|
+
status: {
|
|
644
|
+
type: string;
|
|
645
|
+
enum: string[];
|
|
646
|
+
};
|
|
647
|
+
runId: {
|
|
648
|
+
type: string[];
|
|
649
|
+
};
|
|
650
|
+
fallbackId: {
|
|
651
|
+
type: string[];
|
|
652
|
+
};
|
|
653
|
+
startedAt: {
|
|
654
|
+
type: string;
|
|
655
|
+
};
|
|
656
|
+
updatedAt: {
|
|
657
|
+
type: string;
|
|
658
|
+
};
|
|
659
|
+
basisToken: {
|
|
660
|
+
type: string[];
|
|
661
|
+
};
|
|
662
|
+
basis: {
|
|
663
|
+
type: string;
|
|
664
|
+
properties: {
|
|
665
|
+
campaignId: {
|
|
666
|
+
type: string[];
|
|
667
|
+
};
|
|
668
|
+
selectedLeadListId: {
|
|
669
|
+
type: string[];
|
|
670
|
+
};
|
|
671
|
+
workflowTableId: {
|
|
672
|
+
type: string[];
|
|
673
|
+
};
|
|
674
|
+
reviewBatchRowHash: {
|
|
675
|
+
type: string[];
|
|
676
|
+
};
|
|
677
|
+
reviewBatchRowIds: {
|
|
678
|
+
type: string[];
|
|
679
|
+
items: {
|
|
680
|
+
type: string;
|
|
681
|
+
};
|
|
682
|
+
};
|
|
683
|
+
filterChoice: {
|
|
684
|
+
type: string[];
|
|
685
|
+
};
|
|
686
|
+
};
|
|
687
|
+
};
|
|
688
|
+
messageDraftOutputRef: {
|
|
689
|
+
type: string[];
|
|
690
|
+
};
|
|
691
|
+
messageDraftOutput: {
|
|
692
|
+
type: string[];
|
|
693
|
+
};
|
|
694
|
+
error: {
|
|
695
|
+
type: string[];
|
|
696
|
+
};
|
|
697
|
+
};
|
|
698
|
+
required: string[];
|
|
699
|
+
};
|
|
700
|
+
};
|
|
701
|
+
additionalProperties: boolean;
|
|
534
702
|
};
|
|
535
703
|
};
|
|
536
704
|
required: string[];
|
package/dist/tools/campaigns.js
CHANGED
|
@@ -10,6 +10,99 @@ const LEAD_SOURCE_PROVIDERS = {
|
|
|
10
10
|
PROSPEO: "prospeo",
|
|
11
11
|
SIGNAL_DISCOVERY: "signal-discovery",
|
|
12
12
|
};
|
|
13
|
+
const WATCH_NARRATION_TOOL_SCHEMA = {
|
|
14
|
+
type: "object",
|
|
15
|
+
description: "Single structured watch-guide narration object to send with currentStep changes. Include what just happened, what the browser is showing now, what Codex is doing next, and nextAction so the browser guide mirrors Codex progress. Do not send separate guideHeadline/guideBody fields. Use workerStatuses only for simple string badges; put Message Drafting runtime proof under workerDetails.messageDraftBuilder.",
|
|
16
|
+
properties: {
|
|
17
|
+
stage: {
|
|
18
|
+
type: "string",
|
|
19
|
+
enum: [
|
|
20
|
+
"brief-review",
|
|
21
|
+
"find-leads",
|
|
22
|
+
"review-batch",
|
|
23
|
+
"fit-message",
|
|
24
|
+
"review-ready",
|
|
25
|
+
],
|
|
26
|
+
},
|
|
27
|
+
headline: { type: "string" },
|
|
28
|
+
visibleState: { type: "string" },
|
|
29
|
+
agentIntent: { type: "string" },
|
|
30
|
+
nextAction: { type: ["string", "null"] },
|
|
31
|
+
safety: { type: ["string", "null"] },
|
|
32
|
+
progressLabel: { type: ["string", "null"] },
|
|
33
|
+
blockedReason: { type: ["string", "null"] },
|
|
34
|
+
workerStatuses: {
|
|
35
|
+
type: "object",
|
|
36
|
+
description: 'Simple display badges only. Allowed keys are leadFitBuilder and messageDraftBuilder; values are "idle", "running", "ready", "blocked", or null. Do not put runId, statusSource, basis, or rich worker proof here.',
|
|
37
|
+
properties: {
|
|
38
|
+
leadFitBuilder: {
|
|
39
|
+
type: ["string", "null"],
|
|
40
|
+
enum: ["idle", "running", "ready", "blocked", null],
|
|
41
|
+
},
|
|
42
|
+
messageDraftBuilder: {
|
|
43
|
+
type: ["string", "null"],
|
|
44
|
+
enum: ["idle", "running", "ready", "blocked", null],
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
additionalProperties: false,
|
|
48
|
+
},
|
|
49
|
+
workerDetails: {
|
|
50
|
+
type: "object",
|
|
51
|
+
description: "Rich runtime proof for background workers. Message Drafting proof must use workerDetails.messageDraftBuilder, not workerStatuses.messageDrafting.",
|
|
52
|
+
properties: {
|
|
53
|
+
messageDraftBuilder: {
|
|
54
|
+
type: ["object", "null"],
|
|
55
|
+
description: 'Runtime proof that Message Drafting actually started or fell back inline. For a spawned background worker use statusSource "branch" and status "branch-running"; for inline fallback use statusSource "parent-thread-fallback" and status "fallback-active". The basis must include selectedLeadListId, workflowTableId, and either reviewBatchRowHash or reviewBatchRowIds so the watched UI can trust the current execution slice.',
|
|
56
|
+
properties: {
|
|
57
|
+
statusSource: {
|
|
58
|
+
type: "string",
|
|
59
|
+
enum: ["branch", "parent-thread-fallback"],
|
|
60
|
+
},
|
|
61
|
+
status: {
|
|
62
|
+
type: "string",
|
|
63
|
+
enum: [
|
|
64
|
+
"branch-running",
|
|
65
|
+
"fallback-active",
|
|
66
|
+
"spawn-failed",
|
|
67
|
+
"fallback-superseded",
|
|
68
|
+
"branch-superseded",
|
|
69
|
+
"ready",
|
|
70
|
+
"blocked",
|
|
71
|
+
"retry-needed",
|
|
72
|
+
"stale",
|
|
73
|
+
],
|
|
74
|
+
},
|
|
75
|
+
runId: { type: ["string", "null"] },
|
|
76
|
+
fallbackId: { type: ["string", "null"] },
|
|
77
|
+
startedAt: { type: "string" },
|
|
78
|
+
updatedAt: { type: "string" },
|
|
79
|
+
basisToken: { type: ["string", "null"] },
|
|
80
|
+
basis: {
|
|
81
|
+
type: "object",
|
|
82
|
+
properties: {
|
|
83
|
+
campaignId: { type: ["string", "null"] },
|
|
84
|
+
selectedLeadListId: { type: ["string", "null"] },
|
|
85
|
+
workflowTableId: { type: ["string", "null"] },
|
|
86
|
+
reviewBatchRowHash: { type: ["string", "null"] },
|
|
87
|
+
reviewBatchRowIds: {
|
|
88
|
+
type: ["array", "null"],
|
|
89
|
+
items: { type: "string" },
|
|
90
|
+
},
|
|
91
|
+
filterChoice: { type: ["string", "null"] },
|
|
92
|
+
},
|
|
93
|
+
},
|
|
94
|
+
messageDraftOutputRef: { type: ["string", "null"] },
|
|
95
|
+
messageDraftOutput: { type: ["object", "null"] },
|
|
96
|
+
error: { type: ["string", "null"] },
|
|
97
|
+
},
|
|
98
|
+
required: ["statusSource", "status", "startedAt", "updatedAt", "basis"],
|
|
99
|
+
},
|
|
100
|
+
},
|
|
101
|
+
additionalProperties: false,
|
|
102
|
+
},
|
|
103
|
+
},
|
|
104
|
+
required: ["stage", "headline", "visibleState", "agentIntent", "nextAction"],
|
|
105
|
+
};
|
|
13
106
|
function normalizeLeadSourceProvider(input) {
|
|
14
107
|
if (!input)
|
|
15
108
|
return null;
|
|
@@ -236,37 +329,7 @@ export const campaignToolDefinitions = [
|
|
|
236
329
|
type: ["string", "null"],
|
|
237
330
|
description: "Workflow step ID (headless or UI step ID such as filter-rules)",
|
|
238
331
|
},
|
|
239
|
-
watchNarration:
|
|
240
|
-
type: "object",
|
|
241
|
-
description: "Single structured watch-guide narration object to send with currentStep changes. Include what just happened, what the browser is showing now, what Codex is doing next, and nextAction so the browser guide mirrors Codex progress.",
|
|
242
|
-
properties: {
|
|
243
|
-
stage: {
|
|
244
|
-
type: "string",
|
|
245
|
-
enum: [
|
|
246
|
-
"brief-review",
|
|
247
|
-
"find-leads",
|
|
248
|
-
"review-batch",
|
|
249
|
-
"fit-message",
|
|
250
|
-
"review-ready",
|
|
251
|
-
],
|
|
252
|
-
},
|
|
253
|
-
headline: { type: "string" },
|
|
254
|
-
visibleState: { type: "string" },
|
|
255
|
-
agentIntent: { type: "string" },
|
|
256
|
-
nextAction: { type: ["string", "null"] },
|
|
257
|
-
safety: { type: ["string", "null"] },
|
|
258
|
-
progressLabel: { type: ["string", "null"] },
|
|
259
|
-
blockedReason: { type: ["string", "null"] },
|
|
260
|
-
workerStatuses: { type: "object" },
|
|
261
|
-
},
|
|
262
|
-
required: [
|
|
263
|
-
"stage",
|
|
264
|
-
"headline",
|
|
265
|
-
"visibleState",
|
|
266
|
-
"agentIntent",
|
|
267
|
-
"nextAction",
|
|
268
|
-
],
|
|
269
|
-
},
|
|
332
|
+
watchNarration: WATCH_NARRATION_TOOL_SCHEMA,
|
|
270
333
|
leadSourceType: {
|
|
271
334
|
type: ["string", "null"],
|
|
272
335
|
description: "Lead source type (existing | new)",
|
|
@@ -344,37 +407,7 @@ export const campaignToolDefinitions = [
|
|
|
344
407
|
type: "string",
|
|
345
408
|
description: "Guarded manual recovery clear. currentStep:null is accepted only when this matches the durable step being cleared.",
|
|
346
409
|
},
|
|
347
|
-
watchNarration:
|
|
348
|
-
type: "object",
|
|
349
|
-
description: "Single structured watch-guide narration object to send with currentStep changes. Include what just happened, what the browser is showing now, what Codex is doing next, and nextAction so the browser guide mirrors Codex progress. Do not send separate guideHeadline/guideBody fields.",
|
|
350
|
-
properties: {
|
|
351
|
-
stage: {
|
|
352
|
-
type: "string",
|
|
353
|
-
enum: [
|
|
354
|
-
"brief-review",
|
|
355
|
-
"find-leads",
|
|
356
|
-
"review-batch",
|
|
357
|
-
"fit-message",
|
|
358
|
-
"review-ready",
|
|
359
|
-
],
|
|
360
|
-
},
|
|
361
|
-
headline: { type: "string" },
|
|
362
|
-
visibleState: { type: "string" },
|
|
363
|
-
agentIntent: { type: "string" },
|
|
364
|
-
nextAction: { type: ["string", "null"] },
|
|
365
|
-
safety: { type: ["string", "null"] },
|
|
366
|
-
progressLabel: { type: ["string", "null"] },
|
|
367
|
-
blockedReason: { type: ["string", "null"] },
|
|
368
|
-
workerStatuses: { type: "object" },
|
|
369
|
-
},
|
|
370
|
-
required: [
|
|
371
|
-
"stage",
|
|
372
|
-
"headline",
|
|
373
|
-
"visibleState",
|
|
374
|
-
"agentIntent",
|
|
375
|
-
"nextAction",
|
|
376
|
-
],
|
|
377
|
-
},
|
|
410
|
+
watchNarration: WATCH_NARRATION_TOOL_SCHEMA,
|
|
378
411
|
interactionMode: {
|
|
379
412
|
type: "string",
|
|
380
413
|
enum: ["step-by-step", "autonomous", "ask-when-needed"],
|
package/dist/tools/prompts.js
CHANGED
|
@@ -331,8 +331,8 @@ export function getPostFindLeadsScoutRegistry() {
|
|
|
331
331
|
"basis.campaignId",
|
|
332
332
|
"basis.selectedLeadListId",
|
|
333
333
|
"basis.workflowTableId",
|
|
334
|
-
"basis.
|
|
335
|
-
"basis.
|
|
334
|
+
"basis.reviewBatchRowHash or basis.reviewBatchRowIds",
|
|
335
|
+
"basis.filterChoice",
|
|
336
336
|
],
|
|
337
337
|
promptRequired: 'Load current campaign brief/table state through scoped tools. Before drafting: get_subskill_prompt({ subskillName: "generate-messages" }); every required message asset named by generate-messages Mode 0 through get_subskill_asset, including gold-standard-message-examples.md, gold-standard-message-patterns.md, ai-tells.md, sellable-cleanup-rules.md, ai-native-tokens.md, and token-fill-examples.md. Do not use shell/local filesystem reads, repo paths, plugin-cache paths, /Users paths, local artifacts, alternate prompts, or examples-only prompts. After candidate generation/revision and before returning ready: get_subskill_prompt({ subskillName: "create-campaign-v2-validation" }) as the final internal validation gate. If required prompts/assets cannot load through MCP tools, return blocked/retry-needed instead of drafting from memory.',
|
|
338
338
|
basisFields: [
|
|
@@ -342,6 +342,7 @@ export function getPostFindLeadsScoutRegistry() {
|
|
|
342
342
|
"selectedLeadListId",
|
|
343
343
|
"workflowTableId",
|
|
344
344
|
"filter choice",
|
|
345
|
+
"runtime proof row identity: reviewBatchRowHash or reviewBatchRowIds",
|
|
345
346
|
"concise brief summary: offer, buyer, safe proof, blocked claims",
|
|
346
347
|
"concise source summary and source-use rule",
|
|
347
348
|
"3-5 sample campaign-table rows with name, title, company when available, and signal",
|
|
@@ -363,9 +364,9 @@ export function getPostFindLeadsScoutRegistry() {
|
|
|
363
364
|
reusePolicy: "The first completed Message Drafting recommendation remains the default review candidate. Later Lead Fit Builder, Filter Leads, enrichment, or rubric completion may make an enriched rewrite available, but does not automatically retry or replace the initial draft unless campaign/brief/source/list/table/execution-slice identity mismatches or the initial output failed. If filters were chosen but leadScoringRubrics are not yet visible when the branch reads campaign state, Message Drafting must not wait, retry, or return blocked; missing saved rubrics are parent-owned filter setup, and the branch should return status ready with basisStatus usable_initial when campaign/list/table identity and the non-empty execution slice match. User copy feedback before approve-message is an explicit Message Drafting revision and must be routed back through the message branch with the current recommendation and basis.",
|
|
364
365
|
},
|
|
365
366
|
usage: {
|
|
366
|
-
codex:
|
|
367
|
+
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.',
|
|
367
368
|
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.",
|
|
368
|
-
parentThreadRule: 'Named agents are optional acceleration, but message drafting is not optional. The only normal background worker is Message Drafting.
|
|
369
|
+
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.',
|
|
369
370
|
prepareMessagesRule: 'Default create-campaign stays on the existing reviewBatchLimit:15 first campaign-table execution slice. Only call start_campaign_message_preparation when the user explicitly asks for more prepared messages or a send count. For "prepare/generate X messages", set targetPreparedMessages:X, omit maxRowsToCheck so the backend calibrates on at least 100 rows, estimates the row budget from observed rubric/pass yield, caps maxRowsToCheck at 2500, and use approvalMode:mark_ready. After the calibration sample settles, the backend adapts later batches up to 250 rows while recalculating yield. Poll get_campaign_message_preparation_status and summarize preparation-job status: checked rows, passed/prepared/approved count, target, estimated row budget remaining, and stop reason. For "approve X messages", use approvalMode:approve but still do not launch. For "schedule X sends", use approvalMode:approve to approve exactly the bounded X-message cohort during preparation, then continue through sender, sequence, and final launch greenlight; final launch must verify that bounded cohort and must not broad approve-all. campaignId is CampaignOffer.id. If the user asks to stop preparation, the target is wrong, or status shows the wrong campaign/table, call cancel_campaign_message_preparation; otherwise do not cancel a healthy prepare run. cancel_campaign_message_preparation cancels the same pending workflow-table cells as the UI Cancel Pending Cells action. Low-level selectors are diagnostics and recovery only for this lane. start_campaign remains forbidden until final launch greenlight.',
|
|
370
371
|
},
|
|
371
372
|
};
|
package/dist/tools/registry.d.ts
CHANGED
|
@@ -1110,6 +1110,90 @@ export declare const allTools: ({
|
|
|
1110
1110
|
};
|
|
1111
1111
|
workerStatuses: {
|
|
1112
1112
|
type: string;
|
|
1113
|
+
description: string;
|
|
1114
|
+
properties: {
|
|
1115
|
+
leadFitBuilder: {
|
|
1116
|
+
type: string[];
|
|
1117
|
+
enum: (string | null)[];
|
|
1118
|
+
};
|
|
1119
|
+
messageDraftBuilder: {
|
|
1120
|
+
type: string[];
|
|
1121
|
+
enum: (string | null)[];
|
|
1122
|
+
};
|
|
1123
|
+
};
|
|
1124
|
+
additionalProperties: boolean;
|
|
1125
|
+
};
|
|
1126
|
+
workerDetails: {
|
|
1127
|
+
type: string;
|
|
1128
|
+
description: string;
|
|
1129
|
+
properties: {
|
|
1130
|
+
messageDraftBuilder: {
|
|
1131
|
+
type: string[];
|
|
1132
|
+
description: string;
|
|
1133
|
+
properties: {
|
|
1134
|
+
statusSource: {
|
|
1135
|
+
type: string;
|
|
1136
|
+
enum: string[];
|
|
1137
|
+
};
|
|
1138
|
+
status: {
|
|
1139
|
+
type: string;
|
|
1140
|
+
enum: string[];
|
|
1141
|
+
};
|
|
1142
|
+
runId: {
|
|
1143
|
+
type: string[];
|
|
1144
|
+
};
|
|
1145
|
+
fallbackId: {
|
|
1146
|
+
type: string[];
|
|
1147
|
+
};
|
|
1148
|
+
startedAt: {
|
|
1149
|
+
type: string;
|
|
1150
|
+
};
|
|
1151
|
+
updatedAt: {
|
|
1152
|
+
type: string;
|
|
1153
|
+
};
|
|
1154
|
+
basisToken: {
|
|
1155
|
+
type: string[];
|
|
1156
|
+
};
|
|
1157
|
+
basis: {
|
|
1158
|
+
type: string;
|
|
1159
|
+
properties: {
|
|
1160
|
+
campaignId: {
|
|
1161
|
+
type: string[];
|
|
1162
|
+
};
|
|
1163
|
+
selectedLeadListId: {
|
|
1164
|
+
type: string[];
|
|
1165
|
+
};
|
|
1166
|
+
workflowTableId: {
|
|
1167
|
+
type: string[];
|
|
1168
|
+
};
|
|
1169
|
+
reviewBatchRowHash: {
|
|
1170
|
+
type: string[];
|
|
1171
|
+
};
|
|
1172
|
+
reviewBatchRowIds: {
|
|
1173
|
+
type: string[];
|
|
1174
|
+
items: {
|
|
1175
|
+
type: string;
|
|
1176
|
+
};
|
|
1177
|
+
};
|
|
1178
|
+
filterChoice: {
|
|
1179
|
+
type: string[];
|
|
1180
|
+
};
|
|
1181
|
+
};
|
|
1182
|
+
};
|
|
1183
|
+
messageDraftOutputRef: {
|
|
1184
|
+
type: string[];
|
|
1185
|
+
};
|
|
1186
|
+
messageDraftOutput: {
|
|
1187
|
+
type: string[];
|
|
1188
|
+
};
|
|
1189
|
+
error: {
|
|
1190
|
+
type: string[];
|
|
1191
|
+
};
|
|
1192
|
+
};
|
|
1193
|
+
required: string[];
|
|
1194
|
+
};
|
|
1195
|
+
};
|
|
1196
|
+
additionalProperties: boolean;
|
|
1113
1197
|
};
|
|
1114
1198
|
};
|
|
1115
1199
|
required: string[];
|
|
@@ -1225,6 +1309,90 @@ export declare const allTools: ({
|
|
|
1225
1309
|
};
|
|
1226
1310
|
workerStatuses: {
|
|
1227
1311
|
type: string;
|
|
1312
|
+
description: string;
|
|
1313
|
+
properties: {
|
|
1314
|
+
leadFitBuilder: {
|
|
1315
|
+
type: string[];
|
|
1316
|
+
enum: (string | null)[];
|
|
1317
|
+
};
|
|
1318
|
+
messageDraftBuilder: {
|
|
1319
|
+
type: string[];
|
|
1320
|
+
enum: (string | null)[];
|
|
1321
|
+
};
|
|
1322
|
+
};
|
|
1323
|
+
additionalProperties: boolean;
|
|
1324
|
+
};
|
|
1325
|
+
workerDetails: {
|
|
1326
|
+
type: string;
|
|
1327
|
+
description: string;
|
|
1328
|
+
properties: {
|
|
1329
|
+
messageDraftBuilder: {
|
|
1330
|
+
type: string[];
|
|
1331
|
+
description: string;
|
|
1332
|
+
properties: {
|
|
1333
|
+
statusSource: {
|
|
1334
|
+
type: string;
|
|
1335
|
+
enum: string[];
|
|
1336
|
+
};
|
|
1337
|
+
status: {
|
|
1338
|
+
type: string;
|
|
1339
|
+
enum: string[];
|
|
1340
|
+
};
|
|
1341
|
+
runId: {
|
|
1342
|
+
type: string[];
|
|
1343
|
+
};
|
|
1344
|
+
fallbackId: {
|
|
1345
|
+
type: string[];
|
|
1346
|
+
};
|
|
1347
|
+
startedAt: {
|
|
1348
|
+
type: string;
|
|
1349
|
+
};
|
|
1350
|
+
updatedAt: {
|
|
1351
|
+
type: string;
|
|
1352
|
+
};
|
|
1353
|
+
basisToken: {
|
|
1354
|
+
type: string[];
|
|
1355
|
+
};
|
|
1356
|
+
basis: {
|
|
1357
|
+
type: string;
|
|
1358
|
+
properties: {
|
|
1359
|
+
campaignId: {
|
|
1360
|
+
type: string[];
|
|
1361
|
+
};
|
|
1362
|
+
selectedLeadListId: {
|
|
1363
|
+
type: string[];
|
|
1364
|
+
};
|
|
1365
|
+
workflowTableId: {
|
|
1366
|
+
type: string[];
|
|
1367
|
+
};
|
|
1368
|
+
reviewBatchRowHash: {
|
|
1369
|
+
type: string[];
|
|
1370
|
+
};
|
|
1371
|
+
reviewBatchRowIds: {
|
|
1372
|
+
type: string[];
|
|
1373
|
+
items: {
|
|
1374
|
+
type: string;
|
|
1375
|
+
};
|
|
1376
|
+
};
|
|
1377
|
+
filterChoice: {
|
|
1378
|
+
type: string[];
|
|
1379
|
+
};
|
|
1380
|
+
};
|
|
1381
|
+
};
|
|
1382
|
+
messageDraftOutputRef: {
|
|
1383
|
+
type: string[];
|
|
1384
|
+
};
|
|
1385
|
+
messageDraftOutput: {
|
|
1386
|
+
type: string[];
|
|
1387
|
+
};
|
|
1388
|
+
error: {
|
|
1389
|
+
type: string[];
|
|
1390
|
+
};
|
|
1391
|
+
};
|
|
1392
|
+
required: string[];
|
|
1393
|
+
};
|
|
1394
|
+
};
|
|
1395
|
+
additionalProperties: boolean;
|
|
1228
1396
|
};
|
|
1229
1397
|
};
|
|
1230
1398
|
required: string[];
|
package/package.json
CHANGED
|
@@ -114,12 +114,6 @@ sends", use `approvalMode:"approve"` to approve exactly the bounded X-message
|
|
|
114
114
|
cohort during preparation, then continue through sender, sequence, and final
|
|
115
115
|
launch greenlight; the launch path must verify that bounded cohort and must not
|
|
116
116
|
broad approve-all.
|
|
117
|
-
When approving reviewed draft rows in the campaign table, resolve the actual
|
|
118
|
-
visible `Approved` cells with `select_campaign_cells({ columnRole: "approved",
|
|
119
|
-
rowSelector: { type: "rowIds", rowIds } })` and `update_cell` those returned
|
|
120
|
-
cell IDs. Do not rely on `approveCellId` from `get_rows` unless it matches the
|
|
121
|
-
semantic selector result; it may be a row-level helper and leave the UI checkbox
|
|
122
|
-
unchecked.
|
|
123
117
|
Treat `campaignId` as `CampaignOffer.id`. Low level selector/queue tools are
|
|
124
118
|
diagnostics and recovery only for this lane. If the user asks to stop
|
|
125
119
|
preparation, the target is wrong, or status shows the wrong campaign/table, call
|
|
@@ -948,17 +942,21 @@ updates.
|
|
|
948
942
|
through `mcp__sellable__get_subskill_asset`, and before returning
|
|
949
943
|
`mcp__sellable__get_subskill_prompt({ subskillName: "create-campaign-v2-validation" })`
|
|
950
944
|
as the final internal validation gate.
|
|
951
|
-
In Codex,
|
|
952
|
-
this single Message Drafting background agent
|
|
953
|
-
|
|
954
|
-
agents, delegation, or a message/bg agent in this campaign, ask once for
|
|
955
|
-
permission before loading the long message prompt in the parent. If
|
|
956
|
-
permission is granted but the named custom agent is not
|
|
945
|
+
In Codex, the filter-choice answer is the campaign-scoped go-ahead to use
|
|
946
|
+
this single Message Drafting background agent in step-wise and YOLO modes.
|
|
947
|
+
Do not ask a separate question to start it. If the named custom agent is not
|
|
957
948
|
available, spawn a generic background agent with `model: "gpt-5.5"` and
|
|
958
|
-
`reasoning_effort: "xhigh"` using the same lean campaign/table basis.
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
949
|
+
`reasoning_effort: "xhigh"` using the same lean campaign/table basis. If no
|
|
950
|
+
background-agent tool is callable, start the same full message branch inline
|
|
951
|
+
before filter drafting or skip-filter message review and record it as
|
|
952
|
+
`statusSource: "parent-thread-fallback"`.
|
|
953
|
+
After a spawned branch starts, persist rich proof under
|
|
954
|
+
`watchNarration.workerDetails.messageDraftBuilder` with
|
|
955
|
+
`statusSource: "branch"`, `status: "branch-running"`, `runId`, timestamps,
|
|
956
|
+
selectedLeadListId, workflowTableId, filterChoice, and reviewBatchRowHash or
|
|
957
|
+
reviewBatchRowIds. `workerStatuses.messageDraftBuilder` is only the optional
|
|
958
|
+
simple badge (`running`); never put rich proof under `workerStatuses` or use
|
|
959
|
+
a `messageDrafting` key.
|
|
962
960
|
Do not use any alternate, examples-only, or local-artifact message prompt. Message review and
|
|
963
961
|
message QA require Message Drafting output:
|
|
964
962
|
do not draft from a checklist, local markdown artifact, or parent-thread
|
|
@@ -273,7 +273,7 @@ customer-facing source-choice labels.
|
|
|
273
273
|
|
|
274
274
|
After `confirm_lead_list` copies source rows and records the review batch, ask the filter-choice question immediately. Do not call `get_post_find_leads_scout_registry`, load filter/message prompts, or spawn Message Drafting before that question. Before it: short setup summary plus add filters, skip filters, or revise source; no extra watch link.
|
|
275
275
|
|
|
276
|
-
After filter choice, the only normal background worker is Message Drafting (`post-find-leads-message-scout`). The registry lookup is not a launch. Both choices must run this kickoff: call the registry, then start Message Drafting via `Task`/`spawn_agent` before filter refs, `save_rubrics`, or skip review. YOLO
|
|
276
|
+
After filter choice, the only normal background worker is Message Drafting (`post-find-leads-message-scout`). The registry lookup is not a launch. Both choices must run this kickoff: call the registry, then start Message Drafting via `Task`/`spawn_agent` before filter refs, `save_rubrics`, or skip review. YOLO follows the same no-extra-question kickoff rule. If no background tool is callable, run the same full branch inline as `parent-thread-fallback`; otherwise return `blocked` / `retry-needed`. `update_campaign({ currentStep: "messages" })` is not proof of kickoff. After launch, persist rich proof under `watchNarration.workerDetails.messageDraftBuilder` with `statusSource: "branch"`, `status: "branch-running"`, `runId`, timestamps, selectedLeadListId, workflowTableId, filterChoice, and reviewBatchRowHash or reviewBatchRowIds; `workerStatuses.messageDraftBuilder` is only the optional simple badge (`running`). Never put rich proof under `workerStatuses` or use a `messageDrafting` key.
|
|
277
277
|
|
|
278
278
|
Parent thread writes filters. On the filters path, start Message Drafting, load `references/filter-leads.md`, save rubrics, and ask users to approve saved criteria. Keep Filter Rules until criteria approval. After approval, move to `currentStep: "apply-icp-rubric"` so the app shows Filter Leads while Message Drafting finishes; no cells until template approval. Say Message Drafting is preparing it.
|
|
279
279
|
|
|
@@ -337,15 +337,13 @@ brief/context, full `generate-messages` prompt, all referenced assets, and
|
|
|
337
337
|
`create-campaign-v2-validation` inside its own branch before returning
|
|
338
338
|
review-ready output.
|
|
339
339
|
|
|
340
|
-
Only promise Message Drafting background work when it actually started.
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
the fallback as the worker source instead of reporting a background failure. Say
|
|
348
|
-
the real sequence:
|
|
340
|
+
Only promise Message Drafting background work when it actually started. The
|
|
341
|
+
filter-choice answer is the post-import gate for this single worker, so do not
|
|
342
|
+
ask another question before kickoff. If no background tool is callable, use an
|
|
343
|
+
explicit `parent-thread-fallback`: run the same Message Drafting branch inline,
|
|
344
|
+
load the same live campaign/table context, prompt, assets, and validation gate,
|
|
345
|
+
and record the fallback as the worker source instead of reporting a background
|
|
346
|
+
failure. Say the real sequence:
|
|
349
347
|
|
|
350
348
|
```text
|
|
351
349
|
I’ll tighten the filter first, then run message generation from the same sample.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"v2.1-compact","workflow":"create-campaign-v2","principle":"CampaignOffer/watch canonical: brief, source/import, filters/message, Settings, Start.","normalCustomerPath":"Use campaign state/MCP/watchNarration. Do not create, read, link, or surface local files. Print watch link once.","legacyCompatibility":{"validationSubskill":"create-campaign-v2-validation","tailSubskill":"create-campaign-v2-tail","rule":"Legacy diagnostics are opt-in, not active gates."},"commitGateChoices":["approve","revise-brief","revise-leads","revise-rubric","revise-messaging","abort"],"canonicalStateFields":["campaignId","watchUrl","campaignBrief","currentStep","watchNarration","interactionMode","providerSearchAssociation","selectedLeadListId","workflowTableId","filterChoice","leadScoringRubrics","messageDraftRecommendation","approvedMessageTemplate","senderIds","sequenceTemplate","runningState"],"watchNarrationTransitionContract":{"rule":"Watched currentStep switches need fresh watchNarration.","requiredFields":["stage","headline","visibleState","agentIntent","nextAction"],"copyMustInclude":["what just happened","visible page/state","next user action"],"appliesToTools":["create_campaign","update_campaign","attach_recommended_sequence","start_campaign"],"oneTimeWatchLinkPolicy":"must not print another watch-link handoff unless asked or recovering link."},"lazyReferences":{"watch":["references/watch-link-handoff.md","references/watch-guide-narration.md"],"source":["references/lead-validation-preview.md","references/step-13-import-leads.md"],"filter":["references/filter-leads.md"],"message":[],"tail":["references/sample-validation-loop.md","references/step-15-re-cascade.md","references/final-handoff-contract.md"]},"yoloMode":{"triggerPhrases":["yolo","--yolo","mode=yolo","autopilot","use best guesses","use best estimates","answer for me","just run it","yolo autopilot"],"identityRequestOnlyWhenMissing":true,"operatorDirectionsRule":"Operator directions persist; newest conflicting direction wins.","setInteractionModeAfterCampaignCreate":"autonomous","autoSelectsPreLaunchChoices":["campaign focus","brief approval","source plan","Start Import approval","filters vs skip filters","filter rubric approval","message template approval when recommendation is approve-message","generated message review when quality floor passes","sender identity match"],"mustPauseFor":["missing LinkedIn profile URL or handle","missing credentials/data","ambiguous choice with no reasonable estimate","source/message/filter quality failure","final live launch confirmation"],"neverAutoStart":true},"steps":[{"id":"bootstrap","onEnter":[{"tool":"bootstrap_create_campaign","requiredValues":{"flowVersion":"v2"}},{"tool":"get_subskill_prompt","requiredValues":{"subskillName":"create-campaign-v2"}}],"allowedTools":["bootstrap_create_campaign","get_auth_status","get_active_workspace","get_subskill_prompt","AskUserQuestion","request_user_input"],"doNotAllow":["create_campaign","list_senders","save_rubrics","import_leads","confirm_lead_list","update_campaign","queue_cells","start_campaign"],"waitFor":"bootstrap_complete","transitions":{"bootstrap_complete":"brief-interview"}},{"id":"brief-interview","onEnter":[{"action":"resolve_campaign_identity_before_strategy_packet","allowedTools":["fetch_company","fetch_linkedin_profile","WebFetch","WebSearch"],"mustNotInferFromNameOnly":true,"doNotPresentSenderPickerBeforeIdentityInference":true,"fallback":"Ask only: \"What is your LinkedIn profile URL or handle?\" Normalize handles to profile URLs; if not a profile, ask again before strategy questions.","requiresLinkedInProfileUrl":true,"doNotAcceptAsIdentityInput":["non-profile URL","company page","company/name-only input without a profile handle"],"acceptsLinkedInProfileHandle":true,"normalizeLinkedInProfileHandleToUrl":true},{"action":"run_campaign_identity_research_before_strategy_packet","target":"research-sender","requiredCompletion":"complete_sender_research","allowedTools":["get_subskill_prompt","fetch_linkedin_profile","fetch_company","fetch_linkedin_posts","fetch_company_posts","WebFetch","WebSearch","complete_sender_research"],"requiredInput":"LinkedIn profile URL or handle"},{"action":"confirm_target_before_strategy_packet","uses":"request_user_input","singleChoice":true,"question":"Who should we target first?","options":["Use Sellable's researched recommendation","Choose a different buyer","I'm not sure yet"],"copyMustInclude":["research basis","recommendation is editable","who to target"],"requiredOption":"Other / custom","neverCollectOpenTextWithStructuredQuestion":true,"skipIf":"user already supplied a clear target or yolo_mode with any reasonable best-estimate target"},{"action":"confirm_current_offer_before_strategy_packet","uses":"request_user_input","question":"What should we pitch to prospects first?","options":["Use Sellable's researched recommendation","Use my current pitch","Shape the pitch together"],"copyMustInclude":["research basis","public LinkedIn research may be stale","recommendation is editable","pitch to prospects"],"skipIf":"user already supplied a clear current offer or yolo_mode with any reasonable researched recommendation"},{"action":"confirm_trust_proof_before_strategy_packet","uses":"request_user_input","singleChoice":true,"question":"What is the strongest credibility signal we can lead with?","options":["Use Sellable's recommended proof","Use customer proof or a case study","Use founder or company credibility"],"copyMustInclude":["build trust with prospects","recommendation is editable","proof to use or avoid"],"requiredOption":"Other / custom","skipIf":"user already supplied clear proof to use or avoid, or yolo_mode with any reasonable researched proof"},{"action":"choose_prospect_source_path_before_strategy_packet","uses":"request_user_input","singleChoice":true,"question":"How should we find prospects?","options":["Find prospects for me","Use a CSV of LinkedIn profiles","Use a CSV of company domains"],"copyMustInclude":["prospects","no one added yet","find prospects for me"],"skipIf":"user already supplied a source path or yolo_mode with any reasonable source path"},{"action":"infer_strategy_packet_in_yolo_mode","when":"yolo_mode","skipStructuredSetupQuestions":true,"inferFields":["buyer segment","offer/CTA","proof to use or avoid","lead source","filter choice","message direction"],"sourceOfTruth":"identity/company lookup plus operator directions","mustStateAssumptionsInBrief":true},{"action":"render_supplied_setup_receipt_before_brief_when_setup_questions_skip","when":"any setup question is skipped because the user already supplied or yolo mode inferred identity, target, offer, proof, or source","output":"normal chat receipt before the campaign brief or watch-link handoff","copyMustInclude":["Accepted LinkedIn input: normalized to the required LinkedIn profile URL.","Offer path: supplied current offer or Sellable's researched recommendation; you can replace it with your current offer."],"copyMustNotInclude":["Campaign Identity"]},{"action":"create_watchable_campaign_shell_with_v1_brief","tool":"create_campaign","requiredFields":["name","campaignBrief","clientProspectId or senderLinkedinUrl","currentStep","watchNarration"],"requiredValues":{"currentStep":"create-offer","watchNarration.stage":"brief"},"capture":["campaignId","watchUrl"],"canonicalStateWrites":["campaignId","watchUrl","campaignBrief","currentStep:create-offer"]},{"action":"surface_campaign_shell_watch_link","watchUrlSource":"create_campaign.watchUrl","requiredWatchUrlShape":"exact create_campaign.watchUrl; direct /campaign-builder/{campaignId}?mode={claude|codex} URL with workspaceId and token","copyMustInclude":["WATCH CODEX BUILD","Open live campaign builder","Keep this chat open.","approval questions here"],"immediateNextMainChatLine":"Ask for brief approval now. After approval, say: \"Brief approved. Next, we'll choose where to find buyers. I won't add anyone yet.\"","codexBrowserHandoff":{"openWhenAvailable":false,"printWatchLinkOnly":true,"tellUserCommandEnterOrClick":false,"mustNotUseBrowserAutomation":true,"fallbackMustNotClaimInspection":true},"copyMustAvoid":["bare /campaign-builder/{campaignId} URL","derived watch URL","second watch-link handoff","shell open command","Next, we'll choose where to find buyers"],"oneTimeOnly":true}],"allowedTools":["get_subskill_prompt","fetch_company","fetch_company_posts","fetch_linkedin_profile","fetch_linkedin_posts","complete_sender_research","create_campaign","AskUserQuestion","request_user_input"],"doNotAllow":["list_senders","save_rubrics","import_leads","confirm_lead_list","queue_cells","start_campaign"],"waitFor":["campaign_shell_created","brief_ready","confirm_with_user"],"transitions":{"campaign_shell_created":"brief-review","brief_ready":"brief-review","confirm_with_user":"brief-review"}},{"id":"brief-review","onEnter":[{"action":"render_brief_inline","minimumVisibleDetail":"campaign direction, buyer, offer, proof, source plan, safety gates","copyMustInclude":["This brief is based on Sellable's research and your answers.","If your site or LinkedIn is stale","Does this brief look right, and how should Sellable continue?"],"copyMustNotInclude":["quoted first-message copy","Message Angle as final proof","This approval covers","does not approve adding people","does not approve scraping posts","selecting a sender","attaching a sequence","Campaign Identity","what should this campaign sell first","sell first","[from you]","[from LinkedIn]","[from website]","[from case study]","[Sellable recommendation]"],"messageHintRule":"If any message-shape hint remains, keep it as non-final bullets and say real examples come after leads are found and filtered.","approvalBoundaryRule":"Keep this gate positive and short: ask approve/revise, then move to choosing where to find buyers.","sectionLabelRule":"Use ## Sender and Company for the person/company context; never render ## Campaign Identity.","skipIf":"the full brief was already rendered in the current shell-creation handoff before create_campaign returned","renderOnceRule":"Brief visible once before approval. If shown before shell creation, do not repeat after; append one watch-link handoff, then ask.","copyMustAvoid":["duplicate brief render after shell creation","second Watch link:"]},{"action":"ask_brief_choice","uses":"request_user_input","choices":["Approve brief + activate YOLO mode (Recommended)","Approve brief + build campaign with AI, step by step","Revise brief"],"skipIf":"yolo_mode; auto_continue after rendering assumptions unless brief quality floor fails","question":"Does this brief look right, and how should Sellable continue?","autonomousChoice":"Approve brief + activate YOLO mode (Recommended)","choiceDescriptions":{"Approve brief + activate YOLO mode (Recommended)":"Sellable will auto-decide the remaining setup choices with best guesses, including sources, filters, and messaging. It still stops before final launch.","Approve brief + build campaign with AI, step by step":"Approve this direction, then work with the AI through each major setup decision before it continues.","Revise brief":"Change the target, offer, proof, or campaign direction before continuing."}}],"requiredCampaignState":["campaignId","watchUrl","campaignBrief","currentStep"],"allowedTools":["AskUserQuestion","request_user_input","update_campaign"],"doNotAllow":["create_campaign","list_senders","import_leads","confirm_lead_list","queue_cells","start_campaign"],"waitFor":["user_brief_confirmed","revise_brief","auto_continue"],"transitions":{"user_brief_confirmed":"find-leads","revise_brief":"brief-interview","auto_continue":"find-leads"}},{"id":"find-leads","sourceSelectionFunnel":{"preScoutRecommendationGate":{"required":true,"mustHappenBefore":["get_provider_prompt","search_signals","search_sales_nav","search_prospeo_companies","confirm_prospeo_company_accounts","search_prospeo","fetch_post_engagers"],"show":["buyer groups or places we could check","best place to start","where the right buyers are already talking","what signs the next search will check","where to look next if the first place is too thin","what approval authorizes"],"approvalAuthorizes":"best places to find buyers; no one added yet","explanationMustInclude":["why that place fits this campaign","enough likely prospects","what counts as a good sign","I won't add anyone yet"],"yoloMode":{"autoApproveRecommendedLane":true,"mustShowAssumedChoice":true,"pauseIfConfidenceLow":true},"customerLanguage":{"readability":"grade-5","requiredHeading":"Find Buyers Plan","prefer":["people to check","prospects"],"avoid":["lane","precision/scale tradeoff","evidence quality","workflow pain","ICP"],"termRule":{"buyers":"target market","peopleToCheck":"raw reactions/comments before fit is known","prospects":"likely usable people after fit","leads":"campaign rows"}},"questionOrder":"update_campaign to pick-provider; render Find Buyers Plan without repeating the watch link; never ask first; exactly one structured source-plan question total.","approvalFreshnessRule":"Do not reuse brief approval; continue exact earlier source-plan choice instead of asking a second identical question.","copyMustAvoid":["Watch link:","watch-link handoff"]},"defaultWhenSourceUnspecified":["signal-discovery","sales-nav-recent-active","sales-nav-general","prospeo"],"parallelAllowedOnlyWhen":["user explicitly requested source comparison"]},"onEnter":[{"tool":"update_campaign","requiredValues":{"currentStep":"pick-provider","watchNarration.stage":"find-leads","watchNarration.headline":"Review where to find buyers","watchNarration.visibleState":"Source selection is visible before lead finding.","watchNarration.agentIntent":"Codex is explaining where to look first and fallback.","watchNarration.nextAction":"Approve where to look first or choose another place","watchNarration.safety":"Only deciding where to look. No one is added yet."}},{"action":"render_find_buyers_plan_inline","oneShot":true,"requiredPrecondition":"currentStep=pick-provider has been saved with update_campaign","mustHappenAfter":["update_campaign currentStep=pick-provider"],"mustHappenBefore":["ask_find_buyers_plan_choice","get_provider_prompt","search_signals","search_sales_nav","search_prospeo_companies","confirm_prospeo_company_accounts","search_prospeo","fetch_post_engagers"],"output":"normal chat text before any request_user_input approval panel","requiredHeading":"Find Buyers Plan","requiredInlineFields":["buyer groups or places for this campaign","best place to start","why that place fits this campaign","where to look next if thin","what approval authorizes"],"copyMustInclude":["choose where to find buyers","I won't add anyone yet"],"copyMustAvoid":["lane","source scouting","provider","precision/scale tradeoff","evidence quality","pilot volume","ICP","workflow pain","lead-source scouting","not importing leads","Watch link:","campaign-builder URL","repeat the watch URL","watch-link handoff"],"approvalBoundary":"Approves where to look; no one added yet.","linkPolicy":"Do not include another watch link."},{"action":"ask_find_buyers_plan_choice","uses":"request_user_input","oneShot":true,"requiredPrecondition":"visible plan rendered; no earlier approval can satisfy this unless exact visible source choice exists; do not ask this if that exact earlier source choice exists","skipIf":"earlier source-plan question already captured exact visible source choice, post-plan provider, or yolo choice","choices":["Start with LinkedIn posts","Start with active LinkedIn profiles","Start with company/contact search","Choose a different place","Pause here"],"approvalChoiceLabelsByProvider":{"signal-discovery":"Start with LinkedIn posts","sales-nav":"Start with active LinkedIn profiles","prospeo":"Start with company/contact search"},"approvalState":"source_lane_approved","copyMustInclude":["Approve this plan for where to find buyers?","Start with LinkedIn posts"],"mustNotHappenBefore":["render_find_buyers_plan_inline"],"approvalStateRule":"Never ask a second identical source-plan question; set source_lane_approved only after visible plan, never from brief approval/generic/pre-plan state."},{"action":"persist_provider_search_step_before_search","tool":"update_campaign","requiredPrecondition":"source_lane_approved set after the visible Find Buyers Plan approval question","providerCurrentStepMap":{"signal-discovery":"signal-discovery","sales-nav":"sales-nav","prospeo":"prospeo"},"requiredValues":{"leadSourceType":"new","leadSourceProvider":"approved provider","currentStep":"provider-specific current step","watchNarration.stage":"find-leads","watchNarration.headline":"Searching the approved place","watchNarration.safety":"Looking only. No one is added yet."},"mustRunBefore":["search_signals","search_sales_nav","search_prospeo_companies","confirm_prospeo_company_accounts","search_prospeo","fetch_post_engagers"]},{"action":"run_parent_thread_source_funnel","requiredPrecondition":"source_lane_approved after visible Find Buyers Plan approval","mode":"parent_thread_inline_sequential","sourceAgents":"forbidden in normal create-campaign","loadsOnlyActiveProviderPrompt":true,"defaultOrder":["signal-discovery","sales-nav-recent-active","sales-nav-general","prospeo"],"stopOnFirstViableUnlessComparisonRequested":true}],"requiredCampaignState":["campaignId","campaignBrief","currentStep"],"allowedTools":["get_provider_prompt","lookup_sales_nav_filter","search_sales_nav","search_prospeo_companies","confirm_prospeo_company_accounts","search_prospeo","search_signals","select_promising_posts","fetch_post_engagers","fetch_company","fetch_linkedin_profile","load_csv_dnc_entries","load_csv_linkedin_leads","load_csv_domains","get_rows_minimal","update_campaign","AskUserQuestion","request_user_input","get_campaign_navigation_state"],"doNotAllow":["create_campaign","list_senders","save_rubrics","import_leads","confirm_lead_list","queue_cells","start_campaign","Task","spawn_agent"],"waitFor":["lead_review_ready","revise_brief","confirm_with_user"],"transitions":{"lead_review_ready":"lead-review","revise_brief":"brief-interview","confirm_with_user":"lead-review"}},{"id":"lead-review","label":"Start Import approval","onEnter":[{"action":"show_source_decision_card","requiredInlineFields":["primary source and exact filters/recipe","Start Import action awaiting approval","for Signal Discovery: compact Source Recommendation in plain language with selected posts, people to check, likely prospects, first review, and fallback","for Signal Discovery: recommended scrape post count and target people-to-check volume","first campaign review size, clearly separate from source sampling","runner-up and why it lost","raw volume","sampled people","sampled fits as n/N plus percentage/range","estimated usable prospects","cleanup risk","what happens after Start Import"],"copyMustAvoid":["lead-source scouting","source scouting","headline-fit","engagers needed","execution slice","ICP","good buyers","real buyers","This approval covers","It does not approve","does not approve filters","filters, messages, sender selection","sender selection, sequence, or sending","Watch link:","campaign-builder URL","repeat the watch URL"],"approvalBoundaryRule":"Use positive Start Import copy only: after approval build source list, add to campaign, review first 15 leads; never list future non-approvals.","linkPolicy":"Do not include another watch link in Source Recommendation; describe the Start Import decision only."},{"action":"ask_source_review_choice","uses":"request_user_input","choices":["Approve scraping N recommended LinkedIn posts","Start Import for the approved source list","Revise source","Pause here"],"approvalChoiceLabelsByProvider":{"signal-discovery":"Approve scraping {scrapePostCount} recommended LinkedIn posts?","sales-nav":"Start Import for the approved Sales Nav source list","prospeo":"Start Import for the approved Prospeo source list"},"postApprovalContract":{"singleUseApproval":true,"doNotRepeatAfterApproval":["Source Recommendation","show_source_decision_card","ask_source_review_choice"],"requiredNextActionAfterApproval":"get_provider_prompt then import_leads","signalDiscoveryNextTool":"get_provider_prompt then import_leads"},"autoSelectIf":"yolo_mode and projected usable pool clears the source quality floor","copyMustAvoid":["Watch link:","campaign-builder URL","repeat the watch URL"]}],"requiredCampaignState":["campaignId","campaignBrief","providerSearchAssociation"],"allowedTools":["AskUserQuestion","request_user_input","update_campaign"],"doNotAllow":["create_campaign","list_senders","save_rubrics","import_leads","confirm_lead_list","queue_cells","start_campaign"],"waitFor":["lead_review_confirmed","revise_leads","confirm_with_user","auto_continue"],"transitions":{"lead_review_confirmed":"auto-execute-leads","revise_leads":"find-leads","confirm_with_user":"auto-execute-leads","auto_continue":"auto-execute-leads"}},{"id":"auto-execute-leads","currentStepValue":"auto-execute-leads","reference":"references/step-13-import-leads.md","onEnter":[{"tool":"get_subskill_prompt","requiredValues":{"subskillName":"create-campaign-v2-tail"}},{"tool":"get_provider_prompt"},{"tool":"import_leads","requiredFields":["campaignOfferId","selected source/list","sourceListTarget or targetEngagerCount"],"requiredValues":{"salesNavProspeoDefaultSourceListTarget":1000,"signalDiscoveryDefaultEngagerTarget":1500},"modeAddHandshake":{"firstCallReturns":"needsModeSelection when adding to an existing campaign-attached list","requiredFollowup":"retry with mode=add after explicit user/source-state compatibility is confirmed"},"surfaceDedupRatio":true},{"tool":"wait_for_lead_list_ready","repeatUntil":"ready_true_or_cancelled_or_import_failed","requiredValues":{"requireComplete":true},"onImportStillRunning":"re-run wait_for_lead_list_ready; do not call confirm_lead_list just because rows exist","partialOverrideRule":"Only if the user explicitly asks to keep going early may the next confirm_lead_list call pass allowPartialSourceList: true."},{"tool":"confirm_lead_list","requiredFields":["campaignOfferId","selectedLeadListId","reviewBatchLimit"],"requiredValues":{"reviewBatchLimit":15},"capture":["workflowTableId","reviewBatchRowIds"],"requiredPrecondition":"wait_for_lead_list_ready returned ready:true, unless the user explicitly asked to keep going early with a partial list","partialOverrideField":"allowPartialSourceList:true only after explicit user early-continue instruction","mustNotRunWhen":["wait_for_lead_list_ready reason=import_still_running and no explicit early-continue instruction","wait_for_lead_list_ready reason=cancelled","wait_for_lead_list_ready reason=import_failed","missing import job metadata"]},{"tool":"wait_for_campaign_table_ready"},{"tool":"get_rows_minimal","requiredValues":{"tableId":"{workflowTableId}","limit":15},"capture":["reviewBatchRowHash"]},{"action":"summarize_review_batch_and_advance_to_filter_choice","maxCustomerCopyLines":4,"copyMustAvoid":["Watch link:","campaign-builder URL","repeat the watch URL"],"linkPolicy":"Ask add filters vs skip filters without repeating the watch link.","purpose":"ask filter choice immediately"}],"requiredCampaignState":["campaignId","providerSearchAssociation","selectedLeadListId"],"allowedTools":["get_provider_prompt","get_subskill_prompt","import_leads","wait_for_lead_list_ready","confirm_lead_list","wait_for_campaign_table_ready","get_rows_minimal","update_campaign","AskUserQuestion","request_user_input"],"doNotAllow":["get_post_find_leads_scout_registry","Task","spawn_agent","list_senders","queue_cells","start_campaign","enrich_with_prospeo","bulk_enrich_with_prospeo","save_rubrics"],"waitFor":"source_list_confirmed_and_review_sample_ready","transitions":{"source_list_confirmed_and_review_sample_ready":"filter-choice","escalation_triggered":"escalation"},"hardRules":["import_leads_then_repeated_wait_for_lead_list_ready_then_confirm_lead_list_then_wait_for_campaign_table_ready","partial_source_rows_do_not_unblock_confirm_lead_list_without_explicit_user_early_continue","cancelled_or_failed_source_import_stops_before_campaign_table_copy"]},{"id":"filter-choice","currentStepValue":"filter-choice","onEnter":[{"tool":"update_campaign","requiredValues":{"currentStep":"filter-choice","watchNarration.stage":"fit-message"}},{"action":"ask_filter_choice","uses":"request_user_input","choices":["Use filters","Skip filters","Revise source"],"autoSelectIf":"yolo_mode; choose filters unless source is tightly curated or user directed otherwise","copyMustAvoid":["Watch link:","campaign-builder URL","repeat the watch URL"],"copyMustInclude":["source rows are in the campaign","use filters while Message Drafting runs or skip filters"]}],"hardRules":["ask_filter_choice_immediately_after_review_batch_import","do_not_call_get_subskill_prompt_before_filter_choice","do_not_call_get_subskill_asset_before_filter_choice","do_not_call_get_post_find_leads_scout_registry_before_filter_choice","do_not_spawn_prospect_setup_before_filter_choice"],"requiredCampaignState":["campaignId","campaignBrief","selectedLeadListId","workflowTableId"],"allowedTools":["AskUserQuestion","request_user_input","update_campaign","get_campaign_navigation_state"],"doNotAllow":["get_subskill_prompt","get_subskill_asset","get_post_find_leads_scout_registry","Task","spawn_agent","create_campaign","list_senders","import_leads","confirm_lead_list","queue_cells","start_campaign","generate_messages"],"waitFor":["filters_enabled","filters_skipped","revise_leads"],"transitions":{"filters_enabled":"prospect-setup","filters_skipped":"prospect-setup","revise_leads":"find-leads"}},{"id":"prospect-setup","onEnter":[{"action":"persist_add_filters_approval","tool":"update_campaign","when":"filters_enabled","requiredFields":["campaignId","enableICPFilters","currentStep","watchNarration"],"requiredValues":{"enableICPFilters":true,"currentStep":"create-icp-rubric","watchNarration.stage":"fit-message","watchNarration.headline":"Create filter rules","watchNarration.visibleState":"Filter Rules is visible while Codex drafts/saves filters.","watchNarration.nextAction":"Review saved filter rules"},"mustRunBefore":["get_post_find_leads_scout_registry","launch_message_drafting_after_filter_choice","load_filter_reference_in_parent","save_rubrics","ask_filter_rubric_review_choice"]},{"tool":"get_post_find_leads_scout_registry","returns":["post-find-leads-message-scout"],"rule":"normal post-import registry exposes only Message Drafting; filters are parent-thread MCP work","mustRunBefore":["launch_message_drafting_after_filter_choice","get_subskill_asset:references/filter-leads.md","save_rubrics","ask_filter_rubric_review_choice"],"registryOnlyIsNotLaunch":true},{"action":"launch_message_drafting_after_filter_choice","mode":"background_agent_when_host_supports_subagents","target":"post-find-leads-message-scout","when":"filters_enabled or filters_skipped after filter-choice answer","doesNotQueueCells":true,"customerNarration":"Message Drafting is preparing.","inputs":["campaignId","workflowTableId","brief/source summary","3-5 sample workflow-table rows","optional campaignName/selectedLeadListId/filterChoice"],"forbiddenSiblings":["source/filter workers"],"handoffCompression":"lean_message_drafting_handoff_no_hashes_no_counts_no_full_row_data","requiredConcreteToolCall":"Task or spawn_agent when host supports background agents","registryOnlyIsNotLaunch":true,"mustRunBefore":["get_subskill_asset:references/filter-leads.md","load_filter_reference_in_parent","save_rubrics","ask_filter_rubric_review_choice"],"yoloPermissionRule":"do not ask the user for worker permission in YOLO.","startProof":"Message Drafting counts as started only after Task/spawn_agent.","noBackgroundFallback":"Start the same full message branch inline before filter reference or block."},{"action":"continue_after_drafting","when":"filters_skipped","transition":"filters_skipped_message_started"},{"tool":"get_subskill_asset","action":"load_filter_reference_in_parent","when":"filters_enabled","requiredValues":{"subskillName":"create-campaign-v2","assetPath":"references/filter-leads.md"},"rule":"Parent thread uses this reference to draft production rubrics; do not spawn a filter worker."},{"tool":"save_rubrics","when":"filters_enabled","requiredFields":["campaignOfferId","leadScoringRubrics"],"writesCampaignState":"leadScoringRubrics","requiredSideEffects":{"enableICPFilters":true,"currentStep":"create-icp-rubric","watchNarration.headline":"Filter rules saved for review"}},{"action":"ask_filter_rubric_review_choice","uses":"request_user_input","choices":["Approve filters","Revise filters","Pause"],"copyMustInclude":["Filter rules saved for review","These rules prevent wasted sends before I score/import the list.","Recommended because of the researched ICP, source sample, and repeated false-positive patterns.","one pass example and one block example when available","approval is for the saved filter rules","Approve these filter rules."],"autoSelectIf":"yolo_mode and parent saved production-shaped rubrics","copyMustAvoid":["Watch link:","campaign-builder URL","repeat the watch URL"],"requiredPrecondition":"save_rubrics succeeded or active campaign rubrics verified"}],"requiredCampaignState":["campaignId","campaignBrief","selectedLeadListId","workflowTableId"],"allowedTools":["get_post_find_leads_scout_registry","get_subskill_asset","save_rubrics","get_campaign","get_rows_minimal","update_campaign","get_campaign_navigation_state","AskUserQuestion","request_user_input","Task","spawn_agent"],"doNotAllow":["create_campaign","list_senders","import_leads","confirm_lead_list","queue_cells","start_campaign","check_rubric","generate_messages"],"waitFor":["filter_rubrics_approved","revise_leads","revise_rubric","revise_messaging","filters_skipped_message_started"],"hardRules":["after_save_rubrics_currentStep_must_stay_create-icp-rubric_until_filter_approval","filter_approval_required_before_apply-icp-rubric_or_queue_campaign_cells","do_not_move_browser_to_messages_until_filter_leads_step_is_current_or_filters_are_explicitly_skipped","no_prospect_setup_worker_or_deep_prompt_before_filter_choice","message_drafting_after_filter_choice","message_drafting_no_cells","only_message_drafting_may_spawn_background_agent","filters_are_parent_thread_mcp_work","no_post_find_leads_filter_scout_in_normal_path","registry_call_is_not_message_drafting_launch","yolo_must_not_ask_permission_for_message_drafting_worker","message_drafting_must_start_before_filter_reference_or_save_rubrics","if_background_agent_unavailable_start_full_message_branch_inline_before_filters_or_block","message_drafting_start_does_not_advance_filter_path"],"transitions":{"filter_rubrics_approved":"message-generation","revise_leads":"find-leads","revise_rubric":"filter-rubric","revise_messaging":"message-generation","confirm_with_user":"message-review","filters_skipped_message_started":"message-generation"}},{"id":"filter-rubric","onEnter":[{"tool":"get_subskill_asset","requiredValues":{"subskillName":"create-campaign-v2","assetPath":"references/filter-leads.md"}},{"action":"observed-row-grounding","uses":["get_rows_minimal","get_rows","enrich_with_prospeo"],"requiredBefore":"save_rubrics","contract":["Call get_rows_minimal before drafting filters.","Call get_rows({ tableId, rowIds }) for row/enrichment sample; rowIds must be a JSON array, not a comma-delimited string.","Use multiple visible rows for repeated false positives, broad enterprise sellers, noisy titles, agencies/vendors, geography, and budget gaps.","Use one direct enrichment sample via enrich_with_prospeo if rows are thin; set enrichMobile: false.","On direct enrichment failure, no credits, provider error, or no match, do not retry; continue with uncertainty or block.","If no rows, do not enrich or save row-grounded filters; ask/import rows or use brief/source with uncertainty.","If zero enriched fields, separate raw row fields from unavailable enrichment; do not pretend enrichment-backed filters are observed.","Stop before save_rubrics on stale workflowTableId/source/campaignId/row ids.","Fail generic sales/BD/partnerships unless target/current evidence proves fit and budget path.","No standalone current_role_* safety; fold into keep/exclude or engagement_only_or_stale_fit_exclusion."]},{"tool":"save_rubrics","requiredFields":["campaignOfferId","leadScoringRubrics"],"writesCampaignState":"leadScoringRubrics","requiredSideEffects":{"enableICPFilters":true,"currentStep":"create-icp-rubric","watchNarration.headline":"Filter rules saved for review"}},{"action":"ask_filter_rubric_review_choice","uses":"request_user_input","choices":["Approve filters","Revise filters","Pause"],"copyMustInclude":["These rules prevent wasted sends before I score/import the list.","approval object is filter rules only","approval is for the filter rules","Approve these filter rules."],"autoSelectIf":"yolo_mode and rubrics are production-shaped","copyMustAvoid":["Watch link:","campaign-builder URL","repeat the watch URL"]}],"requiredCampaignState":["campaignId","workflowTableId"],"allowedTools":["get_subskill_asset","get_rows_minimal","get_rows","enrich_with_prospeo","save_rubrics","AskUserQuestion","request_user_input"],"doNotAllow":["create_campaign","list_senders","import_leads","confirm_lead_list","update_campaign","queue_cells","start_campaign","check_rubric","queue_campaign_cells","bulk_enrich_with_prospeo"],"waitFor":["filter_rubrics_approved","revise_leads","confirm_with_user","auto_continue"],"transitions":{"filter_rubrics_approved":"message-generation","revise_leads":"find-leads","confirm_with_user":"message-generation","auto_continue":"message-generation"}},{"id":"message-generation","onEnter":[{"action":"set_message_review_visible_step_by_filter_choice","tool":"update_campaign","watchNarration.stage":"fit-message","requiredValues":{"currentStep":"apply-icp-rubric","watchNarration.stage":"fit-message","watchNarration.headline":"Filters saved + waiting for message approval"},"watchNarrationRule":"After filter approval, show Filter Leads; do not queue enrichment/filter/message cells before approve-message.","mustRunBefore":"run_or_reconcile_message_draft_builder","failureRule":"currentStep=apply-icp-rubric"},{"action":"run_or_reconcile_message_draft_builder","target":"post-find-leads-message-scout","toolCallRequiredBeforeDraft":["Task/spawn_agent or inline fallback before parent drafting","generic gpt-5.5 xhigh Message Drafting fallback","lean handoff: campaignId, workflowTableId, brief, source rule, 3-5 rows","no copied counts, hashes, full row ids, broad row data, or artifacts","branch loads current brief/context, full generate-messages prompt/assets","return labeled Markdown: template, token rules, sample, status, recommendation, validation, hash, retry","hide fallback sample, risk notes, and qaReceipt on happy path","inline fallback=parent-thread-fallback; same gates"],"stateSource":"live campaign/table plus sample rows","outputState":"messageDraftRecommendation with internal validation passed","revisionMode":{"when":"revise_messaging, message QA request, or latest user message requests template changes before approve-message","route":"send feedback/QA/rewrite request to post-find-leads-message-scout or generic gpt-5.5 xhigh Message Drafting branch","requiredInputs":["latest user feedback","current messageDraftRecommendation and basisToken/outputHash","lean campaign/table basis and brief summary; branch reloads live state"],"forbiddenParentActions":["rewrite template in parent","QA template in parent from memory","update_campaign_brief before approve-message"],"output":"revised messageDraftRecommendation rendered before request_user_input"},"onlyMessageBackgroundAgent":true,"forbiddenSiblingAgents":["source-scout-*","any filter background worker"],"handoffCompression":"lean_message_handoff","finalGateRequiredBeforeReady":"Load create-campaign-v2-validation before ready."}],"requiredCampaignState":["campaignId","campaignBrief","selectedLeadListId","workflowTableId"],"allowedTools":["get_subskill_prompt","get_campaign","get_rows_minimal","update_campaign","Task","spawn_agent"],"toolRules":["message_drafting_agent_first_no_silent_parent_fallback; yolo counts","on_filters_enabled_path_parent_must_not_enter_message_review_until_save_rubrics_success_and_filter_approval","brief.md, lead-review.md, and lead-sample.json are optional debug context only.","messageDraftRecommendation returns template, token rules, rendered sample, status, recommendation, validation, hash, retry.","messageDraftRecommendation hides fallback/risk/qaReceipt in the happy path.","If campaign/table/sample basis does not match, classify the output stale or blocked.","message_revision_feedback_routes_to_message_drafting_agent_not_parent","message_qa_routes_to_message_drafting_agent_not_parent","message_drafting_loads_full_generate_messages_prompt_all_chunks","message_drafting_loads_all_reference_assets_via_get_subskill_asset","message_drafting_loads_create_campaign_v2_validation_prompt_before_return","message_drafting_handoff_uses_lean_basis_no_hashes_counts_or_full_rows","message_drafting_loads_current_campaign_brief_before_drafting","parent_may_load_generate_messages_only_for_explicitly_approved_inline_fallback","before return branch loads create-campaign-v2-validation prompt and runs internal validation","pre_approval_step_filter_leads"],"doNotAllow":["create_campaign","list_senders","save_rubrics","import_leads","confirm_lead_list","queue_cells","start_campaign","generate_messages","AskUserQuestion","request_user_input"],"waitFor":["message_validation_ready","revise_rubric","revise_messaging"],"transitions":{"message_validation_ready":"message-review","revise_rubric":"filter-rubric","revise_messaging":"message-generation"},"revisionLoop":{"trigger":"user gives copy feedback, asks for QA/update, or chooses revise-messaging","required":["route latest user feedback or QA request to Message Drafting with current recommendation and live campaign/table state","produce a new messageDraftRecommendation with revisionNotes or validationStatus","render revised ## Message Template, ## Rendered Example, and What changed before asking approval"],"blocked":["asking whether an unseen new version is better","reusing the old template after acknowledging feedback","rewriting the template in the parent thread","update_campaign_brief before approve-message","request_user_input or AskUserQuestion during message-generation","QAing the template in the parent thread"],"outputState":"messageDraftRecommendation"},"hardRules":["message_revision_must_render_new_template_before_approval_question","message_revision_saves_only_after_approve_message","message_generation_must_not_call_request_user_input","message_generation_must_transition_to_message_review_only_after_renderable_draft_state","message_drafting_agent_first_no_silent_parent_fallback","message_revision_routes_to_message_drafting_agent","message_qa_routes_to_message_drafting_agent","filter_path_requires_saved_filters_before_message_review","only_message_drafting_may_spawn_background_agent","no_queue_before_template_approval"],"currentStepValue":"apply-icp-rubric"},{"id":"message-review","onEnter":[{"tool":"update_campaign","requiredValues":{"currentStep":"apply-icp-rubric","watchNarration.stage":"fit-message"},"watchNarrationRule":"Before template approval, keep browser on Filter Leads.","mustRunBefore":"render_message_review_from_state","failureRule":"do not ask for message approval until Filter Leads shows and cells unqueued."},{"action":"render_message_review_from_state","requiredState":["campaignBrief","selectedLeadListId","workflowTableId","messageDraftRecommendation"],"requiredVisibleLabels":["## Message Template","## Rendered Example","Good token fill:","My take:","Question: approve-message or revise-messaging?","Recommendation:"],"doNotShowByDefault":["Rendered fallback sample","Concerns","QA receipt","Token Notes","Good omit / fallback","Bad fill to avoid","Token Adherence Table"],"internalPersistenceOnly":["Token Fill Rules","Token Fill Examples","fallback guidance","bad-fill avoidance notes","validation notes","QA details"],"copyMustInclude":["one recommended template","one rendered sample","token rules and fallbacks","full list remains paused"],"copyMustAvoid":["Watch link:","campaign-builder URL","repeat the watch URL"],"revisionRenderRule":"After feedback, route feedback to Message Drafting; show revised template/example; never ask if an unseen version is better.","parentMustNot":["rewrite template from memory","invent validation summary without Message Drafting output","render qaReceipt, risk notes, or renderedFallbackSample on the normal happy path"]},{"action":"ask_message_review_choice","uses":"request_user_input","choices":["approve-message","revise-messaging"],"copyMustInclude":["approve this message template and continue","template approval only locks the draft direction; final Start still controls sending"],"autoSelectIf":"yolo_mode and Recommendation is approve-message; revise autonomously when Recommendation is revise-messaging","copyMustAvoid":["Watch link:","campaign-builder URL","repeat the watch URL"],"requiredPrecondition":"current or revised template and rendered example are visible in this turn","revisionPrecondition":"after revise_messaging, revised template is visible before this question"},{"action":"sync_approved_message_set_to_campaign_brief","tool":"update_campaign_brief","when":"after approve-message","requiredFields":["campaignId","approvedMessageTemplate","Token Fill Rules","Token Fill Examples"],"writesCampaignState":"approvedMessageTemplate","revisionApprovalRule":"If the user requested revisions, write only the latest Message Drafting-approved revised template and token rules after approve-message.","forbiddenBefore":"approve-message"}],"requiredCampaignState":["campaignId","workflowTableId","messageDraftRecommendation"],"allowedTools":["AskUserQuestion","request_user_input","update_campaign_brief","update_campaign","get_rows_minimal"],"doNotAllow":["create_campaign","list_senders","save_rubrics","import_leads","confirm_lead_list","start_campaign"],"waitFor":["message_approved","revise_messaging"],"transitions":{"message_approved":"validate-sample","revise_messaging":"message-generation"},"currentStepValue":"apply-icp-rubric"},{"id":"validate-sample","currentStepValue":"apply-icp-rubric","reference":"references/sample-validation-loop.md","visibleStepRule":"After saved-filter approval and approve-message, queue bounded Enrich Prospect cells.","onEnter":[{"tool":"update_campaign","requiredValues":{"currentStep":"apply-icp-rubric","watchNarration.stage":"fit-message"},"watchNarrationRule":"Template saved; Filter Leads runs bounded enrichment/scoring."},{"tool":"queue_campaign_cells","requiredFields":["workflowTableId","columnRole","rowSelector"],"requiredValues":{"columnRole":"enrich","rowSelector":{"type":"reviewBatch"},"forceRerun":false},"targetCountSource":"reviewBatch.rowCount default 15"},{"tool":"wait_for_campaign_processing","requiredFields":["workflowTableId","minPassedCount"],"requiredValues":{"minPassedCount":1},"readVia":"stats_only_tool_result","timeoutGuidance":"On timeout, use partial diagnostics; do not repeat identical waits.","customerSummaryPattern":["{checked} leads checked","{passed} passed fit scoring","{blocked} blocked before sending","full list remains paused until approval"]},{"action":"handle_partial_or_timeout_sample","customerStatus":"sample-needs-revision","rule":"Do not repeat waits indefinitely; surface partial status and route to revision.","copyMustInclude":"completed, passed, pending, blocked before sending, and full list remains paused"}],"requiredCampaignState":["campaignId","workflowTableId","approvedMessageTemplate","filterRubricsApproved when enableICPFilters=true"],"allowedTools":["get_subskill_asset","queue_campaign_cells","select_campaign_cells","get_campaign_table_schema","wait_for_campaign_processing","update_campaign","AskUserQuestion","request_user_input"],"doNotAllow":["import_leads","list_senders","start_campaign","enrich_with_prospeo","bulk_enrich_with_prospeo","check_rubric"],"hardRules":["campaign_processing_waits_are_stats_only_by_default","queue_review_batch_by_selector_never_fetch_rows_for_cell_ids","timeout_never_repeats_without_customer_handoff","timeout_or_underfloor_sample_never_advances_to_settings"],"waitFor":["sample_validated","sample_revision_required"],"transitions":{"sample_validated":"auto-execute-messaging","sample_revision_required":"lead-review","revise_leads":"find-leads","revise_rubric":"filter-rubric","escalation_triggered":"escalation"}},{"id":"auto-execute-messaging","currentStepValue":"auto-execute-messaging","references":["references/parallel-critique-protocol.md","references/thomas-variant-selection.md","references/sellable-cleanup-rules.md","references/step-15-re-cascade.md"],"onEnter":[{"tool":"queue_campaign_cells","batchSize":100,"when":"any passing row has pending, empty, or stale Generate Message cell","requiredFields":["workflowTableId","columnRole","rowSelector"],"requiredValues":{"columnRole":"generateMessage","rowSelector":{"type":"needsGeneratedMessage"},"forceRerun":false},"cellSource":"selector-engine needsGeneratedMessage rows using approved campaign brief template"},{"tool":"wait_for_campaign_processing","purpose":"wait_for_first_current_revision_generated_message","requiredValues":{"minGeneratedMessages":1,"templateRevision":"current"},"readVia":"stats_only_tool_result","invariant":"A generated message implies the pass gate; stale or wrong-revision messages are excluded from readiness."},{"action":"observe_generate_message_results","reference":"references/step-15-re-cascade.md"},{"action":"enforce_token_contract","modeFromConfig":"messaging.tokenContract"},{"action":"optional_critique_pass","enabledFromConfig":"messaging.critique.enabled","protocol":"references/parallel-critique-protocol.md","sampleSizeFromConfig":"messaging.critique.sampleSize","budgetUsdCapFromConfig":"messaging.critique.budgetUsdCap","perCriticTimeoutFromConfig":"messaging.critique.perCriticTimeoutSeconds","totalTimeoutFromConfig":"messaging.critique.totalTimeoutSeconds","criticsFromConfig":"messaging.critique.critics","enforceFinalizerPassFromConfig":"messaging.critique.synthesis.enforceFinalizerPass","rejectOnFakeProofFromConfig":"messaging.critique.rejectOnFakeProof","rejectOnUnsupportedTokenFromConfig":"messaging.critique.rejectOnUnsupportedToken","onBudgetTrip":"halt_critique_continue_plain_tail","onPerCriticTimeout":"drop_critic_proceed_with_remaining","onTotalTimeout":"persist_plain_message_for_row","onTokenContractViolation":"persist_plain_message_for_row","onFakeProof":"persist_plain_message_for_row"},{"action":"optional_opus_subset","enabledFromConfig":"messaging.critique.opus.enabled","selection":"references/thomas-variant-selection.md","maxMessagesPerPassFromConfig":"messaging.critique.opus.maxMessagesPerPass","budgetUsdCapFromConfig":"messaging.critique.opus.budgetUsdCap","onOpusBudgetTrip":"halt_opus_continue_non_opus","onOpusTokenContractViolation":"fallback_to_non_opus_rewrite"},{"tool":"update_campaign","requiredValues":{"currentStep":"auto-execute-messaging","watchNarration.stage":"review-ready"},"watchNarrationRule":"Say the first passing generated message is ready in Messages; next is review before Settings."},{"action":"ask_generated_message_review_choice","uses":"request_user_input","choices":["Approve reviewed draft rows and continue to Settings","Revise filters","Revise message template","Pause here"],"copyMustInclude":["approve the reviewed draft rows and continue to Settings","tokens resolved","company/person match","proof claim","prospect angle","language/tone when known","obvious bad fits","Would I take this call?","weak personalization can burn the sender's reputation","full list remains paused","this approves reviewed draft rows for setup; final Start still controls sending"],"autoSelectIf":"yolo_mode and the first passing generated message clears the quality floor","copyMustAvoid":["Watch link:","campaign-builder URL","repeat the watch URL"]}],"allowedTools":["get_subskill_asset","get_campaign_table_schema","select_campaign_cells","queue_campaign_cells","wait_for_campaign_processing","revise_message_template_and_rerun","update_campaign","AskUserQuestion","request_user_input","update_cell"],"doNotAllow":["import_leads","list_senders","start_campaign","generate_messages"],"hardRules":["generated_message_count_excludes_stale_or_wrong_revision_messages","message_template_revision_uses_brief_update_then_generate_message_rerun","do_not_overwrite_generated_message_cells_directly","critique_failure_never_escalates","critique_sample_size_bounded_by_config","first_passing_generated_message_unblocks_review","critics_fixed_at_targeting_copy_voice","synthesis_enforces_message_token_contract","opus_reserved_for_highest_value_subset","proposed_token_never_persisted_in_rewrite","approve_reviewed_rows_via_semantic_approved_selector_not_get_rows_approveCellId"],"waitFor":["generated_messages_approved","sample_revision_required"],"transitions":{"generated_messages_approved":"awaiting-user-greenlight","revise_filters":"filter-rubric","revise_messaging":"message-generation","escalation_triggered":"escalation"}},{"id":"awaiting-user-greenlight","currentStepValue":"awaiting-user-greenlight","reference":"references/final-handoff-contract.md","onEnter":[{"tool":"start_campaign_message_preparation","requiredValues":{"targetPreparedMessages":"{requestedMessageCount}","approvalMode":"{scheduleOrApproveIntent ? 'approve' : 'mark_ready'}"},"intentMapping":{"scheduleSends":"approve the exact requested send count"},"when":"explicit_count_or_schedule","batchStrategy":"max250","rowBudgetStrategy":"sample100_cap2500"},{"tool":"get_campaign_message_preparation_status","copyMustInclude":["preparation job status","checked rows","target","stop reason"],"when":"prep_job_started"},{"tool":"get_campaign"},{"tool":"list_senders","purpose":"identity proof at Settings"},{"tool":"update_campaign","requiredValues":{"currentStep":"settings","watchNarration.stage":"review-ready"},"watchNarrationRule":"Say message review is complete, Settings is open, lead research/filtering happened outside LinkedIn, and nothing sends until Start."},{"action":"surface_sender_and_slack_handoff","requiredVisibleContent":["connect or select a LinkedIn sender","Lead research and filtering already happened outside your LinkedIn account.","This account is only used for approved sending after final launch.","Nothing sends until the final Start step.","Slack reply review","recommended sequence","final launch confirmation is still ahead"],"copyMustAvoid":["Watch link:","campaign-builder URL","repeat the watch URL"]},{"action":"ask_sender_selection","uses":"request_user_input","singleChoice":true,"choices":["Use this connected sender","Connect a different sender in Settings","Pause here"],"autoSelectIf":"yolo one exact identity match","copyMustAvoid":["Watch link:","campaign-builder URL","repeat the watch URL"],"noAutoSelectIf":"identity proof is missing; ask"},{"action":"attach_selected_sender","tool":"update_campaign","when":"user selected an available connected sender","requiredValues":{"senderIds":["{selectedSenderId}"],"currentStep":"sequence","watchNarration.stage":"review-ready"},"watchNarrationRule":"Say the sender was attached and the app is moving to Sequence review; sequence remains editable and nothing sends until Start."},{"tool":"attach_recommended_sequence","when":"after senderIds are attached","requiredValues":{"campaignId":"{campaignId}","currentStep":"send","watchNarration.stage":"review-ready"},"watchNarrationRule":"Say the recommended follow-up sequence is attached, final launch review is open, and nothing sends until Start."},{"action":"ask_final_launch_greenlight","uses":"request_user_input","singleChoice":true,"choices":["Start campaign","Review campaign first","Pause here"],"copyMustInclude":["quality confidence means sample messages and prospect angle were checked","launch confidence means sender, sequence, and Start are ready","approved messages begin sending according to the sequence","replies and meetings follow connected settings","you can monitor and pause","no hidden extra approval disappears after clicking Start"],"onUserStart":"claude-greenlight","neverAutoSelectInYolo":true,"copyMustAvoid":["Watch link:","campaign-builder URL","repeat the watch URL"]}],"allowedTools":["cancel_campaign_message_preparation","get_campaign_message_preparation_status","start_campaign_message_preparation","get_campaign","get_campaign_navigation_state","list_senders","update_campaign","attach_recommended_sequence","AskUserQuestion","request_user_input"],"doNotAllow":["start_campaign","import_leads"],"autoStart":false,"watchRequired":true,"waitFor":["sender_connection_required","sender_attached","sequence_attached","ready_to_launch","user_greenlight","ui_start_detected"],"transitions":{"sender_connection_required":"awaiting-user-greenlight","sender_attached":"awaiting-user-greenlight","sequence_attached":"awaiting-user-greenlight","ready_to_launch":"awaiting-user-greenlight","user_greenlight":"claude-greenlight","ui_start_detected":"running"}},{"id":"claude-greenlight","reference":"references/final-handoff-contract.md","onEnter":[{"tool":"get_campaign"},{"action":"verify_sequence_and_current_step_before_start","requiredState":["workflowTableId","senderIds","sequenceTemplate","at least one approved generated message","currentStep in awaiting-user-greenlight|claude-greenlight|send"],"boundedLaunchRule":"preparation job approved X; no broad approve-all."},{"tool":"start_campaign","requiredFields":["campaignId"],"persistsCurrentStep":"running","watchNarrationRule":"After start_campaign succeeds, say final greenlight was accepted, campaign is live/running, and progress can be watched."}],"allowedTools":["get_campaign","attach_recommended_sequence","start_campaign","AskUserQuestion","request_user_input"],"watchRequired":true,"waitFor":"campaign_started","transitions":{"campaign_started":"running"}},{"id":"running","currentStepValue":"running","onEnter":[{"action":"surface_campaign_live_confirmation_without_watch_link","copyMustAvoid":["Watch link:","campaign-builder URL","repeat the watch URL"]}],"allowedTools":["get_campaign","AskUserQuestion","request_user_input"],"doNotAllow":["start_campaign"],"terminal":true},{"id":"escalation","reference":"references/escalation-ladder.md","allowedTools":["AskUserQuestion","request_user_input"],"doNotAllow":["start_campaign","import_leads"],"transitions":{"revise_brief":"brief-interview","revise_leads":"find-leads","revise_rubric":"filter-rubric","revise_messaging":"message-generation","abort":"abort"}},{"id":"abort","allowedTools":["AskUserQuestion","request_user_input"],"terminal":true}]}
|
|
1
|
+
{"version":"v2.1-compact","workflow":"create-campaign-v2","principle":"CampaignOffer/watch canonical: brief, source/import, filters/message, Settings, Start.","normalCustomerPath":"Use campaign state/MCP/watchNarration. Do not create, read, link, or surface local files. Print watch link once.","legacyCompatibility":{"validationSubskill":"create-campaign-v2-validation","tailSubskill":"create-campaign-v2-tail","rule":"Legacy diagnostics are opt-in, not active gates."},"commitGateChoices":["approve","revise-brief","revise-leads","revise-rubric","revise-messaging","abort"],"canonicalStateFields":["campaignId","watchUrl","campaignBrief","currentStep","watchNarration","interactionMode","providerSearchAssociation","selectedLeadListId","workflowTableId","filterChoice","leadScoringRubrics","messageDraftRecommendation","approvedMessageTemplate","senderIds","sequenceTemplate","runningState"],"watchNarrationTransitionContract":{"rule":"Watched currentStep switches need fresh watchNarration.","requiredFields":["stage","headline","visibleState","agentIntent","nextAction"],"copyMustInclude":["what just happened","visible page/state","next user action"],"appliesToTools":["create_campaign","update_campaign","attach_recommended_sequence","start_campaign"],"oneTimeWatchLinkPolicy":"must not print another watch-link handoff unless asked or recovering link."},"lazyReferences":{"watch":["references/watch-link-handoff.md","references/watch-guide-narration.md"],"source":["references/lead-validation-preview.md","references/step-13-import-leads.md"],"filter":["references/filter-leads.md"],"message":[],"tail":["references/sample-validation-loop.md","references/step-15-re-cascade.md","references/final-handoff-contract.md"]},"yoloMode":{"triggerPhrases":["yolo","--yolo","mode=yolo","autopilot","use best guesses","use best estimates","answer for me","just run it","yolo autopilot"],"identityRequestOnlyWhenMissing":true,"operatorDirectionsRule":"Operator directions persist; newest conflicting direction wins.","setInteractionModeAfterCampaignCreate":"autonomous","autoSelectsPreLaunchChoices":["campaign focus","brief approval","source plan","Start Import approval","filters vs skip filters","filter rubric approval","message template approval when recommendation is approve-message","generated message review when quality floor passes","sender identity match"],"mustPauseFor":["missing LinkedIn profile URL or handle","missing credentials/data","ambiguous choice with no reasonable estimate","source/message/filter quality failure","final live launch confirmation"],"neverAutoStart":true},"steps":[{"id":"bootstrap","onEnter":[{"tool":"bootstrap_create_campaign","requiredValues":{"flowVersion":"v2"}},{"tool":"get_subskill_prompt","requiredValues":{"subskillName":"create-campaign-v2"}}],"allowedTools":["bootstrap_create_campaign","get_auth_status","get_active_workspace","get_subskill_prompt","AskUserQuestion","request_user_input"],"doNotAllow":["create_campaign","list_senders","save_rubrics","import_leads","confirm_lead_list","update_campaign","queue_cells","start_campaign"],"waitFor":"bootstrap_complete","transitions":{"bootstrap_complete":"brief-interview"}},{"id":"brief-interview","onEnter":[{"action":"resolve_campaign_identity_before_strategy_packet","allowedTools":["fetch_company","fetch_linkedin_profile","WebFetch","WebSearch"],"mustNotInferFromNameOnly":true,"doNotPresentSenderPickerBeforeIdentityInference":true,"fallback":"Ask only: \"What is your LinkedIn profile URL or handle?\" Normalize handles to profile URLs; if not a profile, ask again before strategy questions.","requiresLinkedInProfileUrl":true,"doNotAcceptAsIdentityInput":["non-profile URL","company page","company/name-only input without a profile handle"],"acceptsLinkedInProfileHandle":true,"normalizeLinkedInProfileHandleToUrl":true},{"action":"run_campaign_identity_research_before_strategy_packet","target":"research-sender","requiredCompletion":"complete_sender_research","allowedTools":["get_subskill_prompt","fetch_linkedin_profile","fetch_company","fetch_linkedin_posts","fetch_company_posts","WebFetch","WebSearch","complete_sender_research"],"requiredInput":"LinkedIn profile URL or handle"},{"action":"confirm_target_before_strategy_packet","uses":"request_user_input","singleChoice":true,"question":"Who should we target first?","options":["Use Sellable's researched recommendation","Choose a different buyer","I'm not sure yet"],"copyMustInclude":["research basis","recommendation is editable","who to target"],"requiredOption":"Other / custom","neverCollectOpenTextWithStructuredQuestion":true,"skipIf":"user already supplied a clear target or yolo_mode with any reasonable best-estimate target"},{"action":"confirm_current_offer_before_strategy_packet","uses":"request_user_input","question":"What should we pitch to prospects first?","options":["Use Sellable's researched recommendation","Use my current pitch","Shape the pitch together"],"copyMustInclude":["research basis","public LinkedIn research may be stale","recommendation is editable","pitch to prospects"],"skipIf":"user already supplied a clear current offer or yolo_mode with any reasonable researched recommendation"},{"action":"confirm_trust_proof_before_strategy_packet","uses":"request_user_input","singleChoice":true,"question":"What is the strongest credibility signal we can lead with?","options":["Use Sellable's recommended proof","Use customer proof or a case study","Use founder or company credibility"],"copyMustInclude":["build trust with prospects","recommendation is editable","proof to use or avoid"],"requiredOption":"Other / custom","skipIf":"user already supplied clear proof to use or avoid, or yolo_mode with any reasonable researched proof"},{"action":"choose_prospect_source_path_before_strategy_packet","uses":"request_user_input","singleChoice":true,"question":"How should we find prospects?","options":["Find prospects for me","Use a CSV of LinkedIn profiles","Use a CSV of company domains"],"copyMustInclude":["prospects","no one added yet","find prospects for me"],"skipIf":"user already supplied a source path or yolo_mode with any reasonable source path"},{"action":"infer_strategy_packet_in_yolo_mode","when":"yolo_mode","skipStructuredSetupQuestions":true,"inferFields":["buyer segment","offer/CTA","proof to use or avoid","lead source","filter choice","message direction"],"sourceOfTruth":"identity/company lookup plus operator directions","mustStateAssumptionsInBrief":true},{"action":"render_supplied_setup_receipt_before_brief_when_setup_questions_skip","when":"any setup question is skipped because the user already supplied or yolo mode inferred identity, target, offer, proof, or source","output":"normal chat receipt before the campaign brief or watch-link handoff","copyMustInclude":["Accepted LinkedIn input: normalized to the required LinkedIn profile URL.","Offer path: supplied current offer or Sellable's researched recommendation; you can replace it with your current offer."],"copyMustNotInclude":["Campaign Identity"]},{"action":"create_watchable_campaign_shell_with_v1_brief","tool":"create_campaign","requiredFields":["name","campaignBrief","clientProspectId or senderLinkedinUrl","currentStep","watchNarration"],"requiredValues":{"currentStep":"create-offer","watchNarration.stage":"brief"},"capture":["campaignId","watchUrl"],"canonicalStateWrites":["campaignId","watchUrl","campaignBrief","currentStep:create-offer"]},{"action":"surface_campaign_shell_watch_link","watchUrlSource":"create_campaign.watchUrl","requiredWatchUrlShape":"exact create_campaign.watchUrl; direct /campaign-builder/{campaignId}?mode={claude|codex} URL with workspaceId and token","copyMustInclude":["WATCH CODEX BUILD","Open live campaign builder","Keep this chat open.","approval questions here"],"immediateNextMainChatLine":"Ask for brief approval now. After approval, say: \"Brief approved. Next, we'll choose where to find buyers. I won't add anyone yet.\"","codexBrowserHandoff":{"openWhenAvailable":false,"printWatchLinkOnly":true,"tellUserCommandEnterOrClick":false,"mustNotUseBrowserAutomation":true,"fallbackMustNotClaimInspection":true},"copyMustAvoid":["bare /campaign-builder/{campaignId} URL","derived watch URL","second watch-link handoff","shell open command","Next, we'll choose where to find buyers"],"oneTimeOnly":true}],"allowedTools":["get_subskill_prompt","fetch_company","fetch_company_posts","fetch_linkedin_profile","fetch_linkedin_posts","complete_sender_research","create_campaign","AskUserQuestion","request_user_input"],"doNotAllow":["list_senders","save_rubrics","import_leads","confirm_lead_list","queue_cells","start_campaign"],"waitFor":["campaign_shell_created","brief_ready","confirm_with_user"],"transitions":{"campaign_shell_created":"brief-review","brief_ready":"brief-review","confirm_with_user":"brief-review"}},{"id":"brief-review","onEnter":[{"action":"render_brief_inline","minimumVisibleDetail":"campaign direction, buyer, offer, proof, source plan, safety gates","copyMustInclude":["This brief is based on Sellable's research and your answers.","If your site or LinkedIn is stale","Does this brief look right, and how should Sellable continue?"],"copyMustNotInclude":["quoted first-message copy","Message Angle as final proof","This approval covers","does not approve adding people","does not approve scraping posts","selecting a sender","attaching a sequence","Campaign Identity","what should this campaign sell first","sell first","[from you]","[from LinkedIn]","[from website]","[from case study]","[Sellable recommendation]"],"messageHintRule":"If any message-shape hint remains, keep it as non-final bullets and say real examples come after leads are found and filtered.","approvalBoundaryRule":"Keep this gate positive and short: ask approve/revise, then move to choosing where to find buyers.","sectionLabelRule":"Use ## Sender and Company for the person/company context; never render ## Campaign Identity.","skipIf":"the full brief was already rendered in the current shell-creation handoff before create_campaign returned","renderOnceRule":"Brief visible once before approval. If shown before shell creation, do not repeat after; append one watch-link handoff, then ask.","copyMustAvoid":["duplicate brief render after shell creation","second Watch link:"]},{"action":"ask_brief_choice","uses":"request_user_input","choices":["Approve brief + activate YOLO mode (Recommended)","Approve brief + build campaign with AI, step by step","Revise brief"],"skipIf":"yolo_mode; auto_continue after rendering assumptions unless brief quality floor fails","question":"Does this brief look right, and how should Sellable continue?","autonomousChoice":"Approve brief + activate YOLO mode (Recommended)","choiceDescriptions":{"Approve brief + activate YOLO mode (Recommended)":"Sellable will auto-decide the remaining setup choices with best guesses, including sources, filters, and messaging. It still stops before final launch.","Approve brief + build campaign with AI, step by step":"Approve this direction, then work with the AI through each major setup decision before it continues.","Revise brief":"Change the target, offer, proof, or campaign direction before continuing."}}],"requiredCampaignState":["campaignId","watchUrl","campaignBrief","currentStep"],"allowedTools":["AskUserQuestion","request_user_input","update_campaign"],"doNotAllow":["create_campaign","list_senders","import_leads","confirm_lead_list","queue_cells","start_campaign"],"waitFor":["user_brief_confirmed","revise_brief","auto_continue"],"transitions":{"user_brief_confirmed":"find-leads","revise_brief":"brief-interview","auto_continue":"find-leads"}},{"id":"find-leads","sourceSelectionFunnel":{"preScoutRecommendationGate":{"required":true,"mustHappenBefore":["get_provider_prompt","search_signals","search_sales_nav","search_prospeo_companies","confirm_prospeo_company_accounts","search_prospeo","fetch_post_engagers"],"show":["buyer groups or places we could check","best place to start","where the right buyers are already talking","what signs the next search will check","where to look next if the first place is too thin","what approval authorizes"],"approvalAuthorizes":"best places to find buyers; no one added yet","explanationMustInclude":["why that place fits this campaign","enough likely prospects","what counts as a good sign","I won't add anyone yet"],"yoloMode":{"autoApproveRecommendedLane":true,"mustShowAssumedChoice":true,"pauseIfConfidenceLow":true},"customerLanguage":{"readability":"grade-5","requiredHeading":"Find Buyers Plan","prefer":["people to check","prospects"],"avoid":["lane","precision/scale tradeoff","evidence quality","workflow pain","ICP"],"termRule":{"buyers":"target market","peopleToCheck":"raw reactions/comments before fit is known","prospects":"likely usable people after fit","leads":"campaign rows"}},"questionOrder":"update_campaign to pick-provider; render Find Buyers Plan without repeating the watch link; never ask first; exactly one structured source-plan question total.","approvalFreshnessRule":"Do not reuse brief approval; continue exact earlier source-plan choice instead of asking a second identical question.","copyMustAvoid":["Watch link:","watch-link handoff"]},"defaultWhenSourceUnspecified":["signal-discovery","sales-nav-recent-active","sales-nav-general","prospeo"],"parallelAllowedOnlyWhen":["user explicitly requested source comparison"]},"onEnter":[{"tool":"update_campaign","requiredValues":{"currentStep":"pick-provider","watchNarration.stage":"find-leads","watchNarration.headline":"Review where to find buyers","watchNarration.visibleState":"Source selection is visible before lead finding.","watchNarration.agentIntent":"Codex is explaining where to look first and fallback.","watchNarration.nextAction":"Approve where to look first or choose another place","watchNarration.safety":"Only deciding where to look. No one is added yet."}},{"action":"render_find_buyers_plan_inline","oneShot":true,"requiredPrecondition":"currentStep=pick-provider has been saved with update_campaign","mustHappenAfter":["update_campaign currentStep=pick-provider"],"mustHappenBefore":["ask_find_buyers_plan_choice","get_provider_prompt","search_signals","search_sales_nav","search_prospeo_companies","confirm_prospeo_company_accounts","search_prospeo","fetch_post_engagers"],"output":"normal chat text before any request_user_input approval panel","requiredHeading":"Find Buyers Plan","requiredInlineFields":["buyer groups or places for this campaign","best place to start","why that place fits this campaign","where to look next if thin","what approval authorizes"],"copyMustInclude":["choose where to find buyers","I won't add anyone yet"],"copyMustAvoid":["lane","source scouting","provider","precision/scale tradeoff","evidence quality","pilot volume","ICP","workflow pain","lead-source scouting","not importing leads","Watch link:","campaign-builder URL","repeat the watch URL","watch-link handoff"],"approvalBoundary":"Approves where to look; no one added yet.","linkPolicy":"Do not include another watch link."},{"action":"ask_find_buyers_plan_choice","uses":"request_user_input","oneShot":true,"requiredPrecondition":"visible plan rendered; no earlier approval can satisfy this unless exact visible source choice exists; do not ask this if that exact earlier source choice exists","skipIf":"earlier source-plan question already captured exact visible source choice, post-plan provider, or yolo choice","choices":["Start with LinkedIn posts","Start with active LinkedIn profiles","Start with company/contact search","Choose a different place","Pause here"],"approvalChoiceLabelsByProvider":{"signal-discovery":"Start with LinkedIn posts","sales-nav":"Start with active LinkedIn profiles","prospeo":"Start with company/contact search"},"approvalState":"source_lane_approved","copyMustInclude":["Approve this plan for where to find buyers?","Start with LinkedIn posts"],"mustNotHappenBefore":["render_find_buyers_plan_inline"],"approvalStateRule":"Never ask a second identical source-plan question; set source_lane_approved only after visible plan, never from brief approval/generic/pre-plan state."},{"action":"persist_provider_search_step_before_search","tool":"update_campaign","requiredPrecondition":"source_lane_approved set after the visible Find Buyers Plan approval question","providerCurrentStepMap":{"signal-discovery":"signal-discovery","sales-nav":"sales-nav","prospeo":"prospeo"},"requiredValues":{"leadSourceType":"new","leadSourceProvider":"approved provider","currentStep":"provider-specific current step","watchNarration.stage":"find-leads","watchNarration.headline":"Searching the approved place","watchNarration.safety":"Looking only. No one is added yet."},"mustRunBefore":["search_signals","search_sales_nav","search_prospeo_companies","confirm_prospeo_company_accounts","search_prospeo","fetch_post_engagers"]},{"action":"run_parent_thread_source_funnel","requiredPrecondition":"source_lane_approved after visible Find Buyers Plan approval","mode":"parent_thread_inline_sequential","sourceAgents":"forbidden in normal create-campaign","loadsOnlyActiveProviderPrompt":true,"defaultOrder":["signal-discovery","sales-nav-recent-active","sales-nav-general","prospeo"],"stopOnFirstViableUnlessComparisonRequested":true}],"requiredCampaignState":["campaignId","campaignBrief","currentStep"],"allowedTools":["get_provider_prompt","lookup_sales_nav_filter","search_sales_nav","search_prospeo_companies","confirm_prospeo_company_accounts","search_prospeo","search_signals","select_promising_posts","fetch_post_engagers","fetch_company","fetch_linkedin_profile","load_csv_dnc_entries","load_csv_linkedin_leads","load_csv_domains","get_rows_minimal","update_campaign","AskUserQuestion","request_user_input","get_campaign_navigation_state"],"doNotAllow":["create_campaign","list_senders","save_rubrics","import_leads","confirm_lead_list","queue_cells","start_campaign","Task","spawn_agent"],"waitFor":["lead_review_ready","revise_brief","confirm_with_user"],"transitions":{"lead_review_ready":"lead-review","revise_brief":"brief-interview","confirm_with_user":"lead-review"}},{"id":"lead-review","label":"Start Import approval","onEnter":[{"action":"show_source_decision_card","requiredInlineFields":["primary source and exact filters/recipe","Start Import action awaiting approval","for Signal Discovery: compact Source Recommendation in plain language with selected posts, people to check, likely prospects, first review, and fallback","for Signal Discovery: recommended scrape post count and target people-to-check volume","first campaign review size, clearly separate from source sampling","runner-up and why it lost","raw volume","sampled people","sampled fits as n/N plus percentage/range","estimated usable prospects","cleanup risk","what happens after Start Import"],"copyMustAvoid":["lead-source scouting","source scouting","headline-fit","engagers needed","execution slice","ICP","good buyers","real buyers","This approval covers","It does not approve","does not approve filters","filters, messages, sender selection","sender selection, sequence, or sending","Watch link:","campaign-builder URL","repeat the watch URL"],"approvalBoundaryRule":"Use positive Start Import copy only: after approval build source list, add to campaign, review first 15 leads; never list future non-approvals.","linkPolicy":"Do not include another watch link in Source Recommendation; describe the Start Import decision only."},{"action":"ask_source_review_choice","uses":"request_user_input","choices":["Approve scraping N recommended LinkedIn posts","Start Import for the approved source list","Revise source","Pause here"],"approvalChoiceLabelsByProvider":{"signal-discovery":"Approve scraping {scrapePostCount} recommended LinkedIn posts?","sales-nav":"Start Import for the approved Sales Nav source list","prospeo":"Start Import for the approved Prospeo source list"},"postApprovalContract":{"singleUseApproval":true,"doNotRepeatAfterApproval":["Source Recommendation","show_source_decision_card","ask_source_review_choice"],"requiredNextActionAfterApproval":"get_provider_prompt then import_leads","signalDiscoveryNextTool":"get_provider_prompt then import_leads"},"autoSelectIf":"yolo_mode and projected usable pool clears the source quality floor","copyMustAvoid":["Watch link:","campaign-builder URL","repeat the watch URL"]}],"requiredCampaignState":["campaignId","campaignBrief","providerSearchAssociation"],"allowedTools":["AskUserQuestion","request_user_input","update_campaign"],"doNotAllow":["create_campaign","list_senders","save_rubrics","import_leads","confirm_lead_list","queue_cells","start_campaign"],"waitFor":["lead_review_confirmed","revise_leads","confirm_with_user","auto_continue"],"transitions":{"lead_review_confirmed":"auto-execute-leads","revise_leads":"find-leads","confirm_with_user":"auto-execute-leads","auto_continue":"auto-execute-leads"}},{"id":"auto-execute-leads","currentStepValue":"auto-execute-leads","reference":"references/step-13-import-leads.md","onEnter":[{"tool":"get_subskill_prompt","requiredValues":{"subskillName":"create-campaign-v2-tail"}},{"tool":"get_provider_prompt"},{"tool":"import_leads","requiredFields":["campaignOfferId","selected source/list","sourceListTarget or targetEngagerCount"],"requiredValues":{"salesNavProspeoDefaultSourceListTarget":1000,"signalDiscoveryDefaultEngagerTarget":1500},"modeAddHandshake":{"firstCallReturns":"needsModeSelection when adding to an existing campaign-attached list","requiredFollowup":"retry with mode=add after explicit user/source-state compatibility is confirmed"},"surfaceDedupRatio":true},{"tool":"wait_for_lead_list_ready","repeatUntil":"ready_true_or_cancelled_or_import_failed","requiredValues":{"requireComplete":true},"onImportStillRunning":"re-run wait_for_lead_list_ready; do not call confirm_lead_list just because rows exist","partialOverrideRule":"Only if the user explicitly asks to keep going early may the next confirm_lead_list call pass allowPartialSourceList: true."},{"tool":"confirm_lead_list","requiredFields":["campaignOfferId","selectedLeadListId","reviewBatchLimit"],"requiredValues":{"reviewBatchLimit":15},"capture":["workflowTableId","reviewBatchRowIds"],"requiredPrecondition":"wait_for_lead_list_ready returned ready:true, unless the user explicitly asked to keep going early with a partial list","partialOverrideField":"allowPartialSourceList:true only after explicit user early-continue instruction","mustNotRunWhen":["wait_for_lead_list_ready reason=import_still_running and no explicit early-continue instruction","wait_for_lead_list_ready reason=cancelled","wait_for_lead_list_ready reason=import_failed","missing import job metadata"]},{"tool":"wait_for_campaign_table_ready"},{"tool":"get_rows_minimal","requiredValues":{"tableId":"{workflowTableId}","limit":15},"capture":["reviewBatchRowHash"]},{"action":"summarize_review_batch_and_advance_to_filter_choice","maxCustomerCopyLines":4,"copyMustAvoid":["Watch link:","campaign-builder URL","repeat the watch URL"],"linkPolicy":"Ask add filters vs skip filters without repeating the watch link.","purpose":"ask filter choice immediately"}],"requiredCampaignState":["campaignId","providerSearchAssociation","selectedLeadListId"],"allowedTools":["get_provider_prompt","get_subskill_prompt","import_leads","wait_for_lead_list_ready","confirm_lead_list","wait_for_campaign_table_ready","get_rows_minimal","update_campaign","AskUserQuestion","request_user_input"],"doNotAllow":["get_post_find_leads_scout_registry","Task","spawn_agent","list_senders","queue_cells","start_campaign","enrich_with_prospeo","bulk_enrich_with_prospeo","save_rubrics"],"waitFor":"source_list_confirmed_and_review_sample_ready","transitions":{"source_list_confirmed_and_review_sample_ready":"filter-choice","escalation_triggered":"escalation"},"hardRules":["import_leads_then_repeated_wait_for_lead_list_ready_then_confirm_lead_list_then_wait_for_campaign_table_ready","partial_source_rows_do_not_unblock_confirm_lead_list_without_explicit_user_early_continue","cancelled_or_failed_source_import_stops_before_campaign_table_copy"]},{"id":"filter-choice","currentStepValue":"filter-choice","onEnter":[{"tool":"update_campaign","requiredValues":{"currentStep":"filter-choice","watchNarration.stage":"fit-message"}},{"action":"ask_filter_choice","uses":"request_user_input","choices":["Use filters","Skip filters","Revise source"],"autoSelectIf":"yolo_mode; choose filters unless source is tightly curated or user directed otherwise","copyMustAvoid":["Watch link:","campaign-builder URL","repeat the watch URL"],"copyMustInclude":["source rows are in the campaign","use filters while Message Drafting runs or skip filters"]}],"hardRules":["ask_filter_choice_immediately_after_review_batch_import","do_not_call_get_subskill_prompt_before_filter_choice","do_not_call_get_subskill_asset_before_filter_choice","do_not_call_get_post_find_leads_scout_registry_before_filter_choice","do_not_spawn_prospect_setup_before_filter_choice"],"requiredCampaignState":["campaignId","campaignBrief","selectedLeadListId","workflowTableId"],"allowedTools":["AskUserQuestion","request_user_input","update_campaign","get_campaign_navigation_state"],"doNotAllow":["get_subskill_prompt","get_subskill_asset","get_post_find_leads_scout_registry","Task","spawn_agent","create_campaign","list_senders","import_leads","confirm_lead_list","queue_cells","start_campaign","generate_messages"],"waitFor":["filters_enabled","filters_skipped","revise_leads"],"transitions":{"filters_enabled":"prospect-setup","filters_skipped":"prospect-setup","revise_leads":"find-leads"}},{"id":"prospect-setup","onEnter":[{"action":"persist_add_filters_approval","tool":"update_campaign","when":"filters_enabled","requiredFields":["campaignId","enableICPFilters","currentStep","watchNarration"],"requiredValues":{"enableICPFilters":true,"currentStep":"create-icp-rubric","watchNarration.stage":"fit-message","watchNarration.headline":"Create filter rules","watchNarration.visibleState":"Filter Rules is visible while Codex drafts/saves filters.","watchNarration.nextAction":"Review saved filter rules"},"mustRunBefore":["get_post_find_leads_scout_registry","launch_message_drafting_after_filter_choice","load_filter_reference_in_parent","save_rubrics","ask_filter_rubric_review_choice"]},{"tool":"get_post_find_leads_scout_registry","returns":["post-find-leads-message-scout"],"rule":"normal post-import registry exposes only Message Drafting; filters are parent-thread MCP work","mustRunBefore":["launch_message_drafting_after_filter_choice","get_subskill_asset:references/filter-leads.md","save_rubrics","ask_filter_rubric_review_choice"],"registryOnlyIsNotLaunch":true},{"action":"launch_message_drafting_after_filter_choice","mode":"background_agent_when_host_supports_subagents","target":"post-find-leads-message-scout","when":"filters_enabled or filters_skipped after filter-choice answer","doesNotQueueCells":true,"customerNarration":"Message Drafting is preparing.","inputs":["campaignId","workflowTableId","brief/source summary","3-5 sample workflow-table rows","optional campaignName/selectedLeadListId/filterChoice"],"forbiddenSiblings":["source/filter workers"],"handoffCompression":"lean_message_drafting_handoff_no_hashes_no_counts_no_full_row_data","requiredConcreteToolCall":"Task or spawn_agent when host supports background agents","registryOnlyIsNotLaunch":true,"mustRunBefore":["get_subskill_asset:references/filter-leads.md","load_filter_reference_in_parent","save_rubrics","ask_filter_rubric_review_choice"],"yoloPermissionRule":"do not ask the user for worker permission in YOLO.","startProof":"Message Drafting counts as started only after Task/spawn_agent.","noBackgroundFallback":"Start the same full message branch inline before filter reference or block."},{"action":"continue_after_drafting","when":"filters_skipped","transition":"filters_skipped_message_started"},{"tool":"get_subskill_asset","action":"load_filter_reference_in_parent","when":"filters_enabled","requiredValues":{"subskillName":"create-campaign-v2","assetPath":"references/filter-leads.md"},"rule":"Parent thread uses this reference to draft production rubrics; do not spawn a filter worker."},{"tool":"save_rubrics","when":"filters_enabled","requiredFields":["campaignOfferId","leadScoringRubrics"],"writesCampaignState":"leadScoringRubrics","requiredSideEffects":{"enableICPFilters":true,"currentStep":"create-icp-rubric","watchNarration.headline":"Filter rules saved for review"}},{"action":"ask_filter_rubric_review_choice","uses":"request_user_input","choices":["Approve filters","Revise filters","Pause"],"copyMustInclude":["Filter rules saved for review","These rules prevent wasted sends before I score/import the list.","Recommended because of the researched ICP, source sample, and repeated false-positive patterns.","one pass example and one block example when available","approval is for the saved filter rules","Approve these filter rules."],"autoSelectIf":"yolo_mode and parent saved production-shaped rubrics","copyMustAvoid":["Watch link:","campaign-builder URL","repeat the watch URL"],"requiredPrecondition":"save_rubrics succeeded or active campaign rubrics verified"}],"requiredCampaignState":["campaignId","campaignBrief","selectedLeadListId","workflowTableId"],"allowedTools":["get_post_find_leads_scout_registry","get_subskill_asset","save_rubrics","get_campaign","get_rows_minimal","update_campaign","get_campaign_navigation_state","AskUserQuestion","request_user_input","Task","spawn_agent"],"doNotAllow":["create_campaign","list_senders","import_leads","confirm_lead_list","queue_cells","start_campaign","check_rubric","generate_messages"],"waitFor":["filter_rubrics_approved","revise_leads","revise_rubric","revise_messaging","filters_skipped_message_started"],"hardRules":["after_save_rubrics_currentStep_must_stay_create-icp-rubric_until_filter_approval","filter_approval_required_before_apply-icp-rubric_or_queue_campaign_cells","do_not_move_browser_to_messages_until_filter_leads_step_is_current_or_filters_are_explicitly_skipped","no_prospect_setup_worker_or_deep_prompt_before_filter_choice","message_drafting_after_filter_choice","message_drafting_no_cells","only_message_drafting_may_spawn_background_agent","filters_are_parent_thread_mcp_work","no_post_find_leads_filter_scout_in_normal_path","registry_call_is_not_message_drafting_launch","yolo_must_not_ask_permission_for_message_drafting_worker","message_drafting_must_start_before_filter_reference_or_save_rubrics","if_background_agent_unavailable_start_full_message_branch_inline_before_filters_or_block","message_drafting_start_does_not_advance_filter_path"],"transitions":{"filter_rubrics_approved":"message-generation","revise_leads":"find-leads","revise_rubric":"filter-rubric","revise_messaging":"message-generation","confirm_with_user":"message-review","filters_skipped_message_started":"message-generation"}},{"id":"filter-rubric","onEnter":[{"tool":"get_subskill_asset","requiredValues":{"subskillName":"create-campaign-v2","assetPath":"references/filter-leads.md"}},{"action":"observed-row-grounding","uses":["get_rows_minimal","get_rows","enrich_with_prospeo"],"requiredBefore":"save_rubrics","contract":["Call get_rows_minimal before drafting filters.","Call get_rows({ tableId, rowIds }) for row/enrichment sample; rowIds must be a JSON array, not a comma-delimited string.","Use multiple visible rows for repeated false positives, broad enterprise sellers, noisy titles, agencies/vendors, geography, and budget gaps.","Use one direct enrichment sample via enrich_with_prospeo if rows are thin; set enrichMobile: false.","On direct enrichment failure, no credits, provider error, or no match, do not retry; continue with uncertainty or block.","If no rows, do not enrich or save row-grounded filters; ask/import rows or use brief/source with uncertainty.","If zero enriched fields, separate raw row fields from unavailable enrichment; do not pretend enrichment-backed filters are observed.","Stop before save_rubrics on stale workflowTableId/source/campaignId/row ids.","Fail generic sales/BD/partnerships unless target/current evidence proves fit and budget path.","No standalone current_role_* safety; fold into keep/exclude or engagement_only_or_stale_fit_exclusion."]},{"tool":"save_rubrics","requiredFields":["campaignOfferId","leadScoringRubrics"],"writesCampaignState":"leadScoringRubrics","requiredSideEffects":{"enableICPFilters":true,"currentStep":"create-icp-rubric","watchNarration.headline":"Filter rules saved for review"}},{"action":"ask_filter_rubric_review_choice","uses":"request_user_input","choices":["Approve filters","Revise filters","Pause"],"copyMustInclude":["These rules prevent wasted sends before I score/import the list.","approval object is filter rules only","approval is for the filter rules","Approve these filter rules."],"autoSelectIf":"yolo_mode and rubrics are production-shaped","copyMustAvoid":["Watch link:","campaign-builder URL","repeat the watch URL"]}],"requiredCampaignState":["campaignId","workflowTableId"],"allowedTools":["get_subskill_asset","get_rows_minimal","get_rows","enrich_with_prospeo","save_rubrics","AskUserQuestion","request_user_input"],"doNotAllow":["create_campaign","list_senders","import_leads","confirm_lead_list","update_campaign","queue_cells","start_campaign","check_rubric","queue_campaign_cells","bulk_enrich_with_prospeo"],"waitFor":["filter_rubrics_approved","revise_leads","confirm_with_user","auto_continue"],"transitions":{"filter_rubrics_approved":"message-generation","revise_leads":"find-leads","confirm_with_user":"message-generation","auto_continue":"message-generation"}},{"id":"message-generation","onEnter":[{"action":"set_message_review_visible_step_by_filter_choice","tool":"update_campaign","watchNarration.stage":"fit-message","requiredValues":{"currentStep":"apply-icp-rubric","watchNarration.stage":"fit-message","watchNarration.headline":"Filters saved + waiting for message approval"},"watchNarrationRule":"After filter approval, show Filter Leads; do not queue enrichment/filter/message cells before approve-message.","mustRunBefore":"run_or_reconcile_message_draft_builder","failureRule":"currentStep=apply-icp-rubric"},{"action":"run_or_reconcile_message_draft_builder","target":"post-find-leads-message-scout","toolCallRequiredBeforeDraft":["Task/spawn_agent or inline fallback before parent drafting","generic gpt-5.5 xhigh Message Drafting fallback","lean handoff: campaignId, workflowTableId, brief, source rule, 3-5 rows","no copied counts, hashes, full row ids, broad row data, or artifacts","branch loads current brief/context, full generate-messages prompt/assets","return labeled Markdown: template, token rules, sample, status, recommendation, validation, hash, retry","hide fallback sample, risk notes, and qaReceipt on happy path","inline fallback=parent-thread-fallback; same gates"],"stateSource":"live campaign/table plus sample rows","outputState":"messageDraftRecommendation with internal validation passed","revisionMode":{"when":"revise_messaging, message QA request, or latest user message requests template changes before approve-message","route":"send feedback/QA/rewrite request to post-find-leads-message-scout or generic gpt-5.5 xhigh Message Drafting branch","requiredInputs":["latest user feedback","current messageDraftRecommendation and basisToken/outputHash","lean campaign/table basis and brief summary; branch reloads live state"],"forbiddenParentActions":["rewrite template in parent","QA template in parent from memory","update_campaign_brief before approve-message"],"output":"revised messageDraftRecommendation rendered before request_user_input"},"onlyMessageBackgroundAgent":true,"forbiddenSiblingAgents":["source-scout-*","any filter background worker"],"handoffCompression":"lean_message_handoff","finalGateRequiredBeforeReady":"Load create-campaign-v2-validation before ready."}],"requiredCampaignState":["campaignId","campaignBrief","selectedLeadListId","workflowTableId"],"allowedTools":["get_subskill_prompt","get_campaign","get_rows_minimal","update_campaign","Task","spawn_agent"],"toolRules":["message_drafting_agent_first_no_silent_parent_fallback; yolo counts","on_filters_enabled_path_parent_must_not_enter_message_review_until_save_rubrics_success_and_filter_approval","brief.md, lead-review.md, and lead-sample.json are optional debug context only.","messageDraftRecommendation returns template, token rules, rendered sample, status, recommendation, validation, hash, retry.","messageDraftRecommendation hides fallback/risk/qaReceipt in the happy path.","If campaign/table/sample basis does not match, classify the output stale or blocked.","message_revision_feedback_routes_to_message_drafting_agent_not_parent","message_qa_routes_to_message_drafting_agent_not_parent","message_drafting_loads_full_generate_messages_prompt_all_chunks","message_drafting_loads_all_reference_assets_via_get_subskill_asset","message_drafting_loads_create_campaign_v2_validation_prompt_before_return","message_drafting_handoff_uses_lean_basis_no_hashes_counts_or_full_rows","message_drafting_loads_current_campaign_brief_before_drafting","parent_may_load_generate_messages_only_for_explicitly_approved_inline_fallback","before return branch loads create-campaign-v2-validation prompt and runs internal validation","pre_approval_step_filter_leads"],"doNotAllow":["create_campaign","list_senders","save_rubrics","import_leads","confirm_lead_list","queue_cells","start_campaign","generate_messages","AskUserQuestion","request_user_input"],"waitFor":["message_validation_ready","revise_rubric","revise_messaging"],"transitions":{"message_validation_ready":"message-review","revise_rubric":"filter-rubric","revise_messaging":"message-generation"},"revisionLoop":{"trigger":"user gives copy feedback, asks for QA/update, or chooses revise-messaging","required":["route latest user feedback or QA request to Message Drafting with current recommendation and live campaign/table state","produce a new messageDraftRecommendation with revisionNotes or validationStatus","render revised ## Message Template, ## Rendered Example, and What changed before asking approval"],"blocked":["asking whether an unseen new version is better","reusing the old template after acknowledging feedback","rewriting the template in the parent thread","update_campaign_brief before approve-message","request_user_input or AskUserQuestion during message-generation","QAing the template in the parent thread"],"outputState":"messageDraftRecommendation"},"hardRules":["message_revision_must_render_new_template_before_approval_question","message_revision_saves_only_after_approve_message","message_generation_must_not_call_request_user_input","message_generation_must_transition_to_message_review_only_after_renderable_draft_state","message_drafting_agent_first_no_silent_parent_fallback","message_revision_routes_to_message_drafting_agent","message_qa_routes_to_message_drafting_agent","filter_path_requires_saved_filters_before_message_review","only_message_drafting_may_spawn_background_agent","no_queue_before_template_approval"],"currentStepValue":"apply-icp-rubric"},{"id":"message-review","onEnter":[{"tool":"update_campaign","requiredValues":{"currentStep":"apply-icp-rubric","watchNarration.stage":"fit-message"},"watchNarrationRule":"Before template approval, keep browser on Filter Leads.","mustRunBefore":"render_message_review_from_state","failureRule":"do not ask for message approval until Filter Leads shows and cells unqueued."},{"action":"render_message_review_from_state","requiredState":["campaignBrief","selectedLeadListId","workflowTableId","messageDraftRecommendation"],"requiredVisibleLabels":["## Message Template","## Rendered Example","Good token fill:","My take:","Question: approve-message or revise-messaging?","Recommendation:"],"doNotShowByDefault":["Rendered fallback sample","Concerns","QA receipt","Token Notes","Good omit / fallback","Bad fill to avoid","Token Adherence Table"],"internalPersistenceOnly":["Token Fill Rules","Token Fill Examples","fallback guidance","bad-fill avoidance notes","validation notes","QA details"],"copyMustInclude":["one recommended template","one rendered sample","token rules and fallbacks","full list remains paused"],"copyMustAvoid":["Watch link:","campaign-builder URL","repeat the watch URL"],"revisionRenderRule":"After feedback, route feedback to Message Drafting; show revised template/example; never ask if an unseen version is better.","parentMustNot":["rewrite template from memory","invent validation summary without Message Drafting output","render qaReceipt, risk notes, or renderedFallbackSample on the normal happy path"]},{"action":"ask_message_review_choice","uses":"request_user_input","choices":["approve-message","revise-messaging"],"copyMustInclude":["approve this message template and continue","template approval only locks the draft direction; final Start still controls sending"],"autoSelectIf":"yolo_mode and Recommendation is approve-message; revise autonomously when Recommendation is revise-messaging","copyMustAvoid":["Watch link:","campaign-builder URL","repeat the watch URL"],"requiredPrecondition":"current or revised template and rendered example are visible in this turn","revisionPrecondition":"after revise_messaging, revised template is visible before this question"},{"action":"sync_approved_message_set_to_campaign_brief","tool":"update_campaign_brief","when":"after approve-message","requiredFields":["campaignId","approvedMessageTemplate","Token Fill Rules","Token Fill Examples"],"writesCampaignState":"approvedMessageTemplate","revisionApprovalRule":"If the user requested revisions, write only the latest Message Drafting-approved revised template and token rules after approve-message.","forbiddenBefore":"approve-message"}],"requiredCampaignState":["campaignId","workflowTableId","messageDraftRecommendation"],"allowedTools":["AskUserQuestion","request_user_input","update_campaign_brief","update_campaign","get_rows_minimal"],"doNotAllow":["create_campaign","list_senders","save_rubrics","import_leads","confirm_lead_list","start_campaign"],"waitFor":["message_approved","revise_messaging"],"transitions":{"message_approved":"validate-sample","revise_messaging":"message-generation"},"currentStepValue":"apply-icp-rubric"},{"id":"validate-sample","currentStepValue":"apply-icp-rubric","reference":"references/sample-validation-loop.md","visibleStepRule":"After saved-filter approval and approve-message, queue bounded Enrich Prospect cells.","onEnter":[{"tool":"update_campaign","requiredValues":{"currentStep":"apply-icp-rubric","watchNarration.stage":"fit-message"},"watchNarrationRule":"Template saved; Filter Leads runs bounded enrichment/scoring."},{"tool":"queue_campaign_cells","requiredFields":["workflowTableId","columnRole","rowSelector"],"requiredValues":{"columnRole":"enrich","rowSelector":{"type":"reviewBatch"},"forceRerun":false},"targetCountSource":"reviewBatch.rowCount default 15"},{"tool":"wait_for_campaign_processing","requiredFields":["workflowTableId","minPassedCount"],"requiredValues":{"minPassedCount":1},"readVia":"stats_only_tool_result","timeoutGuidance":"On timeout, use partial diagnostics; do not repeat identical waits.","customerSummaryPattern":["{checked} leads checked","{passed} passed fit scoring","{blocked} blocked before sending","full list remains paused until approval"]},{"action":"handle_partial_or_timeout_sample","customerStatus":"sample-needs-revision","rule":"Do not repeat waits indefinitely; surface partial status and route to revision.","copyMustInclude":"completed, passed, pending, blocked before sending, and full list remains paused"}],"requiredCampaignState":["campaignId","workflowTableId","approvedMessageTemplate","filterRubricsApproved when enableICPFilters=true"],"allowedTools":["get_subskill_asset","queue_campaign_cells","select_campaign_cells","get_campaign_table_schema","wait_for_campaign_processing","update_campaign","AskUserQuestion","request_user_input"],"doNotAllow":["import_leads","list_senders","start_campaign","enrich_with_prospeo","bulk_enrich_with_prospeo","check_rubric"],"hardRules":["campaign_processing_waits_are_stats_only_by_default","queue_review_batch_by_selector_never_fetch_rows_for_cell_ids","timeout_never_repeats_without_customer_handoff","timeout_or_underfloor_sample_never_advances_to_settings"],"waitFor":["sample_validated","sample_revision_required"],"transitions":{"sample_validated":"auto-execute-messaging","sample_revision_required":"lead-review","revise_leads":"find-leads","revise_rubric":"filter-rubric","escalation_triggered":"escalation"}},{"id":"auto-execute-messaging","currentStepValue":"auto-execute-messaging","references":["references/parallel-critique-protocol.md","references/thomas-variant-selection.md","references/sellable-cleanup-rules.md","references/step-15-re-cascade.md"],"onEnter":[{"tool":"queue_campaign_cells","batchSize":100,"when":"any passing row has pending, empty, or stale Generate Message cell","requiredFields":["workflowTableId","columnRole","rowSelector"],"requiredValues":{"columnRole":"generateMessage","rowSelector":{"type":"needsGeneratedMessage"},"forceRerun":false},"cellSource":"selector-engine needsGeneratedMessage rows using approved campaign brief template"},{"tool":"wait_for_campaign_processing","purpose":"wait_for_first_current_revision_generated_message","requiredValues":{"minGeneratedMessages":1,"templateRevision":"current"},"readVia":"stats_only_tool_result","invariant":"A generated message implies the pass gate; stale or wrong-revision messages are excluded from readiness."},{"action":"observe_generate_message_results","reference":"references/step-15-re-cascade.md"},{"action":"enforce_token_contract","modeFromConfig":"messaging.tokenContract"},{"action":"optional_critique_pass","enabledFromConfig":"messaging.critique.enabled","protocol":"references/parallel-critique-protocol.md","sampleSizeFromConfig":"messaging.critique.sampleSize","budgetUsdCapFromConfig":"messaging.critique.budgetUsdCap","perCriticTimeoutFromConfig":"messaging.critique.perCriticTimeoutSeconds","totalTimeoutFromConfig":"messaging.critique.totalTimeoutSeconds","criticsFromConfig":"messaging.critique.critics","enforceFinalizerPassFromConfig":"messaging.critique.synthesis.enforceFinalizerPass","rejectOnFakeProofFromConfig":"messaging.critique.rejectOnFakeProof","rejectOnUnsupportedTokenFromConfig":"messaging.critique.rejectOnUnsupportedToken","onBudgetTrip":"halt_critique_continue_plain_tail","onPerCriticTimeout":"drop_critic_proceed_with_remaining","onTotalTimeout":"persist_plain_message_for_row","onTokenContractViolation":"persist_plain_message_for_row","onFakeProof":"persist_plain_message_for_row"},{"action":"optional_opus_subset","enabledFromConfig":"messaging.critique.opus.enabled","selection":"references/thomas-variant-selection.md","maxMessagesPerPassFromConfig":"messaging.critique.opus.maxMessagesPerPass","budgetUsdCapFromConfig":"messaging.critique.opus.budgetUsdCap","onOpusBudgetTrip":"halt_opus_continue_non_opus","onOpusTokenContractViolation":"fallback_to_non_opus_rewrite"},{"tool":"update_campaign","requiredValues":{"currentStep":"auto-execute-messaging","watchNarration.stage":"review-ready"},"watchNarrationRule":"Say the first passing generated message is ready in Messages; next is review before Settings."},{"action":"ask_generated_message_review_choice","uses":"request_user_input","choices":["Approve reviewed draft rows and continue to Settings","Revise filters","Revise message template","Pause here"],"copyMustInclude":["approve the reviewed draft rows and continue to Settings","tokens resolved","company/person match","proof claim","prospect angle","language/tone when known","obvious bad fits","Would I take this call?","weak personalization can burn the sender's reputation","full list remains paused","this approves reviewed draft rows for setup; final Start still controls sending"],"autoSelectIf":"yolo_mode and the first passing generated message clears the quality floor","copyMustAvoid":["Watch link:","campaign-builder URL","repeat the watch URL"]}],"allowedTools":["get_subskill_asset","get_campaign_table_schema","select_campaign_cells","queue_campaign_cells","wait_for_campaign_processing","revise_message_template_and_rerun","update_campaign","AskUserQuestion","request_user_input"],"doNotAllow":["import_leads","list_senders","start_campaign","generate_messages"],"hardRules":["generated_message_count_excludes_stale_or_wrong_revision_messages","message_template_revision_uses_brief_update_then_generate_message_rerun","do_not_overwrite_generated_message_cells_directly","critique_failure_never_escalates","critique_sample_size_bounded_by_config","first_passing_generated_message_unblocks_review","critics_fixed_at_targeting_copy_voice","synthesis_enforces_message_token_contract","opus_reserved_for_highest_value_subset","proposed_token_never_persisted_in_rewrite"],"waitFor":["generated_messages_approved","sample_revision_required"],"transitions":{"generated_messages_approved":"awaiting-user-greenlight","revise_filters":"filter-rubric","revise_messaging":"message-generation","escalation_triggered":"escalation"}},{"id":"awaiting-user-greenlight","currentStepValue":"awaiting-user-greenlight","reference":"references/final-handoff-contract.md","onEnter":[{"tool":"start_campaign_message_preparation","requiredValues":{"targetPreparedMessages":"{requestedMessageCount}","approvalMode":"{scheduleOrApproveIntent ? 'approve' : 'mark_ready'}"},"intentMapping":{"scheduleSends":"approve the exact requested send count"},"when":"explicit_count_or_schedule","batchStrategy":"max250","rowBudgetStrategy":"sample100_cap2500"},{"tool":"get_campaign_message_preparation_status","copyMustInclude":["preparation job status","checked rows","target","stop reason"],"when":"prep_job_started"},{"tool":"get_campaign"},{"tool":"list_senders","purpose":"identity proof at Settings"},{"tool":"update_campaign","requiredValues":{"currentStep":"settings","watchNarration.stage":"review-ready"},"watchNarrationRule":"Say message review is complete, Settings is open, lead research/filtering happened outside LinkedIn, and nothing sends until Start."},{"action":"surface_sender_and_slack_handoff","requiredVisibleContent":["connect or select a LinkedIn sender","Lead research and filtering already happened outside your LinkedIn account.","This account is only used for approved sending after final launch.","Nothing sends until the final Start step.","Slack reply review","recommended sequence","final launch confirmation is still ahead"],"copyMustAvoid":["Watch link:","campaign-builder URL","repeat the watch URL"]},{"action":"ask_sender_selection","uses":"request_user_input","singleChoice":true,"choices":["Use this connected sender","Connect a different sender in Settings","Pause here"],"autoSelectIf":"yolo one exact identity match","copyMustAvoid":["Watch link:","campaign-builder URL","repeat the watch URL"],"noAutoSelectIf":"identity proof is missing; ask"},{"action":"attach_selected_sender","tool":"update_campaign","when":"user selected an available connected sender","requiredValues":{"senderIds":["{selectedSenderId}"],"currentStep":"sequence","watchNarration.stage":"review-ready"},"watchNarrationRule":"Say the sender was attached and the app is moving to Sequence review; sequence remains editable and nothing sends until Start."},{"tool":"attach_recommended_sequence","when":"after senderIds are attached","requiredValues":{"campaignId":"{campaignId}","currentStep":"send","watchNarration.stage":"review-ready"},"watchNarrationRule":"Say the recommended follow-up sequence is attached, final launch review is open, and nothing sends until Start."},{"action":"ask_final_launch_greenlight","uses":"request_user_input","singleChoice":true,"choices":["Start campaign","Review campaign first","Pause here"],"copyMustInclude":["quality confidence means sample messages and prospect angle were checked","launch confidence means sender, sequence, and Start are ready","approved messages begin sending according to the sequence","replies and meetings follow connected settings","you can monitor and pause","no hidden extra approval disappears after clicking Start"],"onUserStart":"claude-greenlight","neverAutoSelectInYolo":true,"copyMustAvoid":["Watch link:","campaign-builder URL","repeat the watch URL"]}],"allowedTools":["cancel_campaign_message_preparation","get_campaign_message_preparation_status","start_campaign_message_preparation","get_campaign","get_campaign_navigation_state","list_senders","update_campaign","attach_recommended_sequence","AskUserQuestion","request_user_input"],"doNotAllow":["start_campaign","import_leads"],"autoStart":false,"watchRequired":true,"waitFor":["sender_connection_required","sender_attached","sequence_attached","ready_to_launch","user_greenlight","ui_start_detected"],"transitions":{"sender_connection_required":"awaiting-user-greenlight","sender_attached":"awaiting-user-greenlight","sequence_attached":"awaiting-user-greenlight","ready_to_launch":"awaiting-user-greenlight","user_greenlight":"claude-greenlight","ui_start_detected":"running"}},{"id":"claude-greenlight","reference":"references/final-handoff-contract.md","onEnter":[{"tool":"get_campaign"},{"action":"verify_sequence_and_current_step_before_start","requiredState":["workflowTableId","senderIds","sequenceTemplate","at least one approved generated message","currentStep in awaiting-user-greenlight|claude-greenlight|send"],"boundedLaunchRule":"preparation job approved X; no broad approve-all."},{"tool":"start_campaign","requiredFields":["campaignId"],"persistsCurrentStep":"running","watchNarrationRule":"After start_campaign succeeds, say final greenlight was accepted, campaign is live/running, and progress can be watched."}],"allowedTools":["get_campaign","attach_recommended_sequence","start_campaign","AskUserQuestion","request_user_input"],"watchRequired":true,"waitFor":"campaign_started","transitions":{"campaign_started":"running"}},{"id":"running","currentStepValue":"running","onEnter":[{"action":"surface_campaign_live_confirmation_without_watch_link","copyMustAvoid":["Watch link:","campaign-builder URL","repeat the watch URL"]}],"allowedTools":["get_campaign","AskUserQuestion","request_user_input"],"doNotAllow":["start_campaign"],"terminal":true},{"id":"escalation","reference":"references/escalation-ladder.md","allowedTools":["AskUserQuestion","request_user_input"],"doNotAllow":["start_campaign","import_leads"],"transitions":{"revise_brief":"brief-interview","revise_leads":"find-leads","revise_rubric":"filter-rubric","revise_messaging":"message-generation","abort":"abort"}},{"id":"abort","allowedTools":["AskUserQuestion","request_user_input"],"terminal":true}]}
|
|
@@ -202,6 +202,23 @@ After confirmed source rows are copied:
|
|
|
202
202
|
"workerStatuses": {
|
|
203
203
|
"leadFitBuilder": "idle",
|
|
204
204
|
"messageDraftBuilder": "running"
|
|
205
|
+
},
|
|
206
|
+
"workerDetails": {
|
|
207
|
+
"messageDraftBuilder": {
|
|
208
|
+
"statusSource": "branch",
|
|
209
|
+
"status": "branch-running",
|
|
210
|
+
"runId": "message-drafting-thread-id",
|
|
211
|
+
"startedAt": "2026-05-09T10:00:00.000Z",
|
|
212
|
+
"updatedAt": "2026-05-09T10:00:00.000Z",
|
|
213
|
+
"basisToken": "message-drafting-basis-1",
|
|
214
|
+
"basis": {
|
|
215
|
+
"campaignId": "campaign-id",
|
|
216
|
+
"selectedLeadListId": "source-lead-list-id",
|
|
217
|
+
"workflowTableId": "campaign-table-id",
|
|
218
|
+
"reviewBatchRowHash": "review-batch-hash",
|
|
219
|
+
"filterChoice": "use-filters"
|
|
220
|
+
}
|
|
221
|
+
}
|
|
205
222
|
}
|
|
206
223
|
}
|
|
207
224
|
```
|
|
@@ -214,6 +231,9 @@ Any cleanup/manual-review row means recommend light filters by default. This is
|
|
|
214
231
|
a user decision gate, not active filtering; do not say filtering the batch before
|
|
215
232
|
rubrics are saved. Message Drafting should start after the filter-choice answer;
|
|
216
233
|
mark it running only when that branch actually started.
|
|
234
|
+
`workerStatuses.messageDraftBuilder` is a simple badge only. Put branch runtime
|
|
235
|
+
proof under `workerDetails.messageDraftBuilder`; do not put rich objects under
|
|
236
|
+
`workerStatuses`, and do not use a `messageDrafting` key.
|
|
217
237
|
When the user chooses filters, immediately persist `enableICPFilters: true` and
|
|
218
238
|
move to `create-icp-rubric` so the watched app shows Filter Rules while Codex
|
|
219
239
|
defines the rules in chat. After `save_rubrics`, keep the app on Filter Rules so
|
|
@@ -89,11 +89,7 @@ first:
|
|
|
89
89
|
- Do NOT use `update_cell` to write message bodies. The `Generate
|
|
90
90
|
Message` column's http_request writes those cells via the cascade.
|
|
91
91
|
`update_cell` remains reachable for legitimate operator overrides
|
|
92
|
-
AFTER the tail hands off.
|
|
93
|
-
`Approved` column cells with `select_campaign_cells({ columnRole:
|
|
94
|
-
"approved", rowSelector: { type: "rowIds", rowIds } })`; do not trust
|
|
95
|
-
`approveCellId` from `get_rows`, which may refer to a row-level scheduling
|
|
96
|
-
helper instead of the visible table checkbox.
|
|
92
|
+
AFTER the tail hands off.
|
|
97
93
|
- Do NOT call `check_rubric`, `enrich_with_prospeo`, or
|
|
98
94
|
`bulk_enrich_with_prospeo` in the tail. Those are direct-API
|
|
99
95
|
mutation tools that fetch data to the caller without writing to
|
|
@@ -392,31 +388,25 @@ templateRevision: "current" })` until the first current-revision generated
|
|
|
392
388
|
approve the generated message before continuing to Settings. Only that
|
|
393
389
|
approval may move the campaign to Settings / `awaiting-user-greenlight`.
|
|
394
390
|
7. When approval is given — or auto-approved in YOLO when the Recommendation is
|
|
395
|
-
`approve-message` — you MUST actually mark the reviewed passing rows approved
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
`
|
|
399
|
-
"rowIds", rowIds: reviewedRowIds } })`. Call
|
|
400
|
-
`update_cell({ cellId: <returned Approved cell id>, value: true })` for at
|
|
401
|
-
least one generated-message row, preferably two when available. Do not use
|
|
402
|
-
`approveCellId` from `get_rows` unless it matches the semantic selector
|
|
403
|
-
result; it may point at a row-level scheduling helper and leave the visible
|
|
404
|
-
checkbox unchecked. The campaign UI gates "Next: Settings" on
|
|
391
|
+
`approve-message` — you MUST actually mark the reviewed passing rows approved
|
|
392
|
+
by calling `update_cell({ cellId: <approveCellId>, value: true })` for at
|
|
393
|
+
least one generated-message row, preferably two when available (read each
|
|
394
|
+
`approveCellId` from `get_rows`). The campaign UI gates "Next: Settings" on
|
|
405
395
|
at least one row whose `Approved` cell is true:
|
|
406
396
|
moving `currentStep` to `settings`/`awaiting-user-greenlight` with zero
|
|
407
397
|
approved rows desyncs the watch UI, which stays stuck on Generate Messages
|
|
408
398
|
showing "Approve at least one draft to continue." Setting the `Approved`
|
|
409
|
-
flag via `update_cell
|
|
410
|
-
rule below applies ONLY to message
|
|
411
|
-
Advance `currentStep` only after the
|
|
412
|
-
|
|
399
|
+
flag via `update_cell({ cellId: approveCellId, value: true })` is explicitly
|
|
400
|
+
allowed; the "do not use `update_cell`" rule below applies ONLY to message
|
|
401
|
+
bodies, never to the `Approved` flag. Advance `currentStep` only after the
|
|
402
|
+
approve writes succeed.
|
|
413
403
|
If any Settings/sequence/send/start step call returns
|
|
414
404
|
`error: "approved_message_required"` with
|
|
415
|
-
`requiredAction: "approve_generated_message"`, recover
|
|
416
|
-
`
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
405
|
+
`requiredAction: "approve_generated_message"`, recover by reading rows with
|
|
406
|
+
`get_rows`, writing `update_cell({ cellId: approveCellId, value: true })`
|
|
407
|
+
for a completed generated-message row, confirming the approved count is at
|
|
408
|
+
least 1, then retrying the blocked action. Do not ignore or route around
|
|
409
|
+
that error with a different currentStep write.
|
|
420
410
|
|
|
421
411
|
**Do NOT hand-write message bodies via `update_cell`.** `update_cell`
|
|
422
412
|
is reachable for legitimate operator overrides AFTER the tail hands
|
|
@@ -466,14 +456,10 @@ strings, which is why Step 16 requires Step 15 to be complete.
|
|
|
466
456
|
7. On success, keep `currentStep: "auto-execute-messaging"`, show that the
|
|
467
457
|
first passing generated message is ready in Messages, and ask for approval
|
|
468
458
|
before Settings. When the user approves (or YOLO auto-approves on an
|
|
469
|
-
`approve-message` recommendation), first
|
|
470
|
-
`
|
|
471
|
-
|
|
472
|
-
`
|
|
473
|
-
least one reviewed passing row, preferably two when available. Never use
|
|
474
|
-
`get_rows.approveCellId` as the approval source of truth unless it matches
|
|
475
|
-
the selector result. Confirm the table now reports `approved >= 1`, and only
|
|
476
|
-
then run
|
|
459
|
+
`approve-message` recommendation), first write the approval to the rows with
|
|
460
|
+
`update_cell({ cellId: <approveCellId>, value: true })` for at least one
|
|
461
|
+
reviewed passing row, preferably two when available, confirm the table now
|
|
462
|
+
reports `approved >= 1`, and only then run
|
|
477
463
|
`update_campaign({ campaignId, currentStep: "awaiting-user-greenlight" })`.
|
|
478
464
|
Never advance to Settings while the table still reports `approved: 0` — the
|
|
479
465
|
builder UI will refuse to leave Generate Messages and the watch step will
|
|
@@ -2990,17 +2990,12 @@ research → condense → 10 angle agents in parallel → finalizer combines bes
|
|
|
2990
2990
|
|
|
2991
2991
|
## Batch Approval
|
|
2992
2992
|
|
|
2993
|
-
After batch generation
|
|
2994
|
-
`Approved` cells. Resolve them semantically first; do not rely on
|
|
2995
|
-
`approveCellId` from row reads unless it matches the selector result.
|
|
2993
|
+
After batch generation, user can approve all:
|
|
2996
2994
|
|
|
2997
2995
|
```
|
|
2998
|
-
|
|
2999
|
-
|
|
3000
|
-
|
|
3001
|
-
})
|
|
3002
|
-
update_cell(returnedApprovedCellId1, true)
|
|
3003
|
-
update_cell(returnedApprovedCellId2, true)
|
|
2996
|
+
update_cell(approveCellId1, true)
|
|
2997
|
+
update_cell(approveCellId2, true)
|
|
2998
|
+
...
|
|
3004
2999
|
```
|
|
3005
3000
|
|
|
3006
3001
|
Or approve individually after reviewing in UI.
|