@synap-core/workspace-templates 0.35.0 → 0.37.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 CHANGED
@@ -279,6 +279,7 @@ proposal; the review is the catalog commit.
279
279
  | `activators[]` (workers) | playbook | `on`: `created` · `enters_status` (+ `status`) · `count` (+ `status`, `min` ≥ 2) · `schedule` (+ `cron`, UTC) · `manual`. `size`: `per_thing` (default) · `per_moment` (count and schedule always are). `mode`: `propose` (default) · `run` only when cheap and safe. `maxPendingApprovals` (default 20) throttles. Compiled to a governed rule the owner can pause; it fires once per thing per transition. |
280
280
  | `goalTemplate` | playbook | Placeholders are `{paramName}`. Never `@{arg:…}` (read-only legacy). |
281
281
  | `params` | playbook | The subject is a `type: entity` param. A required param left unanswered becomes a question owed by the person, not an empty string. |
282
+ | `guidance[]` | playbook | The rules it follows (backend#924): `{ref: "kind:<slug>" \| "skill:<slug>", label?, when?, where?}`, refs never ids. Each run renders the CURRENT versions under "Rules this playbook follows": a kind's entities whose lifecycle category is `done`, an approved skill. So a `kind:` ref names a catalog kind with a lifecycle whose done options are all `humanOnly` (entity text becomes prompt text); a kind with an `order` property renders as "the first row that fits". Style lives here, never in the goal; process stays in the goal. `guidance-ref` in `synap catalog validate`. |
282
283
 
283
284
  Human moments use an `ask` on an owed slot: `confirm` / `choose` (one `recommended`) / `form` / `act` / `provide`
284
285
  (connection, file or secret through the vault). Never ask for a secret in a form.
@@ -488,6 +488,16 @@ interface TemplatePlaybook {
488
488
  * closed `capability_intents` vocabulary (`@synap-core/types/capability-intents`).
489
489
  */
490
490
  requiredIntents?: string[];
491
+ /**
492
+ * The rules the process follows, in order (pod `playbookGuidanceSchema`,
493
+ * backend#924): `{ ref: "kind:<slug>" | "skill:<slug>", label?, when?, where? }`.
494
+ */
495
+ guidance?: Array<{
496
+ ref: string;
497
+ label?: string;
498
+ when?: string;
499
+ where?: Record<string, string[]>;
500
+ }>;
491
501
  /**
492
502
  * DECLARATIONS of when the process starts. Compiled at install/apply into
493
503
  * governed rules through the pod's ONE rule door and linked in
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { W as WorkspaceYaml, T as TemplateDependency, a as TemplateLifecycleOption, b as TemplateLifecycleOptionWaits } from './define-DHDi8C33.js';
2
- export { B as BentoViewBlockWire, c as BentoWidgetBlockWire, d as BuiltSpacePackage, e as BuiltSpacePackageCell, I as INTENT_LABEL_MAX, P as PACKAGE_DEPENDENCY_KINDS, f as PackageAutomationWire, g as PackageDefinitionOutput, h as PackageDependencyKind, S as START_EXAMPLE_RANGE, i as START_STARTERS_RANGE, j as START_VIEWS_MAX, k as SpacePackageCellWire, l as SplitBentoBlocks, m as TemplateActionPlacement, n as TemplateAppKind, o as TemplateAppRef, p as TemplateAutomation, q as TemplateBentoBlock, r as TemplateDefaultSource, s as TemplateDisplayTemplate, t as TemplateEntityLink, u as TemplateExtendsRef, v as TemplateIntegration, w as TemplateIntent, x as TemplateLayoutConfig, y as TemplateMeta, z as TemplateOnboarding, A as TemplateOnboardingCollectTarget, C as TemplatePlaybook, D as TemplatePlaybookParam, E as TemplatePrimarySurface, F as TemplateProfile, G as TemplateProfileEntityBentoTemplates, H as TemplateProperty, J as TemplateSeedEntity, K as TemplateSidebarItem, L as TemplateSidebarSurface, M as TemplateSourceRole, N as TemplateSpacePackage, O as TemplateSpacePackageCell, Q as TemplateStart, R as TemplateSuggestedRelation, U as TemplateView, V as ToDefinitionResult, X as WorkspaceDefinitionInput, Y as WorkspaceJsonValue, Z as WorkspacePrimarySurface, _ as WorkspacePrimarySurfaceViewReference, $ as normalizeTemplateLayout, a0 as spacePackageCells, a1 as splitBentoBlocks, a2 as toAutomationWire, a3 as toPackageDefinition, a4 as toWorkspaceDefinition } from './define-DHDi8C33.js';
1
+ import { W as WorkspaceYaml, T as TemplateDependency, a as TemplateLifecycleOption, b as TemplateLifecycleOptionWaits } from './define-YL-hIPcn.js';
2
+ export { B as BentoViewBlockWire, c as BentoWidgetBlockWire, d as BuiltSpacePackage, e as BuiltSpacePackageCell, I as INTENT_LABEL_MAX, P as PACKAGE_DEPENDENCY_KINDS, f as PackageAutomationWire, g as PackageDefinitionOutput, h as PackageDependencyKind, S as START_EXAMPLE_RANGE, i as START_STARTERS_RANGE, j as START_VIEWS_MAX, k as SpacePackageCellWire, l as SplitBentoBlocks, m as TemplateActionPlacement, n as TemplateAppKind, o as TemplateAppRef, p as TemplateAutomation, q as TemplateBentoBlock, r as TemplateDefaultSource, s as TemplateDisplayTemplate, t as TemplateEntityLink, u as TemplateExtendsRef, v as TemplateIntegration, w as TemplateIntent, x as TemplateLayoutConfig, y as TemplateMeta, z as TemplateOnboarding, A as TemplateOnboardingCollectTarget, C as TemplatePlaybook, D as TemplatePlaybookParam, E as TemplatePrimarySurface, F as TemplateProfile, G as TemplateProfileEntityBentoTemplates, H as TemplateProperty, J as TemplateSeedEntity, K as TemplateSidebarItem, L as TemplateSidebarSurface, M as TemplateSourceRole, N as TemplateSpacePackage, O as TemplateSpacePackageCell, Q as TemplateStart, R as TemplateSuggestedRelation, U as TemplateView, V as ToDefinitionResult, X as WorkspaceDefinitionInput, Y as WorkspaceJsonValue, Z as WorkspacePrimarySurface, _ as WorkspacePrimarySurfaceViewReference, $ as normalizeTemplateLayout, a0 as spacePackageCells, a1 as splitBentoBlocks, a2 as toAutomationWire, a3 as toPackageDefinition, a4 as toWorkspaceDefinition } from './define-YL-hIPcn.js';
3
3
  import '@synap-core/types/presentation';
4
4
  import '@synap-core/types/space-brief';
5
5
  import '@synap-core/types/capability-intents';
package/dist/index.js CHANGED
@@ -2424,7 +2424,8 @@ var DATA = {
2424
2424
  },
2425
2425
  {
2426
2426
  "key": "approved",
2427
- "category": "done"
2427
+ "category": "done",
2428
+ "humanOnly": true
2428
2429
  },
2429
2430
  {
2430
2431
  "key": "deprecated",
@@ -2447,7 +2448,8 @@ var DATA = {
2447
2448
  "social",
2448
2449
  "legal",
2449
2450
  "editorial",
2450
- "investor"
2451
+ "investor",
2452
+ "outreach"
2451
2453
  ],
2452
2454
  "constraints": {
2453
2455
  "defaultValue": "general"
@@ -2998,6 +3000,12 @@ var DATA = {
2998
3000
  }
2999
3001
  ],
3000
3002
  "entityLinks": [
3003
+ {
3004
+ "sourceProfileSlug": "brand-voice-guide",
3005
+ "targetProfileSlug": "brand-voice-guide",
3006
+ "type": "revises",
3007
+ "label": "Revises"
3008
+ },
3001
3009
  {
3002
3010
  "sourceProfileSlug": "brand-token-set",
3003
3011
  "targetProfileSlug": "brand-color",
@@ -14287,6 +14295,113 @@ var DATA = {
14287
14295
  "inputType": "textarea"
14288
14296
  }
14289
14297
  ]
14298
+ },
14299
+ {
14300
+ "slug": "outreach-angle",
14301
+ "displayName": "Outreach angle",
14302
+ "icon": "compass",
14303
+ "color": "violet",
14304
+ "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.',
14305
+ "lifecycle": {
14306
+ "property": "angle-status",
14307
+ "options": [
14308
+ {
14309
+ "key": "draft",
14310
+ "category": "open"
14311
+ },
14312
+ {
14313
+ "key": "current",
14314
+ "category": "done",
14315
+ "humanOnly": true
14316
+ },
14317
+ {
14318
+ "key": "retired",
14319
+ "category": "lost",
14320
+ "humanOnly": true
14321
+ }
14322
+ ]
14323
+ },
14324
+ "properties": [
14325
+ {
14326
+ "slug": "angle-status",
14327
+ "label": "Status",
14328
+ "valueType": "string",
14329
+ "inputType": "select",
14330
+ "enumValues": [
14331
+ "draft",
14332
+ "current",
14333
+ "retired"
14334
+ ],
14335
+ "constraints": {
14336
+ "defaultValue": "draft"
14337
+ }
14338
+ },
14339
+ {
14340
+ "slug": "angle-if",
14341
+ "label": "If the lead",
14342
+ "valueType": "string",
14343
+ "inputType": "textarea",
14344
+ "placeholder": "e.g. Posted a small automation project on Codeur or Malt"
14345
+ },
14346
+ {
14347
+ "slug": "angle-audience",
14348
+ "label": "Audience",
14349
+ "valueType": "entity_id",
14350
+ "targetProfileSlug": "audience",
14351
+ "inputType": "entity_select"
14352
+ },
14353
+ {
14354
+ "slug": "angle-about-offer",
14355
+ "label": "About the offer",
14356
+ "valueType": "entity_id",
14357
+ "targetProfileSlug": "offer",
14358
+ "inputType": "entity_select"
14359
+ },
14360
+ {
14361
+ "slug": "angle-lead-with",
14362
+ "label": "Lead with",
14363
+ "valueType": "string",
14364
+ "inputType": "textarea"
14365
+ },
14366
+ {
14367
+ "slug": "angle-offer",
14368
+ "label": "Offer",
14369
+ "valueType": "string",
14370
+ "inputType": "textarea",
14371
+ "placeholder": "e.g. Fixed small set-up, tool costs listed apart"
14372
+ },
14373
+ {
14374
+ "slug": "angle-proof",
14375
+ "label": "Proof",
14376
+ "valueType": "string",
14377
+ "inputType": "textarea"
14378
+ },
14379
+ {
14380
+ "slug": "angle-avoid",
14381
+ "label": "Avoid",
14382
+ "valueType": "string",
14383
+ "inputType": "textarea"
14384
+ },
14385
+ {
14386
+ "slug": "angle-tone",
14387
+ "label": "Tone",
14388
+ "valueType": "string",
14389
+ "inputType": "text"
14390
+ },
14391
+ {
14392
+ "slug": "angle-channel",
14393
+ "label": "Channel",
14394
+ "valueType": "string",
14395
+ "inputType": "text",
14396
+ "placeholder": "e.g. LinkedIn, else email"
14397
+ },
14398
+ {
14399
+ "slug": "order",
14400
+ "label": "Order",
14401
+ "valueType": "number",
14402
+ "inputType": "number"
14403
+ }
14404
+ ]
14290
14405
  }
14291
14406
  ],
14292
14407
  "entityLinks": [
@@ -14373,6 +14488,12 @@ var DATA = {
14373
14488
  "targetProfileSlug": "audience",
14374
14489
  "type": "targets",
14375
14490
  "label": "Targets"
14491
+ },
14492
+ {
14493
+ "sourceProfileSlug": "outreach-angle",
14494
+ "targetProfileSlug": "outreach-angle",
14495
+ "type": "revises",
14496
+ "label": "Revises"
14376
14497
  }
14377
14498
  ],
14378
14499
  "views": [
@@ -14443,6 +14564,16 @@ var DATA = {
14443
14564
  "sentDate"
14444
14565
  ]
14445
14566
  }
14567
+ },
14568
+ {
14569
+ "name": "Health",
14570
+ "slug": "health",
14571
+ "type": "bento",
14572
+ "description": "The health of your sales at a glance, one tile per question you asked, each one approved by you.",
14573
+ "config": {
14574
+ "layout": "bento",
14575
+ "blocks": []
14576
+ }
14446
14577
  }
14447
14578
  ],
14448
14579
  "onboarding": {
@@ -15073,7 +15204,7 @@ var DATA = {
15073
15204
  {
15074
15205
  "name": "Draft a first message",
15075
15206
  "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.",
15076
- "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. 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. 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.`,
15207
+ "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.`,
15077
15208
  "subjectProfile": {
15078
15209
  "profileSlug": "lead"
15079
15210
  },
@@ -15108,6 +15239,22 @@ var DATA = {
15108
15239
  ],
15109
15240
  "executor": "is-agent",
15110
15241
  "status": "active",
15242
+ "guidance": [
15243
+ {
15244
+ "ref": "kind:brand-voice-guide",
15245
+ "label": "Voice",
15246
+ "where": {
15247
+ "voice-context": [
15248
+ "general",
15249
+ "outreach"
15250
+ ]
15251
+ }
15252
+ },
15253
+ {
15254
+ "ref": "kind:outreach-angle",
15255
+ "label": "By kind of lead"
15256
+ }
15257
+ ],
15111
15258
  "grants": [
15112
15259
  "entity.create"
15113
15260
  ],
@@ -15140,8 +15287,8 @@ var DATA = {
15140
15287
  }
15141
15288
  },
15142
15289
  {
15143
- "key": "first-message-personal",
15144
- "statement": "The message cites the lead's buying signal or a past exchange, is in the person's language (French by default, with vous), and is not a generic template.",
15290
+ "key": "first-message-rules",
15291
+ "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).",
15145
15292
  "check": {
15146
15293
  "kind": "judge"
15147
15294
  }
@@ -15368,7 +15515,7 @@ var DATA = {
15368
15515
  {
15369
15516
  "name": "Follow up on leads in outreach",
15370
15517
  "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.",
15371
- "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, short and in the lead's language, offering the next useful step, never pressure. For a lead with no campaign, ask the person which one. 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. 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.`,
15518
+ "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.`,
15372
15519
  "subjectProfile": {
15373
15520
  "profileSlug": "lead"
15374
15521
  },
@@ -15386,6 +15533,22 @@ var DATA = {
15386
15533
  ],
15387
15534
  "executor": "is-agent",
15388
15535
  "status": "active",
15536
+ "guidance": [
15537
+ {
15538
+ "ref": "kind:brand-voice-guide",
15539
+ "label": "Voice",
15540
+ "where": {
15541
+ "voice-context": [
15542
+ "general",
15543
+ "outreach"
15544
+ ]
15545
+ }
15546
+ },
15547
+ {
15548
+ "ref": "kind:outreach-angle",
15549
+ "label": "By kind of lead"
15550
+ }
15551
+ ],
15389
15552
  "expectedOutputs": [
15390
15553
  {
15391
15554
  "kind": "messaging",
@@ -15409,7 +15572,7 @@ var DATA = {
15409
15572
  },
15410
15573
  {
15411
15574
  "key": "followup-angle",
15412
- "statement": "Each draft follows the angle of the lead's outreach campaign and its call to action.",
15575
+ "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.",
15413
15576
  "check": {
15414
15577
  "kind": "judge"
15415
15578
  }
@@ -15454,7 +15617,7 @@ var DATA = {
15454
15617
  {
15455
15618
  "name": "Personalized Outreach",
15456
15619
  "description": "Run one outreach campaign \u2014 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.",
15457
- "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, specific to them \u2014 their company, role and any past message \u2014 never a generic template. 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. 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.`,
15620
+ "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.`,
15458
15621
  "subjectProfile": {
15459
15622
  "profileSlug": "campaign"
15460
15623
  },
@@ -15484,6 +15647,22 @@ var DATA = {
15484
15647
  ],
15485
15648
  "executor": "is-agent",
15486
15649
  "status": "active",
15650
+ "guidance": [
15651
+ {
15652
+ "ref": "kind:brand-voice-guide",
15653
+ "label": "Voice",
15654
+ "where": {
15655
+ "voice-context": [
15656
+ "general",
15657
+ "outreach"
15658
+ ]
15659
+ }
15660
+ },
15661
+ {
15662
+ "ref": "kind:outreach-angle",
15663
+ "label": "By kind of lead"
15664
+ }
15665
+ ],
15487
15666
  "requiredIntents": [
15488
15667
  "find_people",
15489
15668
  "enrich_entity"
@@ -15514,8 +15693,8 @@ var DATA = {
15514
15693
  }
15515
15694
  },
15516
15695
  {
15517
- "key": "outreach-personal",
15518
- "statement": "Every drafted message names something specific to its person.",
15696
+ "key": "outreach-rules",
15697
+ "statement": "Every drafted message follows the rules this process follows, as its instructions showed them (the approved Voice, in this campaign's angle).",
15519
15698
  "check": {
15520
15699
  "kind": "judge"
15521
15700
  }
@@ -15741,6 +15920,136 @@ var DATA = {
15741
15920
  ]
15742
15921
  }
15743
15922
  ]
15923
+ },
15924
+ {
15925
+ "name": "Propose my rules from my sent messages",
15926
+ "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.",
15927
+ "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.`,
15928
+ "executor": "is-agent",
15929
+ "status": "active",
15930
+ "grants": [
15931
+ "entity.create"
15932
+ ],
15933
+ "expectedOutputs": [
15934
+ {
15935
+ "kind": "brand-voice-guide",
15936
+ "label": "Draft outreach voice",
15937
+ "relationToSubject": "none"
15938
+ },
15939
+ {
15940
+ "kind": "outreach-angle",
15941
+ "label": 'Draft "By kind of lead" rows',
15942
+ "relationToSubject": "none"
15943
+ }
15944
+ ],
15945
+ "stages": [
15946
+ {
15947
+ "key": "draft",
15948
+ "name": "Propose the drafts",
15949
+ "category": "started",
15950
+ "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.',
15951
+ "criteria": [
15952
+ {
15953
+ "key": "rules-drafts-only",
15954
+ "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.",
15955
+ "check": {
15956
+ "kind": "judge"
15957
+ }
15958
+ },
15959
+ {
15960
+ "key": "rules-seeded",
15961
+ "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.",
15962
+ "check": {
15963
+ "kind": "judge"
15964
+ }
15965
+ },
15966
+ {
15967
+ "key": "rules-rows-sourced",
15968
+ "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.',
15969
+ "check": {
15970
+ "kind": "judge"
15971
+ }
15972
+ }
15973
+ ]
15974
+ },
15975
+ {
15976
+ "key": "review",
15977
+ "name": "Person makes them current",
15978
+ "category": "completed",
15979
+ "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.",
15980
+ "gate": {
15981
+ "kind": "human"
15982
+ },
15983
+ "onFail": {
15984
+ "toStage": "draft"
15985
+ }
15986
+ }
15987
+ ]
15988
+ },
15989
+ {
15990
+ "name": "Propose a Health cell",
15991
+ "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).",
15992
+ "goalTemplate": `Propose one Health tile that answers: {question}. FIND THE VIEW: in the CRM space, the bento view named Health (synap_list_views with the space's workspaceId, type bento). When the space has none, stop and say so: never create another dashboard. READ FIRST: what already sits on Health (its config.blocks: each widget tile names a cell by widgetType) and the space's cells (synap_list_widgets); when a tile already answers the question, say which one and stop. DATA: decide where each number comes from. A cell reads the pod ONLY through the cell bridge, at render time: window.synap.query(op, params), with an op of the bridge table (entities.list, entities.get, views.list, profiles.list, lifecycle.board, lifecycle.throughput, attention.needsYou, attention.count, sessions.list, lifecycle.home, lifecycle.moving, documents.get, lens.page) and only that op's params; the host stamps the space, so never put a workspaceId, a token, a pod URL or a fetch in the page. What the bridge reads stays live: query it in the page, never paste its rows. What it cannot read yet (messages, replies, sends: the bridge has no message op) you read now with your own tools (synap_get_channel, synap_get_entities) and write into the page as a snapshot, with the date it was taken shown on the tile (for example "au 8 novembre") and how it was counted. Never invent a number: a figure you cannot source is left out and the tile says what is missing. THE PAGE: one self-contained HTML page, inline script and style only (no CDN, no remote font or image: the frame's CSP refuses them), that answers the question in one glance (a number, a short table or a small chart), in the person's language (French by default), readable in light and dark, and that shows an error, never an empty tile, when a query fails. FILE IT: synap_create_cell with name = a short title of the question, rendererSource = the page, workspaceId = the CRM space (never pod-wide: the CRM app reads only its space's cells), contentKind widget, placeOn = {viewId: the Health view's id}, and reasoning = the question in the person's words. It comes back proposed: that is success, never retry it; the person approves it in the CRM or the pod, which defines the cell and puts its tile on Health in one act. One cell per run.`,
15993
+ "params": [
15994
+ {
15995
+ "name": "question",
15996
+ "type": "text",
15997
+ "label": "What should the tile answer?",
15998
+ "required": true
15999
+ }
16000
+ ],
16001
+ "executor": "external-agent",
16002
+ "status": "active",
16003
+ "stages": [
16004
+ {
16005
+ "key": "draft",
16006
+ "name": "Write the tile",
16007
+ "category": "started",
16008
+ "goal": "Find the Health view, check no tile already answers the question, write one self-contained HTML page that answers it (live through the cell bridge, a dated snapshot for what the bridge cannot read), and file it with synap_create_cell, contentKind widget, workspaceId the CRM space and placeOn the Health view.",
16009
+ "expectedOutputs": [
16010
+ {
16011
+ "kind": "cell",
16012
+ "label": "Proposed Health tile",
16013
+ "relationToSubject": "none"
16014
+ }
16015
+ ],
16016
+ "criteria": [
16017
+ {
16018
+ "key": "health-cell-placed",
16019
+ "statement": "One cell/define proposal was filed through synap_create_cell with contentKind widget, workspaceId the CRM space and placeOn the Health view's id, and no other dashboard or view was created.",
16020
+ "check": {
16021
+ "kind": "judge"
16022
+ }
16023
+ },
16024
+ {
16025
+ "key": "health-cell-bridge-only",
16026
+ "statement": "The page reads pod data only through window.synap.query with ops of the cell bridge table, and holds no token, pod URL, workspaceId, fetch or remote script, style, font or image.",
16027
+ "check": {
16028
+ "kind": "judge"
16029
+ }
16030
+ },
16031
+ {
16032
+ "key": "health-cell-sourced",
16033
+ "statement": "Every number the page shows is either queried live through the bridge or a snapshot shown with the date it was taken and how it was counted; no number is invented.",
16034
+ "check": {
16035
+ "kind": "judge"
16036
+ }
16037
+ }
16038
+ ]
16039
+ },
16040
+ {
16041
+ "key": "approve",
16042
+ "name": "You approve the tile",
16043
+ "category": "completed",
16044
+ "goal": "The person previews the proposed tile and approves it (the cell is defined and its tile placed on Health) or rejects it.",
16045
+ "gate": {
16046
+ "kind": "human"
16047
+ },
16048
+ "onFail": {
16049
+ "toStage": "draft"
16050
+ }
16051
+ }
16052
+ ]
15744
16053
  }
15745
16054
  ],
15746
16055
  "actionPlacements": [