@synap-core/workspace-templates 0.46.0 → 0.48.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/README.md +4 -3
  2. package/automations/lead-converted-becomes-client.automation.json +89 -0
  3. package/automations/lead-converted-becomes-client.catalog.json +13 -0
  4. package/capabilities/apify.capability.json +8 -1
  5. package/capabilities/apollo.capability.json +8 -1
  6. package/capabilities/cal-com.capability.json +8 -1
  7. package/capabilities/exa.capability.json +8 -1
  8. package/capabilities/fal-ai.capability.json +8 -1
  9. package/capabilities/fal-media-lab.capability.json +8 -1
  10. package/capabilities/fireflies.capability.json +8 -1
  11. package/capabilities/mailgun.capability.json +8 -1
  12. package/capabilities/omniroute.capability.json +7 -1
  13. package/capabilities/posthog-analytics.capability.json +7 -1
  14. package/capabilities/postiz.capability.json +7 -1
  15. package/capabilities/replicate-rvm.capability.json +21 -5
  16. package/capabilities/stripe.capability.json +10 -1
  17. package/capabilities/unipile-linkedin.capability.json +39 -3
  18. package/capabilities/vercel.capability.json +8 -1
  19. package/dist/{define-BAPO0xZf.d.ts → define-Dto5_E47.d.ts} +15 -3
  20. package/dist/index.d.ts +2 -2
  21. package/dist/index.js +623 -96
  22. package/dist/index.js.map +1 -1
  23. package/dist/wire.d.ts +1 -1
  24. package/package.json +1 -1
  25. package/src/agency-os.yaml +1 -1
  26. package/src/brand-library.yaml +6 -6
  27. package/src/builder.yaml +17 -12
  28. package/src/content-os.template.test.ts +38 -22
  29. package/src/content-os.video-takes.template.test.ts +4 -2
  30. package/src/content-os.yaml +33 -23
  31. package/src/crm-absorbs-outreach.template.test.ts +5 -1
  32. package/src/crm.yaml +53 -30
  33. package/src/decisions-wave.template.test.ts +99 -5
  34. package/src/finance.yaml +11 -6
  35. package/src/foundation.yaml +22 -10
  36. package/src/grants.yaml +4 -0
  37. package/src/intent.test.ts +4 -2
  38. package/src/lead-automations.test.ts +93 -0
  39. package/src/lead-becomes-client.template.test.ts +137 -0
  40. package/src/lifecycle-declarations.test.ts +20 -1
  41. package/src/lifecycle-presets.test.ts +39 -7
  42. package/src/marketing.yaml +3 -3
  43. package/src/operations.yaml +155 -24
  44. package/src/postiz-contract.test.ts +3 -2
  45. package/src/process-contract.validate.test.ts +4 -1
  46. package/src/publish-official-lib.test.ts +8 -7
  47. package/src/research-base.yaml +2 -2
  48. package/src/research-decision.yaml +1 -1
  49. package/src/ship-a-change.template.test.ts +11 -2
  50. package/src/templates.ts +223 -74
  51. package/src/types.ts +15 -3
  52. package/src/unipile-lookups-read-only.test.ts +1 -0
  53. package/src/validate-flow.ts +15 -1
  54. package/src/validate.ts +40 -4
package/dist/index.js CHANGED
@@ -106,7 +106,7 @@ var DATA = {
106
106
  "slug": "operations",
107
107
  "kind": "workspace",
108
108
  "relation": "require",
109
- "reason": "Client engagements, deliverables and contracts \u2014 where won deals are delivered."
109
+ "reason": "Clients, their engagements, deliverables and contracts \u2014 where a lead that signs becomes a client, is onboarded and delivered."
110
110
  },
111
111
  {
112
112
  "slug": "finance",
@@ -3386,7 +3386,7 @@ var DATA = {
3386
3386
  {
3387
3387
  "name": "Make a brand asset",
3388
3388
  "description": "Turn a request for a logo, image, icon or template into a draft built from the approved brand, and approve it with a person before anything uses it.",
3389
- "goalTemplate": "Make this brand asset ({asset}); each stage moves its status. DRAFT: read the request and the approved brand only \u2014 approved colours, fonts, references and the active token set; never a draft \u2014 and load the creative-director skill to pick the recipe. Make the draft (or up to three variants, each its own asset derived from this one) and record the generator, prompt and parameters on it. Stop there: with variants, the pod asks the person which one to keep and wakes you with their choice (its id is in the answer); when they want none, draft again. APPROVE: a person approves one draft as final (with variants, the one they kept). Until then nothing may use it. Deprecating an asset is a person's call.",
3389
+ "goalTemplate": "Make this brand asset ({asset}); each stage moves its status when its work is approved. DRAFT: read the request and the approved brand only \u2014 approved colours, fonts, references and the active token set; never a draft \u2014 and load the creative-director skill to pick the recipe. Make the draft (or up to three variants, each its own asset derived from this one) and record the generator, prompt and parameters on it. Stop there: with variants, the pod asks the person which one to keep and wakes you with their choice (its id is in the answer); when they want none, draft again. APPROVE: a person approves one draft as final (with variants, the one they kept). Until then nothing may use it. Deprecating an asset is a person's call.",
3390
3390
  "subjectProfile": {
3391
3391
  "profileSlug": "brand-asset"
3392
3392
  },
@@ -3416,6 +3416,7 @@ var DATA = {
3416
3416
  "name": "Draft",
3417
3417
  "category": "started",
3418
3418
  "subjectStatus": "draft",
3419
+ "onApproved": "approved",
3419
3420
  "goal": "Build the draft from approved brand sources only and record how it was made.",
3420
3421
  "criteria": [
3421
3422
  {
@@ -3456,7 +3457,6 @@ var DATA = {
3456
3457
  "key": "approve",
3457
3458
  "name": "Approve",
3458
3459
  "category": "completed",
3459
- "subjectStatus": "approved",
3460
3460
  "goal": "A person approves one draft as final; with variants, the one they kept.",
3461
3461
  "gate": {
3462
3462
  "kind": "human"
@@ -3470,7 +3470,7 @@ var DATA = {
3470
3470
  {
3471
3471
  "name": "Write the brand voice",
3472
3472
  "description": "Draft or revise the brand voice guide from what the brand already publishes, and approve it with a person.",
3473
- "goalTemplate": "Write this brand voice guide ({guide}); each stage moves its status. DRAFT: read the brand identity, the approved assets and the last posts and emails the brand published; write the voice in a few traits, each with a do and a don't taken from real examples, and the words to use and avoid. APPROVE: a person approves the guide; then it is what every draft is checked against. Retiring a guide is a person's call.",
3473
+ "goalTemplate": "Write this brand voice guide ({guide}); each stage moves its status when its work is approved. DRAFT: read the brand identity, the approved assets and the last posts and emails the brand published; write the voice in a few traits, each with a do and a don't taken from real examples, and the words to use and avoid. APPROVE: a person approves the guide; then it is what every draft is checked against. Retiring a guide is a person's call.",
3474
3474
  "subjectProfile": {
3475
3475
  "profileSlug": "brand-voice-guide"
3476
3476
  },
@@ -3490,6 +3490,7 @@ var DATA = {
3490
3490
  "name": "Draft",
3491
3491
  "category": "started",
3492
3492
  "subjectStatus": "draft",
3493
+ "onApproved": "approved",
3493
3494
  "goal": "Write the voice traits with real do and don't examples, and the words to use and avoid.",
3494
3495
  "criteria": [
3495
3496
  {
@@ -3505,7 +3506,6 @@ var DATA = {
3505
3506
  "key": "approve",
3506
3507
  "name": "Approve",
3507
3508
  "category": "completed",
3508
- "subjectStatus": "approved",
3509
3509
  "goal": "A person approves the guide.",
3510
3510
  "gate": {
3511
3511
  "kind": "human"
@@ -3519,7 +3519,7 @@ var DATA = {
3519
3519
  {
3520
3520
  "name": "Write a content guideline",
3521
3521
  "description": "Distil approved references into a content guideline (base, format or the frame for one goal), and approve it with a person.",
3522
- "goalTemplate": "Write this content guideline ({guideline}); each stage moves its status. DRAFT: read the brand identity, the approved voice guide and the approved references; load the content-taste skill. Write what to take and what to avoid as rules a maker can follow, link the guideline to every reference it was distilled from, and fill the summary. For a frame guideline, set the goal and give the structure in order. APPROVE: a person approves the guideline; then content is made and checked against it. Retiring a guideline is a person's call.",
3522
+ "goalTemplate": "Write this content guideline ({guideline}); each stage moves its status when its work is approved. DRAFT: read the brand identity, the approved voice guide and the approved references; load the content-taste skill. Write what to take and what to avoid as rules a maker can follow, link the guideline to every reference it was distilled from, and fill the summary. For a frame guideline, set the goal and give the structure in order. APPROVE: a person approves the guideline; then content is made and checked against it. Retiring a guideline is a person's call.",
3523
3523
  "subjectProfile": {
3524
3524
  "profileSlug": "content-guideline"
3525
3525
  },
@@ -3539,6 +3539,7 @@ var DATA = {
3539
3539
  "name": "Draft",
3540
3540
  "category": "started",
3541
3541
  "subjectStatus": "draft",
3542
+ "onApproved": "approved",
3542
3543
  "goal": "Distil the approved references into rules a maker can follow, linked to their sources.",
3543
3544
  "criteria": [
3544
3545
  {
@@ -3561,7 +3562,6 @@ var DATA = {
3561
3562
  "key": "approve",
3562
3563
  "name": "Approve",
3563
3564
  "category": "completed",
3564
- "subjectStatus": "approved",
3565
3565
  "goal": "A person approves the guideline.",
3566
3566
  "gate": {
3567
3567
  "kind": "human"
@@ -6476,6 +6476,7 @@ var DATA = {
6476
6476
  "key": "verify",
6477
6477
  "name": "Verify",
6478
6478
  "category": "started",
6479
+ "onApproved": "implemented",
6479
6480
  "goal": "Run the gates, capture the implemented story and compare it with the design (and the current story when there is one), and walk the screen in the running app; write what passed and what failed.",
6480
6481
  "gate": {
6481
6482
  "kind": "check"
@@ -6518,7 +6519,6 @@ var DATA = {
6518
6519
  "key": "done",
6519
6520
  "name": "Done",
6520
6521
  "category": "completed",
6521
- "subjectStatus": "implemented",
6522
6522
  "goal": "A person confirms the pull request merged and the screen matches the approved design; approving writes implemented.",
6523
6523
  "gate": {
6524
6524
  "kind": "human"
@@ -7044,8 +7044,8 @@ var DATA = {
7044
7044
  "key": "verify",
7045
7045
  "name": "Criteria verified",
7046
7046
  "category": "completed",
7047
- "subjectStatus": "done",
7048
- "goal": "Grade every criterion of the session with its evidence, separating VERIFIED (gate or check output quoted) from NEEDS-DOGFOOD; the feature reads Shipped once a person accepts it.",
7047
+ "onApproved": "done",
7048
+ "goal": "Grade every criterion of the session with its evidence, separating VERIFIED (gate or check output quoted) from NEEDS-DOGFOOD. Then, when a feature is bound, move it to done yourself (update_entity, featureStatus done, expectedStatus the status you read); nothing else moves it. Your move into done comes back proposed for the person to approve, which is success; the feature reads Shipped once they accept it.",
7049
7049
  "criteria": [
7050
7050
  {
7051
7051
  "key": "criteria-verified",
@@ -7332,7 +7332,8 @@ var DATA = {
7332
7332
  },
7333
7333
  {
7334
7334
  "key": "verify",
7335
- "goal": "Grade every criterion of the session with its evidence, separating VERIFIED (gate or check output quoted) from NEEDS-DOGFOOD, capture what was learned, and end with the graded criteria as your answer.",
7335
+ "onApproved": "done",
7336
+ "goal": "Grade every criterion of the session with its evidence, separating VERIFIED (gate or check output quoted) from NEEDS-DOGFOOD, and capture what was learned. Then, when a feature is bound, move it to done yourself (synap_update_entity, featureStatus done, expectedStatus the status you read); nothing else moves it. Your move into done comes back proposed for the person to approve, which is success. End with the graded criteria as your answer.",
7336
7337
  "name": "Criteria verified",
7337
7338
  "category": "completed",
7338
7339
  "criteria": [
@@ -7345,8 +7346,7 @@ var DATA = {
7345
7346
  }
7346
7347
  ],
7347
7348
  "description": "Shared land stage. Never report unverified work as verified. File the lesson, decision or finding the work produced (engineering-memory skill, rule dogfood-journal). Close what you opened: asks answered or withdrawn, worktree removed once merged, then synap_complete_session. Moving the feature to done is a proposal the person approves. Tools: synap_update_session, synap_capture, synap_complete_session. Gate: none.",
7348
- "tier": "quick",
7349
- "subjectStatus": "done"
7349
+ "tier": "quick"
7350
7350
  }
7351
7351
  ]
7352
7352
  },
@@ -7606,7 +7606,8 @@ var DATA = {
7606
7606
  },
7607
7607
  {
7608
7608
  "key": "verify",
7609
- "goal": "Grade every criterion of the session with its evidence, separating VERIFIED (gate or check output quoted) from NEEDS-DOGFOOD, capture what was learned, and end with the graded criteria as your answer.",
7609
+ "onApproved": "fixed",
7610
+ "goal": "Grade every criterion of the session with its evidence, separating VERIFIED (gate or check output quoted) from NEEDS-DOGFOOD, and capture what was learned. Then move the issue to fixed yourself (synap_update_entity, issueStatus fixed, expectedStatus the status you read); nothing else moves it. Your move into fixed comes back proposed for the person to approve, which is success. End with the graded criteria as your answer.",
7610
7611
  "name": "Criteria verified",
7611
7612
  "category": "completed",
7612
7613
  "criteria": [
@@ -7619,8 +7620,7 @@ var DATA = {
7619
7620
  }
7620
7621
  ],
7621
7622
  "description": "Shared land stage. Never report unverified work as verified. File the lesson, decision or finding the work produced (engineering-memory skill, rule dogfood-journal). Close what you opened: asks answered or withdrawn, worktree removed once merged, then synap_complete_session. Moving the issue to fixed is a proposal the person approves. Tools: synap_update_session, synap_capture, synap_complete_session. Gate: none.",
7622
- "tier": "quick",
7623
- "subjectStatus": "fixed"
7623
+ "tier": "quick"
7624
7624
  }
7625
7625
  ]
7626
7626
  },
@@ -8245,23 +8245,30 @@ var DATA = {
8245
8245
  {
8246
8246
  "key": "fix",
8247
8247
  "name": "Fix it",
8248
- "goal": "Find the root cause and ship the fix as a gated PR or commit",
8248
+ "goal": "Find the root cause and ship the fix as a gated PR or commit. Once the pull request is open (or the gated commit pushed), move the session to Fix merged.",
8249
8249
  "category": "started",
8250
8250
  "subjectStatus": "fixing"
8251
8251
  },
8252
8252
  {
8253
8253
  "key": "merged",
8254
8254
  "name": "Fix merged",
8255
- "goal": "The fix is on main (a merged PR or a gated commit)",
8255
+ "goal": "Record the fix's pull request on this stage's Merged fix output with its url as the ref, and leave it open (synap_update_session); the pod closes it when the pull request merges into main, and that moves the finding to fixed. A fix landed as a gated commit, with no pull request, marks the output done with the commit's url as its ref. Never move the finding yourself.",
8256
8256
  "category": "started",
8257
- "subjectStatus": "fixed"
8257
+ "onApproved": "fixed",
8258
+ "expectedOutputs": [
8259
+ {
8260
+ "kind": "pull_request",
8261
+ "label": "Merged fix",
8262
+ "relationToSubject": "none"
8263
+ }
8264
+ ]
8258
8265
  },
8259
8266
  {
8260
8267
  "key": "verified",
8261
8268
  "name": "Live and verified",
8262
- "goal": "The fix runs on the pod (its build contains the fix) and the finding no longer happens",
8269
+ "goal": "The fix runs on the pod (its build contains the fix) and the finding no longer happens. Then move the finding to verified yourself (synap_update_entity, status verified, expectedStatus fixed); nothing else moves it, and your move into verified comes back proposed for the person to approve, which is success.",
8263
8270
  "category": "completed",
8264
- "subjectStatus": "verified"
8271
+ "onApproved": "verified"
8265
8272
  }
8266
8273
  ]
8267
8274
  },
@@ -10317,6 +10324,7 @@ var DATA = {
10317
10324
  "Short Video",
10318
10325
  "Long Video",
10319
10326
  "Carousel",
10327
+ "Text Post",
10320
10328
  "Image Post",
10321
10329
  "Story",
10322
10330
  "Newsletter Section",
@@ -12538,7 +12546,7 @@ var DATA = {
12538
12546
  {
12539
12547
  "name": "Produce Content",
12540
12548
  "description": "Take a briefed post from brief to script to published in any format \u2014 text, visual or video (HyperFrames) \u2014 from the pod's brand kit, one stage per post status, with a person approving the script before anything is generated.",
12541
- "goalTemplate": "Produce content for {platform} from this idea ({post}) in the {format} format. Read the brand first from the pod's brand kit (GET /api/hub/brand/kit) \u2014 never re-derive it from a website capture \u2014 and load the creative-director skill (linked to this space) to pick the approved brand-template (layout and recipe), references and assets for this format and style; drafts never feed generation. Work the stages in order; each stage moves the post's status. SCRIPT before anything is made: write the script or outline for the format (carousel slide outline, deck outline, video script and storyboard, or the text draft) by filling the narrative frame for the post's goal \u2014 the approved content-guideline of type frame for that goal, else the default frame (sell: story, example, lesson, link; hot-take: claim, tension, reason, invitation; tutorial: promise, steps, result, next; product-demo: problem, real screen, outcome, try it). A person approves the script before the draft; nothing is generated from an unapproved script. At the draft, run the creative-director readiness check first (approved references, an approved base guideline, an approved brand-template for this format); if anything is missing, stop and route to the content-taste skill or brand onboarding instead of improvising. Then branch on the format. TEXT (article, thread, newsletter section, caption): draft it with a scroll-stopping hook and a clear CTA. VISUAL: build it pass by pass through the edit-loop skill, a person answering each pass \u2014 a carousel, LinkedIn PDF or image post as a layered composition saved on the post (carousel-format), a deck, PDF document or presentation in Open Design (open-design-edit). VIDEO (short or long video): first pick the route \u2014 FROM SCRATCH (script, storyboard, frames), FROM A VOICE (an existing voice-over or talk: transcribe it, cut on its beats, build the frames under it) or RE-EDIT (existing footage plus a voice: cut, caption, add music and motion); takes ({takes}) mean RE-EDIT, and the Draft stage says how takes, transcripts and passes are handled. Then run the HyperFrames workflow on your own agent with HYPERFRAMES_NO_TELEMETRY=1, from the kit's frame.md (format=frame-md), with GSAP vendored locally \u2014 never `hyperframes publish`, never a cloud render. For a visual or video format, record a content-composition made for this post (for a video: the brief and storyboard documents, the project zip, the MP4, key-frame stills and the brand-kit hash). Keep every format on the post's pillar and the brand voice. A human approves the script before the draft, each pass as it is built, and the draft on the preview at Review. At Schedule, a post whose account is a Postiz channel is queued through the capability that serves publish_post (postiz_schedule_post); that queueing is itself a proposal a person approves. Nothing publishes itself, and the post reads Published only once it went live: reported by Postiz, or confirmed by a person at Publish.",
12549
+ "goalTemplate": "Produce content for {platform} from this idea ({post}) in the {format} format. Read the brand first from the pod's brand kit (GET /api/hub/brand/kit) \u2014 never re-derive it from a website capture \u2014 and load the creative-director skill (linked to this space) to pick the approved brand-template (layout and recipe), references and assets for this format and style; drafts never feed generation. Work the stages in order; a stage's approved work moves the post's status. SCRIPT before anything is made: write the script or outline for the format (carousel slide outline, deck outline, video script and storyboard, or the text draft) by filling the narrative frame for the post's goal \u2014 the approved content-guideline of type frame for that goal, else the default frame (sell: story, example, lesson, link; hot-take: claim, tension, reason, invitation; tutorial: promise, steps, result, next; product-demo: problem, real screen, outcome, try it). A person approves the script before the draft; nothing is generated from an unapproved script. At the draft, run the creative-director readiness check first (approved references, an approved base guideline, an approved brand-template for this format); if anything is missing, stop and route to the content-taste skill or brand onboarding instead of improvising. Then branch on the format. TEXT (article, thread, newsletter section, caption): draft it with a scroll-stopping hook and a clear CTA. VISUAL: build it pass by pass through the edit-loop skill, a person answering each pass \u2014 a carousel, LinkedIn PDF or image post as a layered composition saved on the post (carousel-format), a deck, PDF document or presentation in Open Design (open-design-edit). VIDEO (short or long video): first pick the route \u2014 FROM SCRATCH (script, storyboard, frames), FROM A VOICE (an existing voice-over or talk: transcribe it, cut on its beats, build the frames under it) or RE-EDIT (existing footage plus a voice: cut, caption, add music and motion); takes ({takes}) mean RE-EDIT, and the Draft stage says how takes, transcripts and passes are handled. Then run the HyperFrames workflow on your own agent with HYPERFRAMES_NO_TELEMETRY=1, from the kit's frame.md (format=frame-md), with GSAP vendored locally \u2014 never `hyperframes publish`, never a cloud render. For a visual or video format, record a content-composition made for this post (for a video: the brief and storyboard documents, the project zip, the MP4, key-frame stills and the brand-kit hash). Keep every format on the post's pillar and the brand voice. A human approves the script before the draft, each pass as it is built, and the draft on the preview at Review. At Schedule, a post whose account is a Postiz channel is queued through the capability that serves publish_post (postiz_schedule_post); that queueing is itself a proposal a person approves. Nothing publishes itself, and the post reads Published only once it went live: written by Publish due posts, reported by Postiz, or moved by a person once it is live. The gate at Publish approves the schedule (the post reads Scheduled).",
12542
12550
  "subjectProfile": {
12543
12551
  "profileSlug": "post"
12544
12552
  },
@@ -12600,8 +12608,8 @@ var DATA = {
12600
12608
  "key": "brief",
12601
12609
  "name": "Brief",
12602
12610
  "category": "planned",
12603
- "subjectStatus": "Briefed",
12604
- "goal": "Pin down the post's angle, platform, format, pillar and journey stage before anything is drafted. A run starts at this stage without moving the post: if the post still reads Idea, move it to Briefed first (synap_update_entity, post-status Briefed, expectedStatus Idea). Then advance the run through every stage in order (currentStage), never skipping one, takes included: entering a stage moves the post to its status, and a reply that says proposed is success.",
12611
+ "onApproved": "Briefed",
12612
+ "goal": "Pin down the post's angle, platform, format, pillar and journey stage before anything is drafted. A run starts at this stage without moving the post. Once the brief is set, move the post to Briefed if it still reads Idea (synap_update_entity, post-status Briefed, expectedStatus Idea): Briefed means the brief is done. Then advance the run through every stage in order (currentStage), never skipping one, takes included. A stage moves the post when its work is APPROVED, not when it is entered: the approved Script moves it to Scripted, the Draft gate's approval to In Draft, the Publish gate's approval to Scheduled; a reply that says proposed is success.",
12605
12613
  "criteria": [
12606
12614
  {
12607
12615
  "key": "brief-has-hook",
@@ -12623,7 +12631,7 @@ var DATA = {
12623
12631
  "key": "script",
12624
12632
  "name": "Script",
12625
12633
  "category": "started",
12626
- "subjectStatus": "Scripted",
12634
+ "onApproved": "Scripted",
12627
12635
  "goal": "Write the script or outline for the post's format \u2014 carousel slide outline, deck outline, video script and storyboard, or the text draft \u2014 by filling the narrative frame for the post's goal (the approved content-guideline of type frame for that goal, else the default frame). With takes (the RE-EDIT route), the script is the cut plan: what is kept of the takes' words, in order, and why (the facecam-edit skill's plan), so the person approves the cut before any pass is built.",
12628
12636
  "expectedOutputs": [
12629
12637
  {
@@ -12718,7 +12726,7 @@ var DATA = {
12718
12726
  "key": "schedule",
12719
12727
  "name": "Schedule",
12720
12728
  "category": "started",
12721
- "subjectStatus": "Scheduled",
12729
+ "onApproved": "Scheduled",
12722
12730
  "goal": "Set the publish date and queue the post on its account: its post-account, else the Personal account (account-owner) of its network (founder, 4 Nov). When that platform carries unipile-account-id (Unipile, the default; decision A, 3 Nov: approving is the yes, nothing asks again), arm it for Publish due posts in one write: post-account set to that platform, publish-account-id to its unipile-account-id, publish-as-organization to its linkedin-organization-id when it is a LinkedIn company page, publish-text to the approved caption or text, publish-media to the approved pictures or video as pod file ids in order (at most 10), publish-at-ms to 09:00 Europe/Paris on the publish date in epoch milliseconds, and publish-outcome queued. Publish due posts sends it through unipile_publish_post on that day and writes the result back. For each other account in post-copy-to (the same post) or post-reshare-on (a LinkedIn repost), create one Scheduled post armed the same way on that account, with post-copy-of set to this post and post-send-mode copy or reshare; a repost has empty publish-text and no media, and waits (publish-outcome waiting) until this post is out. When the account is a Postiz channel (it carries postiz-integration-id and postiz-provider), queue it with postiz_schedule_post: type schedule, the publish date, the approved text, the media links in order, and postEntityId set to this post. When a person approves that run, the pod records the returned postId on the post as postiz-post-id. Any other account: queue it where the account lives and say how.",
12723
12731
  "criteria": [
12724
12732
  {
@@ -12742,8 +12750,8 @@ var DATA = {
12742
12750
  "key": "publish",
12743
12751
  "name": "Publish",
12744
12752
  "category": "completed",
12745
- "subjectStatus": "Published",
12746
- "goal": "The post is live at its URL. Armed for Unipile, Publish due posts sends it on its day and writes Published, post-url and published-at itself; a send that fails writes publish-outcome failed and publish-error and leaves the post at Scheduled, for a person to fix and arm again. Queued through Postiz, Postiz reports it (its webhook records the URL and Published); otherwise a person confirms it, and approving writes Published.",
12753
+ "onApproved": "Published",
12754
+ "goal": "The post is live at its URL. Armed for Unipile, Publish due posts sends it on its day and writes Published, post-url and published-at itself; a send that fails writes publish-outcome failed and publish-error and leaves the post at Scheduled, for a person to fix and arm again. Queued through Postiz, Postiz reports it (its webhook records the URL and Published); otherwise a person moves the post to Published once it is live.",
12747
12755
  "gate": {
12748
12756
  "kind": "human"
12749
12757
  },
@@ -13143,7 +13151,7 @@ var DATA = {
13143
13151
  "key": "scheduled",
13144
13152
  "name": "Scheduled",
13145
13153
  "category": "started",
13146
- "subjectStatus": "Scheduled",
13154
+ "onApproved": "Scheduled",
13147
13155
  "goal": "Set the send date and queue the issue.",
13148
13156
  "criteria": [
13149
13157
  {
@@ -14030,9 +14038,6 @@ var DATA = {
14030
14038
  {
14031
14039
  "profile": "lead"
14032
14040
  },
14033
- {
14034
- "profile": "client"
14035
- },
14036
14041
  {
14037
14042
  "profile": "deal"
14038
14043
  },
@@ -15227,7 +15232,7 @@ var DATA = {
15227
15232
  {
15228
15233
  "name": "Qualify a lead",
15229
15234
  "description": 'Research one lead, decide with a person whether it is worth pursuing, and set a pursued lead qualified with "book a meeting" as its next action.',
15230
- "goalTemplate": 'Qualify this lead ({lead}). RESEARCH: verify and enrich only facts you can support \u2014 company, role, size, recent signal \u2014 and record the source of each. SCORE: assess fit against the offers and the ideal client, set the ICP score, qualification notes and outreach channels, and write the step you recommend as the lead\'s next action: `nextAction` one imperative line (e.g. "Send the first message on LinkedIn") and `nextActionAt` its date, and say in the qualification notes whether you recommend pursuing, nurturing or dropping it. Stop there: the pod asks the person to pick pursue, nurture or drop and wakes you with their answer, which is the decision. DECIDE: record it on the lead. NURTURE: set the lead to nurturing, with `nextAction` to check in again and `nextActionAt` the date they gave (three months out when they gave none). DROP: write their reason in `disqualificationReason` and move the lead to disqualified; that move is the person\'s (disqualified is human-only), so it comes back proposed for them to approve, which is success; never write it another way. PURSUE: only when they chose pursue, set the lead to qualified with `nextAction` "Book a meeting" (one line naming the channel, e.g. "Ask for a meeting on LinkedIn") and `nextActionAt` its date. Never create a deal: a deal is opened when a person records a booked meeting, and that same step converts the lead. Never mark the lead a client.',
15235
+ "goalTemplate": 'Qualify this lead ({lead}). RESEARCH: verify and enrich only facts you can support \u2014 company, role, size, recent signal \u2014 and record the source of each. SCORE: assess fit against the offers and the ideal client, set the ICP score, qualification notes and outreach channels, and write the step you recommend as the lead\'s next action: `nextAction` one imperative line (e.g. "Send the first message on LinkedIn") and `nextActionAt` its date, and say in the qualification notes whether you recommend pursuing, nurturing or dropping it. Stop there: the pod asks the person to pick pursue, nurture or drop and wakes you with their answer, which is the decision. DECIDE: record it on the lead. NURTURE: set the lead to nurturing, with `nextAction` to check in again and `nextActionAt` the date they gave (three months out when they gave none). DROP: write their reason in `disqualificationReason` and move the lead to disqualified; that move is the person\'s (disqualified is human-only), so it comes back proposed for them to approve, which is success; never write it another way. PURSUE: only when they chose pursue, set the lead to qualified with `nextAction` "Book a meeting" (one line naming the channel, e.g. "Ask for a meeting on LinkedIn") and `nextActionAt` its date. Never create a deal: a deal is opened when a person records a booked meeting. Never move the lead to converted and never mark it a client: the lead converts when the client signs, and that is a person\'s move.',
15231
15236
  "subjectProfile": {
15232
15237
  "profileSlug": "lead"
15233
15238
  },
@@ -15341,8 +15346,8 @@ var DATA = {
15341
15346
  "key": "pursue",
15342
15347
  "name": "Pursue",
15343
15348
  "category": "completed",
15344
- "subjectStatus": "qualified",
15345
- "goal": 'Only after the person chose pursue, set the lead qualified with nextAction "Book a meeting" (one line naming the channel) and its nextActionAt. Open no deal.',
15349
+ "onApproved": "qualified",
15350
+ "goal": 'Only after the person chose pursue, set the lead qualified yourself (update_facet on the lead role, leadStage qualified, expectedStatus the status you read; nothing else moves it) with nextAction "Book a meeting" (one line naming the channel) and its nextActionAt. Open no deal.',
15346
15351
  "criteria": [
15347
15352
  {
15348
15353
  "key": "lead-book-meeting",
@@ -15379,7 +15384,7 @@ var DATA = {
15379
15384
  {
15380
15385
  "name": "Win a deal",
15381
15386
  "description": "Take a deal from first conversation to won or lost \u2014 qualify it, write and send the proposal, negotiate, and hand a won deal to delivery, with a person deciding every commitment.",
15382
- "goalTemplate": `Work this deal ({deal}) through its stages; each stage moves the deal's commercial stage. QUALIFY: from the pod (the company, its people, every past message and meeting) and public sources, establish the four facts a proposal needs \u2014 the problem the buyer wants solved and what it costs them, a budget range, who signs, and when they need it \u2014 and link the people involved to the deal. Do not guess a fact: when one is missing, ask the person who owns the relationship. WRITE: draft the proposal document (scope, deliverables, timeline, price, terms) from the agency's offers and past won proposals, and set the deal's value and close date. SEND: a person approves the proposal before it goes to the client; nothing is sent without that approval. AWAIT: wait for the client's answer and record it on the deal. NEGOTIATE: its check reads that answer; log every objection and counter-offer and propose the next step. WON: once a person confirms the client said yes, reuse the engagement Operations already has for this company; only when there is none, open one at proposed with its client set to the company. Then attach the client role to the company with handoff status handed_off. The daily "Pick up handed-off clients" automation skips any client that already has an engagement, so no second one is opened. A lost deal is a person's call \u2014 record why it was lost.`,
15387
+ "goalTemplate": `Work this deal ({deal}) through its stages; each stage moves the deal's commercial stage when its work is approved (the sent proposal moves it to Proposal sent). QUALIFY: from the pod (the company, its people, every past message and meeting) and public sources, establish the four facts a proposal needs \u2014 the problem the buyer wants solved and what it costs them, a budget range, who signs, and when they need it \u2014 and link the people involved to the deal. Do not guess a fact: when one is missing, ask the person who owns the relationship. WRITE: draft the proposal document (scope, deliverables, timeline, price, terms) from the agency's offers and past won proposals, and set the deal's value and close date. SEND: a person approves the proposal before it goes to the client; nothing is sent without that approval. AWAIT: wait for the client's answer and record it on the deal. NEGOTIATE: its check reads that answer; log every objection and counter-offer and propose the next step. WON: once a person confirms the client said yes, propose moving the deal's lead (the company's lead, else the person's) to converted, which means signed. That move is the person's (converted is human-only), so it comes back proposed for them to approve, which is success. Never attach the client role and never open an engagement yourself: once the person approves, the pod stamps the lead, makes the company (or person) a client handed off to Operations, and Operations' "Onboard a client" opens or reuses the engagement. A lost deal is a person's call \u2014 record why it was lost.`,
15383
15388
  "subjectProfile": {
15384
15389
  "profileSlug": "deal"
15385
15390
  },
@@ -15414,11 +15419,6 @@ var DATA = {
15414
15419
  {
15415
15420
  "kind": "document",
15416
15421
  "label": "Proposal"
15417
- },
15418
- {
15419
- "kind": "engagement",
15420
- "label": "Client engagement",
15421
- "relationToSubject": "relates_to"
15422
15422
  }
15423
15423
  ],
15424
15424
  "metadata": {
@@ -15497,8 +15497,15 @@ var DATA = {
15497
15497
  "key": "send",
15498
15498
  "name": "Send proposal",
15499
15499
  "category": "started",
15500
- "subjectStatus": "proposed",
15501
- "goal": "A person approves the proposal; then send it to the decision maker and record when.",
15500
+ "onApproved": "proposed",
15501
+ "goal": "A person approves the proposal; then send it to the decision maker with send_message and record when. Once it has gone, mark this stage's Sent proposal output done with the sent message as its ref (update_run); that moves the deal to Proposal sent. Never move the deal yourself.",
15502
+ "expectedOutputs": [
15503
+ {
15504
+ "kind": "document",
15505
+ "label": "Sent proposal",
15506
+ "relationToSubject": "none"
15507
+ }
15508
+ ],
15502
15509
  "gate": {
15503
15510
  "kind": "human"
15504
15511
  },
@@ -15527,6 +15534,7 @@ var DATA = {
15527
15534
  "name": "Negotiate",
15528
15535
  "category": "started",
15529
15536
  "subjectStatus": "negotiating",
15537
+ "onApproved": "won",
15530
15538
  "goal": "Answer objections, log every counter-offer on the deal, and propose the next step.",
15531
15539
  "gate": {
15532
15540
  "kind": "check"
@@ -15549,8 +15557,7 @@ var DATA = {
15549
15557
  "key": "won",
15550
15558
  "name": "Won",
15551
15559
  "category": "completed",
15552
- "subjectStatus": "won",
15553
- "goal": "A person confirms the client said yes; then reuse the company's engagement in Operations (open one only when none exists) and attach the client role to the company.",
15560
+ "goal": "A person confirms the client said yes; then propose moving the deal's lead to converted (signed), which the person approves. That approved move makes the company (or person) a client handed off to Operations, which onboards it.",
15554
15561
  "gate": {
15555
15562
  "kind": "human"
15556
15563
  },
@@ -16220,7 +16227,7 @@ var DATA = {
16220
16227
  {
16221
16228
  "name": "Personalized Outreach",
16222
16229
  "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.",
16223
- "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 (channel.resolve, then feed.read) 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 channel.resolve and feed.read: 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 qualified 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.`,
16230
+ "goalTemplate": `Run this outreach campaign ({campaign}) on {channel}; each stage moves its status when its work is approved, and at Finish you move it to completed yourself. 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 (channel.resolve, then feed.read) 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 channel.resolve and feed.read: 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 qualified 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.`,
16224
16231
  "subjectProfile": {
16225
16232
  "profileSlug": "campaign"
16226
16233
  },
@@ -16324,8 +16331,8 @@ var DATA = {
16324
16331
  "key": "finish",
16325
16332
  "name": "Finish",
16326
16333
  "category": "completed",
16327
- "subjectStatus": "completed",
16328
- "goal": "Record how many messages were sent, how many got a reply and how many led to a booked meeting.",
16334
+ "onApproved": "completed",
16335
+ "goal": "Record how many messages were sent, how many got a reply and how many led to a booked meeting, then move the campaign to completed yourself (update_entity, campaign-status completed, expectedStatus active); nothing else moves it, and your move into completed comes back proposed for the person to approve, which is success.",
16329
16336
  "criteria": [
16330
16337
  {
16331
16338
  "key": "outreach-reply-rate",
@@ -16341,7 +16348,7 @@ var DATA = {
16341
16348
  {
16342
16349
  "name": "Read the reply to an outreach message",
16343
16350
  "description": "Once a person has marked an outreach touch sent (messages recorded before the channels), watch for the reply; summarise it and propose the next step \u2014 the free estimate or a meeting \u2014 and never open a deal.",
16344
- "goalTemplate": 'Watch this sent outreach message ({touch}) for a reply; each stage moves its status. WAIT: watch its conversation. Set it bounced when it did not reach the person, or no response when its lead\'s next action date passes with no reply; that date is the cadence\'s (the sent day + 3 days after the first message, the sent day + 7 days after each follow-up), so when the lead has none, count from this message\'s sent date. The next message is drafted by "Follow up on leads in outreach", not here. When this message is the second follow-up (the third message sent to the lead) and its date passes with no reply, mark it no response and propose moving the lead to nurturing through the status door, with its expected status; there is never a third follow-up. REPLIED: its check reads the reply. Summarise it for a person. When they show interest, propose the next step \u2014 prepare the free estimate ("Prepare a pre-sale estimate") or book a meeting \u2014 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 you propose on the lead as `nextAction`, one imperative line (e.g. "Book a meeting with Ana"; "Check in again" for nurturing), and `nextActionAt`, the date they named or today; never leave it only in the summary. BOUNCED: set the lead\'s `nextAction` to find another way to reach them and `nextActionAt` to today. Never open a deal: a deal is opened only when a person records a booked meeting. Never answer the reply yourself; a person does. Opened is recorded by a person.',
16351
+ "goalTemplate": 'Watch this sent outreach message ({touch}) for a reply; each stage moves its status when its work is approved. WAIT: watch its conversation. Set it bounced when it did not reach the person, or no response when its lead\'s next action date passes with no reply; that date is the cadence\'s (the sent day + 3 days after the first message, the sent day + 7 days after each follow-up), so when the lead has none, count from this message\'s sent date. The next message is drafted by "Follow up on leads in outreach", not here. When this message is the second follow-up (the third message sent to the lead) and its date passes with no reply, mark it no response and propose moving the lead to nurturing through the status door, with its expected status; there is never a third follow-up. REPLIED: its check reads the reply. Summarise it for a person. When they show interest, propose the next step \u2014 prepare the free estimate ("Prepare a pre-sale estimate") or book a meeting \u2014 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 you propose on the lead as `nextAction`, one imperative line (e.g. "Book a meeting with Ana"; "Check in again" for nurturing), and `nextActionAt`, the date they named or today; never leave it only in the summary. BOUNCED: set the lead\'s `nextAction` to find another way to reach them and `nextActionAt` to today. Never open a deal: a deal is opened only when a person records a booked meeting. Never answer the reply yourself; a person does. Opened is recorded by a person.',
16345
16352
  "subjectProfile": {
16346
16353
  "profileSlug": "outreach-touch"
16347
16354
  },
@@ -16371,6 +16378,7 @@ var DATA = {
16371
16378
  "key": "wait",
16372
16379
  "name": "Waiting for a reply",
16373
16380
  "category": "started",
16381
+ "onApproved": "replied",
16374
16382
  "goal": "Watch the conversation for a reply, a bounce, or the follow-up date passing in silence.",
16375
16383
  "indefinite": true,
16376
16384
  "criteria": [
@@ -16387,7 +16395,6 @@ var DATA = {
16387
16395
  "key": "replied",
16388
16396
  "name": "Replied",
16389
16397
  "category": "completed",
16390
- "subjectStatus": "replied",
16391
16398
  "goal": "Summarise the reply for a person and propose the next step \u2014 the free estimate or a meeting; never open a deal.",
16392
16399
  "gate": {
16393
16400
  "kind": "check"
@@ -18499,7 +18506,7 @@ var DATA = {
18499
18506
  {
18500
18507
  "name": "Bill a client",
18501
18508
  "description": "Take an invoice from draft to paid \u2014 prepare it, send it with a person's approval, chase it when late, and confirm the payment.",
18502
- "goalTemplate": "Bill this invoice ({invoice}); each stage moves its status. PREPARE: set the invoice number, customer, amount, currency, issue date and due date from the engagement or deal it bills, and check the amount against what was agreed. SEND: a person approves the invoice before it goes to the client; record the issue date. DUE: wait for the payment; look for it in the bank or payment provider (match the amount and the reference), and move on once it is found or the due date has passed. PAID: its check reads the payment; set the paid date and link the account it was deposited to. When the due date passed unpaid, the check sends the run to CHASE instead: the invoice becomes overdue and you draft a polite reminder for a person to send; once the payment is found, move the run back to Paid. Voiding an invoice is a person's call.",
18509
+ "goalTemplate": "Bill this invoice ({invoice}); each stage moves its status when its work is approved. PREPARE: set the invoice number, customer, amount, currency, issue date and due date from the engagement or deal it bills, and check the amount against what was agreed. SEND: a person approves the invoice before it goes to the client; record the issue date. DUE: wait for the payment; look for it in the bank or payment provider (match the amount and the reference), and move on once it is found or the due date has passed. PAID: its check reads the payment; set the paid date and link the account it was deposited to. When the due date passed unpaid, the check sends the run to CHASE instead: the invoice becomes overdue and you draft a polite reminder for a person to send; once the payment is found, move the run back to Paid. Voiding an invoice is a person's call.",
18503
18510
  "subjectProfile": {
18504
18511
  "profileSlug": "invoice"
18505
18512
  },
@@ -18558,8 +18565,14 @@ var DATA = {
18558
18565
  "key": "send",
18559
18566
  "name": "Send",
18560
18567
  "category": "started",
18561
- "subjectStatus": "sent",
18562
- "goal": "A person approves the invoice before it goes to the client.",
18568
+ "onApproved": "sent",
18569
+ "goal": "A person approves the invoice before it goes to the client; then send it to the client with send_message. Once it has gone, mark the Invoice sent to the client output done with the sent message as its ref (update_run); that moves the invoice to sent. Never move the invoice yourself.",
18570
+ "expectedOutputs": [
18571
+ {
18572
+ "kind": "document",
18573
+ "label": "Invoice sent to the client"
18574
+ }
18575
+ ],
18563
18576
  "gate": {
18564
18577
  "kind": "human"
18565
18578
  },
@@ -18660,7 +18673,7 @@ var DATA = {
18660
18673
  {
18661
18674
  "name": "Approve an expense",
18662
18675
  "description": "Review an expense against its budget, get a person's approval, and record the payment.",
18663
- "goalTemplate": "Handle this expense ({expense}); each stage moves its status. REVIEW: check the vendor, amount, date, category and receipt, link the budget it counts against and say how much of that budget is left after it. APPROVE: a person approves or rejects the spend. PAY: a person confirms it was paid; link the account it was paid from. Reimbursement and rejection are a person's call.",
18676
+ "goalTemplate": "Handle this expense ({expense}); each stage moves its status when its work is approved. REVIEW: check the vendor, amount, date, category and receipt, link the budget it counts against and say how much of that budget is left after it. APPROVE: a person approves or rejects the spend. PAY: a person confirms it was paid; link the account it was paid from. Reimbursement and rejection are a person's call.",
18664
18677
  "subjectProfile": {
18665
18678
  "profileSlug": "expense"
18666
18679
  },
@@ -18686,6 +18699,7 @@ var DATA = {
18686
18699
  "name": "Review",
18687
18700
  "category": "planned",
18688
18701
  "subjectStatus": "pending",
18702
+ "onApproved": "approved",
18689
18703
  "goal": "Check the expense's facts and receipt and link the budget it counts against.",
18690
18704
  "criteria": [
18691
18705
  {
@@ -18708,7 +18722,7 @@ var DATA = {
18708
18722
  "key": "approve",
18709
18723
  "name": "Approve",
18710
18724
  "category": "started",
18711
- "subjectStatus": "approved",
18725
+ "onApproved": "paid",
18712
18726
  "goal": "A person approves the spend.",
18713
18727
  "gate": {
18714
18728
  "kind": "human"
@@ -18721,7 +18735,6 @@ var DATA = {
18721
18735
  "key": "pay",
18722
18736
  "name": "Pay",
18723
18737
  "category": "completed",
18724
- "subjectStatus": "paid",
18725
18738
  "goal": "A person confirms the expense was paid; link the account it was paid from.",
18726
18739
  "gate": {
18727
18740
  "kind": "human"
@@ -19262,6 +19275,10 @@ var DATA = {
19262
19275
  "key": "prospect",
19263
19276
  "category": "open"
19264
19277
  },
19278
+ {
19279
+ "key": "onboarding",
19280
+ "category": "open"
19281
+ },
19265
19282
  {
19266
19283
  "key": "active",
19267
19284
  "category": "active"
@@ -19288,6 +19305,7 @@ var DATA = {
19288
19305
  "inputType": "select",
19289
19306
  "enumValues": [
19290
19307
  "prospect",
19308
+ "onboarding",
19291
19309
  "active",
19292
19310
  "paused",
19293
19311
  "former",
@@ -20990,6 +21008,10 @@ var DATA = {
20990
21008
  "key": "prospect",
20991
21009
  "category": "open"
20992
21010
  },
21011
+ {
21012
+ "key": "onboarding",
21013
+ "category": "open"
21014
+ },
20993
21015
  {
20994
21016
  "key": "active",
20995
21017
  "category": "active"
@@ -21016,6 +21038,7 @@ var DATA = {
21016
21038
  "inputType": "select",
21017
21039
  "enumValues": [
21018
21040
  "prospect",
21041
+ "onboarding",
21019
21042
  "active",
21020
21043
  "paused",
21021
21044
  "former",
@@ -27503,7 +27526,7 @@ Report the submission's current state as STRICT JSON, using ONLY these vocabular
27503
27526
  {
27504
27527
  "name": "Run a campaign",
27505
27528
  "description": "Take a campaign from brief to results \u2014 goal, audience, plan, content, launch with a person's approval, and a report on the leads it brought.",
27506
- "goalTemplate": "Run this campaign ({campaign}); each stage moves its status. BRIEF: write the campaign's goal as a number, its target audience, channel, budget, start and end dates, from the brand kit and the agency's offers. PLAN: list the pieces to make and the outreach to send, each with a date. MAKE: create each piece as a post at the Idea status in Content OS and each outreach sequence as an outreach campaign, so their own processes produce them. LAUNCH: a person approves the launch; nothing is published, sent or paid for before that. REPORT: after the end date, record the lead count and conversion rate, link every new lead the campaign brought, and write what worked and what to change. Pausing or cancelling is a person's call.",
27529
+ "goalTemplate": "Run this campaign ({campaign}); each stage moves its status when its work is approved. BRIEF: write the campaign's goal as a number, its target audience, channel, budget, start and end dates, from the brand kit and the agency's offers. PLAN: list the pieces to make and the outreach to send, each with a date. MAKE: create each piece as a post at the Idea status in Content OS and each outreach sequence as an outreach campaign, so their own processes produce them. LAUNCH: a person approves the launch; nothing is published, sent or paid for before that. REPORT: after the end date, record the lead count and conversion rate, link every new lead the campaign brought, and write what worked and what to change. Pausing or cancelling is a person's call.",
27507
27530
  "subjectProfile": {
27508
27531
  "profileSlug": "campaign"
27509
27532
  },
@@ -27629,8 +27652,8 @@ Report the submission's current state as STRICT JSON, using ONLY these vocabular
27629
27652
  "key": "report",
27630
27653
  "name": "Report",
27631
27654
  "category": "completed",
27632
- "subjectStatus": "completed",
27633
- "goal": "Record lead count and conversion rate, link the leads, and write what to change.",
27655
+ "onApproved": "completed",
27656
+ "goal": "Record lead count and conversion rate, link the leads, and write what to change, then move the campaign to completed yourself (update_entity, campaign-status completed, expectedStatus active); nothing else moves it, and your move into completed comes back proposed for the person to approve, which is success.",
27634
27657
  "criteria": [
27635
27658
  {
27636
27659
  "key": "campaign-results",
@@ -28805,7 +28828,7 @@ Pick the SINGLE best provider for this need, or none if nothing fits well. Respo
28805
28828
  "slug": "operations",
28806
28829
  "domain": "company",
28807
28830
  "name": "Operations",
28808
- "description": "Deliver client work end to end \u2014 the engagements you're running, the deliverables due inside them, and the contracts that govern them. Won deals from CRM hand off into engagements here.",
28831
+ "description": "Deliver client work end to end \u2014 the clients you serve, the engagements you're running, the deliverables due inside them, and the contracts that govern them. A lead that signs in the CRM becomes a client here, is onboarded, and its work runs as an engagement.",
28809
28832
  "icon": "briefcase",
28810
28833
  "color": "#0F766E",
28811
28834
  "tags": [
@@ -28874,6 +28897,9 @@ Pick the SINGLE best provider for this need, or none if nothing fits well. Respo
28874
28897
  },
28875
28898
  {
28876
28899
  "profile": "deliverable"
28900
+ },
28901
+ {
28902
+ "profile": "client"
28877
28903
  }
28878
28904
  ]
28879
28905
  }
@@ -28898,10 +28924,17 @@ Pick the SINGLE best provider for this need, or none if nothing fits well. Respo
28898
28924
  "slug": "foundation",
28899
28925
  "kind": "workspace",
28900
28926
  "relation": "require",
28901
- "reason": "Provides the pod-wide `client` role the daily client-briefing automation queries."
28927
+ "reason": "Provides the pod-wide `client` role this space onboards and serves (Clients board, Onboard a client) and its automations query."
28902
28928
  }
28903
28929
  ],
28904
28930
  "profiles": [
28931
+ {
28932
+ "slug": "client",
28933
+ "displayName": "Client",
28934
+ "scope": "shared",
28935
+ "profileKind": "role",
28936
+ "properties": []
28937
+ },
28905
28938
  {
28906
28939
  "slug": "engagement",
28907
28940
  "displayName": "Engagement",
@@ -28956,7 +28989,7 @@ Pick the SINGLE best provider for this need, or none if nothing fits well. Respo
28956
28989
  "slug": "engagement-client",
28957
28990
  "label": "Client",
28958
28991
  "valueType": "entity_id",
28959
- "targetProfileSlug": "company",
28992
+ "targetProfileSlug": "client",
28960
28993
  "inputType": "entity_select"
28961
28994
  },
28962
28995
  {
@@ -29278,6 +29311,16 @@ Pick the SINGLE best provider for this need, or none if nothing fits well. Respo
29278
29311
  }
29279
29312
  ],
29280
29313
  "views": [
29314
+ {
29315
+ "name": "Clients",
29316
+ "slug": "clients",
29317
+ "type": "kanban",
29318
+ "scopeProfileSlug": "client",
29319
+ "config": {
29320
+ "groupByField": "clientStatus"
29321
+ },
29322
+ "description": "Clients on a board by status, from onboarding to active."
29323
+ },
29281
29324
  {
29282
29325
  "name": "Engagements",
29283
29326
  "slug": "engagements",
@@ -29369,6 +29412,12 @@ Pick the SINGLE best provider for this need, or none if nothing fits well. Respo
29369
29412
  "defaultView": "Engagements",
29370
29413
  "defaultApp": null,
29371
29414
  "sidebarItems": [
29415
+ {
29416
+ "kind": "view",
29417
+ "viewName": "Clients",
29418
+ "label": "Clients",
29419
+ "icon": "users"
29420
+ },
29372
29421
  {
29373
29422
  "kind": "view",
29374
29423
  "viewName": "Engagements",
@@ -29662,7 +29711,7 @@ Recent conversation (oldest first, JSON): {{steps.read-comms.output.messages}}`
29662
29711
  {
29663
29712
  "key": "operations-crm-handoff-pickup",
29664
29713
  "name": "Pick up handed-off clients",
29665
- "description": "Daily. Finds pod-wide clients the CRM marked ready or handed off that have no engagement yet, and opens the delivery shell for them \u2014 a proposed engagement plus a draft contract, both linked to the client. Deduped per client, so it is safe to re-run.",
29714
+ "description": "Daily safety net. Finds pod-wide clients the CRM marked ready or handed off that have no engagement yet (Onboard a client normally opens it), and opens the delivery shell for them \u2014 a proposed engagement plus a draft contract, both linked to the client. Deduped per client on the engagement's client, the key Onboard a client uses too, so it is safe to re-run.",
29666
29715
  "triggerType": "cron",
29667
29716
  "triggerConfig": {
29668
29717
  "expression": "0 7 * * *"
@@ -29943,10 +29992,110 @@ Recent conversation (oldest first, JSON): {{steps.read-comms.output.messages}}`
29943
29992
  }
29944
29993
  ],
29945
29994
  "playbooks": [
29995
+ {
29996
+ "name": "Onboard a client",
29997
+ "description": "Welcome a new client, open or reuse their engagement, and have a person confirm the kick-off \u2014 the client moves from onboarding to active.",
29998
+ "goalTemplate": `Onboard this new client ({client}); each stage moves the client's status. WELCOME: read how they became a client \u2014 the converted lead, the won deal and its proposal, every message with them, and the handoff notes on the client role \u2014 and write a short brief in the client's notes: what they bought, who signs, and what they expect first. Draft one welcome message to them as a proposed message in their channel, through the pod's send door (messaging.send): a person approves it before it is sent; never send it another way. ENGAGEMENT: find the engagement whose client is this client (the daily pick-up may already have opened one) and reuse it. Only when there is none, open one at proposed with its client set to this client and its scope and value from the won deal, and link it to the client. Never open a second one. Opening it starts "Deliver a client engagement". KICK-OFF: propose the kick-off (its date, who attends, what is decided there) as the engagement's next step; a person confirms the kick-off happened, which makes the client active.`,
29999
+ "subjectProfile": {
30000
+ "profileSlug": "client"
30001
+ },
30002
+ "activators": [
30003
+ {
30004
+ "on": "created",
30005
+ "mode": "propose"
30006
+ }
30007
+ ],
30008
+ "params": [
30009
+ {
30010
+ "name": "client",
30011
+ "type": "entity",
30012
+ "label": "Client",
30013
+ "required": true
30014
+ }
30015
+ ],
30016
+ "executor": "is-agent",
30017
+ "status": "active",
30018
+ "tools": [
30019
+ "list_records",
30020
+ "send_message"
30021
+ ],
30022
+ "metadata": {
30023
+ "lineage": {
30024
+ "method": "Agency client onboarding: welcome, engagement set-up, kick-off"
30025
+ }
30026
+ },
30027
+ "stages": [
30028
+ {
30029
+ "key": "welcome",
30030
+ "name": "Welcome",
30031
+ "category": "planned",
30032
+ "subjectStatus": "onboarding",
30033
+ "goal": "Write the client brief in the client's notes and propose a welcome message in their channel for a person to approve.",
30034
+ "criteria": [
30035
+ {
30036
+ "key": "welcome-brief",
30037
+ "statement": "The client's notes hold a short brief \u2014 what they bought, who signs, and what they expect first.",
30038
+ "check": {
30039
+ "kind": "judge"
30040
+ }
30041
+ },
30042
+ {
30043
+ "key": "welcome-message-proposed",
30044
+ "statement": "A welcome message to the client is proposed in their channel for a person to approve.",
30045
+ "check": {
30046
+ "kind": "judge"
30047
+ }
30048
+ }
30049
+ ]
30050
+ },
30051
+ {
30052
+ "key": "engagement",
30053
+ "name": "Open or reuse the engagement",
30054
+ "category": "started",
30055
+ "goal": "Reuse the engagement whose client is this client; only when none exists, open one at proposed with its client set and link it to the client.",
30056
+ "expectedOutputs": [
30057
+ {
30058
+ "kind": "engagement",
30059
+ "label": "Client engagement",
30060
+ "relationToSubject": "engagement_for_client"
30061
+ }
30062
+ ],
30063
+ "criteria": [
30064
+ {
30065
+ "key": "engagement-one-per-client",
30066
+ "statement": "Exactly one engagement names this client as its client.",
30067
+ "check": {
30068
+ "kind": "judge"
30069
+ }
30070
+ },
30071
+ {
30072
+ "key": "engagement-linked",
30073
+ "statement": "That engagement is linked to the client.",
30074
+ "check": {
30075
+ "kind": "judge"
30076
+ }
30077
+ }
30078
+ ]
30079
+ },
30080
+ {
30081
+ "key": "kickoff",
30082
+ "name": "Kick-off confirmed",
30083
+ "category": "completed",
30084
+ "subjectStatus": "active",
30085
+ "goal": "A person confirms the kick-off happened; the client becomes active.",
30086
+ "gate": {
30087
+ "kind": "human"
30088
+ },
30089
+ "onFail": {
30090
+ "toStage": "engagement"
30091
+ }
30092
+ }
30093
+ ]
30094
+ },
29946
30095
  {
29947
30096
  "name": "Deliver a client engagement",
29948
30097
  "description": "Run one client engagement from kick-off to close \u2014 scope, contract, deliverables, final review and the closing invoice \u2014 with a person approving the start and the close.",
29949
- "goalTemplate": "Run this client engagement ({engagement}); each stage moves its status. KICK-OFF: read the won deal, the proposal and every message with the client; write the scope, owner, start and end dates and value on the engagement; create one deliverable per promised output (each with a due date and an owner); reuse the draft contract already linked to the engagement (the daily client pick-up opens one), and create a draft contract only when none is linked. START: a person confirms the contract is signed and the work may start. DELIVER: track every deliverable to accepted (or cancelled by a person), flag any deliverable past its due date, and end with your answer: a short status of what moved and what is late. CLOSE: once every deliverable is accepted or cancelled, write the closing review (what was delivered, what slipped, what the client said), create the closing invoice in Finance at the draft status for the engagement value still owed (when the engagement bills per deliverable, subtract every milestone invoice already created for it), and propose the renewal or next engagement. A person approves the close. Pausing or cancelling an engagement is a person's call.",
30098
+ "goalTemplate": "Run this client engagement ({engagement}); each stage moves its status when its work is approved. KICK-OFF: read the won deal, the proposal and every message with the client; write the scope, owner, start and end dates and value on the engagement; create one deliverable per promised output (each with a due date and an owner); reuse the draft contract already linked to the engagement (the daily client pick-up opens one), and create a draft contract only when none is linked. START: a person confirms the contract is signed and the work may start. DELIVER: track every deliverable to accepted (or cancelled by a person), flag any deliverable past its due date, and end with your answer: a short status of what moved and what is late. CLOSE: once every deliverable is accepted or cancelled, write the closing review (what was delivered, what slipped, what the client said), create the closing invoice in Finance at the draft status for the engagement value still owed (when the engagement bills per deliverable, subtract every milestone invoice already created for it), and propose the renewal or next engagement. A person approves the close. Pausing or cancelling an engagement is a person's call.",
29950
30099
  "subjectProfile": {
29951
30100
  "profileSlug": "engagement"
29952
30101
  },
@@ -30044,6 +30193,7 @@ Recent conversation (oldest first, JSON): {{steps.read-comms.output.messages}}`
30044
30193
  "key": "deliver",
30045
30194
  "name": "Deliver",
30046
30195
  "category": "started",
30196
+ "onApproved": "completed",
30047
30197
  "goal": "Track every deliverable to accepted or cancelled, and end with a short status of what moved and what is late as your answer.",
30048
30198
  "indefinite": true,
30049
30199
  "criteria": [
@@ -30067,7 +30217,6 @@ Recent conversation (oldest first, JSON): {{steps.read-comms.output.messages}}`
30067
30217
  "key": "close",
30068
30218
  "name": "Close",
30069
30219
  "category": "completed",
30070
- "subjectStatus": "completed",
30071
30220
  "goal": "Write the closing review, create the closing invoice, propose the renewal; a person approves the close.",
30072
30221
  "gate": {
30073
30222
  "kind": "human"
@@ -30081,7 +30230,7 @@ Recent conversation (oldest first, JSON): {{steps.read-comms.output.messages}}`
30081
30230
  {
30082
30231
  "name": "Deliver a deliverable",
30083
30232
  "description": "Take one deliverable from in progress to accepted by the client \u2014 plan, produce, review internally, send, get the client's sign-off, and bill it when the engagement bills per deliverable.",
30084
- "goalTemplate": "Deliver this deliverable ({deliverable}); each stage moves its status. PLAN: read the engagement's scope and the client's brief, and write what done looks like for this deliverable. PRODUCE: make it, or break it into tasks for the people who will. REVIEW: check it against what done looks like before anyone outside sees it. SEND: a person approves before it goes to the client; record the date it was delivered. ACCEPTED: a person confirms the client accepted it; if the client asked for changes, go back to producing. Then read the engagement's billing: only when it bills per deliverable, create this deliverable's invoice in Finance at the draft status for its share of the engagement value, linked to the deliverable. When it bills at close, create no invoice; the engagement's close bills it.",
30233
+ "goalTemplate": "Deliver this deliverable ({deliverable}); each stage moves its status when its work is approved. PLAN: read the engagement's scope and the client's brief, and write what done looks like for this deliverable. PRODUCE: make it, or break it into tasks for the people who will. REVIEW: check it against what done looks like before anyone outside sees it. SEND: a person approves before it goes to the client; record the date it was delivered. ACCEPTED: a person confirms the client accepted it; if the client asked for changes, go back to producing. Then read the engagement's billing: only when it bills per deliverable, create this deliverable's invoice in Finance at the draft status for its share of the engagement value, linked to the deliverable. When it bills at close, create no invoice; the engagement's close bills it.",
30085
30234
  "subjectProfile": {
30086
30235
  "profileSlug": "deliverable"
30087
30236
  },
@@ -30166,7 +30315,7 @@ Recent conversation (oldest first, JSON): {{steps.read-comms.output.messages}}`
30166
30315
  "key": "send",
30167
30316
  "name": "Send to client",
30168
30317
  "category": "started",
30169
- "subjectStatus": "delivered",
30318
+ "onApproved": "delivered",
30170
30319
  "goal": "A person approves sending; record the delivered date.",
30171
30320
  "gate": {
30172
30321
  "kind": "human"
@@ -30211,7 +30360,7 @@ Recent conversation (oldest first, JSON): {{steps.read-comms.output.messages}}`
30211
30360
  {
30212
30361
  "name": "Get a contract signed",
30213
30362
  "description": "Take a client contract from draft to signed and active, with a person approving what is sent and confirming the signature.",
30214
- "goalTemplate": "Get this contract ({contract}) signed; each stage moves its status. DRAFT: fill the contract from the engagement's scope, value, dates and the agency's standard terms, and list every term that differs from the standard. SEND: a person approves the contract before it goes to the client; once it went, the pod asks the person for the signed file and wakes you with it. SIGNED: link the signed file on the contract; the person's approval confirms both sides signed. ACTIVE: set the start and end dates and link the signed document. Expiry and termination are a person's call.",
30363
+ "goalTemplate": "Get this contract ({contract}) signed; each stage moves its status when its work is approved. DRAFT: fill the contract from the engagement's scope, value, dates and the agency's standard terms, and list every term that differs from the standard. SEND: a person approves the contract before it goes to the client; once it went, the pod asks the person for the signed file and wakes you with it. SIGNED: link the signed file on the contract; the person's approval confirms both sides signed. ACTIVE: set the start and end dates and link the signed document. Expiry and termination are a person's call.",
30215
30364
  "subjectProfile": {
30216
30365
  "profileSlug": "contract"
30217
30366
  },
@@ -30265,7 +30414,7 @@ Recent conversation (oldest first, JSON): {{steps.read-comms.output.messages}}`
30265
30414
  "key": "send",
30266
30415
  "name": "Send",
30267
30416
  "category": "started",
30268
- "subjectStatus": "sent",
30417
+ "onApproved": "sent",
30269
30418
  "goal": "A person approves the contract before it goes to the client.",
30270
30419
  "gate": {
30271
30420
  "kind": "human"
@@ -30306,8 +30455,8 @@ Recent conversation (oldest first, JSON): {{steps.read-comms.output.messages}}`
30306
30455
  "key": "active",
30307
30456
  "name": "Active",
30308
30457
  "category": "completed",
30309
- "subjectStatus": "active",
30310
- "goal": "Set the dates and link the signed document on the contract.",
30458
+ "onApproved": "active",
30459
+ "goal": "Set the dates and link the signed document on the contract, then move the contract to active yourself (update_entity, contract-status active, expectedStatus signed); nothing else moves it.",
30311
30460
  "criteria": [
30312
30461
  {
30313
30462
  "key": "contract-document-linked",
@@ -32168,7 +32317,7 @@ Recent conversation (oldest first, JSON): {{steps.read-comms.output.messages}}`
32168
32317
  {
32169
32318
  "name": "Research a Question",
32170
32319
  "description": "Investigate a question end-to-end \u2014 gather and rank sources (keeping the rejected ones), weigh hypotheses, emit findings with calibrated confidence, and map them onto the knowledge graph.",
32171
- "goalTemplate": "Investigate the question {question} and record the WHOLE investigation, not just the answer; each stage moves the question's status. FRAME: restate the question so it can be answered, and say what evidence would answer it. GATHER: use the source-triage skill to gather sources widely via web search, classify each by type and credibility, and create a `source` entity for every one \u2014 including the ones you rejected, marked rejected with a reason (never silently drop a source). WEIGH: form the candidate answers as `hypothesis` entities that answer the question; link every source that bears on a hypothesis with `supports` or `contradicts`; use the evidence-synthesis skill to emit `research-finding` entities with honestly calibrated confidence, each `supported_by` its sources and `derived_from` this research; use the concept-cartography skill to place the findings onto the knowledge map. ANSWER: create the `research` entity that `investigates` the question and `explored` the sources, write its conclusion and confidence, and set the question to answered. Abandoning a question is a person's call. Every write is proposal-gated and reviewable.",
32320
+ "goalTemplate": "Investigate the question {question} and record the WHOLE investigation, not just the answer; each stage moves the question's status when its work is approved. FRAME: restate the question so it can be answered, and say what evidence would answer it. GATHER: use the source-triage skill to gather sources widely via web search, classify each by type and credibility, and create a `source` entity for every one \u2014 including the ones you rejected, marked rejected with a reason (never silently drop a source). WEIGH: form the candidate answers as `hypothesis` entities that answer the question; link every source that bears on a hypothesis with `supports` or `contradicts`; use the evidence-synthesis skill to emit `research-finding` entities with honestly calibrated confidence, each `supported_by` its sources and `derived_from` this research; use the concept-cartography skill to place the findings onto the knowledge map. ANSWER: create the `research` entity that `investigates` the question and `explored` the sources, write its conclusion and confidence, and set the question to answered. Abandoning a question is a person's call. Every write is proposal-gated and reviewable.",
32172
32321
  "subjectProfile": {
32173
32322
  "profileSlug": "question"
32174
32323
  },
@@ -32245,6 +32394,7 @@ Recent conversation (oldest first, JSON): {{steps.read-comms.output.messages}}`
32245
32394
  "key": "weigh",
32246
32395
  "name": "Weigh",
32247
32396
  "category": "started",
32397
+ "onApproved": "answered",
32248
32398
  "goal": "Form hypotheses, link evidence for and against, and emit findings with calibrated confidence.",
32249
32399
  "criteria": [
32250
32400
  {
@@ -32267,7 +32417,6 @@ Recent conversation (oldest first, JSON): {{steps.read-comms.output.messages}}`
32267
32417
  "key": "answer",
32268
32418
  "name": "Answer",
32269
32419
  "category": "completed",
32270
- "subjectStatus": "answered",
32271
32420
  "goal": "Record the research, its conclusion and confidence, and mark the question answered.",
32272
32421
  "gate": {
32273
32422
  "kind": "check"
@@ -32740,6 +32889,7 @@ counter-evidence: research that only kept what agreed with it isn't research.
32740
32889
  "name": "Prepare",
32741
32890
  "category": "started",
32742
32891
  "subjectStatus": "proposed",
32892
+ "onApproved": "accepted",
32743
32893
  "goal": "Summarise the question, the options, the evidence and the recommendation in one screen.",
32744
32894
  "criteria": [
32745
32895
  {
@@ -32755,7 +32905,6 @@ counter-evidence: research that only kept what agreed with it isn't research.
32755
32905
  "key": "accept",
32756
32906
  "name": "Accept",
32757
32907
  "category": "completed",
32758
- "subjectStatus": "accepted",
32759
32908
  "goal": "A person accepts the decision.",
32760
32909
  "gate": {
32761
32910
  "kind": "human"
@@ -33759,6 +33908,138 @@ function groupByDomain(items, domainOf) {
33759
33908
 
33760
33909
  // src/validate-flow.ts
33761
33910
  import { PLAYBOOK_RUN_MODES } from "@synap-core/types/automations";
33911
+
33912
+ // ../../../synap-backend/packages/types/dist/needs/index.js
33913
+ var NEEDS = [
33914
+ {
33915
+ slug: "code-host",
33916
+ label: "Code host",
33917
+ description: "Where the code lives: repositories, branches, pull requests.",
33918
+ intents: ["fetch_record", "list_records", "run_external_job"],
33919
+ aliases: ["git-host", "repository"]
33920
+ },
33921
+ {
33922
+ slug: "deploy-target",
33923
+ label: "Deploy target",
33924
+ description: "Where a change is deployed and served.",
33925
+ intents: ["run_external_job", "fetch_record"],
33926
+ aliases: ["hosting"]
33927
+ },
33928
+ {
33929
+ slug: "gate",
33930
+ label: "Gate",
33931
+ description: "What checks a change before it lands: tests, typecheck, CI.",
33932
+ intents: ["run_external_job", "fetch_record"],
33933
+ aliases: ["ci"]
33934
+ },
33935
+ {
33936
+ slug: "payments",
33937
+ label: "Payments",
33938
+ description: "Where money is charged and recorded.",
33939
+ intents: ["list_records", "fetch_record"],
33940
+ aliases: []
33941
+ },
33942
+ {
33943
+ slug: "messaging",
33944
+ label: "Messaging",
33945
+ description: "Where messages are sent to people outside the pod.",
33946
+ intents: ["send_message", "request_connection"],
33947
+ aliases: ["chat"]
33948
+ },
33949
+ {
33950
+ slug: "email",
33951
+ label: "Email",
33952
+ description: "The mailbox that sends and reads email.",
33953
+ intents: ["send_message", "list_records", "fetch_record"],
33954
+ aliases: ["mail"]
33955
+ },
33956
+ {
33957
+ slug: "calendar",
33958
+ label: "Calendar",
33959
+ description: "Where meetings and events are scheduled.",
33960
+ intents: ["schedule_event", "list_records"],
33961
+ aliases: []
33962
+ },
33963
+ {
33964
+ slug: "file-store",
33965
+ label: "File store",
33966
+ description: "Where files are kept outside the pod.",
33967
+ intents: ["manage_file", "fetch_record", "list_records"],
33968
+ aliases: ["storage", "drive"]
33969
+ },
33970
+ {
33971
+ slug: "media-generation",
33972
+ label: "Media generation",
33973
+ description: "What makes and edits images, video and audio.",
33974
+ intents: ["generate_media", "edit_video", "transcribe_media"],
33975
+ aliases: ["media"]
33976
+ },
33977
+ {
33978
+ slug: "social-publishing",
33979
+ label: "Social publishing",
33980
+ description: "Where posts are published to social networks.",
33981
+ intents: ["publish_post"],
33982
+ aliases: ["social"]
33983
+ },
33984
+ {
33985
+ slug: "linkedin-reach",
33986
+ label: "LinkedIn reach",
33987
+ description: "What finds people and reaches them on LinkedIn.",
33988
+ intents: [
33989
+ "find_people",
33990
+ "request_connection",
33991
+ "send_message",
33992
+ "enrich_entity"
33993
+ ],
33994
+ aliases: ["linkedin"]
33995
+ },
33996
+ {
33997
+ slug: "analytics",
33998
+ label: "Analytics",
33999
+ description: "Where usage and traffic are measured.",
34000
+ intents: ["list_records", "fetch_record"],
34001
+ aliases: []
34002
+ }
34003
+ ];
34004
+ var NEED_SLUGS = NEEDS.map((n) => n.slug);
34005
+ var BY_SLUG = new Map(NEEDS.map((n) => [n.slug, n]));
34006
+ var BY_ALIAS = new Map(NEEDS.flatMap((n) => n.aliases.map((a) => [a, n.slug])));
34007
+ function canonicalNeedSlug(value) {
34008
+ if (typeof value !== "string")
34009
+ return null;
34010
+ if (BY_SLUG.has(value))
34011
+ return value;
34012
+ return BY_ALIAS.get(value) ?? null;
34013
+ }
34014
+ function needOf(value) {
34015
+ const slug = canonicalNeedSlug(value);
34016
+ return slug ? BY_SLUG.get(slug) : void 0;
34017
+ }
34018
+ var NEED_REF_RE = /^need:([a-z][a-z0-9-]{0,63})(?:\/([a-z][a-z0-9_]{0,63}))?$/;
34019
+ function parseNeedRef(entry) {
34020
+ if (typeof entry !== "string")
34021
+ return null;
34022
+ const m = NEED_REF_RE.exec(entry.trim());
34023
+ if (!m)
34024
+ return null;
34025
+ return { need: m[1], intent: m[2] ?? null };
34026
+ }
34027
+ function needRefProblem(entry) {
34028
+ const ref = parseNeedRef(entry);
34029
+ if (!ref) {
34030
+ return `"${entry}" is not a need ref: write need:<need> or need:<need>/<intent>.`;
34031
+ }
34032
+ const need = needOf(ref.need);
34033
+ if (!need) {
34034
+ return `"${entry}" names no need. Needs: ${NEED_SLUGS.join(", ")}.`;
34035
+ }
34036
+ if (ref.intent && !need.intents.includes(ref.intent)) {
34037
+ return `"${entry}": the need "${need.slug}" does not group the intent "${ref.intent}" (it groups ${need.intents.join(", ")}).`;
34038
+ }
34039
+ return null;
34040
+ }
34041
+
34042
+ // src/validate-flow.ts
33762
34043
  var FLOW_NODE_TYPES = [
33763
34044
  "trigger",
33764
34045
  "command",
@@ -33902,11 +34183,22 @@ function validateFlowDefinition(flow, resolvers) {
33902
34183
  const data = isRecord(node.data) ? node.data : {};
33903
34184
  switch (type) {
33904
34185
  case "capability": {
34186
+ if (!nonEmptyString(data.verbId) && nonEmptyString(data.need)) {
34187
+ const problem = needRefProblem(data.need);
34188
+ if (problem) {
34189
+ errors.push({
34190
+ nodeId,
34191
+ code: "capability_unknown_need",
34192
+ message: `Capability node "${nodeId}": ${problem}`
34193
+ });
34194
+ }
34195
+ break;
34196
+ }
33905
34197
  if (!nonEmptyString(data.verbId)) {
33906
34198
  errors.push({
33907
34199
  nodeId,
33908
34200
  code: "capability_missing_verbId",
33909
- message: `Capability node "${nodeId}" has no \`verbId\`. Pick a verb on the selected tool.`
34201
+ message: `Capability node "${nodeId}" has no \`verbId\` (or \`need\`). Pick a verb on the selected tool, or name a need.`
33910
34202
  });
33911
34203
  } else if (resolvers?.verbExists && !resolvers.verbExists(data.verbId)) {
33912
34204
  errors.push({
@@ -34340,10 +34632,10 @@ var vocabularySentencesEn = {
34340
34632
  // `resolveNextRungOfferLabel`: a trust offer that reaches every space.
34341
34633
  "vocabulary.offer.everySpace": "{offer} in every space",
34342
34634
  // `resolveTemplateNoun`: a template's noun, derived from its scope.
34343
- "vocabulary.templateNoun.goal.one": "Goal template",
34344
- "vocabulary.templateNoun.goal.other": "Goal templates",
34345
- "vocabulary.templateNoun.work.one": "Work template",
34346
- "vocabulary.templateNoun.work.other": "Work templates",
34635
+ "vocabulary.templateNoun.goal.one": "Goal process",
34636
+ "vocabulary.templateNoun.goal.other": "Goal processes",
34637
+ "vocabulary.templateNoun.work.one": "Process",
34638
+ "vocabulary.templateNoun.work.other": "Processes",
34347
34639
  "vocabulary.templateNoun.space.one": "Space template",
34348
34640
  "vocabulary.templateNoun.space.other": "Space templates",
34349
34641
  // `resolvePackageNoun`: what installs, named by what it holds (founder,
@@ -34359,7 +34651,40 @@ var vocabularySentencesEn = {
34359
34651
  "vocabulary.grant.packageInstall": "Add packs and templates to your pod",
34360
34652
  // `resolveNeedsYouItemCount` for a kind no table names: its words are a
34361
34653
  // humanized token, counted with English plural rules.
34362
- "vocabulary.needsYou.count.uncurated": "{n, plural, one {# {noun}} other {# {nouns}}}"
34654
+ "vocabulary.needsYou.count.uncurated": "{n, plural, one {# {noun}} other {# {nouns}}}",
34655
+ // `resolveProcessHealthLabel` / `resolveProcessHealthReason`: a process
34656
+ // health's words, keyed by its reason code (`PROCESS_HEALTH_REASONS`,
34657
+ // `@synap-core/types/processes`). `waiting_on_you`'s label is the status
34658
+ // label door's (`status.waiting_on_you`), so it has no row here.
34659
+ "vocabulary.processHealth.config_invalid.label": "Configuration error",
34660
+ "vocabulary.processHealth.config_invalid.reason": "The saved definition is invalid or cannot be activated.",
34661
+ "vocabulary.processHealth.running.label": "Running",
34662
+ "vocabulary.processHealth.running.reason": "At least one execution is currently in progress.",
34663
+ "vocabulary.processHealth.running_after_failure.label": "Running \xB7 previous run failed",
34664
+ "vocabulary.processHealth.running_after_failure.reason": "An execution is in progress after the previous known outcome failed.",
34665
+ "vocabulary.processHealth.waiting_on_you.reason": "The latest run is paused until you answer what its session asked of you.",
34666
+ "vocabulary.processHealth.blocked_by_policy.label": "Blocked by policy",
34667
+ "vocabulary.processHealth.blocked_by_policy.reason": "Governance refused the latest run\u2019s effect \u2014 it needs your review.",
34668
+ "vocabulary.processHealth.latest_failed.label": "Latest run failed",
34669
+ "vocabulary.processHealth.latest_failed.reason": "No newer successful outcome resolves the latest failure.",
34670
+ "vocabulary.processHealth.draft.label": "Draft",
34671
+ "vocabulary.processHealth.draft.reason": "The definition still needs to be completed or activated.",
34672
+ "vocabulary.processHealth.paused.label": "Paused",
34673
+ "vocabulary.processHealth.paused.reason": "The definition is paused and will not start new runs.",
34674
+ "vocabulary.processHealth.archived.label": "Archived",
34675
+ "vocabulary.processHealth.archived.reason": "The definition is archived and will not start new runs.",
34676
+ "vocabulary.processHealth.healthy.label": "Healthy",
34677
+ "vocabulary.processHealth.healthy.reason": "The latest known outcome completed without failure.",
34678
+ "vocabulary.processHealth.latest_unresolved.label": "Latest status unresolved",
34679
+ "vocabulary.processHealth.latest_unresolved.reason": "The latest execution is {status}; Synap cannot classify it as healthy or failed yet.",
34680
+ "vocabulary.processHealth.never_run.label": "Never run",
34681
+ "vocabulary.processHealth.never_run.reason": "This saved definition has no executions yet.",
34682
+ "vocabulary.processHealth.not_enough_activity.label": "Status unknown",
34683
+ "vocabulary.processHealth.not_enough_activity.reason": "There is not enough loaded activity to determine current health.",
34684
+ // `resolveJobsStartedHereLabel`: a job's folded child jobs on its Activity
34685
+ // line (plan 5207fbb6: a child job is drawn as a fork, never named a
34686
+ // "branch"), counted with the Job word.
34687
+ "vocabulary.job.startedHere": "{n, plural, one {# job started from here} other {# jobs started from here}}"
34363
34688
  };
34364
34689
  function buildVocabularyEn(tables) {
34365
34690
  const words = {};
@@ -34393,6 +34718,15 @@ function buildVocabularyEn(tables) {
34393
34718
  for (const [kind, label] of Object.entries(tables.waitKinds)) {
34394
34719
  words[`waitKind.${kind}`] = label;
34395
34720
  }
34721
+ for (const [kind, label] of Object.entries(tables.stepRunners)) {
34722
+ words[`stepRunner.${kind}`] = label;
34723
+ }
34724
+ for (const [slug, label] of Object.entries(tables.needs)) {
34725
+ words[`need.${slug}`] = label;
34726
+ }
34727
+ for (const [slug, label] of Object.entries(tables.intents)) {
34728
+ words[`intent.${slug}`] = label;
34729
+ }
34396
34730
  return { ...words, ...vocabularySentencesEn };
34397
34731
  }
34398
34732
 
@@ -34461,14 +34795,16 @@ var vocabularyFr = {
34461
34795
  "kind.skill.other": "Outils",
34462
34796
  "kind.automation.one": "Automatisation",
34463
34797
  "kind.automation.other": "Automatisations",
34464
- "kind.playbook.one": "Mod\xE8le",
34465
- "kind.playbook.other": "Mod\xE8les",
34798
+ "kind.playbook.one": "Processus",
34799
+ "kind.playbook.other": "Processus",
34466
34800
  "kind.capability.one": "Outil",
34467
34801
  "kind.capability.other": "Outils",
34468
34802
  "kind.command.one": "Commande",
34469
34803
  "kind.command.other": "Commandes",
34470
34804
  "kind.tool.one": "Outil",
34471
34805
  "kind.tool.other": "Outils",
34806
+ "kind.need.one": "Besoin",
34807
+ "kind.need.other": "Besoins",
34472
34808
  "kind.application.one": "App connect\xE9e",
34473
34809
  "kind.application.other": "Apps connect\xE9es",
34474
34810
  "kind.issuer.one": "\xC9metteur de confiance",
@@ -34555,6 +34891,8 @@ var vocabularyFr = {
34555
34891
  "kind.review.other": "Revues",
34556
34892
  "kind.test_run.one": "S\xE9rie de tests",
34557
34893
  "kind.test_run.other": "S\xE9ries de tests",
34894
+ "kind.orchestrator.one": "Orchestrateur",
34895
+ "kind.orchestrator.other": "Orchestrateurs",
34558
34896
  // ── Verbs: `action.<token>.imperative` (infinitive) / `.past` (masculine
34559
34897
  // participle, D4) / `.progressive` / `.present` ──
34560
34898
  "action.create.imperative": "Cr\xE9er",
@@ -34593,6 +34931,8 @@ var vocabularyFr = {
34593
34931
  "action.attach.past": "Joint",
34594
34932
  "action.add.imperative": "Ajouter",
34595
34933
  "action.add.past": "Ajout\xE9",
34934
+ "action.bind_need.imperative": "Pourvoir le besoin",
34935
+ "action.bind_need.past": "Besoin pourvu",
34596
34936
  "action.detach.imperative": "D\xE9tacher",
34597
34937
  "action.detach.past": "D\xE9tach\xE9",
34598
34938
  "action.remove.imperative": "Enlever",
@@ -34681,10 +35021,14 @@ var vocabularyFr = {
34681
35021
  "action.terminal.open.past": "Terminal ouvert",
34682
35022
  "action.session.stop.imperative": "Arr\xEAter",
34683
35023
  "action.session.stop.past": "Arr\xEAt\xE9",
35024
+ "action.session.continue.imperative": "Continuer",
35025
+ "action.session.continue.past": "Continu\xE9",
34684
35026
  "action.session.wait_on.imperative": "Attendre",
34685
35027
  "action.session.wait_on.past": "Mis en attente de",
34686
35028
  "action.session.release.imperative": "Ne plus attendre",
34687
35029
  "action.session.release.past": "N\u2019attend plus",
35030
+ "action.orchestrate.imperative": "Orchestrer",
35031
+ "action.orchestrate.past": "Orchestr\xE9",
34688
35032
  "action.track.take_offer.imperative": "Accepter leur offre",
34689
35033
  "action.track.take_offer.past": "Offre accept\xE9e",
34690
35034
  "action.track.keep_ask.imperative": "Garder ma demande",
@@ -34804,6 +35148,9 @@ var vocabularyFr = {
34804
35148
  "action.decline.imperative": "Refuser",
34805
35149
  "action.decline.past": "Refus\xE9",
34806
35150
  "action.decline.progressive": "Refus en cours",
35151
+ "action.refuse.imperative": "Refuser",
35152
+ "action.refuse.past": "Refus\xE9",
35153
+ "action.refuse.progressive": "Refus en cours",
34807
35154
  "action.disconnect.imperative": "D\xE9connecter",
34808
35155
  "action.disconnect.past": "D\xE9connect\xE9",
34809
35156
  "action.disconnect.progressive": "D\xE9connexion en cours",
@@ -34818,6 +35165,8 @@ var vocabularyFr = {
34818
35165
  "action.ask.progressive": "Demande en cours",
34819
35166
  "action.attest.imperative": "Marquer comme fait",
34820
35167
  "action.attest.past": "Marqu\xE9 comme fait",
35168
+ "action.hand_back.imperative": "Rendre",
35169
+ "action.hand_back.past": "Rendu",
34821
35170
  "action.post.imperative": "Poster",
34822
35171
  "action.post.past": "Post\xE9",
34823
35172
  "action.post.progressive": "Publication en cours",
@@ -34962,6 +35311,44 @@ var vocabularyFr = {
34962
35311
  "waitKind.another_work": "Autre travail",
34963
35312
  "waitKind.date": "Une date",
34964
35313
  "waitKind.nobody": "Personne",
35314
+ // ── Step runners: `stepRunner.<kind>` (who moves a step on) ──
35315
+ "stepRunner.person": "Vous",
35316
+ "stepRunner.ai": "Un agent",
35317
+ "stepRunner.automatic": "S\u2019ex\xE9cute tout seul",
35318
+ // ── Needs (0426): `need.<slug>` (a need's name) ──
35319
+ "need.code-host": "H\xE9bergement du code",
35320
+ "need.deploy-target": "Cible de d\xE9ploiement",
35321
+ "need.gate": "Contr\xF4le",
35322
+ "need.payments": "Paiements",
35323
+ "need.messaging": "Messagerie",
35324
+ "need.email": "E-mail",
35325
+ "need.calendar": "Agenda",
35326
+ "need.file-store": "Stockage de fichiers",
35327
+ "need.media-generation": "G\xE9n\xE9ration de m\xE9dias",
35328
+ "need.social-publishing": "Publication sur les r\xE9seaux",
35329
+ "need.linkedin-reach": "Prospection LinkedIn",
35330
+ "need.analytics": "Statistiques",
35331
+ // ── Intents: `intent.<slug>` (an intent's short name, never the consent sentence) ──
35332
+ "intent.search_external": "Chercher dans des sources externes",
35333
+ "intent.find_people": "Trouver des personnes",
35334
+ "intent.enrich_entity": "Enrichir des fiches",
35335
+ "intent.fetch_record": "R\xE9cup\xE9rer une fiche",
35336
+ "intent.list_records": "Lister des fiches",
35337
+ "intent.send_message": "Envoyer un message",
35338
+ "intent.request_connection": "Demander une mise en relation",
35339
+ "intent.schedule_event": "Planifier un \xE9v\xE9nement",
35340
+ "intent.manage_file": "G\xE9rer des fichiers",
35341
+ "intent.generate_media": "G\xE9n\xE9rer des m\xE9dias",
35342
+ "intent.capture_into_pod": "Importer des donn\xE9es dans le pod",
35343
+ "intent.run_external_job": "Lancer une t\xE2che externe",
35344
+ "intent.connect_account": "Connecter un compte",
35345
+ "intent.publish_post": "Publier un post",
35346
+ "intent.delegate_agent_task": "Confier une t\xE2che \xE0 un agent",
35347
+ "intent.read_webpage": "Lire une page web",
35348
+ "intent.search_web": "Chercher sur le web",
35349
+ "intent.edit_video": "Monter une vid\xE9o",
35350
+ "intent.transcribe_media": "Transcrire un m\xE9dia",
35351
+ "intent.download_media": "T\xE9l\xE9charger un m\xE9dia",
34965
35352
  // ── Needs-you counts: `needsYou.count.<kind>` (French counts 0 and 1 as
34966
35353
  // singular; `many` is a whole number of millions: "1000000 de décisions") ──
34967
35354
  "needsYou.count.decision": "{n, plural, one {# d\xE9cision} many {# de d\xE9cisions} other {# d\xE9cisions}}",
@@ -35021,10 +35408,10 @@ var vocabularyFr = {
35021
35408
  "vocabulary.runner.needs_answer.named": "Attend la r\xE9ponse de {name}",
35022
35409
  "vocabulary.runner.needs_answer.unnamed": "Attend une r\xE9ponse",
35023
35410
  "vocabulary.offer.everySpace": "{offer} dans tous les espaces",
35024
- "vocabulary.templateNoun.goal.one": "Mod\xE8le d\u2019objectif",
35025
- "vocabulary.templateNoun.goal.other": "Mod\xE8les d\u2019objectif",
35026
- "vocabulary.templateNoun.work.one": "Mod\xE8le de travail",
35027
- "vocabulary.templateNoun.work.other": "Mod\xE8les de travail",
35411
+ "vocabulary.templateNoun.goal.one": "Processus d\u2019objectif",
35412
+ "vocabulary.templateNoun.goal.other": "Processus d\u2019objectif",
35413
+ "vocabulary.templateNoun.work.one": "Processus",
35414
+ "vocabulary.templateNoun.work.other": "Processus",
35028
35415
  "vocabulary.templateNoun.space.one": "Mod\xE8le d\u2019espace",
35029
35416
  "vocabulary.templateNoun.space.other": "Mod\xE8les d\u2019espace",
35030
35417
  "vocabulary.packageNoun.template.one": "Mod\xE8le",
@@ -35032,7 +35419,34 @@ var vocabularyFr = {
35032
35419
  "vocabulary.packageNoun.pack.one": "Pack",
35033
35420
  "vocabulary.packageNoun.pack.other": "Packs",
35034
35421
  "vocabulary.grant.packageInstall": "Ajouter des packs et des mod\xE8les \xE0 votre pod",
35035
- "vocabulary.needsYou.count.uncurated": "{n, plural, one {# {noun}} many {# de {nouns}} other {# {nouns}}}"
35422
+ "vocabulary.needsYou.count.uncurated": "{n, plural, one {# {noun}} many {# de {nouns}} other {# {nouns}}}",
35423
+ // ── Process health: `vocabulary.processHealth.<code>.label|reason` ──
35424
+ "vocabulary.processHealth.config_invalid.label": "Erreur de configuration",
35425
+ "vocabulary.processHealth.config_invalid.reason": "La d\xE9finition enregistr\xE9e est invalide ou ne peut pas \xEAtre activ\xE9e.",
35426
+ "vocabulary.processHealth.running.label": "En cours",
35427
+ "vocabulary.processHealth.running.reason": "Au moins une ex\xE9cution est en cours.",
35428
+ "vocabulary.processHealth.running_after_failure.label": "En cours \xB7 l\u2019ex\xE9cution pr\xE9c\xE9dente a \xE9chou\xE9",
35429
+ "vocabulary.processHealth.running_after_failure.reason": "Une ex\xE9cution est en cours apr\xE8s l\u2019\xE9chec du dernier r\xE9sultat connu.",
35430
+ "vocabulary.processHealth.waiting_on_you.reason": "La derni\xE8re ex\xE9cution est en pause jusqu\u2019\xE0 ce que vous r\xE9pondiez \xE0 ce que sa session vous a demand\xE9.",
35431
+ "vocabulary.processHealth.blocked_by_policy.label": "Bloqu\xE9 par une r\xE8gle",
35432
+ "vocabulary.processHealth.blocked_by_policy.reason": "La gouvernance a refus\xE9 l\u2019effet de la derni\xE8re ex\xE9cution \u2014 elle attend votre revue.",
35433
+ "vocabulary.processHealth.latest_failed.label": "Derni\xE8re ex\xE9cution en \xE9chec",
35434
+ "vocabulary.processHealth.latest_failed.reason": "Aucun r\xE9sultat r\xE9ussi plus r\xE9cent ne r\xE9sout le dernier \xE9chec.",
35435
+ "vocabulary.processHealth.draft.label": "Brouillon",
35436
+ "vocabulary.processHealth.draft.reason": "La d\xE9finition doit encore \xEAtre compl\xE9t\xE9e ou activ\xE9e.",
35437
+ "vocabulary.processHealth.paused.label": "En pause",
35438
+ "vocabulary.processHealth.paused.reason": "La d\xE9finition est en pause et ne lancera pas de nouvelle ex\xE9cution.",
35439
+ "vocabulary.processHealth.archived.label": "Archiv\xE9",
35440
+ "vocabulary.processHealth.archived.reason": "La d\xE9finition est archiv\xE9e et ne lancera pas de nouvelle ex\xE9cution.",
35441
+ "vocabulary.processHealth.healthy.label": "En bonne sant\xE9",
35442
+ "vocabulary.processHealth.healthy.reason": "Le dernier r\xE9sultat connu s\u2019est termin\xE9 sans \xE9chec.",
35443
+ "vocabulary.processHealth.latest_unresolved.label": "Dernier statut non r\xE9solu",
35444
+ "vocabulary.processHealth.latest_unresolved.reason": "La derni\xE8re ex\xE9cution est \xAB\xA0{status}\xA0\xBB\xA0; Synap ne peut pas encore la classer comme r\xE9ussie ou en \xE9chec.",
35445
+ "vocabulary.processHealth.never_run.label": "Jamais ex\xE9cut\xE9",
35446
+ "vocabulary.processHealth.never_run.reason": "Cette d\xE9finition enregistr\xE9e n\u2019a encore aucune ex\xE9cution.",
35447
+ "vocabulary.processHealth.not_enough_activity.label": "Statut inconnu",
35448
+ "vocabulary.processHealth.not_enough_activity.reason": "Il n\u2019y a pas assez d\u2019activit\xE9 charg\xE9e pour d\xE9terminer l\u2019\xE9tat actuel.",
35449
+ "vocabulary.job.startedHere": "{n, plural, one {# travail lanc\xE9 d\u2019ici} many {# de travaux lanc\xE9s d\u2019ici} other {# travaux lanc\xE9s d\u2019ici}}"
35036
35450
  };
35037
35451
 
35038
35452
  // ../../../synap-backend/packages/types/dist/vocabulary/object-kinds.js
@@ -35341,15 +35755,28 @@ var OBJECT_KIND_ROWS = {
35341
35755
  labelPlural: "Automations",
35342
35756
  glyph: "\u26A1"
35343
35757
  },
35344
- // The user word is "Template" (concepts.md). Scoped surfaces say WHICH
35345
- // template through `resolveTemplateNoun(scope)` ("Work"/"Goal template").
35758
+ // The user word is "Process" (founder D1, 16 Nov 2026, Process wave plan
35759
+ // 0adf8352; it replaced "Template", concepts.md D2 of 31 Oct). "Template"
35760
+ // now names only the space package (`resolvePackageNoun`, "Space template").
35761
+ // A goal's method says WHICH process through `resolveTemplateNoun(scope)`
35762
+ // ("Goal process").
35346
35763
  playbook: {
35347
35764
  kind: "playbook",
35348
35765
  category: "playbook",
35349
35766
  icon: "BookOpen",
35350
35767
  color: ID(8),
35351
- label: "Template",
35352
- labelPlural: "Templates"
35768
+ label: "Process",
35769
+ labelPlural: "Processes",
35770
+ // Stored summaries filed before D1 say "Template" ("Update Template"),
35771
+ // "Work/Goal template", or the older "Playbook".
35772
+ formerLabels: [
35773
+ "Template",
35774
+ "Templates",
35775
+ "Work template",
35776
+ "Goal template",
35777
+ "Playbook",
35778
+ "Playbooks"
35779
+ ]
35353
35780
  },
35354
35781
  // Concept glossary (`skills/synap/concepts.md` → Tools, founder D2): skill,
35355
35782
  // capability and tool are three DB kinds but ONE user word, "Tool". A detail
@@ -35378,6 +35805,17 @@ var OBJECT_KIND_ROWS = {
35378
35805
  label: "Tool",
35379
35806
  labelPlural: "Tools"
35380
35807
  },
35808
+ // A NEED (0426, founder decisions D2 and D3): a seat a provider fills once
35809
+ // per space ("Code host", "Payments"). Its own word, "Need", never "Role"
35810
+ // (which already means four things). Category `tool`: a tool fills it.
35811
+ need: {
35812
+ kind: "need",
35813
+ category: "tool",
35814
+ icon: "Puzzle",
35815
+ color: ID(12),
35816
+ label: "Need",
35817
+ labelPlural: "Needs"
35818
+ },
35381
35819
  // An Application (App Connect v1) — an app that REACHES the pod with a grant.
35382
35820
  // NOT `category: "tool"`: a tool is what the pod USES (outbound); an
35383
35821
  // application is what USES the pod (inbound). The user word is "Connected app"
@@ -35681,6 +36119,8 @@ var ACTION_VERB_ROWS = {
35681
36119
  link: { imperative: "Link", past: "Linked", present: "Links" },
35682
36120
  unlink: { imperative: "Unlink", past: "Unlinked" },
35683
36121
  attach: { imperative: "Attach", past: "Attached" },
36122
+ // A space's need filled by a provider (0426, the `workspace/bind_need` door).
36123
+ bind_need: { imperative: "Fill need", past: "Filled need" },
35684
36124
  // "Add to <session>" (a capture offered to a running session) — `add`
35685
36125
  // humanized to "Add" in BOTH moods, so the receipt read "Add to X".
35686
36126
  add: { imperative: "Add", past: "Added" },
@@ -35816,6 +36256,8 @@ var ACTION_VERB_ROWS = {
35816
36256
  // `blocked_by` edge. Dotted keys, so a bare `stop` or `release` elsewhere
35817
36257
  // keeps its own reading (pause, resume and rerun share their bare rows).
35818
36258
  "session.stop": { imperative: "Stop", past: "Stopped" },
36259
+ // A run that stopped before its last stage resumes at it (plan 7d71ddcc).
36260
+ "session.continue": { imperative: "Continue", past: "Continued" },
35819
36261
  "session.wait_on": { imperative: "Wait on", past: "Waited on" },
35820
36262
  "session.release": {
35821
36263
  imperative: "Stop waiting on",
@@ -35829,6 +36271,9 @@ var ACTION_VERB_ROWS = {
35829
36271
  past: "Took their offer"
35830
36272
  },
35831
36273
  "track.keep_ask": { imperative: "Keep my ask", past: "Kept my ask" },
36274
+ // `focus_session/orchestrate`: start ONE orchestrator over several running
36275
+ // sessions (links them, holds each on the person's yes). The proposal's verb.
36276
+ orchestrate: { imperative: "Orchestrate", past: "Orchestrated" },
35832
36277
  // The pod's one "Make them goals" card (founder decision D-3, 2026-10-26):
35833
36278
  // the retired goal / objective / OKR entities the person reviews and makes
35834
36279
  // goals, each through the one convert door. Plural on purpose — the single
@@ -36002,6 +36447,16 @@ var ACTION_VERB_ROWS = {
36002
36447
  past: "Declined",
36003
36448
  progressive: "Declining"
36004
36449
  },
36450
+ // The person's NO to an agent's ask, on every mode (founder, 16 Nov 2026,
36451
+ // plan d717d6ac §3): the stored answer is `{ type: "declined" }`
36452
+ // (`@synap-core/types/ask`). Not `decline` (a connection asking for reach)
36453
+ // and not `reject` (a proposal): the ask closes as refused, the reason goes
36454
+ // to the agent, nothing is handed over.
36455
+ refuse: {
36456
+ imperative: "Refuse",
36457
+ past: "Refused",
36458
+ progressive: "Refusing"
36459
+ },
36005
36460
  // Cutting a connection's sign-in (an account, a channel, an agent's keys).
36006
36461
  // Reversible by connecting again — never "Deleted".
36007
36462
  disconnect: {
@@ -36028,6 +36483,10 @@ var ACTION_VERB_ROWS = {
36028
36483
  // into a channel (`channel_message.created`).
36029
36484
  ask: { imperative: "Ask", past: "Asked", progressive: "Asking" },
36030
36485
  attest: { imperative: "Mark done", past: "Marked done" },
36486
+ // The person's "Not mine" on a slot an agent handed them
36487
+ // (`focus_session.slot_handed_back`): the slot is the agent's again,
36488
+ // unanswered. Not an answer and not a refusal.
36489
+ hand_back: { imperative: "Hand back", past: "Handed back" },
36031
36490
  post: { imperative: "Post", past: "Posted", progressive: "Posting" },
36032
36491
  see_failure: { imperative: "See what failed", past: "Saw what failed" },
36033
36492
  turn_on: {
@@ -36134,7 +36593,12 @@ var OBJECT_NOUN_ROWS = {
36134
36593
  // One devbox gate job a session ran (`devboxJobs` on the session read,
36135
36594
  // backend#637): what a person reads as "its test runs", never a job's name
36136
36595
  // (D-R4). Humanized it read "Test run" in every locale.
36137
- test_run: "Test run"
36596
+ test_run: "Test run",
36597
+ // A session that coordinates several running sessions (founder decision D5,
36598
+ // plan b38bc224): it reads their rooms, posts one merged plan, and holds
36599
+ // each until the person's yes. A session by kind, but the person names it
36600
+ // by its role ("Start an orchestrator"); `orchestrated_by` is its edge.
36601
+ orchestrator: "Orchestrator"
36138
36602
  };
36139
36603
  var OBJECT_NOUNS = OBJECT_NOUN_ROWS;
36140
36604
  var OBJECT_NOUN_PLURALS = {
@@ -36162,7 +36626,8 @@ var OBJECT_NOUN_PLURALS = {
36162
36626
  renderer: "Displays",
36163
36627
  room: "Rooms",
36164
36628
  review: "Reviews",
36165
- test_run: "Test runs"
36629
+ test_run: "Test runs",
36630
+ orchestrator: "Orchestrators"
36166
36631
  };
36167
36632
  var STATUS_LABEL_ROWS = {
36168
36633
  // proposal lifecycle
@@ -36436,6 +36901,47 @@ var WAIT_KIND_LABELS = {
36436
36901
  date: "A date",
36437
36902
  nobody: "Nobody"
36438
36903
  };
36904
+ var STEP_RUNNER_KIND_LABELS = {
36905
+ person: "You",
36906
+ ai: "An agent",
36907
+ automatic: "Runs by itself"
36908
+ };
36909
+ var NEED_LABELS = {
36910
+ "code-host": "Code host",
36911
+ "deploy-target": "Deploy target",
36912
+ gate: "Gate",
36913
+ payments: "Payments",
36914
+ messaging: "Messaging",
36915
+ email: "Email",
36916
+ calendar: "Calendar",
36917
+ "file-store": "File store",
36918
+ "media-generation": "Media generation",
36919
+ "social-publishing": "Social publishing",
36920
+ "linkedin-reach": "LinkedIn reach",
36921
+ analytics: "Analytics"
36922
+ };
36923
+ var INTENT_LABELS = {
36924
+ search_external: "Search outside sources",
36925
+ find_people: "Find people",
36926
+ enrich_entity: "Enrich records",
36927
+ fetch_record: "Fetch a record",
36928
+ list_records: "List records",
36929
+ send_message: "Send a message",
36930
+ request_connection: "Request a connection",
36931
+ schedule_event: "Schedule an event",
36932
+ manage_file: "Manage files",
36933
+ generate_media: "Generate media",
36934
+ capture_into_pod: "Bring data into the pod",
36935
+ run_external_job: "Run an outside job",
36936
+ connect_account: "Connect an account",
36937
+ publish_post: "Publish a post",
36938
+ delegate_agent_task: "Hand a task to an agent",
36939
+ read_webpage: "Read a web page",
36940
+ search_web: "Search the web",
36941
+ edit_video: "Edit a video",
36942
+ transcribe_media: "Transcribe media",
36943
+ download_media: "Download media"
36944
+ };
36439
36945
  var RUNNER_STATE_LABELS = {
36440
36946
  busy: "Working",
36441
36947
  idle: "Idle",
@@ -36509,7 +37015,10 @@ var vocabularyEn = buildVocabularyEn({
36509
37015
  statuses: STATUS_LABELS,
36510
37016
  needsYouNouns: NEEDS_YOU_ITEM_NOUNS,
36511
37017
  runnerStates: RUNNER_STATE_LABELS,
36512
- waitKinds: WAIT_KIND_LABELS
37018
+ waitKinds: WAIT_KIND_LABELS,
37019
+ stepRunners: STEP_RUNNER_KIND_LABELS,
37020
+ needs: NEED_LABELS,
37021
+ intents: INTENT_LABELS
36513
37022
  });
36514
37023
 
36515
37024
  // ../../../synap-backend/packages/types/dist/presentation/index.js
@@ -37234,6 +37743,11 @@ function knownRelationTypes(tpl, resolveDep, corpus) {
37234
37743
  }
37235
37744
  var MAX_SESSION_CRITERIA = 12;
37236
37745
  var TEMPLATE_ACTIVATOR_ON = ["created", "enters_status", "count", "schedule", "manual"];
37746
+ function goalNamesStatus(goal, value, labels) {
37747
+ if (typeof goal !== "string" || typeof value !== "string") return false;
37748
+ const names = [value, labels?.get(value)].filter((n) => !!n && n.trim() !== "");
37749
+ return names.some((n) => new RegExp(`(^|[^\\p{L}\\p{N}_])${n.trim().replace(/[.*+?^${}()|[\]\\]/g, "\\$&")}($|[^\\p{L}\\p{N}_])`, "iu").test(goal));
37750
+ }
37237
37751
  function checkProcessContract(tpl, resolveDep, corpus, add) {
37238
37752
  let relations = null;
37239
37753
  const relationsOnce = () => relations ??= knownRelationTypes(tpl, resolveDep, corpus);
@@ -37256,6 +37770,7 @@ function checkProcessContract(tpl, resolveDep, corpus, add) {
37256
37770
  `playbook "${pb.name}" declares ${field} \u2014 retired: the process follows the kind's declared lifecycle (a person-only status is \`humanOnly\` on that lifecycle, a status no stage owns is derived, and a session end moves nothing)`
37257
37771
  );
37258
37772
  let statuses = null;
37773
+ let labels = null;
37259
37774
  let lifecycleProperty;
37260
37775
  let judgeable = hasCorpus(resolveDep);
37261
37776
  if (kind) {
@@ -37265,6 +37780,7 @@ function checkProcessContract(tpl, resolveDep, corpus, add) {
37265
37780
  if (declared) {
37266
37781
  lifecycleProperty = declared.property;
37267
37782
  statuses = new Set(declared.options.map((o) => o.key));
37783
+ labels = new Map(declared.options.map((o) => [o.key, o.label ?? o.key]));
37268
37784
  }
37269
37785
  }
37270
37786
  const checkStatus = (rule, path, value) => {
@@ -37294,10 +37810,21 @@ function checkProcessContract(tpl, resolveDep, corpus, add) {
37294
37810
  `${at}.criteria`,
37295
37811
  `playbook "${pb.name}" declares ${criterionKeys.size} criteria (playbook-level plus every stage's) \u2014 a session keeps ${MAX_SESSION_CRITERIA} and drops the rest silently`
37296
37812
  );
37297
- for (const stage of stages) {
37813
+ stages.forEach((stage, i) => {
37298
37814
  const sp = `${at}.stages.${stage.key}`;
37299
37815
  if (stage.subjectStatus !== void 0)
37300
37816
  checkStatus("stage-subject-status-unknown", `${sp}.subjectStatus`, stage.subjectStatus);
37817
+ if (stage.onApproved !== void 0) {
37818
+ checkStatus("stage-on-approved-unknown", `${sp}.onApproved`, stage.onApproved);
37819
+ const owesOutput = (stage.expectedOutputs ?? []).some((o) => o.optional !== true);
37820
+ const nextGated = !!stages[i + 1]?.gate;
37821
+ if (!owesOutput && !nextGated && !goalNamesStatus(stage.goal, stage.onApproved, labels))
37822
+ add(
37823
+ "stage-on-approved-no-signal",
37824
+ `${sp}.onApproved`,
37825
+ `stage "${stage.key}" of playbook "${pb.name}" owes no required output and ${stages[i + 1] ? `the next stage "${stages[i + 1].key}" has no gate` : "is the last stage"}: nothing approves it, so the pod never writes onApproved "${String(stage.onApproved)}" (never on the session's end). Keep it declared, and make the goal tell whoever finishes the stage to move the subject to "${String(stage.onApproved)}" through the status door`
37826
+ );
37827
+ }
37301
37828
  const toStage = stage.onFail?.toStage;
37302
37829
  if (stage.onFail !== void 0 && (!toStage || !stageIds.has(toStage)))
37303
37830
  add(
@@ -37305,7 +37832,7 @@ function checkProcessContract(tpl, resolveDep, corpus, add) {
37305
37832
  `${sp}.onFail.toStage`,
37306
37833
  `stage "${stage.key}" onFail.toStage "${String(toStage)}" names no stage of playbook "${pb.name}"`
37307
37834
  );
37308
- }
37835
+ });
37309
37836
  (pb.activators ?? []).forEach((a, i) => {
37310
37837
  const ap = `${at}.activators[${i}]`;
37311
37838
  if (!TEMPLATE_ACTIVATOR_ON.includes(a.on))