@sellable/mcp 0.1.150 → 0.1.151

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.
@@ -40,8 +40,8 @@ the branch input.
40
40
  `get_subskill_prompt({ subskillName: "generate-messages", offset, limit })`
41
41
  until `hasMore` is false.
42
42
 
43
- 2. Use that prompt as the drafting contract. The create-campaign safety gate may
44
- be used as an approval checklist, but it does not replace the long prompt.
43
+ 2. Use that prompt as the drafting contract. Do not use create-campaign
44
+ safety/checklist instructions as a substitute for the full prompt.
45
45
  3. Draft only from the campaign brief, selected source context, and imported
46
46
  review-batch rows supplied by the parent.
47
47
  4. Keep the work provisional until the user chooses `Use Template` in Messages.
@@ -134,6 +134,7 @@ export interface PostFindLeadsScoutRegistryResponse {
134
134
  forbiddenStarts: string[];
135
135
  runtimeProofTransport: string;
136
136
  runtimeProofRequiredFields: string[];
137
+ promptRequired?: string;
137
138
  basisFields: string[];
138
139
  compactOutputFields: string[];
139
140
  reusePolicy?: string;
@@ -315,6 +315,7 @@ export function getPostFindLeadsScoutRegistry() {
315
315
  "basis.workflowTableId",
316
316
  "basis.reviewBatchRowHash or basis.reviewBatchRowIds",
317
317
  ],
318
+ promptRequired: 'get_subskill_prompt({ subskillName: "generate-messages", offset, limit }) until hasMore=false',
318
319
  basisFields: [
319
320
  "campaign revision or updatedAt",
320
321
  "brief hash",
@@ -341,7 +342,7 @@ export function getPostFindLeadsScoutRegistry() {
341
342
  usage: {
342
343
  codex: "After confirm_lead_list imports a non-empty bounded review batch and get_rows_minimal proves rows for workflowTableId, ask the filter-choice question immediately. Do not spawn returned post-lead scout names before that question. Once the user answers, spawn Message Draft Builder from the same campaign/table basis. If the user chooses filters, also spawn Lead Fit Builder, move to Filter Rules, save rubrics, then keep the browser on Filter Leads while the message recommendation is reviewed. If filters are skipped, move to Messages/message review.",
343
344
  claude: "After confirm_lead_list imports a non-empty bounded review batch and get_rows_minimal proves rows for workflowTableId, ask the filter-choice question immediately. Do not invoke returned post-lead Task/Agent names before that question. Once the user answers, invoke Message Draft Builder from the same campaign/table basis. If the user chooses filters, also invoke Lead Fit Builder, move to Filter Rules, save rubrics, then keep the browser on Filter Leads while the message recommendation is reviewed. If filters are skipped, move to Messages/message review.",
344
- parentThreadRule: "Named agents are optional acceleration. If they are absent, do not customer-surface install status; the main thread still orchestrates filter and message branches from CampaignOffer state, selected source state, workflowTableId, and imported review-batch rows. 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, filter references, or the full generate-messages prompt before it. Message drafting starts after the filter-choice answer, must load the full generate-messages prompt, must read live campaign/review-batch state through scoped MCP/product tools, and must reject mismatched selectedLeadListId/workflowTableId/campaign/workspace input. On the filter path, keep the browser on Filter Rules then Filter Leads while the background message agent prepares the template; enrichment/filtering/Generate Message cells wait for template approval. On the skip path, move to Messages/message review and wait for template approval before enrichment. Template approval in the parent thread uses the create-campaign-v2 message-review safety gate; do not load the full generate-messages prompt for approval-only review. Do not automatically rerun Message Draft Builder after filters/enrichment finish; show the initial draft by default and offer an enriched rewrite only with explicit user opt-in.",
345
+ parentThreadRule: 'Named agents are optional acceleration, but message drafting is not optional. If post-find-leads-message-scout is available, run it as the background Message Draft Builder after the filter-choice answer. If it is absent, do not customer-surface install status; the main thread must execute the same message branch from CampaignOffer state, selected source state, workflowTableId, and imported review-batch rows. 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, filter references, or the full generate-messages prompt before it. Message drafting starts after the filter-choice answer, must load get_subskill_prompt({ subskillName: "generate-messages", offset, limit }) until hasMore=false, must read live campaign/review-batch state through scoped MCP/product tools, and must reject mismatched selectedLeadListId/workflowTableId/campaign/workspace input. On the filter path, keep the browser on Filter Rules then Filter Leads while the background message agent prepares the template; enrichment/filtering/Generate Message cells wait for template approval. On the skip path, move to Messages/message review and wait for template approval before enrichment. Do not render message review from checklist or shortcut instructions; message review requires a messageDraftRecommendation whose basis proves the full generate-messages prompt ran for the current campaign/table/review batch. Do not automatically rerun Message Draft Builder after filters/enrichment finish; show the initial draft by default and offer an enriched rewrite only with explicit user opt-in.',
345
346
  },
346
347
  };
347
348
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sellable/mcp",
3
- "version": "0.1.150",
3
+ "version": "0.1.151",
4
4
  "type": "module",
5
5
  "description": "Sellable MCP server for Claude Code and Codex campaign workflows",
6
6
  "main": "dist/index.js",
@@ -640,12 +640,12 @@ updates.
640
640
  available. The worker and parent-thread fallback must load the full
641
641
  long-form `generate-messages` prompt with
642
642
  `mcp__sellable__get_subskill_prompt({ subskillName: "generate-messages", offset, limit })`
643
- until `hasMore=false`. The create-campaign message-review safety gate is a
644
- supplemental approval checklist, not a replacement for the long prompt. Use
645
- campaign state, campaign brief content, selected source state, and imported
646
- review-batch rows as the source of truth; do not read stale local markdown
647
- such as `message-validation.md`, inspect the database directly, or synthesize
648
- local validation artifacts from general knowledge.
643
+ until `hasMore=false`. Message review requires Message Draft Builder output:
644
+ do not draft from a checklist, local markdown artifact, or parent-thread
645
+ intuition. Use campaign state, campaign brief content, selected source state, and
646
+ imported review-batch rows as the source of truth; do not read stale local
647
+ markdown such as `message-validation.md`, inspect the database directly, or
648
+ synthesize local validation artifacts from general knowledge.
649
649
  5. Create the campaign shell early with the v1 brief so the user can open the
650
650
  watch link and see useful setup state immediately. Import only the first
651
651
  bounded review batch after the source is attached to the campaign; do not
@@ -281,23 +281,18 @@ Lead Fit Builder persists production rubrics with `save_rubrics` when filters
281
281
  are enabled. It must not require `brief.md`, `lead-review.md`, or
282
282
  `lead-sample.json`.
283
283
 
284
- Message Draft Builder is `post-find-leads-message-scout`. It must load the full
285
- message prompt:
284
+ Run `post-find-leads-message-scout` as the background Message Draft Builder
285
+ whenever the host exposes it. It must load:
286
286
 
287
287
  ```text
288
288
  get_subskill_prompt({ subskillName: "generate-messages", offset, limit }) until hasMore=false
289
289
  ```
290
290
 
291
- It may also load the supplemental approval checklist:
292
-
293
- ```text
294
- get_subskill_asset({ subskillName: "create-campaign-v2", assetPath: "references/message-review-safety-gate.md" })
295
- ```
296
-
297
- Do not load the full `generate-messages` prompt in the create-campaign parent
298
- thread unless you are executing the parent-thread fallback for the actual
299
- message-draft branch. Parent-thread template approval uses only the compact
300
- message-review safety gate.
291
+ No shortcut message instructions are valid. If the host cannot launch the
292
+ agent, the parent fallback must run the same full prompt from live campaign
293
+ state before drafting. Do not render message review until
294
+ `messageDraftRecommendation` proves current campaign/table/review-batch
295
+ `generate-messages` basis.
301
296
 
302
297
  ## Hard Gates
303
298
 
@@ -320,7 +315,6 @@ Load references only when needed:
320
315
  - `references/watch-guide-narration.md` for watched-step narration.
321
316
  - `references/lead-validation-preview.md` for legacy/debug preview shapes.
322
317
  - `references/filter-leads.md` for rubric design and `save_rubrics` rules.
323
- - `references/message-review-safety-gate.md` for final message approval checks.
324
318
  - `references/step-13-import-leads.md` before review-batch import.
325
319
  - `references/sample-validation-loop.md` before review-batch validation.
326
320
  - `references/final-handoff-contract.md` for Settings, sender, sequence, and
@@ -66,9 +66,7 @@
66
66
  "filter": [
67
67
  "references/filter-leads.md"
68
68
  ],
69
- "message": [
70
- "references/message-review-safety-gate.md"
71
- ],
69
+ "message": [],
72
70
  "tail": [
73
71
  "references/sample-validation-loop.md",
74
72
  "references/step-15-re-cascade.md",
@@ -890,8 +888,8 @@
890
888
  "action": "run_or_reconcile_message_draft_builder",
891
889
  "target": "post-find-leads-message-scout",
892
890
  "toolCallRequiredBeforeDraft": [
893
- "get_subskill_prompt({ subskillName: \"generate-messages\", offset, limit }) until hasMore=false",
894
- "parent approval uses references/message-review-safety-gate.md only"
891
+ "run background post-find-leads-message-scout when available",
892
+ "get_subskill_prompt({ subskillName: \"generate-messages\", offset, limit }) until hasMore=false"
895
893
  ],
896
894
  "stateSource": "campaignBrief, source, selectedLeadListId, workflowTableId, review-batch row ids/hash",
897
895
  "outputState": "messageDraftRecommendation"
@@ -905,7 +903,6 @@
905
903
  ],
906
904
  "allowedTools": [
907
905
  "get_subskill_prompt",
908
- "get_subskill_asset",
909
906
  "get_campaign",
910
907
  "get_rows_minimal",
911
908
  "update_campaign",
@@ -913,9 +910,9 @@
913
910
  "request_user_input"
914
911
  ],
915
912
  "toolRules": [
916
- "Message Draft Builder loads full get_subskill_prompt({ subskillName: \"generate-messages\" }) from live state. Parent approval uses message-review-safety-gate only.",
913
+ "Message Draft Builder must run as the background post-find-leads-message-scout when the host exposes it. If the host cannot launch the agent, the parent-thread fallback must execute the same full get_subskill_prompt({ subskillName: \"generate-messages\" }) from live state before drafting.",
917
914
  "Do not use brief.md, lead-review.md, or lead-sample.json as required live state; those files are optional debug context only.",
918
- "The compact messageDraftRecommendation must return templateRecommendation, tokenFillRules, renderedSample, concerns, status, basisToken, outputAt, outputHash, and error or retry detail.",
915
+ "The messageDraftRecommendation must return templateRecommendation, tokenFillRules, renderedSample, concerns, status, basisToken, outputAt, outputHash, and error or retry detail.",
919
916
  "If campaign/source/table/review-batch basis does not match, classify the output stale or blocked."
920
917
  ],
921
918
  "doNotAllow": [
@@ -1005,7 +1002,6 @@
1005
1002
  "allowedTools": [
1006
1003
  "AskUserQuestion",
1007
1004
  "request_user_input",
1008
- "get_subskill_asset",
1009
1005
  "update_campaign_brief",
1010
1006
  "update_campaign",
1011
1007
  "get_rows_minimal",
@@ -33,14 +33,13 @@ Before showing the commit gate, the draft directory must contain all of:
33
33
  - `message-validation.md`
34
34
  - `approval-packet.md`
35
35
 
36
- The current run must also have retrieved message-generation rules before
37
- `message-validation.md`, `approval-packet.md`, or the commit gate is written. In
38
- `create-campaign-v2`, use the compact
39
- `references/message-review-safety-gate.md` asset or the embedded
40
- `post-find-leads-message-scout` prompt. Do not load the full long-form
41
- `generate-messages` subskill for the hosted campaign launch path. If the message
42
- template was written directly from memory or planning artifacts, do not show the
43
- commit gate; route back to message generation.
36
+ The current run must also have retrieved the full message-generation rules
37
+ before `message-validation.md`, `approval-packet.md`, or the commit gate is
38
+ written. In `create-campaign-v2`, use the embedded
39
+ `post-find-leads-message-scout` prompt or load the full long-form
40
+ `generate-messages` subskill. If the message template was written directly from
41
+ memory, checklist instructions, or planning artifacts, do not show the commit
42
+ gate; route back to message generation.
44
43
 
45
44
  `rubric.json` is optional but strongly preferred — when missing, derive it from
46
45
  `lead-filter.md` in the atomic mint step.
@@ -1,162 +0,0 @@
1
- # Message Review Safety Gate
2
-
3
- Use this reference for `create-campaign-v2` message review only in two cases:
4
- when these rules are embedded inside the `post-find-leads-message-scout` agent
5
- prompt, or when the host cannot launch that agent and the parent thread needs a
6
- self-contained safety gate. It is the campaign-launch subset of
7
- `generate-messages`: enough to prove a truthful first-send message, rendered
8
- token examples, and an approval decision without loading the full long-form
9
- message-generation prompt into the main Claude/Codex thread.
10
-
11
- In a normal installed Claude/Codex session, the message scout owns these rules.
12
- The parent-thread asset is a compatibility safety path, not a fast-mode prompt
13
- or a shortcut. Do not load the full `generate-messages` subskill in this flow. If
14
- the safety gate is missing a needed campaign-specific rule or the draft fails
15
- quality gates, stop at `revise-messaging` with the exact missing rule/failure
16
- instead of pulling the long prompt into the main thread.
17
-
18
- ## Required Workflow
19
-
20
- 1. Read the live campaign basis: campaign id, campaign revision or
21
- `campaignUpdatedAt`, campaign brief content, selected source decision,
22
- selected lead list/source state, `workflowTableId`, imported review-batch
23
- row ids/hash, and any saved rubric/filter summary supplied by the parent.
24
- 2. Pick 2-3 sample rows from the imported review-batch rows, preferring rows
25
- that pass the saved rubrics or are likely to pass. Do not invent new rows.
26
- 3. Build the message from the approved campaign brief, selected source context,
27
- sampled rows, and explicit user answers. Use only proof that appears in that
28
- live basis. Unsupported reply-rate, meeting-rate, ROI, revenue, and
29
- customer-logo claims are blocked.
30
- 4. Return a compact message recommendation to the parent thread. Do not write
31
- local markdown/json artifacts in normal customer runs; emit debug artifacts
32
- only when the parent explicitly asks for debug/UAT output.
33
- 5. Render the customer-facing message review in chat before asking for approval.
34
- Keep chat lightweight: show the tokenized template and one strong rendered
35
- good-fill example only. Do not print the token notes table, omit/fallback
36
- example, or bad-fill analysis in chat unless the user explicitly asks.
37
- After approval, the parent persists template, token rules, fallback guidance,
38
- and bad-fill avoidance notes into campaign state with `update_campaign_brief`.
39
- 6. Ask exactly `approve-message` or `revise-messaging`. Do not import, queue,
40
- attach sequence, or start before `approve-message`.
41
-
42
- ## Required Message Recommendation Sections
43
-
44
- - `Status`
45
- - `Mode`
46
- - `Lead Sample Basis`
47
- - `Strongest Reply Reason`
48
- - `Campaign Element Pool`
49
- - `Gold Standard Strategy Map`
50
- - `Current Campaign Translation`
51
- - `Token Fill Rules`
52
- - `Token Adherence Table`
53
- - `Angle Drafts`
54
- - `Kill / Combine Review`
55
- - `Finalizer Pass`
56
- - `Gold-Standard Quality Gate`
57
- - `Skeptical Prospect Review`
58
- - `Winner Gate`
59
- - `Selected Winner`
60
- - `Findings`
61
- - `Recommendation`
62
-
63
- Keep this recommendation concise. It should prove the reasoning path, not
64
- reproduce the full framework.
65
-
66
- ## Message Quality Gates
67
-
68
- - The selected winner must be one first outbound send only. No post-accept DM,
69
- follow-up, cadence branch, or sequence copy.
70
- - The message must explain what the product is and what it does in plain
71
- language before asking for a call.
72
- - The message must use a truthful buyer-side reply reason, not just sender
73
- biography.
74
- - If using a template, include at least one supported `{{token}}` and show a
75
- complete rendered good-fill example and complete rendered omit/fallback
76
- example.
77
- - Do not use internal tokens such as `{{profile_signal}}` in customer-facing
78
- copy.
79
- - Do not put bracketed instructions in the message body, such as `[ROW_BRIDGE]`,
80
- `[insert]`, `[generated]`, or any instruction for a later model to fill.
81
- - Optional row-specific personalization must be grounded in a row field or
82
- omitted entirely. Never use generic filler like "your work" or "your team."
83
- - Engagement-source personalization is a special case, not the default opener.
84
- Do not write `saw you {{engagement_context}} on {{post_context}}`, `saw you
85
- reacted to`, `saw you engaging with`, or equivalent source-citation copy as a
86
- default hook. Only refer to the prospect's engagement when the line is
87
- self-aware and low-certainty, for example `not sure if this is too specific,
88
- but the [topic] thread felt close enough to send`. Otherwise omit the
89
- engagement signal and use role/company/problem context.
90
- - Subject lines should be short, buyer-relevant, and specific. Avoid
91
- `quick question`, `demo`, `founder call`, sender names, and generic `outbound`.
92
- - If the message is plausible but not ready to send, set
93
- `Recommendation: revise-messaging`.
94
-
95
- ## Internal Message Recommendation
96
-
97
- The message scout or parent safety gate should still produce complete internal
98
- review data: token-fill rules, one rendered omit/fallback example, and bad-fill
99
- avoidance notes. This data is for campaign-brief persistence and safety checks,
100
- not for the default chat approval packet.
101
-
102
- ## Customer-Facing Message Review
103
-
104
- Render this in chat before asking. Use Markdown structure so the approval target
105
- is visually scannable and low-overhead:
106
-
107
- ````markdown
108
- Status: message-review
109
-
110
- ## Message Template
111
-
112
- **Subject**
113
-
114
- ```text
115
- {{tokenized_subject}}
116
- ```
117
-
118
- **Body**
119
-
120
- ```text
121
- {{tokenized_message_body}}
122
- ```
123
-
124
- ## Rendered Example
125
-
126
- ### Example
127
-
128
- Good token fill:
129
-
130
- ```text
131
- Subject: ...
132
-
133
- Hey First,
134
-
135
- ...
136
- ```
137
-
138
- ## Recommendation
139
-
140
- **My take:** ...
141
-
142
- **Suggested adjustment:** ...
143
-
144
- **Question:** approve-message or revise-messaging?
145
-
146
- **Recommendation:** approve-message
147
- ````
148
-
149
- Formatting requirements:
150
-
151
- - Put the tokenized template and rendered example in fenced `text` blocks
152
- so chat gives them a distinct background.
153
- - The chat example must contain a complete rendered subject + body, not a
154
- bullet list of token names or a single bridge-line fragment.
155
- - Do not show `Good omit / fallback`, `Bad fill to avoid`, or `Token Notes` in
156
- the default chat approval packet. Keep those in the internal recommendation
157
- and persist them to the campaign brief after approval.
158
- - Keep reasoning outside the code blocks so the blocks are easy to inspect and
159
- approve.
160
-
161
- `My take` and `Suggested adjustment` must be specific. The adjustment can be
162
- "approve as-is, or revise once to X if you want Y"; it must not be empty.