@sellable/mcp 0.1.92 → 0.1.94

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sellable/mcp",
3
- "version": "0.1.92",
3
+ "version": "0.1.94",
4
4
  "type": "module",
5
5
  "description": "Sellable MCP server for Claude Code and Codex campaign workflows",
6
6
  "main": "dist/index.js",
@@ -66,10 +66,10 @@ allowed-tools:
66
66
 
67
67
  Use this as the customer-facing entrypoint for Sellable campaign creation.
68
68
 
69
- CampaignOffer state is canonical; disk artifacts are a debug trail. The
70
- internal create-campaign-v2 flow still writes the diagnostics, and all 14 disk
71
- artifacts remain as debug outputs, but resume, gating, and handoff read campaign
72
- state first. The
69
+ CampaignOffer state and the watch link are the customer-facing source of truth.
70
+ Disk artifacts are optional debug/UAT diagnostics; normal customer runs should
71
+ not create, link, or surface local draft files unless the user explicitly asks
72
+ for them. Resume, gating, and handoff read campaign state first. The
73
73
  watchable campaign exists after the short brief; lead import is bounded to the
74
74
  first review batch, and enrichment/message generation waits until rubrics and
75
75
  the approved message template are saved on the campaign.
@@ -147,13 +147,12 @@ Use rendered Markdown for user review surfaces, not fenced code blocks. Keep
147
147
  lines short, use indexed section labels and bullets, and translate internal
148
148
  sourcing terms into plain language.
149
149
 
150
- Every approval gate must include artifact access after the readable inline
151
- content. Show a short `Open artifact:` line with the one key clickable markdown
152
- link for that stage. Do not show raw filesystem paths unless links cannot be
153
- created or the user asks. Do this for brief approval, lead-source
154
- approval/review, lead-filter review, and message review.
155
- The link is for deeper inspection; never use it as a substitute for showing the
156
- content in chat.
150
+ Every approval gate must include live campaign access after the readable inline
151
+ content. Show a short `Watch link:` line once the campaign shell exists. In
152
+ normal customer runs, do not show `Open artifact:` lines, raw filesystem paths,
153
+ or local draft filenames. Local artifacts are debug/UAT-only unless the user asks
154
+ for them. The link is for deeper inspection; never use it as a substitute for
155
+ showing the content in chat.
157
156
 
158
157
  Never mention MCP namespaces, prompt chunking, plugin cache paths, missing
159
158
  linked skill versions, runbooks, or local skill files in normal customer-facing
@@ -503,9 +502,16 @@ updates.
503
502
  `message-validation.md` proves the message-review safety-gate workflow ran,
504
503
  `message-review.md` approves the template, rubrics are saved, and the
505
504
  approved message set is synced into the campaign brief.
506
- 6. Keep `selectedLeadListId` as the source list and `workflowTableId` as the
505
+ 6. The main thread owns watch navigation. Call
506
+ `mcp__sellable__update_campaign({ campaignId, currentStep })` before major
507
+ visible work so the user can watch progress in the app: `create-offer` for
508
+ the brief, `pick-provider` or the selected provider step while sourcing,
509
+ `filter-choice` after the 10-row review batch, `messages` or
510
+ `auto-execute-messaging` for message work, `validate-sample` for validation,
511
+ and `awaiting-user-greenlight` for Settings. Do not advance the step backward.
512
+ 7. Keep `selectedLeadListId` as the source list and `workflowTableId` as the
507
513
  campaign table. Do not use disk files as the post-mint source of truth.
508
- 7. Do not ask the user to run another command.
514
+ 8. Do not ask the user to run another command.
509
515
 
510
516
  ## Fallback
511
517
 
@@ -31,19 +31,21 @@ Run the configured JSON flow in durable stages:
31
31
  8. queue and validate the 10-row cascade
32
32
  9. settings/sender, sequence, and start handoff
33
33
 
34
- The JSON flow is the source of truth for stage order, `requiredArtifacts`,
35
- `producesArtifacts`, `allowedTools`, `doNotAllow`, `waitFor`, and
36
- `transitions`. This prompt explains how to execute those gates; it does not
37
- replace them.
38
-
39
- CampaignOffer state is canonical; disk artifacts are a debug trail. In this
40
- phase, all 14 disk artifacts remain as debug outputs, but resume, gating, and
34
+ The JSON flow is the source of truth for stage order, artifact policy,
35
+ `requiredArtifacts`, `producesArtifacts`, `allowedTools`, `doNotAllow`,
36
+ `waitFor`, and `transitions`. In normal customer runs, obey
37
+ `artifactPolicy.normalCustomerPath`: use campaign state and MCP responses instead
38
+ of local draft files. This prompt explains how to execute those gates; it does
39
+ not replace them.
40
+
41
+ CampaignOffer state and the watch link are the customer-facing source of truth.
42
+ Disk artifacts are optional debug/UAT diagnostics only. In normal customer runs,
43
+ do not create, link, or surface local draft files unless the user explicitly asks
44
+ for debug artifacts or the run is an explicit UAT/rehearsal. Resume, gating, and
41
45
  handoff read campaign state first: campaign id, watch URL, campaign brief,
42
46
  currentStep, provider/search association, selectedLeadListId as the source
43
47
  list, workflowTableId as the campaign table, saved rubrics, approved message
44
- template, senderIds, sequence template, and running state. `brief.md` is the
45
- single customer-facing debug copy of the brief; the campaign brief field is the
46
- durable downstream campaign thesis input.
48
+ template, senderIds, sequence template, and running state.
47
49
 
48
50
  There is no separate approval-packet, commit-gate, or mint step in the active
49
51
  shell-first flow. The campaign exists early for watch mode. The hard boundary
@@ -54,7 +56,7 @@ are saved, and the approved message set is synced into the campaign brief.
54
56
 
55
57
  <files>
56
58
 
57
- Validated draft directory:
59
+ Optional debug/UAT draft directory, disabled in normal customer runs:
58
60
 
59
61
  ```text
60
62
  .sellable/create-campaign-v2/drafts/{workspace-slug}/{campaign-slug}/
@@ -88,6 +90,14 @@ Validated draft directory:
88
90
  `watchUrl`; when the user opens it they should see the brief, not an empty
89
91
  campaign. If shell creation fails, stop and surface the error. There is no
90
92
  no-shell mint fallback in the active shell-first flow.
93
+ - The main thread owns watch navigation. Before expensive work in each major
94
+ stage, call `update_campaign({ campaignId, currentStep })` with the visible UI
95
+ step the user should be watching, then continue the work from MCP/product
96
+ state. Use `create-offer` for the brief, `pick-provider` or the selected
97
+ provider step while sourcing, `filter-choice` after the 10-row review batch is
98
+ imported, `messages`/`auto-execute-messaging` for message work,
99
+ `validate-sample` for the 10-row validation cascade, and
100
+ `awaiting-user-greenlight` for Settings. Do not advance `currentStep` backward.
91
101
  - After the shell is minted, normal resume paths read the CampaignOffer first.
92
102
  Use debug files to explain or reconstruct work, not to decide whether a
93
103
  post-mint gate is allowed. Validation/debug artifacts are not durable campaign
@@ -110,7 +120,7 @@ Validated draft directory:
110
120
  `request_user_input` (enabled in Default mode by
111
121
  `[features].default_mode_request_user_input = true`, not available in
112
122
  `codex exec`). Treat them as equivalent approval/intake gates and persist the
113
- same draft artifacts after the user answers. Use this structured gate only for
123
+ same campaign state after the user answers. Use this structured gate only for
114
124
  single-choice decisions with fixed options or approval gates. Every campaign
115
125
  setup gate must be single-choice in both hosts: set or assume
116
126
  `multiSelect: false`, use mutually exclusive option labels, and do not ask
@@ -163,13 +173,13 @@ Validated draft directory:
163
173
  or safe launch. Do not say "persist", "local draft folder", "artifact",
164
174
  "mkdir", "campaign thesis", or "same approved campaign thesis" in
165
175
  customer-facing progress copy.
166
- - Every approval gate must include artifact access after the readable inline
167
- content. Show a short `Open artifact:` line with the one key clickable
168
- markdown link for that stage. Do not show raw filesystem paths unless links
169
- cannot be created or the user asks. Do this for brief approval, lead-source
170
- approval/review, lead-filter review, and message review. Do not use the link
171
- as a substitute for rendering the decision in chat; links are for deeper
172
- inspection.
176
+ - Every approval gate must include live campaign access after the readable inline
177
+ content. Show a short `Watch link:` line with the campaign link when a
178
+ campaign shell exists. In normal customer runs, do not show `Open artifact:`
179
+ lines, raw filesystem paths, or local draft filenames. If the run is explicit
180
+ debug/UAT or the user asks for local artifacts, artifact links may be shown as
181
+ secondary diagnostics. The link is never a substitute for rendering the
182
+ decision in chat.
173
183
  - Any time the user is reviewing a list or decision, use rendered Markdown with
174
184
  short indexed sections and bullets. Do not use label-plus-paragraph blocks
175
185
  like `Key numbers:` followed by one long paragraph. Do not use fenced code
@@ -274,8 +284,9 @@ Validated draft directory:
274
284
  Before that first
275
285
  structured question gate, do not run source discovery, Sales Nav, Prospeo,
276
286
  Signals, Bash, Read, Write, Edit, Glob, Grep, full company research, or
277
- draft-directory inspection/creation. Do draft-directory setup only after the
278
- founder answers. After launch identity and any ambiguous campaign focus are
287
+ draft-directory inspection/creation. In normal customer runs, do not create a
288
+ draft directory after the founder answers; create/update the campaign shell and
289
+ campaign state instead. After launch identity and any ambiguous campaign focus are
279
290
  confirmed, the setup packet must
280
291
  use the structured question gate and ask buyer, offer/CTA, proof, and lead
281
292
  source. All four questions must include an `Other / custom` option.
@@ -314,14 +325,16 @@ Validated draft directory:
314
325
  Settings/final handoff.
315
326
 
316
327
  - Before asking for brief approval, render a slim approval brief in the chat and
317
- keep the rich current brief in `brief.md`. Use rendered Markdown directly:
328
+ write the rich current brief into `CampaignOffer.campaignBrief` through
329
+ `create_campaign`/`update_campaign`. Use rendered Markdown directly:
318
330
  `##` heading, bold field labels, numbered section labels, and short bullets.
319
331
  Do not wrap the user-facing approval view in a fenced code block because that
320
332
  creates horizontal scrolling in Claude Code and Codex. Do not ask the user to
321
333
  approve a one-paragraph direction, a risk note, or hidden artifact they cannot
322
334
  inspect. The chat approval view should be skimmable in under 45 seconds; full
323
- reasoning, source notes, and robustness stay in the artifacts. Include these
324
- sections, with short wrapped lines:
335
+ reasoning, source notes, and robustness can stay in optional debug artifacts
336
+ only during explicit debug/UAT runs. Include these sections, with short wrapped
337
+ lines:
325
338
 
326
339
  ```text
327
340
  ## Campaign brief
@@ -378,21 +391,19 @@ brief`, `Revise target`, `Revise offer/proof`, and `Other / custom`.
378
391
  not visible in this session, use `Approve brief + compare source paths`
379
392
  instead. The customer approves the sourcing decision, not the host
380
393
  implementation detail.
381
- Include an `Open artifact:` link to `brief.md` before the approval question.
382
- The visible brief must come before local persistence chrome. After the brief
383
- is synthesized, render the approval-ready brief in chat before running visible
384
- `mkdir`, `Write`, artifact-copy, or similar local draft setup. When the host
385
- supports sidecar/background work, let a background writer persist `brief.md`
386
- while the main thread keeps the brief review moving. If no background writer
387
- is available, write `brief.md` synchronously only after the visible brief is
388
- already in chat. File/folder creation is not the user's value moment; the
389
- brief is.
390
-
391
- The approval question can be based on the rendered brief in chat. Do not wait
392
- for file-write chrome before asking for approval. Before lead sourcing or any
393
- downstream step reads `brief.md`, reconcile that the persisted file matches
394
- the visible approved brief; if the sidecar is still running, wait quietly or
395
- finish the write synchronously at that boundary.
394
+ Include a `Watch link:` line before the approval question once
395
+ `create_campaign` has returned `watchUrl`. The visible brief must come before
396
+ any optional debug persistence. After the brief is synthesized, render the
397
+ approval-ready brief in chat and create/update the campaign shell before any
398
+ visible `mkdir`, `Write`, artifact-copy, or similar local draft setup. In
399
+ normal customer runs, skip local draft setup entirely. File/folder creation is
400
+ not the user's value moment; the live campaign brief is.
401
+
402
+ The approval question can be based on the rendered brief in chat and the live
403
+ campaign brief. Do not wait for file-write chrome before asking for approval.
404
+ Before lead sourcing, call `update_campaign({ campaignId, campaignBrief,
405
+ currentStep: "pick-provider" })` after approval so the watch link moves out of
406
+ Plan while the main thread compares source paths.
396
407
 
397
408
  - After the brief is approved, show the next progress line:
398
409
  `Cool. Now I'm going to find people who are both a good fit and active enough
@@ -418,26 +429,30 @@ message we should test.`
418
429
  show you the draft next so you can approve it or change it.
419
430
  ```
420
431
 
421
- - In hosted/rehearsal runs, `Bash` is only for safe local draft-directory
432
+ - In explicit debug/UAT runs, `Bash` is only for safe local draft-directory
422
433
  housekeeping before the import/test batch: `mkdir`, `ls`, `find`, `test`, `pwd`, `echo`,
423
- or `cat` inside the repo. Do not use
434
+ or `cat` inside the repo. In normal customer runs, do not use Bash for local
435
+ draft setup. Do not use
424
436
  Bash to run interpreters/scripts (`python`, `node`, `npm`, `pnpm`, `yarn`,
425
437
  `npx`), call APIs, query databases, inspect prompt dumps, run git, or
426
438
  synthesize artifact content. Use `Read`/`Write`/`Edit` for artifact files and
427
439
  MCP tools for product actions.
428
- - `brief.md` is the single user-facing debug copy of the brief. The
429
- `CampaignOffer.campaignBrief` field is the stable downstream thesis source.
430
- - `lead-review.md` and `lead-sample.json` are the required outputs of `find leads`.
431
- `lead-review.md` is customer-readable: describe source paths as provider
432
- lanes checked (Signals, Sales Nav, Prospeo) and never include custom agent
433
- names, host availability, install state, allowed-tool state, or fallback
434
- implementation details.
440
+ - `CampaignOffer.campaignBrief` is the stable downstream thesis source.
441
+ `brief.md` is an optional debug/UAT copy only; never make it the user-facing
442
+ approval surface in normal customer runs.
443
+ - The lead-source decision and lead sample must be rendered in chat and attached
444
+ to campaign state/search state. `lead-review.md` and `lead-sample.json` are
445
+ optional debug/UAT outputs of `find leads`; when they exist, describe source
446
+ paths as provider lanes checked (Signals, Sales Nav, Prospeo) and never
447
+ include custom agent names, host availability, install state, allowed-tool
448
+ state, or fallback implementation details.
435
449
  - `lead-filter.md` is the primary output of `filter leads`.
436
450
  - `rubric.json` is optional and secondary to `lead-filter.md`.
437
451
  - `message-prep.md` is an optional speed artifact produced by the explicit
438
452
  message path after find-leads. It can prepare proof inventory, buyer
439
453
  objections, CTA options, gold-standard strategy maps, and candidate angles
440
- from `brief.md`, `lead-review.md`, and `lead-sample.json`.
454
+ from the live campaign brief, source decision, lead sample, and optional debug
455
+ copies.
441
456
  - `message-candidate-drafts.md` is an optional provisional speed artifact from
442
457
  sample rows that already look like probable good fits. It can contain rough
443
458
  candidate messages and element tests, but it cannot select the final winner
@@ -448,10 +463,10 @@ message we should test.`
448
463
  message quality gate outputs between `message-validation.md` and
449
464
  `approval-packet.md`.
450
465
  - Run the dependency chain as a DAG: `create-campaign-brief` -> `find leads` ->
451
- bounded import/confirm. Once `lead-review.md`, `lead-sample.json`, and the
452
- campaign table `workflowTableId` exist, the normal path is the
466
+ bounded import/confirm. Once the source decision, lead sample, and campaign
467
+ table `workflowTableId` exist, the normal path is the
453
468
  `post-lead-workstreams` step. Launch `filter leads` and `message generation`
454
- from the same basis (`brief.md`, `lead-review.md`, `lead-sample.json`, and
469
+ from the same basis (live campaign brief, source decision, lead sample, and
455
470
  the imported review-batch rows) as separate workstreams when the host exposes
456
471
  the named Sellable post-find-leads agents or real background work.
457
472
  First call `get_post_find_leads_scout_registry` and use the returned
@@ -466,8 +481,8 @@ message we should test.`
466
481
  resume targets.
467
482
  - Message generation does not need `lead-filter.md` to start. The moment the
468
483
  bounded review batch is imported and `workflowTableId` is ready, start the
469
- message-generation workstream from `brief.md`, `lead-review.md`,
470
- `lead-sample.json`, and the imported campaign table sample. It can prepare
484
+ message-generation workstream from the live campaign brief, source decision,
485
+ lead sample, and the imported campaign table sample. It can prepare
471
486
  proof inventory, token strategy, and candidate angles while filter-leads
472
487
  tightens keep/exclude rules. Approval still waits for both `lead-filter.md`
473
488
  and `message-validation.md`, then reconciles that the selected message basis
@@ -512,10 +527,11 @@ workstreams`, `in parallel`, or `background` unless parallel branches were
512
527
  available. This is the two Task/Agent subagents path for the
513
528
  `post-lead-workstreams` step. This is the same registry pattern as source scouting, but the
514
529
  trigger is source approval and the join gate is both `lead-filter.md` and
515
- `message-validation.md` existing from the same `brief.md`, `lead-review.md`,
516
- and `lead-sample.json`.
517
- - Never run a downstream stage until the active `flow.v2.json` step's
518
- `requiredArtifacts` exist.
530
+ `message-validation.md` existing from the same live campaign brief/source
531
+ decision/lead-sample basis.
532
+ - Never run a downstream stage until the active `flow.v2.json` step's required
533
+ campaign state and required normal inputs exist. In normal customer runs, do
534
+ not create optional debug artifacts just to satisfy a file gate.
519
535
  - Never call a tool outside the active step's `allowedTools`, and never call a
520
536
  tool listed in the active step's `doNotAllow`.
521
537
  - Before the source is approved, `import_leads` and `confirm_lead_list` are
@@ -922,7 +938,7 @@ user-facing lead review. The visible response must include:
922
938
  usable prospects per post, and use/discard decision.
923
939
  - `Sample leads` with 3-5 representative `Name — Title, Company` rows
924
940
  - `Tradeoff`
925
- - `Open artifact: lead-review.md`
941
+ - `Watch link: {watchUrl}` when the campaign shell exists
926
942
 
927
943
  The first sentence of the visible decision must make the actual choice clear:
928
944
  `I recommend {primary source} using {exact filter/source recipe}. The runner-up
@@ -948,9 +964,9 @@ fresh, high-density posts when available, sample engagers, show fit rate, then
948
964
  state how many additional posts could be added/scraped if that first sample is
949
965
  good but volume is low.
950
966
 
951
- Keep discarded paths, full sample rows, and `lead-sample.json` details in
952
- artifacts. Do not show raw filesystem paths unless links cannot be created or
953
- the user asks.
967
+ Keep discarded paths and full sample rows in the campaign/source decision
968
+ context. In explicit debug/UAT runs they may also be copied into
969
+ `lead-sample.json`. Do not show raw filesystem paths unless the user asks.
954
970
 
955
971
  For supplied profile CSVs and existing lead lists, `lead-review.md` must not
956
972
  describe a generic TAM estimate or pretend the rows came from Sales Nav/Prospeo
@@ -60,10 +60,11 @@ Approvals only feel safe when the user can see what they are approving. Before
60
60
  any approve/revise question, show the relevant decision in plain language. For a
61
61
  brief approval, render the brief itself, not just a direction summary.
62
62
 
63
- Every approval should also give the user a way to inspect the source artifact.
64
- After the readable inline content, include an `Open artifacts:` line with links
65
- or plain paths to the files behind the decision. The artifact links are a backup
66
- for inspection, not a replacement for showing the content in chat.
63
+ Every approval should also give the user a way to inspect the live campaign.
64
+ After the readable inline content, include a `Watch link:` line when a campaign
65
+ shell exists. Local artifacts are optional debug/UAT diagnostics only; do not
66
+ surface `Open artifact:` links, file paths, or local draft filenames in normal
67
+ customer runs.
67
68
 
68
69
  This applies especially to message approvals. Never ask someone to approve a
69
70
  message they cannot see. Show the subject, tokenized template, a filled sample
@@ -138,9 +139,10 @@ because the campaign state is what the lead source, filters, and messages will
138
139
  build from. I’ll show you the draft next so you can approve it or change it.
139
140
  ```
140
141
 
141
- CampaignOffer state is canonical; disk artifacts are a debug trail. Keep the
142
- diagnostics for inspection, and all 14 disk artifacts remain as debug outputs,
143
- but resume, gating, and handoff read campaign state first.
142
+ CampaignOffer state and the watch link are canonical. Disk artifacts are
143
+ optional debug/UAT diagnostics. Normal customer runs should read, resume, gate,
144
+ and hand off from campaign state first, and should not expose local draft files
145
+ unless the user asks for them.
144
146
 
145
147
  Good opening:
146
148
 
@@ -1,7 +1,13 @@
1
1
  {
2
2
  "version": "v2",
3
3
  "workflow": "create-campaign-v2",
4
- "principle": "CampaignOffer state is canonical from the first brief onward. The flow still writes the 14 disk artifacts as a debug trail, but resume, gating, and handoff read campaign state first. Start from user intake, create a watchable campaign shell with a v1 brief, attach source/search state to that CampaignOffer, import the bounded review batch before post-import fit/message scouts, save rubrics and an approved message template, then queue the 10-row cascade and hand off to settings/sequence/start.",
4
+ "principle": "CampaignOffer state and the watch link are canonical from the first brief onward. Disk artifacts are optional debug/UAT diagnostics, not the normal customer surface. Resume, gating, and handoff read campaign state first. Start from user intake, create a watchable campaign shell with a v1 brief, update currentStep before major visible work, attach source/search state to that CampaignOffer, import the bounded review batch before post-import fit/message scouts, save rubrics and an approved message template, then queue the 10-row cascade and hand off to settings/sequence/start.",
5
+ "artifactPolicy": {
6
+ "normalCustomerPath": "Use CampaignOffer state, MCP responses, provider search state, and campaign table rows. Do not create, read, link, or surface local draft files unless debug/UAT mode is explicit or the user asks for them.",
7
+ "debugArtifactsAreOptional": true,
8
+ "requiredArtifactsApplyWhen": "legacy resume, fixture validation, or explicit debug/UAT mode only",
9
+ "customerFacingAccess": "Watch link and live campaign currentStep"
10
+ },
5
11
  "commitGateChoices": [
6
12
  "approve",
7
13
  "revise-brief",
@@ -211,7 +217,7 @@
211
217
  "target": "create-campaign-brief"
212
218
  },
213
219
  {
214
- "action": "render_brief_preview_before_artifact_write",
220
+ "action": "render_brief_preview_before_debug_artifact_write",
215
221
  "requiredVisibleContent": [
216
222
  "Campaign brief",
217
223
  "Decision",
@@ -224,20 +230,21 @@
224
230
  "What happens next"
225
231
  ],
226
232
  "mustRunBefore": [
227
- "start_background_artifact_writer",
233
+ "optional_debug_artifact_writer",
228
234
  "Bash",
229
235
  "mkdir"
230
236
  ],
231
- "chatRenderRule": "After synthesizing the brief, render the approval-ready brief in chat before any visible local folder creation, file write, or artifact copy. The user should see useful brief content before local persistence chrome. Do not ask the user to approve a hidden artifact."
237
+ "chatRenderRule": "After synthesizing the brief, render the approval-ready brief in chat before any optional local folder creation, file write, or artifact copy. Normal customer runs should not create local draft files here. The user should see useful brief content and live campaign state, not local persistence chrome. Do not ask the user to approve a hidden artifact."
232
238
  },
233
239
  {
234
- "action": "start_background_artifact_writer",
240
+ "action": "optional_debug_artifact_writer",
235
241
  "artifact": "brief.md",
236
- "mode": "sidecar_when_host_supports_background_agents",
242
+ "mode": "debug_or_uat_only",
243
+ "shouldNotRunInNormalCustomerPath": true,
237
244
  "shouldNotBlockMainThread": true,
238
245
  "allowedToRunWhileUserReviewsInlineBrief": true,
239
- "fallback": "If no background writer is available, write brief.md synchronously only after the approval-ready brief is already visible in chat.",
240
- "chatRenderRule": "Do not surface folder/file-write progress in chat unless the write fails or the user asks. The main thread should keep the brief review moving while the sidecar persists brief.md."
246
+ "fallback": "If debug/UAT artifacts are requested and no background writer is available, write brief.md synchronously only after the approval-ready brief is already visible in chat. In normal customer runs, skip the write.",
247
+ "chatRenderRule": "Do not surface folder/file-write progress in chat unless the write fails or the user asks. The main thread should keep the brief review moving from campaign state."
241
248
  },
242
249
  {
243
250
  "action": "create_watchable_campaign_shell_with_v1_brief",
@@ -304,10 +311,7 @@
304
311
  }
305
312
  ],
306
313
  "requiredArtifacts": [],
307
- "producesArtifacts": [
308
- "brief.md",
309
- "campaign-shell.json"
310
- ],
314
+ "producesArtifacts": [],
311
315
  "allowedTools": [
312
316
  "get_subskill_prompt",
313
317
  "get_subskill_asset",
@@ -359,7 +363,8 @@
359
363
  "onEnter": [
360
364
  {
361
365
  "action": "show_brief_summary",
362
- "artifact": "brief.md"
366
+ "source": "campaignBrief",
367
+ "fallbackDebugArtifact": "brief.md"
363
368
  },
364
369
  {
365
370
  "action": "render_brief_approval_checkpoint",
@@ -378,10 +383,15 @@
378
383
  "then I will find good-fit leads"
379
384
  ],
380
385
  "minimumVisibleBriefDetail": "full_readable_brief_before_question",
381
- "requiredArtifactLinks": [
382
- "brief.md"
386
+ "requiredCampaignLinks": [
387
+ "watchUrl"
388
+ ],
389
+ "campaignLinkTiming": "before_approval_question",
390
+ "forbiddenNormalCustomerLinks": [
391
+ "brief.md",
392
+ "local draft path",
393
+ "Open artifact:"
383
394
  ],
384
- "artifactLinkTiming": "when_ready_before_downstream",
385
395
  "avoidQuestionWhenOnlyUsefulAnswerIs": "looks good"
386
396
  },
387
397
  {
@@ -397,13 +407,14 @@
397
407
  }
398
408
  },
399
409
  {
400
- "action": "ensure_background_artifact_ready",
410
+ "action": "optional_debug_artifact_sync",
401
411
  "artifacts": [
402
412
  "brief.md"
403
413
  ],
404
- "requiredBeforeTransition": "find-leads",
405
- "reconcileRule": "Before lead sourcing reads brief.md, verify the sidecar persisted the same brief shown in chat. If the sidecar is still running, wait quietly or finish the write synchronously; if it differs, reconcile to the visible approved brief.",
406
- "chatRenderRule": "Do not block the brief approval question on this step. Only mention artifact persistence if it fails or needs user action."
414
+ "debugOrUatOnly": true,
415
+ "requiredBeforeTransition": false,
416
+ "reconcileRule": "If debug/UAT artifacts are enabled, verify the sidecar persisted the same brief shown in chat. Normal customer lead sourcing reads CampaignOffer.campaignBrief, not brief.md.",
417
+ "chatRenderRule": "Do not block the brief approval question or find-leads transition on this step. Only mention artifact persistence if debug/UAT mode fails or the user asks."
407
418
  },
408
419
  {
409
420
  "action": "sync_approved_brief_to_campaign_shell",
@@ -415,7 +426,7 @@
415
426
  "when": "after_user_brief_confirmed_or_auto_continue",
416
427
  "fields": [
417
428
  "campaignBrief",
418
- "currentStep:create-offer"
429
+ "currentStep:pick-provider"
419
430
  ],
420
431
  "fallback": "If campaignId is missing from CampaignOffer state, stop; shell-first flow requires an existing campaign before sourcing leads.",
421
432
  "readsCampaignStateFirst": true,
@@ -425,9 +436,7 @@
425
436
  ]
426
437
  }
427
438
  ],
428
- "requiredArtifacts": [
429
- "brief.md"
430
- ],
439
+ "requiredArtifacts": [],
431
440
  "producesArtifacts": [],
432
441
  "allowedTools": [
433
442
  "AskUserQuestion",
@@ -467,6 +476,19 @@
467
476
  "id": "find-leads",
468
477
  "label": "Find leads",
469
478
  "onEnter": [
479
+ {
480
+ "action": "advance_watch_to_source_selection",
481
+ "tool": "update_campaign",
482
+ "requiredFields": [
483
+ "campaignId",
484
+ "currentStep"
485
+ ],
486
+ "requiredValues": {
487
+ "currentStep": "pick-provider"
488
+ },
489
+ "when": "before_source_scouts_or_provider_search",
490
+ "chatRenderRule": "Move the campaign watch view to Find Contacts before the main thread starts comparing source paths. Do not mention MCP or local artifacts."
491
+ },
470
492
  {
471
493
  "action": "render_find_leads_progress",
472
494
  "requiredVisibleContent": [
@@ -505,20 +527,18 @@
505
527
  "sourceScoutRule": "Shell-first flow requires the CampaignOffer campaignId from durable state. Pass campaignId as campaignOfferId into every provider prompt/search that can persist source state (`get_provider_prompt({ provider, campaignOfferId, confirmed: true })`, `search_signals`, `search_sales_nav`, `search_prospeo`) so the user can watch the selected source inside the campaign. The later import_leads call must use the same campaignOfferId. When several source lanes are credible, scout them independently, then write one primary source recommendation and any runner-up tradeoffs. Do not import, confirm, enrich, queue, or start leads during source discovery."
506
528
  },
507
529
  {
508
- "action": "write_artifacts",
530
+ "action": "optional_debug_artifacts",
509
531
  "artifacts": [
510
532
  "lead-review.md",
511
533
  "lead-sample.json"
512
- ]
534
+ ],
535
+ "debugOrUatOnly": true,
536
+ "shouldNotRunInNormalCustomerPath": true,
537
+ "chatRenderRule": "Do not create or surface local lead-review artifacts in normal customer runs. The main thread renders the source decision in chat and persists provider/source state to the campaign."
513
538
  }
514
539
  ],
515
- "requiredArtifacts": [
516
- "brief.md"
517
- ],
518
- "producesArtifacts": [
519
- "lead-review.md",
520
- "lead-sample.json"
521
- ],
540
+ "requiredArtifacts": [],
541
+ "producesArtifacts": [],
522
542
  "allowedTools": [
523
543
  "get_subskill_prompt",
524
544
  "get_subskill_asset",
@@ -1319,7 +1339,7 @@
1319
1339
  "Question: approve-message or revise-messaging?",
1320
1340
  "Recommendation:"
1321
1341
  ],
1322
- "chatRenderRule": "Show a slim rendered-Markdown message review, never a fenced code block. Use ## Message review plus indexed sections and short bullets. Show one fully filled sample message with no {{tokens}} before asking for approval. Include subject, sample message, why it should work, one concern or None, recommendation, and Open artifact: message-review.md. Keep tokenized template, token fill basis, rendered examples, good/bad token fill examples, validation notes, and message-validation.md details in artifacts. Do not show plain filesystem paths unless links cannot be created.",
1342
+ "chatRenderRule": "Show a slim rendered-Markdown message review, never a fenced code block. Use ## Message review plus indexed sections and short bullets. Show one fully filled sample message with no {{tokens}} before asking for approval. Include subject, sample message, why it should work, one concern or None, recommendation, and Watch link when a campaign shell exists. Keep tokenized template, token fill basis, rendered examples, good/bad token fill examples, validation notes, and message-validation.md details in campaign state or optional debug artifacts. Do not show plain filesystem paths unless the user asks.",
1323
1343
  "allowedRecommendations": [
1324
1344
  "approve-message",
1325
1345
  "revise-messaging"
@@ -5,10 +5,11 @@ runs do not route through `approval-packet`, `commit-gate`, or `atomic-mint`.
5
5
  Load this file only when resuming a compatibility run that already has those
6
6
  debug artifacts.
7
7
 
8
- CampaignOffer state is canonical; disk artifacts are a debug trail. All 14 disk
9
- artifacts remain as debug outputs, but resume, gating, and handoff read campaign
10
- state first. In new runs, the live campaign object appears after the short brief,
11
- not after this approval packet.
8
+ CampaignOffer state and the watch link are canonical. Disk artifacts are
9
+ optional debug/UAT diagnostics, and normal customer runs should not expose local
10
+ draft files. Resume, gating, and handoff read campaign state first. In new runs,
11
+ the live campaign object appears after the short brief, not after this approval
12
+ packet.
12
13
 
13
14
  ## Purpose
14
15
 
@@ -1,8 +1,9 @@
1
1
  # Filter Leads
2
2
 
3
- CampaignOffer state is canonical; disk artifacts are a debug trail. All 14 disk
4
- artifacts remain as debug outputs, but resume, gating, and handoff read campaign
5
- state first. Filter design may use the debug sample, but the active rubric save
3
+ CampaignOffer state and the watch link are canonical. Disk artifacts are
4
+ optional debug/UAT diagnostics, and normal customer runs should not expose local
5
+ draft files. Resume, gating, and handoff read campaign state first. Filter design
6
+ may use the live lead sample or optional debug sample, but the active rubric save
6
7
  is `save_rubrics({ campaignOfferId, leadScoringRubrics }) after the campaign
7
8
  table exists`.
8
9
 
@@ -14,10 +14,11 @@ that decision — UI and Claude greenlight — and the skill must handle both
14
14
  cleanly, including the case where one channel has already started the
15
15
  campaign before the other arrives.
16
16
 
17
- CampaignOffer state is canonical; disk artifacts are a debug trail. All 14 disk
18
- artifacts remain as debug outputs, but resume, gating, and handoff read campaign
19
- state first. At this point, `workflowTableId` is the campaign table, while
20
- `selectedLeadListId` remains the source list that produced the review batch.
17
+ CampaignOffer state and the watch link are canonical. Disk artifacts are
18
+ optional debug/UAT diagnostics, and normal customer runs should not expose local
19
+ draft files. Resume, gating, and handoff read campaign state first. At this
20
+ point, `workflowTableId` is the campaign table, while `selectedLeadListId`
21
+ remains the source list that produced the review batch.
21
22
 
22
23
  ## Step 16 Setup
23
24
 
@@ -6,9 +6,9 @@ Step 13.
6
6
 
7
7
  ## Principle
8
8
 
9
- CampaignOffer state is canonical; disk artifacts are a debug trail. All 14 disk
10
- artifacts remain as debug outputs, but resume, gating, and handoff read campaign
11
- state first.
9
+ CampaignOffer state and the watch link are canonical. Disk artifacts are
10
+ optional debug/UAT diagnostics, and normal customer runs should not expose local
11
+ draft files. Resume, gating, and handoff read campaign state first.
12
12
 
13
13
  Bounded review-batch sourcing + import happens after the existing campaign
14
14
  shell has the selected source attached with `campaignOfferId`. It happens before
@@ -6,8 +6,9 @@ message direction hold up against real preview evidence.
6
6
 
7
7
  ## Primary Contract
8
8
 
9
- - CampaignOffer state is canonical; disk artifacts are a debug trail.
10
- - validation/debug artifacts are not durable campaign state.
9
+ - CampaignOffer state and the watch link are canonical.
10
+ - validation/debug artifacts are optional debug/UAT diagnostics, not durable campaign state.
11
+ - normal customer runs should not expose local draft files.
11
12
  - resume and handoff read campaign state before debug files.
12
13
  - `CampaignOffer.campaignBrief` is the durable Phase 83 thesis input;
13
14
  `brief.md` is its debug copy
@@ -4,9 +4,10 @@ This reference governs how create-campaign-v2 surfaces the watch link in the
4
4
  shell-first flow. Load it before showing the link and on every resume where the
5
5
  link needs to be re-surfaced.
6
6
 
7
- CampaignOffer state is canonical; disk artifacts are a debug trail. All 14 disk
8
- artifacts remain as debug outputs, but resume, gating, and handoff read campaign
9
- state first.
7
+ CampaignOffer state and the watch link are canonical. Disk artifacts are
8
+ optional debug/UAT diagnostics; normal customer runs should not create, link, or
9
+ surface local draft files unless the user explicitly asks for them. Resume,
10
+ gating, and handoff read campaign state first.
10
11
 
11
12
  ## Plumbing Reuse
12
13
 
@@ -61,8 +62,9 @@ Stop before `save_rubrics` and recover the missing signed URL first.
61
62
 
62
63
  ## Step Orientation
63
64
 
64
- After the shell exists, re-surface the same watch link only when it helps orient
65
- the user after a meaningful step change:
65
+ After the shell exists, the main thread must update `currentStep` before each
66
+ meaningful visible stage, then re-surface the same watch link only when it helps
67
+ orient the user after a meaningful step change:
66
68
 
67
69
  - source selected: the campaign should point at the primary provider step
68
70
  - rubrics saved: the campaign should show filter/rubric state
@@ -8,10 +8,11 @@ visibility: internal
8
8
 
9
9
  This is the tail detail extracted from the main create-campaign-v2 SKILL.md to keep the entry prompt slim. The agent loads this on-demand BEFORE entering the auto-execute or validate-sample steps. Follow this verbatim.
10
10
 
11
- CampaignOffer state is canonical; disk artifacts are a debug trail. All 14 disk
12
- artifacts remain as debug outputs, but resume, gating, and handoff read campaign
13
- state first. selectedLeadListId remains the source list; workflowTableId is the
14
- campaign table.
11
+ CampaignOffer state and the watch link are canonical. Disk artifacts are
12
+ optional debug/UAT diagnostics; normal customer runs should not expose local
13
+ draft files. Resume, gating, and handoff read campaign state first.
14
+ selectedLeadListId remains the source list; workflowTableId is the campaign
15
+ table.
15
16
 
16
17
  ## MANDATORY TOOL ORDER (read this BEFORE any tail step)
17
18
 
@@ -87,9 +87,9 @@ The kickoff doc is the resume surface. Re-open it before repeating discovery wor
87
87
  explorer agents installed from the same canonical Sellable agent registry.
88
88
  Launch every credible lane in the same assistant message so Claude Code can
89
89
  run them concurrently/background:
90
- - `./.claude/agents/source-scout-linkedin-engagement.md`
91
- - `./.claude/agents/source-scout-sales-nav.md`
92
- - `./.claude/agents/source-scout-prospeo-contact.md`
90
+ - `~/.claude/agents/source-scout-linkedin-engagement.md`
91
+ - `~/.claude/agents/source-scout-sales-nav.md`
92
+ - `~/.claude/agents/source-scout-prospeo-contact.md`
93
93
  - These Claude agents must have explicit Sellable MCP tool allowlists and must
94
94
  load the matching provider prompt before searching. They are optional
95
95
  acceleration: if the names are absent, do not mention the missing install or