@sellable/mcp 0.1.0

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.
Files changed (200) hide show
  1. package/.claude-plugin/plugin.json +12 -0
  2. package/.mcp.json +9 -0
  3. package/README.md +355 -0
  4. package/dist/api.d.ts +21 -0
  5. package/dist/api.js +73 -0
  6. package/dist/auth.d.ts +60 -0
  7. package/dist/auth.js +246 -0
  8. package/dist/engage-memory.d.ts +63 -0
  9. package/dist/engage-memory.js +354 -0
  10. package/dist/index-dev.d.ts +2 -0
  11. package/dist/index-dev.js +17 -0
  12. package/dist/index.d.ts +7 -0
  13. package/dist/index.js +8 -0
  14. package/dist/server.d.ts +1 -0
  15. package/dist/server.js +499 -0
  16. package/dist/skills.d.ts +11 -0
  17. package/dist/skills.js +97 -0
  18. package/dist/tools/auth.d.ts +30 -0
  19. package/dist/tools/auth.js +124 -0
  20. package/dist/tools/blueprint-commit.d.ts +174 -0
  21. package/dist/tools/blueprint-commit.js +286 -0
  22. package/dist/tools/bootstrap.d.ts +64 -0
  23. package/dist/tools/bootstrap.js +246 -0
  24. package/dist/tools/campaigns.d.ts +589 -0
  25. package/dist/tools/campaigns.js +892 -0
  26. package/dist/tools/cells.d.ts +58 -0
  27. package/dist/tools/cells.js +48 -0
  28. package/dist/tools/context.d.ts +88 -0
  29. package/dist/tools/context.js +271 -0
  30. package/dist/tools/csv-domains.d.ts +73 -0
  31. package/dist/tools/csv-domains.js +464 -0
  32. package/dist/tools/csv-linkedin.d.ts +102 -0
  33. package/dist/tools/csv-linkedin.js +712 -0
  34. package/dist/tools/direct-campaigns.d.ts +240 -0
  35. package/dist/tools/direct-campaigns.js +250 -0
  36. package/dist/tools/engage-bootstrap.d.ts +94 -0
  37. package/dist/tools/engage-bootstrap.js +205 -0
  38. package/dist/tools/engage-discovery.d.ts +78 -0
  39. package/dist/tools/engage-discovery.js +150 -0
  40. package/dist/tools/engage-memory.d.ts +181 -0
  41. package/dist/tools/engage-memory.js +143 -0
  42. package/dist/tools/engage-state.d.ts +72 -0
  43. package/dist/tools/engage-state.js +62 -0
  44. package/dist/tools/enrichment.d.ts +167 -0
  45. package/dist/tools/enrichment.js +174 -0
  46. package/dist/tools/flow-preflight.d.ts +68 -0
  47. package/dist/tools/flow-preflight.js +138 -0
  48. package/dist/tools/framework.d.ts +44 -0
  49. package/dist/tools/framework.js +153 -0
  50. package/dist/tools/interaction-mode.d.ts +27 -0
  51. package/dist/tools/interaction-mode.js +102 -0
  52. package/dist/tools/leads.d.ts +2417 -0
  53. package/dist/tools/leads.js +2307 -0
  54. package/dist/tools/linkedin.d.ts +210 -0
  55. package/dist/tools/linkedin.js +229 -0
  56. package/dist/tools/navigation.d.ts +91 -0
  57. package/dist/tools/navigation.js +381 -0
  58. package/dist/tools/one-off.d.ts +229 -0
  59. package/dist/tools/one-off.js +273 -0
  60. package/dist/tools/processing.d.ts +70 -0
  61. package/dist/tools/processing.js +56 -0
  62. package/dist/tools/prompts.d.ts +211 -0
  63. package/dist/tools/prompts.js +210 -0
  64. package/dist/tools/provider-preflight.d.ts +21 -0
  65. package/dist/tools/provider-preflight.js +59 -0
  66. package/dist/tools/readiness.d.ts +261 -0
  67. package/dist/tools/readiness.js +510 -0
  68. package/dist/tools/rows.d.ts +126 -0
  69. package/dist/tools/rows.js +105 -0
  70. package/dist/tools/rubrics.d.ts +497 -0
  71. package/dist/tools/rubrics.js +681 -0
  72. package/dist/tools/senders.d.ts +44 -0
  73. package/dist/tools/senders.js +69 -0
  74. package/dist/tools/sequencer.d.ts +127 -0
  75. package/dist/tools/sequencer.js +194 -0
  76. package/dist/tools/tables.d.ts +35 -0
  77. package/dist/tools/tables.js +36 -0
  78. package/dist/tools/verify-row.d.ts +36 -0
  79. package/dist/tools/verify-row.js +38 -0
  80. package/dist/tools/workspaces.d.ts +140 -0
  81. package/dist/tools/workspaces.js +139 -0
  82. package/dist/utils/workspace-root.d.ts +1 -0
  83. package/dist/utils/workspace-root.js +39 -0
  84. package/package.json +46 -0
  85. package/skills/building-gtm-tables/SKILL.md +216 -0
  86. package/skills/building-gtm-tables/core/auto-execute.yaml +19 -0
  87. package/skills/building-gtm-tables/core/blueprint-schema.json +72 -0
  88. package/skills/building-gtm-tables/references/brief-to-blueprint.md +334 -0
  89. package/skills/building-gtm-tables/references/column-type-catalog.md +318 -0
  90. package/skills/building-gtm-tables/references/common-blueprints.fixtures.ts +199 -0
  91. package/skills/building-gtm-tables/references/common-blueprints.md +44 -0
  92. package/skills/building-gtm-tables/references/failure-taxonomy.md +197 -0
  93. package/skills/building-gtm-tables/references/uat-seed-prompts.md +37 -0
  94. package/skills/building-gtm-tables/references/verify-loop.md +74 -0
  95. package/skills/campaign-messages/SKILL.md +173 -0
  96. package/skills/campaign-messages/flow.v1.json +75 -0
  97. package/skills/craft-message/SKILL.md +401 -0
  98. package/skills/create-campaign/ARCHITECTURE.md +232 -0
  99. package/skills/create-campaign/DISCUSS.md +296 -0
  100. package/skills/create-campaign/FLOW_ASCII.md +240 -0
  101. package/skills/create-campaign/HOST-PARITY-CHECKLIST.md +49 -0
  102. package/skills/create-campaign/README.md +142 -0
  103. package/skills/create-campaign/SKILL.md +286 -0
  104. package/skills/create-campaign/context/README.md +67 -0
  105. package/skills/create-campaign/context/_TEMPLATE.md +12 -0
  106. package/skills/create-campaign/context/context.md +35 -0
  107. package/skills/create-campaign/context/learnings.md +16 -0
  108. package/skills/create-campaign/context/registry.json +19 -0
  109. package/skills/create-campaign/core/flow.v1.json +217 -0
  110. package/skills/create-campaign/core/policy.md +191 -0
  111. package/skills/create-campaign/core/providers/apollo.json +35 -0
  112. package/skills/create-campaign/core/providers/prospeo.json +34 -0
  113. package/skills/create-campaign/core/providers/registry.json +31 -0
  114. package/skills/create-campaign/core/providers/sales-nav.json +37 -0
  115. package/skills/create-campaign/core/providers/signal-discovery.json +42 -0
  116. package/skills/create-campaign/references/brief-template.md +64 -0
  117. package/skills/create-campaign/references/campaign-quality.md +84 -0
  118. package/skills/create-campaign/references/copy-calibration-examples.md +120 -0
  119. package/skills/create-campaign/references/offer-patterns.md +108 -0
  120. package/skills/create-campaign/references/provider-selection-strategy.md +212 -0
  121. package/skills/create-campaign/references/question-examples.md +167 -0
  122. package/skills/create-campaign/references/token-fill-examples.md +81 -0
  123. package/skills/create-campaign-brief/ARCHITECTURE.md +72 -0
  124. package/skills/create-campaign-brief/DISCUSS.md +64 -0
  125. package/skills/create-campaign-brief/README.md +176 -0
  126. package/skills/create-campaign-brief/SKILL.md +537 -0
  127. package/skills/create-campaign-brief/references/brief-synthesis-rules.md +100 -0
  128. package/skills/create-campaign-brief/references/brief-template.md +220 -0
  129. package/skills/create-campaign-brief/references/campaign-idea-options.md +30 -0
  130. package/skills/create-campaign-brief/references/copy-appendix-template.md +62 -0
  131. package/skills/create-campaign-brief/references/draft-lifecycle.md +23 -0
  132. package/skills/create-campaign-brief/references/examples/MANIFEST.json +89 -0
  133. package/skills/create-campaign-brief/references/examples/briefs/clover.md +223 -0
  134. package/skills/create-campaign-brief/references/examples/briefs/galley.md +222 -0
  135. package/skills/create-campaign-brief/references/examples/briefs/gelee.md +220 -0
  136. package/skills/create-campaign-brief/references/examples/briefs/hey-digital.md +234 -0
  137. package/skills/create-campaign-brief/references/examples/briefs/persona.md +231 -0
  138. package/skills/create-campaign-brief/references/examples/briefs/revvix.md +220 -0
  139. package/skills/create-campaign-brief/references/examples/briefs/sellable-dev.md +220 -0
  140. package/skills/create-campaign-brief/references/examples/briefs/superposition.md +233 -0
  141. package/skills/create-campaign-brief/references/examples/briefs/superpower.md +219 -0
  142. package/skills/create-campaign-brief/references/examples/briefs/westpark-villas.md +220 -0
  143. package/skills/create-campaign-brief/references/icp-lock-question-bank.md +43 -0
  144. package/skills/create-campaign-brief/references/messaging-inputs.md +58 -0
  145. package/skills/create-campaign-brief/references/output-acceptance-rubric.md +62 -0
  146. package/skills/create-campaign-brief/references/phase75-active-runtime-message-pack.md +248 -0
  147. package/skills/create-campaign-brief/references/phase75-canonical-brief-template.md +319 -0
  148. package/skills/create-campaign-brief/references/phase75-good-brief-and-messaging-examples.md +445 -0
  149. package/skills/create-campaign-brief/references/quick-research-protocol.md +39 -0
  150. package/skills/create-campaign-brief/references/reference-sheet-protocol.md +60 -0
  151. package/skills/create-campaign-brief/references/zero-shot-iteration-rules.md +66 -0
  152. package/skills/create-campaign-v2/SKILL.md +1619 -0
  153. package/skills/create-campaign-v2/core/auto-execute.README.md +219 -0
  154. package/skills/create-campaign-v2/core/auto-execute.yaml +121 -0
  155. package/skills/create-campaign-v2/core/flow.v2.json +1643 -0
  156. package/skills/create-campaign-v2/core/policy.md +82 -0
  157. package/skills/create-campaign-v2/references/ai-tells.md +253 -0
  158. package/skills/create-campaign-v2/references/approval-gate-framing.md +346 -0
  159. package/skills/create-campaign-v2/references/draft-lifecycle.md +110 -0
  160. package/skills/create-campaign-v2/references/escalation-ladder.md +119 -0
  161. package/skills/create-campaign-v2/references/filter-leads.md +495 -0
  162. package/skills/create-campaign-v2/references/final-handoff-contract.md +176 -0
  163. package/skills/create-campaign-v2/references/gold-standard-message-examples.md +394 -0
  164. package/skills/create-campaign-v2/references/gold-standard-message-patterns.md +314 -0
  165. package/skills/create-campaign-v2/references/gold-standard-message-validation-example.md +212 -0
  166. package/skills/create-campaign-v2/references/lead-validation-preview.md +172 -0
  167. package/skills/create-campaign-v2/references/parallel-critique-protocol.md +368 -0
  168. package/skills/create-campaign-v2/references/sample-validation-loop.md +289 -0
  169. package/skills/create-campaign-v2/references/step-13-import-leads.md +151 -0
  170. package/skills/create-campaign-v2/references/step-15-re-cascade.md +90 -0
  171. package/skills/create-campaign-v2/references/thomas-revision-filters.md +521 -0
  172. package/skills/create-campaign-v2/references/thomas-variant-selection.md +202 -0
  173. package/skills/create-campaign-v2/references/tier-routing-matrix.md +66 -0
  174. package/skills/create-campaign-v2/references/validation-criteria.md +367 -0
  175. package/skills/create-campaign-v2/references/watch-link-handoff.md +106 -0
  176. package/skills/create-campaign-v2-validation/SKILL.md +296 -0
  177. package/skills/create-post/SKILL.md +1308 -0
  178. package/skills/create-rubric/SKILL.md +251 -0
  179. package/skills/engage/SKILL.md +549 -0
  180. package/skills/engage/core/README.md +23 -0
  181. package/skills/engage/core/proven-searches.json +11 -0
  182. package/skills/engage/core/style-guide.template.md +47 -0
  183. package/skills/engage/core/tracked-people.json +10 -0
  184. package/skills/enrich-prospects/SKILL.md +97 -0
  185. package/skills/find-leads/SKILL.md +467 -0
  186. package/skills/generate-messages/SKILL.md +2361 -0
  187. package/skills/interview/SKILL.md +132 -0
  188. package/skills/interview/core/ENGAGE_STYLE_GUIDE.template.md +54 -0
  189. package/skills/interview/core/ICP.template.md +54 -0
  190. package/skills/interview/core/VOICE_PROFILE.template.md +101 -0
  191. package/skills/providers/apollo.md +520 -0
  192. package/skills/providers/prospeo.md +398 -0
  193. package/skills/providers/sales-nav.md +372 -0
  194. package/skills/providers/signal-discovery.md +495 -0
  195. package/skills/research/SKILL.md +258 -0
  196. package/skills/research/config.json +9 -0
  197. package/skills/research/override.md +13 -0
  198. package/skills/research-prospect/SKILL.md +99 -0
  199. package/skills/research-sender/SKILL.md +158 -0
  200. package/skills/workflow-sequences/SKILL.md +85 -0
@@ -0,0 +1,219 @@
1
+ # Autonomous Tail Configuration
2
+
3
+ This file narrates `auto-execute.yaml`. The YAML is the source of truth; this
4
+ README explains intent, tuning guidance, and how each knob affects the
5
+ Plan 85-02 autonomous tail.
6
+
7
+ ## When this file is loaded
8
+
9
+ The skill reads `auto-execute.yaml` exactly once, at the start of the
10
+ autonomous tail (Step 13, `auto-execute-leads`). All subsequent steps (14
11
+ validate-sample, 15 auto-execute-messaging, 16 awaiting-user-greenlight)
12
+ read the already-parsed config; they do not re-load the YAML mid-run.
13
+
14
+ Config values are NOT written to DB. They live on the skill side and
15
+ influence tool arguments (e.g. `importLimit` flows into `import_leads`
16
+ `targetLeadCount` arg, `sampleSize` flows into the first N rows pulled from
17
+ the imported review batch for validation).
18
+
19
+ ## Sections
20
+
21
+ ### `import`
22
+
23
+ - **`importLimit`** — Review-batch size imported in Step 13. The tail MUST
24
+ NOT exceed this cap before the user reviews the first batch and explicitly
25
+ approves expansion. If the user wants 250 leads, run a later expansion step;
26
+ do not spend credits on all 250 during the default approval tail.
27
+ - **`provider`** — Inherited from the Phase 84 commit decision (saved in
28
+ the committed brief / campaign metadata). Present here so the tail can
29
+ narrate which provider it's running against; it does NOT override the
30
+ committed provider.
31
+
32
+ ### `sample`
33
+
34
+ - **`sampleSize`** — How many rows the validation loop pulls from the
35
+ imported review batch. In v2 this matches the review-batch cap
36
+ (default 25), so the user sees enough real rows to judge the campaign
37
+ without spending credits on hundreds more.
38
+ - **`minProjectedPass`** — Passing-message floor required before handoff.
39
+ The default requires 5 passing examples from the 25-row review batch.
40
+ Math:
41
+ ```text
42
+ projectedPass = round(passInSample / sampleSize * importLimit)
43
+ ```
44
+ With defaults (sampleSize=25, importLimit=25), `projectedPass` equals
45
+ the actual review-batch pass count. 5 passing rows is exactly at the
46
+ floor.
47
+ - **`maxRevisionRounds`** — Hard cap before escalating to the user. A
48
+ revision round is one full sample pass that triggered brief revision
49
+ and retried. On stale resume the counter does NOT reset.
50
+
51
+ ### `messaging`
52
+
53
+ - **`tokenContract`** — `strict` rejects unresolved/unsupported tokens
54
+ before handing the review batch to the user. `relaxed` logs warnings but
55
+ proceeds.
56
+ Default `strict` because live campaign state shouldn't ship messages
57
+ with unresolved templating.
58
+ - **`critique.enabled`** — Plan 85-03 feature flag for the message
59
+ critique pass. Plan 85-02 reads the flag but never flips it; it
60
+ stays false by default. Only flip to `true` after dry-running the
61
+ critique protocol against a real sample and confirming the token
62
+ contract still holds on the rewritten output. See
63
+ `references/parallel-critique-protocol.md` for the full protocol.
64
+ - **`critique.sampleSize`** — Hard cap on the number of messages sent
65
+ through parallel critics. Bounded on purpose so cost stays
66
+ predictable whether the cohort is 50 or 500. Defaults to 5.
67
+ - **`critique.budgetUsdCap`** — Total dollar cap across critics +
68
+ synthesis for a single critique pass. Tripping the cap HALTS
69
+ critique for the remaining sample and continues the plain tail
70
+ (Step 15 plain path). The trip is logged.
71
+ - **`critique.perCriticTimeoutSeconds`** — Per-critic timeout. A
72
+ critic that blows past it is treated as "no opinion" and synthesis
73
+ proceeds with the remaining voices. Never blocks the tail.
74
+ - **`critique.totalTimeoutSeconds`** — Total critique-pass timeout.
75
+ Blown cap → tail falls back to the plain generated message for that
76
+ row. Never blocks the tail.
77
+ - **`critique.critics`** — Three fixed critic groups (targeting, copy,
78
+ voice). Each critic returns structured JSON the synthesis step can
79
+ merge. Do NOT add free-form critics; stay on the three groups.
80
+ - **`critique.synthesis.enforceFinalizerPass`** — When `true`, the
81
+ synthesizer re-runs the Phase 84 finalizer pass on its rewrite.
82
+ This is the last guardrail against critic-introduced token drift.
83
+ Default stays `true`.
84
+ - **`critique.opus.enabled`** — Flag gating Opus / craft-message
85
+ usage. Opus is reserved for the highest-value subset only. Stays
86
+ off by default; flip on only when the targeting critic flags a
87
+ high-priority row and budget allows.
88
+ - **`critique.opus.maxMessagesPerPass`** — Hard cap on the number of
89
+ rows that can be escalated to Opus per critique pass. Defaults to 2.
90
+ - **`critique.opus.budgetUsdCap`** — Dollar ceiling for the Opus
91
+ subset, independent of the overall critique budget. Opus trip halts
92
+ Opus for this pass only; non-Opus critique continues.
93
+ - **`critique.rejectOnFakeProof`** — When `true`, any critic rewrite
94
+ that introduces invented proof (metric, logo, customer, funding
95
+ detail) is rejected and the plain message is persisted. Default
96
+ `true`.
97
+ - **`critique.rejectOnUnsupportedToken`** — When `true`, any rewrite
98
+ that introduces a token not declared in the brief is rejected. A
99
+ proposed new token may be surfaced for operator review but does
100
+ NOT appear in the persisted rewrite. Default `true`.
101
+
102
+ ### `handoff`
103
+
104
+ - **`autoStart`** — HARD-CODED `false` in v2. The autonomous tail never
105
+ calls `start_campaign` on its own. The value is exposed here for
106
+ clarity so future calibration doesn't accidentally enable it.
107
+ - **`orientation`** — One-line user-facing string surfaced in Step 16
108
+ with the watch link. Keep it short and actionable. The dual greenlight
109
+ channel (UI button or Claude reply) is documented in
110
+ `references/final-handoff-contract.md`.
111
+
112
+ ### `retry`
113
+
114
+ - **`sameToolSameError`** — Cap on same-tool-same-error retries before
115
+ escalating. Prevents thrash when (e.g.) enrichment 5xx's repeatedly on
116
+ the same sample.
117
+
118
+ ### `logging`
119
+
120
+ - **`logEveryThresholdTrip`** — When true, every threshold trip
121
+ (projectedPass floor, retry cap, revision cap, hard-fail) gets a log
122
+ line. Keep this on until we've tuned the YAML over 3-5 real runs.
123
+
124
+ ## Tuning After Live Runs
125
+
126
+ After 3-5 real campaigns complete the tail, review the threshold-trip
127
+ logs and adjust:
128
+
129
+ - `importLimit` higher only if users consistently ask for larger review
130
+ batches and credit spend is acceptable.
131
+ - `sampleSize` higher if a 25-row review batch is not enough to judge
132
+ quality for a specific market.
133
+ - `minProjectedPass` lower only if fewer than 5 passing examples is still
134
+ enough for a confident user decision.
135
+ - `maxRevisionRounds` should rarely change; 3 is already generous. If
136
+ brief revision is hitting the cap often, the brief template upstream
137
+ is the real problem, not this knob.
138
+ - `sameToolSameError` higher only if a flaky provider is otherwise
139
+ healthy. Prefer fixing the provider.
140
+
141
+ ## What This File Does NOT Control
142
+
143
+ - Tool-level auth / workspace scoping — lives in MCP auth config.
144
+ - The commit gate choices — locked by
145
+ `references/approval-gate-framing.md` and `core/flow.v2.json`.
146
+ - Watch link surfacing — locked by `references/watch-link-handoff.md`.
147
+ - The final-handoff contract (UI vs Claude greenlight) — locked by
148
+ `references/final-handoff-contract.md`.
149
+
150
+ ## Related References
151
+
152
+ - `references/sample-validation-loop.md` — the brief-vs-list diagnosis
153
+ decision tree for Step 14.
154
+ - `references/escalation-ladder.md` — the ordered stop-and-escalate
155
+ conditions that short-circuit the tail.
156
+ - `references/final-handoff-contract.md` — the dual greenlight channel
157
+ that takes Step 16 into a running campaign.
158
+ - `references/parallel-critique-protocol.md` — Plan 85-03 Step 15
159
+ critique protocol: bounded sample, parallel critics, synthesis,
160
+ budget caps, and token-contract enforcement.
161
+ - `references/thomas-variant-selection.md` — Plan 85-03 rules for
162
+ which rows earn an Opus / craft-message rewrite.
163
+ - `references/thomas-revision-filters.md` — the positive-target and
164
+ automatic-revision filters that gate any critique rewrite.
165
+
166
+ ## Flipping `messaging.critique.enabled` to true (dry-run protocol)
167
+
168
+ The critique flag stays `false` by default because an enabled critique
169
+ pass invents new tokens + costs ~$2 per sample pass — both of which
170
+ can silently degrade a live campaign if the protocol isn't solid. Plan
171
+ 85-02 ships the protocol; flipping the default requires dry-run
172
+ evidence.
173
+
174
+ ### Required evidence before flipping default
175
+
176
+ 1. **Quality lift on ≥ 1 non-trivial archetype.** Run critique-on vs
177
+ critique-off on the same fixture (e.g. Ambral enterprise horizontal
178
+ SaaS, where voice drift is expected to be more pronounced than
179
+ IncidentFox founder-peer mode). Compare winner messages via the
180
+ Filter 8 catalog check + a human read. Critique must produce
181
+ measurably better output on ≥ 60% of the bounded sample.
182
+
183
+ 2. **Budget cap holds.** Total critique pass cost must stay under
184
+ `messaging.critique.budgetUsdCap` (default $2.00) across 3
185
+ consecutive dry-run passes. One overshoot trips the budget cap
186
+ correctly but signals the archetype is critique-expensive;
187
+ re-evaluate per archetype.
188
+
189
+ 3. **Token contract finalizer passes on every synthesis output.** The
190
+ finalizer pass (Phase 84 token contract) is the last guardrail
191
+ against critic-introduced token drift. If any synthesis output
192
+ fails the finalizer in dry-run, the protocol is not safe to flip.
193
+
194
+ 4. **No regression on founder-peer archetypes.** IncidentFox +
195
+ Skillsync style voices must NOT degrade under critique. If critique
196
+ over-corrects a casually-written Block 1 into a structured
197
+ value-prop, critique is wrong for those archetypes — decide
198
+ per-archetype, not globally.
199
+
200
+ ### Dry-run process
201
+
202
+ 1. Keep `messaging.critique.enabled: false` at the YAML default.
203
+ 2. On a single VPS UAT run, set `SELLABLE_CREATE_CAMPAIGN_V2_UAT_CRITIQUE=on`
204
+ (runner override) to exercise critique without touching the default.
205
+ 3. Compare results with `SELLABLE_CREATE_CAMPAIGN_V2_UAT_CRITIQUE=off`
206
+ on the same fixture.
207
+ 4. Record delta in the UAT artifact run folder.
208
+ 5. After 3 clean dry-runs across ≥ 2 archetypes, flip the YAML default.
209
+
210
+ The fixture runner matrix mode (`critique=matrix`) already runs both
211
+ flavors per fixture — use it for the dry-run comparison.
212
+
213
+ ### Why the flag exists as a flag
214
+
215
+ Critique is a **net quality lift** in theory. In practice it depends
216
+ on the archetype's voice — critique helps structured enterprise voice,
217
+ can hurt casually-founder voice, and flips unpredictably with budget.
218
+ Shipping critique default-off with an explicit enable path prevents
219
+ silent regression on live campaigns.
@@ -0,0 +1,121 @@
1
+ # Autonomous tail configuration for create-campaign-v2 (Plan 85-02)
2
+ #
3
+ # This file controls the post-commit review-batch tail that runs AFTER the
4
+ # commit gate succeeds and the campaign has been atomically minted. The tail
5
+ # does NOT call `start_campaign` on its own and does NOT spend enrichment
6
+ # credits on the full cohort before the user has reviewed a real sample.
7
+ #
8
+ # Tune after 3-5 real campaign runs. Log every threshold trip so tuning is
9
+ # evidence-based, not guess-based. See `auto-execute.README.md` for a
10
+ # narrative walkthrough and `references/sample-validation-loop.md` for the
11
+ # decision tree.
12
+
13
+ version: 1
14
+
15
+ import:
16
+ # Initial review batch imported in Step 13 before the sample validation
17
+ # loop. Import + enrichment must never exceed this cap before the user
18
+ # reviews the sample and explicitly asks to expand.
19
+ importLimit: 25
20
+ # Provider is inherited from the Phase 84 commit decision (not re-selected
21
+ # here). The autonomous tail reads the committed value rather than
22
+ # overriding it.
23
+ provider: prospeo
24
+
25
+ sample:
26
+ # Rows pulled from the imported cohort for the validation loop. In v2 this
27
+ # equals the review-batch cap so the user sees a meaningful first batch
28
+ # without spending credits on hundreds of rows.
29
+ sampleSize: 25
30
+ # Projected first-batch passing count required to proceed to sample
31
+ # messaging. This is not approval to scale the full source list.
32
+ # projectedPass = round(passInSample / sampleSize * importLimit).
33
+ minProjectedPass: 5
34
+ # Hard cap on revision loops before escalating to the user. On a stale
35
+ # resume the counter does NOT reset — the 3-round cap holds across
36
+ # sessions.
37
+ maxRevisionRounds: 3
38
+
39
+ messaging:
40
+ # strict = reject any unresolved or unsupported tokens before scaling.
41
+ # relaxed = warn but allow. Default is strict for live campaign state.
42
+ tokenContract: strict
43
+ critique:
44
+ # Feature flag for the message critique pass shipped in Plan 85-03.
45
+ # Stays false by default. Flip to true only after the critique
46
+ # protocol has been dry-run against a real sample.
47
+ enabled: false
48
+ # Hard cap on the subset of messages sent through parallel critics.
49
+ # Critique runs on a bounded sample (NOT the full cohort), so the
50
+ # cost stays predictable whether the cohort is 50 or 500.
51
+ sampleSize: 5
52
+ # Total dollar cap for a single critique pass (sum across critics +
53
+ # synthesis). Trip halts critique for the remaining sample and
54
+ # continues the plain tail. Tripping is logged for tuning.
55
+ budgetUsdCap: 2.0
56
+ # Per-critic timeout. A critic that blows past this is treated as
57
+ # "no opinion" and the synthesis proceeds with the remaining voices.
58
+ # Does NOT block the tail.
59
+ perCriticTimeoutSeconds: 30
60
+ # Total critique-pass timeout. If the full parallel group has not
61
+ # returned by this cap, the tail falls back to the plain generated
62
+ # message. Does NOT block the tail.
63
+ totalTimeoutSeconds: 120
64
+ # Three fixed critic groups. Each group returns structured JSON.
65
+ # Synthesis merges opinions back into ONE rewritten message that
66
+ # obeys the token contract verbatim.
67
+ critics:
68
+ - id: targeting
69
+ label: Targeting critic
70
+ focus: signal-lead-fit-and-buyer-intent
71
+ - id: copy
72
+ label: Copy critic
73
+ focus: sentence-shape-proof-cta
74
+ - id: voice
75
+ label: Voice critic
76
+ focus: tone-motion-alignment
77
+ synthesis:
78
+ # Model tier used to merge critic JSON into the final rewrite.
79
+ # The rewrite MUST pass the token contract finalizer pass before
80
+ # being persisted — synthesis never ships a message that invents
81
+ # tokens, proof, or personalization.
82
+ model: synthesizer
83
+ # When true, the synthesis step is required to re-run the Phase
84
+ # 84 finalizer pass on its output. The finalizer is the last
85
+ # guardrail against critic-introduced token drift.
86
+ enforceFinalizerPass: true
87
+ opus:
88
+ # Opus / craft-message is reserved for the highest-value subset
89
+ # only. Count is a hard cap per critique pass. Selection lives
90
+ # in references/thomas-variant-selection.md.
91
+ enabled: false
92
+ maxMessagesPerPass: 2
93
+ # Dollar ceiling for the Opus subset, separate from the overall
94
+ # critique budget. Opus trip halts Opus for this pass only; the
95
+ # non-Opus critique continues.
96
+ budgetUsdCap: 1.5
97
+ rejectOnFakeProof: true
98
+ rejectOnUnsupportedToken: true
99
+
100
+ handoff:
101
+ # HARD-CODED false in v2. The autonomous tail never calls
102
+ # `start_campaign` on its own. Present here for clarity so future tuning
103
+ # doesn't accidentally flip it.
104
+ autoStart: false
105
+ # Orientation surfaced in Step 16 ("awaiting-user-greenlight") along with
106
+ # the watch link. Keep this short and user-facing.
107
+ orientation: >-
108
+ Review the first 25 enriched leads and messages. If they look good,
109
+ approve/start this review batch or ask Claude to expand the next batch
110
+ before spending credits on more leads.
111
+
112
+ retry:
113
+ # Stop after N repeats of the same tool hitting the same error. Prevents
114
+ # tight thrash loops (e.g. enrichment repeatedly 5xx'ing on the same
115
+ # sample).
116
+ sameToolSameError: 2
117
+
118
+ logging:
119
+ # When true, every threshold trip (projectedPass floor, retry cap,
120
+ # revision cap, hard-fail) is logged for later calibration.
121
+ logEveryThresholdTrip: true