@synap-core/workspace-templates 0.36.0 → 0.38.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.
- package/README.md +2 -1
- package/capabilities/media-download.capability.json +16 -17
- package/capabilities/media-ffmpeg.capability.json +68 -1
- package/capabilities/media-transcribe.capability.json +2 -2
- package/capabilities/unipile-linkedin.capability.json +3 -3
- package/dist/index.js +269 -18
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/brand-library.yaml +17 -1
- package/src/crm-messages-cadence.template.test.ts +49 -7
- package/src/crm-rules-guidance.template.test.ts +156 -0
- package/src/crm.yaml +250 -45
- package/src/lifecycle-declarations.test.ts +6 -1
- package/src/templates.ts +252 -18
- package/src/unipile-linkedin-find-profile.test.ts +21 -5
package/src/templates.ts
CHANGED
|
@@ -2359,7 +2359,8 @@ const DATA = {
|
|
|
2359
2359
|
},
|
|
2360
2360
|
{
|
|
2361
2361
|
"key": "approved",
|
|
2362
|
-
"category": "done"
|
|
2362
|
+
"category": "done",
|
|
2363
|
+
"humanOnly": true
|
|
2363
2364
|
},
|
|
2364
2365
|
{
|
|
2365
2366
|
"key": "deprecated",
|
|
@@ -2382,7 +2383,8 @@ const DATA = {
|
|
|
2382
2383
|
"social",
|
|
2383
2384
|
"legal",
|
|
2384
2385
|
"editorial",
|
|
2385
|
-
"investor"
|
|
2386
|
+
"investor",
|
|
2387
|
+
"outreach"
|
|
2386
2388
|
],
|
|
2387
2389
|
"constraints": {
|
|
2388
2390
|
"defaultValue": "general"
|
|
@@ -2933,6 +2935,12 @@ const DATA = {
|
|
|
2933
2935
|
}
|
|
2934
2936
|
],
|
|
2935
2937
|
"entityLinks": [
|
|
2938
|
+
{
|
|
2939
|
+
"sourceProfileSlug": "brand-voice-guide",
|
|
2940
|
+
"targetProfileSlug": "brand-voice-guide",
|
|
2941
|
+
"type": "revises",
|
|
2942
|
+
"label": "Revises"
|
|
2943
|
+
},
|
|
2936
2944
|
{
|
|
2937
2945
|
"sourceProfileSlug": "brand-token-set",
|
|
2938
2946
|
"targetProfileSlug": "brand-color",
|
|
@@ -14210,6 +14218,113 @@ const DATA = {
|
|
|
14210
14218
|
"inputType": "textarea"
|
|
14211
14219
|
}
|
|
14212
14220
|
]
|
|
14221
|
+
},
|
|
14222
|
+
{
|
|
14223
|
+
"slug": "outreach-angle",
|
|
14224
|
+
"displayName": "Outreach angle",
|
|
14225
|
+
"icon": "compass",
|
|
14226
|
+
"color": "violet",
|
|
14227
|
+
"description": "One row of \"By kind of lead\": if the lead is X, lead with this angle, offer, proof, tone and channel. The first row that fits the lead wins; a person makes a row current.",
|
|
14228
|
+
"lifecycle": {
|
|
14229
|
+
"property": "angle-status",
|
|
14230
|
+
"options": [
|
|
14231
|
+
{
|
|
14232
|
+
"key": "draft",
|
|
14233
|
+
"category": "open"
|
|
14234
|
+
},
|
|
14235
|
+
{
|
|
14236
|
+
"key": "current",
|
|
14237
|
+
"category": "done",
|
|
14238
|
+
"humanOnly": true
|
|
14239
|
+
},
|
|
14240
|
+
{
|
|
14241
|
+
"key": "retired",
|
|
14242
|
+
"category": "lost",
|
|
14243
|
+
"humanOnly": true
|
|
14244
|
+
}
|
|
14245
|
+
]
|
|
14246
|
+
},
|
|
14247
|
+
"properties": [
|
|
14248
|
+
{
|
|
14249
|
+
"slug": "angle-status",
|
|
14250
|
+
"label": "Status",
|
|
14251
|
+
"valueType": "string",
|
|
14252
|
+
"inputType": "select",
|
|
14253
|
+
"enumValues": [
|
|
14254
|
+
"draft",
|
|
14255
|
+
"current",
|
|
14256
|
+
"retired"
|
|
14257
|
+
],
|
|
14258
|
+
"constraints": {
|
|
14259
|
+
"defaultValue": "draft"
|
|
14260
|
+
}
|
|
14261
|
+
},
|
|
14262
|
+
{
|
|
14263
|
+
"slug": "angle-if",
|
|
14264
|
+
"label": "If the lead",
|
|
14265
|
+
"valueType": "string",
|
|
14266
|
+
"inputType": "textarea",
|
|
14267
|
+
"placeholder": "e.g. Posted a small automation project on Codeur or Malt"
|
|
14268
|
+
},
|
|
14269
|
+
{
|
|
14270
|
+
"slug": "angle-audience",
|
|
14271
|
+
"label": "Audience",
|
|
14272
|
+
"valueType": "entity_id",
|
|
14273
|
+
"targetProfileSlug": "audience",
|
|
14274
|
+
"inputType": "entity_select"
|
|
14275
|
+
},
|
|
14276
|
+
{
|
|
14277
|
+
"slug": "angle-about-offer",
|
|
14278
|
+
"label": "About the offer",
|
|
14279
|
+
"valueType": "entity_id",
|
|
14280
|
+
"targetProfileSlug": "offer",
|
|
14281
|
+
"inputType": "entity_select"
|
|
14282
|
+
},
|
|
14283
|
+
{
|
|
14284
|
+
"slug": "angle-lead-with",
|
|
14285
|
+
"label": "Lead with",
|
|
14286
|
+
"valueType": "string",
|
|
14287
|
+
"inputType": "textarea"
|
|
14288
|
+
},
|
|
14289
|
+
{
|
|
14290
|
+
"slug": "angle-offer",
|
|
14291
|
+
"label": "Offer",
|
|
14292
|
+
"valueType": "string",
|
|
14293
|
+
"inputType": "textarea",
|
|
14294
|
+
"placeholder": "e.g. Fixed small set-up, tool costs listed apart"
|
|
14295
|
+
},
|
|
14296
|
+
{
|
|
14297
|
+
"slug": "angle-proof",
|
|
14298
|
+
"label": "Proof",
|
|
14299
|
+
"valueType": "string",
|
|
14300
|
+
"inputType": "textarea"
|
|
14301
|
+
},
|
|
14302
|
+
{
|
|
14303
|
+
"slug": "angle-avoid",
|
|
14304
|
+
"label": "Avoid",
|
|
14305
|
+
"valueType": "string",
|
|
14306
|
+
"inputType": "textarea"
|
|
14307
|
+
},
|
|
14308
|
+
{
|
|
14309
|
+
"slug": "angle-tone",
|
|
14310
|
+
"label": "Tone",
|
|
14311
|
+
"valueType": "string",
|
|
14312
|
+
"inputType": "text"
|
|
14313
|
+
},
|
|
14314
|
+
{
|
|
14315
|
+
"slug": "angle-channel",
|
|
14316
|
+
"label": "Channel",
|
|
14317
|
+
"valueType": "string",
|
|
14318
|
+
"inputType": "text",
|
|
14319
|
+
"placeholder": "e.g. LinkedIn, else email"
|
|
14320
|
+
},
|
|
14321
|
+
{
|
|
14322
|
+
"slug": "order",
|
|
14323
|
+
"label": "Order",
|
|
14324
|
+
"valueType": "number",
|
|
14325
|
+
"inputType": "number"
|
|
14326
|
+
}
|
|
14327
|
+
]
|
|
14213
14328
|
}
|
|
14214
14329
|
],
|
|
14215
14330
|
"entityLinks": [
|
|
@@ -14296,6 +14411,12 @@ const DATA = {
|
|
|
14296
14411
|
"targetProfileSlug": "audience",
|
|
14297
14412
|
"type": "targets",
|
|
14298
14413
|
"label": "Targets"
|
|
14414
|
+
},
|
|
14415
|
+
{
|
|
14416
|
+
"sourceProfileSlug": "outreach-angle",
|
|
14417
|
+
"targetProfileSlug": "outreach-angle",
|
|
14418
|
+
"type": "revises",
|
|
14419
|
+
"label": "Revises"
|
|
14299
14420
|
}
|
|
14300
14421
|
],
|
|
14301
14422
|
"views": [
|
|
@@ -15006,7 +15127,7 @@ const DATA = {
|
|
|
15006
15127
|
{
|
|
15007
15128
|
"name": "Draft a first message",
|
|
15008
15129
|
"description": "Draft one personal first message for a lead, citing its buying signal or a past exchange, in the person's language, as a proposed message in their channel for a person to approve; the agent never sends.",
|
|
15009
|
-
"goalTemplate": "Draft the first message to the lead {lead} on {channel}. READ: the lead's score fields (icpScore, buyingSignal, buyingSignalSource, qualificationNotes) as they are, never rescoring them; its channels, past messages and notes in the pod; and the outreach campaign given ({campaign}), if any: its value proposition and call to action are the angle. WHO: a person lead is written to directly; for a company lead, write to the person who decides there (from the pod, else its public decider), and when no decider is known ask the person who to write to. DRAFT: one first message on channel {channel}, in the campaign's angle when one is given. DRAFT RULES: each draft is one proposed message in the channel of the person it is written to, filed through the pod's send door: run messaging.send with to = that person's entity id (for a company lead, its decider: when that person is not in the pod, create them through the entity door with only their own fields, such as name, role and LinkedIn URL, never the company's website, domain or email), text = the message, and provider linkedin or email. Read their channel first (synap_get_channel, mode person) for what was already said. The pod files it for a person to review in that channel; it goes out only once they approve it. Never call a tool's own send verb (Unipile, Gmail), never create an outreach touch, a note or a task holding the message, and never use synap_capture for it. Never send. A LinkedIn message is drafted whatever their reach: the pod holds a draft to someone who is not a connection yet, shows it with the next step and lets it go out once they connect, so never hold a draft back for want of a connection. Draft it, then, in this order: (1) a person with no linkedinUrl: find their profile with linkedin_find_profile (their full name and company); on a match, propose its linkedinUrl and linkedinProviderId on the person for a person to approve; on none or several, ask the person to choose among its candidates (the process \"Find their LinkedIn\" does this for one lead). (2) Read their linkedinConnection, which only the pod writes (never set it or linkedinInvitedAt): connected, nothing more; none or not set, ask to connect with linkedin_send_invite (it refuses someone already connected or already invited: then nothing more); pending, the draft waits for them; ignored, draft by email instead when they have an email address. While the draft waits for them to connect, set the lead's nextAction to \"Wait for <name> to accept the LinkedIn request\" and its nextActionAt 7 days later. An email message needs none of this.
|
|
15130
|
+
"goalTemplate": "Draft the first message to the lead {lead} on {channel}. READ: the lead's score fields (icpScore, buyingSignal, buyingSignalSource, qualificationNotes) as they are, never rescoring them; its channels, past messages and notes in the pod; and the outreach campaign given ({campaign}), if any: its value proposition and call to action are the angle. WHO: a person lead is written to directly; for a company lead, write to the person who decides there (from the pod, else its public decider), and when no decider is known ask the person who to write to. DRAFT: one first message on channel {channel}, in the campaign's angle when one is given. DRAFT RULES: each draft is one proposed message in the channel of the person it is written to, filed through the pod's send door: run messaging.send with to = that person's entity id (for a company lead, its decider: when that person is not in the pod, create them through the entity door with only their own fields, such as name, role and LinkedIn URL, never the company's website, domain or email), text = the message, and provider linkedin or email. Read their channel first (synap_get_channel, mode person) for what was already said. The pod files it for a person to review in that channel; it goes out only once they approve it. Never call a tool's own send verb (Unipile, Gmail), never create an outreach touch, a note or a task holding the message, and never use synap_capture for it. Never send. A LinkedIn message is drafted whatever their reach: the pod holds a draft to someone who is not a connection yet, shows it with the next step and lets it go out once they connect, so never hold a draft back for want of a connection. Draft it, then, in this order: (1) a person with no linkedinUrl: find their profile with linkedin_find_profile (their full name and company); on a match, propose its linkedinUrl and linkedinProviderId on the person for a person to approve; on none or several, ask the person to choose among its candidates (the process \"Find their LinkedIn\" does this for one lead). (2) Read their linkedinConnection, which only the pod writes (never set it or linkedinInvitedAt): connected, nothing more; none or not set, ask to connect with linkedin_send_invite (it refuses someone already connected or already invited: then nothing more); pending, the draft waits for them; ignored, draft by email instead when they have an email address. While the draft waits for them to connect, set the lead's nextAction to \"Wait for <name> to accept the LinkedIn request\" and its nextActionAt 7 days later. An email message needs none of this. RULES: follow the rules this process follows, in order: Voice, then By kind of lead (the first row that fits the lead; a given campaign's angle comes first). A rule shown as not available is left out: say so. Draft one message only: a person reviews it in the channel, edits it if needed and approves it. NEXT ACTION: set the lead's nextAction to \"Send the first message to <name> on LinkedIn\" (\"Send the first message to <name> by email\" on email), naming the person written to, and its nextActionAt to today. Never move the lead's stage while drafting. SENT: once the message is sent, follow the cadence, so \"Follow up on leads in outreach\" drafts the next one. CADENCE: when a message is sent (a person approved its proposed message, so it is an outbound message in the channel), set its lead's lastContactedAt to the sent day, count the messages sent to the lead (the outbound messages in its channels, read with synap_get_channel mode person: for a company lead, the channels of the person written to there), and set the lead's next action: after the first message, nextAction \"Follow up with <name> if no reply\" and nextActionAt the sent day + 3 days; after the first follow-up, nextAction \"Follow up with <name> a last time if no reply\" and nextActionAt the sent day + 7 days; after the second follow-up, nextAction \"No reply after two follow-ups: nurture or drop <name>\" and nextActionAt the sent day + 7 days, and when that date passes with no reply, \"Follow up on leads in outreach\" proposes nurturing. Never a third follow-up. Propose moving a lead at new or researching to outreach through the status door, with its expected status. A reply stops the cadence: a reply is an inbound message after our last outbound one in the channel, and \"Follow up on leads in outreach\" reads it and proposes the next step.",
|
|
15010
15131
|
"subjectProfile": {
|
|
15011
15132
|
"profileSlug": "lead"
|
|
15012
15133
|
},
|
|
@@ -15041,6 +15162,22 @@ const DATA = {
|
|
|
15041
15162
|
],
|
|
15042
15163
|
"executor": "is-agent",
|
|
15043
15164
|
"status": "active",
|
|
15165
|
+
"guidance": [
|
|
15166
|
+
{
|
|
15167
|
+
"ref": "kind:brand-voice-guide",
|
|
15168
|
+
"label": "Voice",
|
|
15169
|
+
"where": {
|
|
15170
|
+
"voice-context": [
|
|
15171
|
+
"general",
|
|
15172
|
+
"outreach"
|
|
15173
|
+
]
|
|
15174
|
+
}
|
|
15175
|
+
},
|
|
15176
|
+
{
|
|
15177
|
+
"ref": "kind:outreach-angle",
|
|
15178
|
+
"label": "By kind of lead"
|
|
15179
|
+
}
|
|
15180
|
+
],
|
|
15044
15181
|
"grants": [
|
|
15045
15182
|
"entity.create"
|
|
15046
15183
|
],
|
|
@@ -15073,8 +15210,8 @@ const DATA = {
|
|
|
15073
15210
|
}
|
|
15074
15211
|
},
|
|
15075
15212
|
{
|
|
15076
|
-
"key": "first-message-
|
|
15077
|
-
"statement": "The message
|
|
15213
|
+
"key": "first-message-rules",
|
|
15214
|
+
"statement": "The message follows the rules this process follows, as its instructions showed them (the approved Voice, then the first By kind of lead row that fits the lead, or the campaign's angle when one was given).",
|
|
15078
15215
|
"check": {
|
|
15079
15216
|
"kind": "judge"
|
|
15080
15217
|
}
|
|
@@ -15111,10 +15248,10 @@ const DATA = {
|
|
|
15111
15248
|
},
|
|
15112
15249
|
{
|
|
15113
15250
|
"name": "Find their LinkedIn",
|
|
15114
|
-
"description": "Find one
|
|
15115
|
-
"goalTemplate": "Find the LinkedIn profile of
|
|
15251
|
+
"description": "Find one person's LinkedIn profile by their full name and, when known, their company, and propose its URL and member id on the person for a person to approve, or offer up to 5 candidates to choose from; nothing is sent. The person need not be a lead.",
|
|
15252
|
+
"goalTemplate": "Find the LinkedIn profile of {person}. WHO: the person themselves, whether or not they are a lead (a contact of a company lead is looked up as themselves). When they already have a linkedinUrl, say so and stop. COMPANY: use where they work when it is known (their own company field, else the company they work at); when none is known, search by their name alone. FIND: run linkedin_find_profile with their full name, their company when known, and the LinkedIn account unipile_list_accounts lists (when several are connected, ask the person which one reads). On a strict match, propose its linkedinUrl and linkedinProviderId on the person through the entity door, for a person to approve; never write them directly, and never set linkedinConnection or linkedinInvitedAt, which only the pod writes. On none, several, more results than it read, or a name-only search, ask the person to choose among its candidates (at most 5, each with its name, headline, location and profile URL) or to give the URL themselves, then propose the one chosen the same way. Never send a message or a connection request, never draft one, and never move a lead's stage.",
|
|
15116
15253
|
"subjectProfile": {
|
|
15117
|
-
"profileSlug": "
|
|
15254
|
+
"profileSlug": "person"
|
|
15118
15255
|
},
|
|
15119
15256
|
"activators": [
|
|
15120
15257
|
{
|
|
@@ -15124,9 +15261,9 @@ const DATA = {
|
|
|
15124
15261
|
],
|
|
15125
15262
|
"params": [
|
|
15126
15263
|
{
|
|
15127
|
-
"name": "
|
|
15264
|
+
"name": "person",
|
|
15128
15265
|
"type": "entity",
|
|
15129
|
-
"label": "
|
|
15266
|
+
"label": "Person",
|
|
15130
15267
|
"required": true
|
|
15131
15268
|
}
|
|
15132
15269
|
],
|
|
@@ -15140,18 +15277,18 @@ const DATA = {
|
|
|
15140
15277
|
"key": "find",
|
|
15141
15278
|
"name": "Find the profile",
|
|
15142
15279
|
"category": "started",
|
|
15143
|
-
"goal": "Run linkedin_find_profile for the
|
|
15280
|
+
"goal": "Run linkedin_find_profile for the person with their full name and company when known; on a strict match propose linkedinUrl and linkedinProviderId on the person, otherwise ask the person to choose among up to 5 candidates or give the URL.",
|
|
15144
15281
|
"criteria": [
|
|
15145
15282
|
{
|
|
15146
15283
|
"key": "find-linkedin-proposed",
|
|
15147
|
-
"statement": "The person's linkedinUrl and linkedinProviderId are proposed on them for a person to approve (a strict match, or the candidate the person chose), or the person was asked to choose among at most
|
|
15284
|
+
"statement": "The person's linkedinUrl and linkedinProviderId are proposed on them for a person to approve (a strict match, or the candidate the person chose), or the person was asked to choose among at most 5 candidates; nothing was written directly.",
|
|
15148
15285
|
"check": {
|
|
15149
15286
|
"kind": "judge"
|
|
15150
15287
|
}
|
|
15151
15288
|
},
|
|
15152
15289
|
{
|
|
15153
15290
|
"key": "find-linkedin-reader-only",
|
|
15154
|
-
"statement": "No message or connection request was sent or drafted, linkedinConnection and linkedinInvitedAt were not set, and
|
|
15291
|
+
"statement": "No message or connection request was sent or drafted, linkedinConnection and linkedinInvitedAt were not set, and no lead's stage was moved.",
|
|
15155
15292
|
"check": {
|
|
15156
15293
|
"kind": "judge"
|
|
15157
15294
|
}
|
|
@@ -15301,7 +15438,7 @@ const DATA = {
|
|
|
15301
15438
|
{
|
|
15302
15439
|
"name": "Follow up on leads in outreach",
|
|
15303
15440
|
"description": "Each weekday, read the channels of the leads in outreach; summarise a reply and propose the next step, or, when the follow-up is due with no reply, draft the next message in the angle of its outreach campaign as a proposed message for a person to approve; the agent never sends.",
|
|
15304
|
-
"goalTemplate": "Follow up on the leads in outreach. For each, read its channels (synap_get_channel, mode person: for a company lead, the channels of the person who decides there) and its notes. A REPLY is an inbound message after our last outbound one in a channel. With a reply, draft nothing: summarise it for a person; when they show interest, propose the next step (prepare the free estimate, \"Prepare a pre-sale estimate\", or book a meeting) and propose moving the lead to engaged; when they decline, propose nurturing or disqualified with their reason (in disqualificationReason). Unless you propose dropping them, write the next step on the lead as nextAction, one imperative line, and nextActionAt, the date they named or today. Never open a deal and never answer the reply yourself; a person does. With no reply, and only when the lead's next action date is today or past and no proposed message to it is still waiting, draft the next message, to the lead (for a company, the person who decides there) and in the angle of the lead's outreach campaign: follow its value proposition and call to action
|
|
15441
|
+
"goalTemplate": "Follow up on the leads in outreach. For each, read its channels (synap_get_channel, mode person: for a company lead, the channels of the person who decides there) and its notes. A REPLY is an inbound message after our last outbound one in a channel. With a reply, draft nothing: summarise it for a person; when they show interest, propose the next step (prepare the free estimate, \"Prepare a pre-sale estimate\", or book a meeting) and propose moving the lead to engaged; when they decline, propose nurturing or disqualified with their reason (in disqualificationReason). Unless you propose dropping them, write the next step on the lead as nextAction, one imperative line, and nextActionAt, the date they named or today. Never open a deal and never answer the reply yourself; a person does. With no reply, and only when the lead's next action date is today or past and no proposed message to it is still waiting, draft the next message, to the lead (for a company, the person who decides there) and in the angle of the lead's outreach campaign: follow its value proposition and call to action. With no campaign and no By kind of lead row that fits, ask the person which campaign. Draft at most two follow-ups per lead: a lead already sent two follow-ups gets no draft, never a third follow-up; when its last date passes in silence, propose moving it to nurturing through the status door, with its expected status. DRAFT RULES: each draft is one proposed message in the channel of the person it is written to, filed through the pod's send door: run messaging.send with to = that person's entity id (for a company lead, its decider: when that person is not in the pod, create them through the entity door with only their own fields, such as name, role and LinkedIn URL, never the company's website, domain or email), text = the message, and provider linkedin or email. Read their channel first (synap_get_channel, mode person) for what was already said. The pod files it for a person to review in that channel; it goes out only once they approve it. Never call a tool's own send verb (Unipile, Gmail), never create an outreach touch, a note or a task holding the message, and never use synap_capture for it. Never send. A LinkedIn message is drafted whatever their reach: the pod holds a draft to someone who is not a connection yet, shows it with the next step and lets it go out once they connect, so never hold a draft back for want of a connection. Draft it, then, in this order: (1) a person with no linkedinUrl: find their profile with linkedin_find_profile (their full name and company); on a match, propose its linkedinUrl and linkedinProviderId on the person for a person to approve; on none or several, ask the person to choose among its candidates (the process \"Find their LinkedIn\" does this for one lead). (2) Read their linkedinConnection, which only the pod writes (never set it or linkedinInvitedAt): connected, nothing more; none or not set, ask to connect with linkedin_send_invite (it refuses someone already connected or already invited: then nothing more); pending, the draft waits for them; ignored, draft by email instead when they have an email address. While the draft waits for them to connect, set the lead's nextAction to \"Wait for <name> to accept the LinkedIn request\" and its nextActionAt 7 days later. An email message needs none of this. RULES: follow the rules this process follows, in order: Voice, then By kind of lead (the first row that fits the lead; a given campaign's angle comes first). A rule shown as not available is left out: say so. For each draft, set the lead's `nextAction` to send it (e.g. \"Send the drafted message to Ana on LinkedIn\") and `nextActionAt` to today. The person reviews each proposed message in its channel, edits it if needed and approves it; the agent never sends. CADENCE: when a message is sent (a person approved its proposed message, so it is an outbound message in the channel), set its lead's lastContactedAt to the sent day, count the messages sent to the lead (the outbound messages in its channels, read with synap_get_channel mode person: for a company lead, the channels of the person written to there), and set the lead's next action: after the first message, nextAction \"Follow up with <name> if no reply\" and nextActionAt the sent day + 3 days; after the first follow-up, nextAction \"Follow up with <name> a last time if no reply\" and nextActionAt the sent day + 7 days; after the second follow-up, nextAction \"No reply after two follow-ups: nurture or drop <name>\" and nextActionAt the sent day + 7 days, and when that date passes with no reply, \"Follow up on leads in outreach\" proposes nurturing. Never a third follow-up. Propose moving a lead at new or researching to outreach through the status door, with its expected status. A reply stops the cadence: a reply is an inbound message after our last outbound one in the channel, and \"Follow up on leads in outreach\" reads it and proposes the next step.",
|
|
15305
15442
|
"subjectProfile": {
|
|
15306
15443
|
"profileSlug": "lead"
|
|
15307
15444
|
},
|
|
@@ -15319,6 +15456,22 @@ const DATA = {
|
|
|
15319
15456
|
],
|
|
15320
15457
|
"executor": "is-agent",
|
|
15321
15458
|
"status": "active",
|
|
15459
|
+
"guidance": [
|
|
15460
|
+
{
|
|
15461
|
+
"ref": "kind:brand-voice-guide",
|
|
15462
|
+
"label": "Voice",
|
|
15463
|
+
"where": {
|
|
15464
|
+
"voice-context": [
|
|
15465
|
+
"general",
|
|
15466
|
+
"outreach"
|
|
15467
|
+
]
|
|
15468
|
+
}
|
|
15469
|
+
},
|
|
15470
|
+
{
|
|
15471
|
+
"ref": "kind:outreach-angle",
|
|
15472
|
+
"label": "By kind of lead"
|
|
15473
|
+
}
|
|
15474
|
+
],
|
|
15322
15475
|
"expectedOutputs": [
|
|
15323
15476
|
{
|
|
15324
15477
|
"kind": "messaging",
|
|
@@ -15342,7 +15495,7 @@ const DATA = {
|
|
|
15342
15495
|
},
|
|
15343
15496
|
{
|
|
15344
15497
|
"key": "followup-angle",
|
|
15345
|
-
"statement": "Each draft follows the angle of the lead's outreach campaign and its call to action.",
|
|
15498
|
+
"statement": "Each draft follows the angle of the lead's outreach campaign and its call to action, or, with no campaign, the first By kind of lead row that fits the lead, and the approved Voice.",
|
|
15346
15499
|
"check": {
|
|
15347
15500
|
"kind": "judge"
|
|
15348
15501
|
}
|
|
@@ -15387,7 +15540,7 @@ const DATA = {
|
|
|
15387
15540
|
{
|
|
15388
15541
|
"name": "Personalized Outreach",
|
|
15389
15542
|
"description": "Run one outreach campaign — write the angle and its offer, pick the people, draft one personal first message each as a proposed message in their channel; a person approves the list, then approves each message, which the pod sends.",
|
|
15390
|
-
"goalTemplate": "Run this outreach campaign ({campaign}) on {channel}; each stage moves its status. If its type is not outreach, stop and say so. PREPARE: write the target audience, the value proposition and the call to action. Pick the people to reach from the pod (and public sources when the pod has too few), resolving each one before creating anything, link each as a member of the campaign with the lead role (lead source cold-outreach when it has none), and for each draft one first message to that person in this campaign's angle
|
|
15543
|
+
"goalTemplate": "Run this outreach campaign ({campaign}) on {channel}; each stage moves its status. If its type is not outreach, stop and say so. PREPARE: write the target audience, the value proposition and the call to action (from the By kind of lead row that fits the audience, when one does). Pick the people to reach from the pod (and public sources when the pod has too few), resolving each one before creating anything, link each as a member of the campaign with the lead role (lead source cold-outreach when it has none), and for each draft one first message to that person in this campaign's angle. DRAFT RULES: each draft is one proposed message in the channel of the person it is written to, filed through the pod's send door: run messaging.send with to = that person's entity id (for a company lead, its decider: when that person is not in the pod, create them through the entity door with only their own fields, such as name, role and LinkedIn URL, never the company's website, domain or email), text = the message, and provider linkedin or email. Read their channel first (synap_get_channel, mode person) for what was already said. The pod files it for a person to review in that channel; it goes out only once they approve it. Never call a tool's own send verb (Unipile, Gmail), never create an outreach touch, a note or a task holding the message, and never use synap_capture for it. Never send. A LinkedIn message is drafted whatever their reach: the pod holds a draft to someone who is not a connection yet, shows it with the next step and lets it go out once they connect, so never hold a draft back for want of a connection. Draft it, then, in this order: (1) a person with no linkedinUrl: find their profile with linkedin_find_profile (their full name and company); on a match, propose its linkedinUrl and linkedinProviderId on the person for a person to approve; on none or several, ask the person to choose among its candidates (the process \"Find their LinkedIn\" does this for one lead). (2) Read their linkedinConnection, which only the pod writes (never set it or linkedinInvitedAt): connected, nothing more; none or not set, ask to connect with linkedin_send_invite (it refuses someone already connected or already invited: then nothing more); pending, the draft waits for them; ignored, draft by email instead when they have an email address. While the draft waits for them to connect, set the lead's nextAction to \"Wait for <name> to accept the LinkedIn request\" and its nextActionAt 7 days later. An email message needs none of this. RULES: follow the rules this process follows, in order: Voice, then By kind of lead (the first row that fits the lead; a given campaign's angle comes first). A rule shown as not available is left out: say so. START: a person approves the audience, the offer and the list, then reviews each proposed message in its channel and approves it; nothing goes out before they approve it, and the agent never sends. Once a message is sent, follow the cadence, so \"Follow up on leads in outreach\" drafts the next one. CADENCE: when a message is sent (a person approved its proposed message, so it is an outbound message in the channel), set its lead's lastContactedAt to the sent day, count the messages sent to the lead (the outbound messages in its channels, read with synap_get_channel mode person: for a company lead, the channels of the person written to there), and set the lead's next action: after the first message, nextAction \"Follow up with <name> if no reply\" and nextActionAt the sent day + 3 days; after the first follow-up, nextAction \"Follow up with <name> a last time if no reply\" and nextActionAt the sent day + 7 days; after the second follow-up, nextAction \"No reply after two follow-ups: nurture or drop <name>\" and nextActionAt the sent day + 7 days, and when that date passes with no reply, \"Follow up on leads in outreach\" proposes nurturing. Never a third follow-up. Propose moving a lead at new or researching to outreach through the status door, with its expected status. A reply stops the cadence: a reply is an inbound message after our last outbound one in the channel, and \"Follow up on leads in outreach\" reads it and proposes the next step. FINISH: when every person written to has replied or their follow-ups ended in silence, record in the campaign notes how many messages were sent (the outbound messages in their channels), how many got a reply and how many led to a booked meeting. Pausing or cancelling is a person's call.",
|
|
15391
15544
|
"subjectProfile": {
|
|
15392
15545
|
"profileSlug": "campaign"
|
|
15393
15546
|
},
|
|
@@ -15417,6 +15570,22 @@ const DATA = {
|
|
|
15417
15570
|
],
|
|
15418
15571
|
"executor": "is-agent",
|
|
15419
15572
|
"status": "active",
|
|
15573
|
+
"guidance": [
|
|
15574
|
+
{
|
|
15575
|
+
"ref": "kind:brand-voice-guide",
|
|
15576
|
+
"label": "Voice",
|
|
15577
|
+
"where": {
|
|
15578
|
+
"voice-context": [
|
|
15579
|
+
"general",
|
|
15580
|
+
"outreach"
|
|
15581
|
+
]
|
|
15582
|
+
}
|
|
15583
|
+
},
|
|
15584
|
+
{
|
|
15585
|
+
"ref": "kind:outreach-angle",
|
|
15586
|
+
"label": "By kind of lead"
|
|
15587
|
+
}
|
|
15588
|
+
],
|
|
15420
15589
|
"requiredIntents": [
|
|
15421
15590
|
"find_people",
|
|
15422
15591
|
"enrich_entity"
|
|
@@ -15447,8 +15616,8 @@ const DATA = {
|
|
|
15447
15616
|
}
|
|
15448
15617
|
},
|
|
15449
15618
|
{
|
|
15450
|
-
"key": "outreach-
|
|
15451
|
-
"statement": "Every drafted message
|
|
15619
|
+
"key": "outreach-rules",
|
|
15620
|
+
"statement": "Every drafted message follows the rules this process follows, as its instructions showed them (the approved Voice, in this campaign's angle).",
|
|
15452
15621
|
"check": {
|
|
15453
15622
|
"kind": "judge"
|
|
15454
15623
|
}
|
|
@@ -15675,6 +15844,71 @@ const DATA = {
|
|
|
15675
15844
|
}
|
|
15676
15845
|
]
|
|
15677
15846
|
},
|
|
15847
|
+
{
|
|
15848
|
+
"name": "Propose my rules from my sent messages",
|
|
15849
|
+
"description": "Propose the first rules your drafts follow, the voice (say, don't say) and what to lead with by kind of lead, from the rules your drafters held until now and the messages you sent; they stay drafts until you make them current.",
|
|
15850
|
+
"goalTemplate": "Propose the rules the CRM drafters write by, as drafts for a person to make current. READ: the current and draft voice guides (synap_get_entities profileSlug brand-voice-guide) and By kind of lead rows (profileSlug outreach-angle), the audiences and offers, and the messages already sent: for the leads with a lastContactedAt, newest first, at most 20, their channels (synap_get_channel, mode person) and the outbound messages they show. SEED: the drafters' rules until now, word for word: \"Its message is personal: it cites the buying signal and what it showed, or a past exchange, never a generic template; short; in the person's language, French by default, and in French it says vous. It offers one useful next step, never pressure.\" VOICE: one voice guide, context outreach, status draft, in the Brand Library space: its Do lines (what to say) and Don't lines (what never to say), one per line, start from the seed and add only what at least two sent messages show; Source IDs lists the messages' channel or entity ids. BY KIND OF LEAD: one row per kind of lead the sent messages show, status draft: If the lead (the condition in words), its audience and offer when one fits, Lead with, Offer, Proof, Avoid, Tone, Channel and an order, the most specific first; end with an \"Anything else\" row with the highest order. Never invent a proof: leave it empty and say so. When a current version exists, the draft is a new record that revises it (a revises edge to it) and says what changed; never edit or retire a current one. DRAFTS ONLY: never set a voice guide to approved or deprecated, nor a row to current or retired; a person does, on the Brand and communication page. With fewer than three sent messages, propose the voice from the seed alone and one \"Anything else\" row, and say so. FINISH: list each draft with the messages it came from.",
|
|
15851
|
+
"executor": "is-agent",
|
|
15852
|
+
"status": "active",
|
|
15853
|
+
"grants": [
|
|
15854
|
+
"entity.create"
|
|
15855
|
+
],
|
|
15856
|
+
"expectedOutputs": [
|
|
15857
|
+
{
|
|
15858
|
+
"kind": "brand-voice-guide",
|
|
15859
|
+
"label": "Draft outreach voice",
|
|
15860
|
+
"relationToSubject": "none"
|
|
15861
|
+
},
|
|
15862
|
+
{
|
|
15863
|
+
"kind": "outreach-angle",
|
|
15864
|
+
"label": "Draft \"By kind of lead\" rows",
|
|
15865
|
+
"relationToSubject": "none"
|
|
15866
|
+
}
|
|
15867
|
+
],
|
|
15868
|
+
"stages": [
|
|
15869
|
+
{
|
|
15870
|
+
"key": "draft",
|
|
15871
|
+
"name": "Propose the drafts",
|
|
15872
|
+
"category": "started",
|
|
15873
|
+
"goal": "Read the current rules, the audiences and offers and the sent messages; write one draft outreach voice guide from the seed and the messages, and one draft By kind of lead row per kind of lead, ending with an \"Anything else\" row.",
|
|
15874
|
+
"criteria": [
|
|
15875
|
+
{
|
|
15876
|
+
"key": "rules-drafts-only",
|
|
15877
|
+
"statement": "Every voice guide and By kind of lead row this run wrote is a draft (voice status draft, angle status draft), and no approved voice guide or current row was edited, approved or retired.",
|
|
15878
|
+
"check": {
|
|
15879
|
+
"kind": "judge"
|
|
15880
|
+
}
|
|
15881
|
+
},
|
|
15882
|
+
{
|
|
15883
|
+
"key": "rules-seeded",
|
|
15884
|
+
"statement": "The draft voice holds the seed lines (cite the signal or a past exchange, never a generic template, short, the person's language, French by default with vous, one useful next step, never pressure) as Do and Don't lines, plus only what at least two sent messages show.",
|
|
15885
|
+
"check": {
|
|
15886
|
+
"kind": "judge"
|
|
15887
|
+
}
|
|
15888
|
+
},
|
|
15889
|
+
{
|
|
15890
|
+
"key": "rules-rows-sourced",
|
|
15891
|
+
"statement": "Each By kind of lead row names the sent messages it came from, has an order, and the last one is an \"Anything else\" row; no proof is invented.",
|
|
15892
|
+
"check": {
|
|
15893
|
+
"kind": "judge"
|
|
15894
|
+
}
|
|
15895
|
+
}
|
|
15896
|
+
]
|
|
15897
|
+
},
|
|
15898
|
+
{
|
|
15899
|
+
"key": "review",
|
|
15900
|
+
"name": "Person makes them current",
|
|
15901
|
+
"category": "completed",
|
|
15902
|
+
"goal": "The person reads the drafts, edits them if needed and makes each one current (a voice guide approved, a row current) on the Brand and communication page or in the pod, or drops it.",
|
|
15903
|
+
"gate": {
|
|
15904
|
+
"kind": "human"
|
|
15905
|
+
},
|
|
15906
|
+
"onFail": {
|
|
15907
|
+
"toStage": "draft"
|
|
15908
|
+
}
|
|
15909
|
+
}
|
|
15910
|
+
]
|
|
15911
|
+
},
|
|
15678
15912
|
{
|
|
15679
15913
|
"name": "Propose a Health cell",
|
|
15680
15914
|
"description": "Answer one question about your sales with a tile on the Health dashboard; the AI writes the tile and you approve it before it shows. Run by one of your agents for now (Synap AI cannot place a tile yet).",
|
|
@@ -72,7 +72,7 @@ describe("linkedin_find_profile — a strict match or none", () => {
|
|
|
72
72
|
expect(verb.intent).toBe("enrich_entity");
|
|
73
73
|
// Declared read-only: the pod runs it with no review (plan 87088d2d W3c).
|
|
74
74
|
expect(verb.metadata).toEqual({ verbType: "read", readOnly: true });
|
|
75
|
-
expect(verb.parameters).toEqual({ fullName: "string", company: "string", accountId: "string" });
|
|
75
|
+
expect(verb.parameters).toEqual({ fullName: "string", company: "string?", accountId: "string" });
|
|
76
76
|
expect(verb.requires).toEqual(["unipile_linkedin"]);
|
|
77
77
|
expect(verb.code).not.toMatch(/\{\{\w+\}\}/);
|
|
78
78
|
// It writes nothing: the match is the caller's proposal (decision 7).
|
|
@@ -132,7 +132,7 @@ describe("linkedin_find_profile — a strict match or none", () => {
|
|
|
132
132
|
]);
|
|
133
133
|
});
|
|
134
134
|
|
|
135
|
-
it("a different name with the right company is never a match, and
|
|
135
|
+
it("a different name with the right company is never a match, and the closest candidates come back first, at most 5", async () => {
|
|
136
136
|
const rows = [
|
|
137
137
|
row("a", "Ada Lovelace", "CEO at Analytical Engines"),
|
|
138
138
|
row("b", "Bob Smith", "Sales"),
|
|
@@ -141,7 +141,24 @@ describe("linkedin_find_profile — a strict match or none", () => {
|
|
|
141
141
|
];
|
|
142
142
|
const { result } = await run("linkedin_find_profile", ARGS, [{ data: rows }]);
|
|
143
143
|
expect(result).toMatchObject({ matched: false, reason: "none" });
|
|
144
|
-
expect(result.candidates.map((c: any) => c.providerId)).toEqual(["c", "a", "d"]);
|
|
144
|
+
expect(result.candidates.map((c: any) => c.providerId)).toEqual(["c", "a", "d", "b"]);
|
|
145
|
+
const many = Array.from({ length: 8 }, (_, i) => row(`m${i}`, `Person ${i}`, "Analytical Engines"));
|
|
146
|
+
const capped = await run("linkedin_find_profile", ARGS, [{ data: many }]);
|
|
147
|
+
expect(capped.result.candidates).toHaveLength(5);
|
|
148
|
+
});
|
|
149
|
+
|
|
150
|
+
// The company is optional (CRM, founder 9 Nov 2026: "if you just have the name then you send the name, and if the tool
|
|
151
|
+
// answers with a list then the UI shows the list"): a name alone is never a strict match, so the answer is always the
|
|
152
|
+
// closest candidates, even when one result carries the exact name; the search sends no company filter.
|
|
153
|
+
it("no company: the search carries the name only, and the answer is candidates (name_only), never a match", async () => {
|
|
154
|
+
const { company: _omit, ...NO_COMPANY } = ARGS;
|
|
155
|
+
for (const args of [NO_COMPANY, { ...NO_COMPANY, company: " " }, { ...NO_COMPANY, company: undefined }]) {
|
|
156
|
+
const { result, calls } = await run("linkedin_find_profile", args, [{ data: [ADA, row("u-bob", "Bob Smith", "Sales")] }]);
|
|
157
|
+
expect(calls[0].body).toEqual({ keywords: "adele LOVELACE" });
|
|
158
|
+
expect(result).toMatchObject({ matched: false, reason: "name_only" });
|
|
159
|
+
expect(result.candidates.map((c: any) => c.providerId)).toEqual(["u-ada", "u-bob"]);
|
|
160
|
+
expect(result.searched.company).toBeNull();
|
|
161
|
+
}
|
|
145
162
|
});
|
|
146
163
|
|
|
147
164
|
it("pages by cursor: a match on page 2 with no page after it is the match", async () => {
|
|
@@ -168,9 +185,8 @@ describe("linkedin_find_profile — a strict match or none", () => {
|
|
|
168
185
|
expect(result).toEqual({ matched: false, reason: "proposed", proposed: true, proposalId: "p-1", candidates: [] });
|
|
169
186
|
});
|
|
170
187
|
|
|
171
|
-
it("a failed search throws; a missing
|
|
188
|
+
it("a failed search throws; a missing name is refused before any call (a missing company is not)", async () => {
|
|
172
189
|
await expect(run("linkedin_find_profile", ARGS, [{ proposed: false, status: 429 } as any])).rejects.toThrow(/status 429/);
|
|
173
|
-
await expect(run("linkedin_find_profile", { ...ARGS, company: " " }, [{ data: [] }])).rejects.toThrow(/company is required/);
|
|
174
190
|
await expect(run("linkedin_find_profile", { ...ARGS, fullName: "" }, [{ data: [] }])).rejects.toThrow(/fullName/);
|
|
175
191
|
});
|
|
176
192
|
});
|