@synap-core/workspace-templates 0.47.0 → 0.49.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -2
- package/capabilities/postiz.capability.json +8 -4
- package/capabilities/unipile-linkedin.capability.json +39 -3
- package/dist/{define-BAPO0xZf.d.ts → define-Dto5_E47.d.ts} +15 -3
- package/dist/index.d.ts +2 -2
- package/dist/index.js +244 -158
- package/dist/index.js.map +1 -1
- package/dist/wire.d.ts +1 -1
- package/package.json +1 -1
- package/src/brand-library.yaml +6 -6
- package/src/builder.yaml +17 -12
- package/src/content-os.template.test.ts +38 -22
- package/src/content-os.video-takes.template.test.ts +4 -2
- package/src/content-os.yaml +33 -23
- package/src/crm-absorbs-outreach.template.test.ts +5 -1
- package/src/crm.yaml +19 -11
- package/src/decisions-wave.template.test.ts +99 -5
- package/src/finance.yaml +11 -6
- package/src/lead-becomes-client.template.test.ts +4 -1
- package/src/lifecycle-declarations.test.ts +1 -1
- package/src/marketing.yaml +3 -3
- package/src/operations.yaml +8 -8
- package/src/postiz-contract.test.ts +25 -5
- package/src/process-contract.validate.test.ts +4 -1
- package/src/publish-official-lib.test.ts +8 -7
- package/src/research-base.yaml +2 -2
- package/src/research-decision.yaml +1 -1
- package/src/ship-a-change.template.test.ts +11 -2
- package/src/templates.ts +80 -59
- package/src/types.ts +15 -3
- package/src/unipile-lookups-read-only.test.ts +1 -0
- package/src/validate-flow.ts +15 -1
- package/src/validate.ts +40 -4
package/dist/index.js
CHANGED
|
@@ -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
|
-
"
|
|
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
|
|
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
|
-
"
|
|
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
|
-
"
|
|
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": "
|
|
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
|
-
"
|
|
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
|
-
"
|
|
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;
|
|
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
|
-
"
|
|
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
|
|
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
|
-
"
|
|
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
|
-
"
|
|
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
|
-
"
|
|
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
|
|
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
|
-
"
|
|
13154
|
+
"onApproved": "Scheduled",
|
|
13147
13155
|
"goal": "Set the send date and queue the issue.",
|
|
13148
13156
|
"criteria": [
|
|
13149
13157
|
{
|
|
@@ -15338,8 +15346,8 @@ var DATA = {
|
|
|
15338
15346
|
"key": "pursue",
|
|
15339
15347
|
"name": "Pursue",
|
|
15340
15348
|
"category": "completed",
|
|
15341
|
-
"
|
|
15342
|
-
"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.',
|
|
15343
15351
|
"criteria": [
|
|
15344
15352
|
{
|
|
15345
15353
|
"key": "lead-book-meeting",
|
|
@@ -15376,7 +15384,7 @@ var DATA = {
|
|
|
15376
15384
|
{
|
|
15377
15385
|
"name": "Win a deal",
|
|
15378
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.",
|
|
15379
|
-
"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, 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.`,
|
|
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.`,
|
|
15380
15388
|
"subjectProfile": {
|
|
15381
15389
|
"profileSlug": "deal"
|
|
15382
15390
|
},
|
|
@@ -15489,8 +15497,15 @@ var DATA = {
|
|
|
15489
15497
|
"key": "send",
|
|
15490
15498
|
"name": "Send proposal",
|
|
15491
15499
|
"category": "started",
|
|
15492
|
-
"
|
|
15493
|
-
"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
|
+
],
|
|
15494
15509
|
"gate": {
|
|
15495
15510
|
"kind": "human"
|
|
15496
15511
|
},
|
|
@@ -15519,6 +15534,7 @@ var DATA = {
|
|
|
15519
15534
|
"name": "Negotiate",
|
|
15520
15535
|
"category": "started",
|
|
15521
15536
|
"subjectStatus": "negotiating",
|
|
15537
|
+
"onApproved": "won",
|
|
15522
15538
|
"goal": "Answer objections, log every counter-offer on the deal, and propose the next step.",
|
|
15523
15539
|
"gate": {
|
|
15524
15540
|
"kind": "check"
|
|
@@ -15541,7 +15557,6 @@ var DATA = {
|
|
|
15541
15557
|
"key": "won",
|
|
15542
15558
|
"name": "Won",
|
|
15543
15559
|
"category": "completed",
|
|
15544
|
-
"subjectStatus": "won",
|
|
15545
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.",
|
|
15546
15561
|
"gate": {
|
|
15547
15562
|
"kind": "human"
|
|
@@ -16212,7 +16227,7 @@ var DATA = {
|
|
|
16212
16227
|
{
|
|
16213
16228
|
"name": "Personalized Outreach",
|
|
16214
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.",
|
|
16215
|
-
"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.`,
|
|
16216
16231
|
"subjectProfile": {
|
|
16217
16232
|
"profileSlug": "campaign"
|
|
16218
16233
|
},
|
|
@@ -16316,8 +16331,8 @@ var DATA = {
|
|
|
16316
16331
|
"key": "finish",
|
|
16317
16332
|
"name": "Finish",
|
|
16318
16333
|
"category": "completed",
|
|
16319
|
-
"
|
|
16320
|
-
"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.",
|
|
16321
16336
|
"criteria": [
|
|
16322
16337
|
{
|
|
16323
16338
|
"key": "outreach-reply-rate",
|
|
@@ -16333,7 +16348,7 @@ var DATA = {
|
|
|
16333
16348
|
{
|
|
16334
16349
|
"name": "Read the reply to an outreach message",
|
|
16335
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.",
|
|
16336
|
-
"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.',
|
|
16337
16352
|
"subjectProfile": {
|
|
16338
16353
|
"profileSlug": "outreach-touch"
|
|
16339
16354
|
},
|
|
@@ -16363,6 +16378,7 @@ var DATA = {
|
|
|
16363
16378
|
"key": "wait",
|
|
16364
16379
|
"name": "Waiting for a reply",
|
|
16365
16380
|
"category": "started",
|
|
16381
|
+
"onApproved": "replied",
|
|
16366
16382
|
"goal": "Watch the conversation for a reply, a bounce, or the follow-up date passing in silence.",
|
|
16367
16383
|
"indefinite": true,
|
|
16368
16384
|
"criteria": [
|
|
@@ -16379,7 +16395,6 @@ var DATA = {
|
|
|
16379
16395
|
"key": "replied",
|
|
16380
16396
|
"name": "Replied",
|
|
16381
16397
|
"category": "completed",
|
|
16382
|
-
"subjectStatus": "replied",
|
|
16383
16398
|
"goal": "Summarise the reply for a person and propose the next step \u2014 the free estimate or a meeting; never open a deal.",
|
|
16384
16399
|
"gate": {
|
|
16385
16400
|
"kind": "check"
|
|
@@ -18491,7 +18506,7 @@ var DATA = {
|
|
|
18491
18506
|
{
|
|
18492
18507
|
"name": "Bill a client",
|
|
18493
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.",
|
|
18494
|
-
"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.",
|
|
18495
18510
|
"subjectProfile": {
|
|
18496
18511
|
"profileSlug": "invoice"
|
|
18497
18512
|
},
|
|
@@ -18550,8 +18565,14 @@ var DATA = {
|
|
|
18550
18565
|
"key": "send",
|
|
18551
18566
|
"name": "Send",
|
|
18552
18567
|
"category": "started",
|
|
18553
|
-
"
|
|
18554
|
-
"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
|
+
],
|
|
18555
18576
|
"gate": {
|
|
18556
18577
|
"kind": "human"
|
|
18557
18578
|
},
|
|
@@ -18652,7 +18673,7 @@ var DATA = {
|
|
|
18652
18673
|
{
|
|
18653
18674
|
"name": "Approve an expense",
|
|
18654
18675
|
"description": "Review an expense against its budget, get a person's approval, and record the payment.",
|
|
18655
|
-
"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.",
|
|
18656
18677
|
"subjectProfile": {
|
|
18657
18678
|
"profileSlug": "expense"
|
|
18658
18679
|
},
|
|
@@ -18678,6 +18699,7 @@ var DATA = {
|
|
|
18678
18699
|
"name": "Review",
|
|
18679
18700
|
"category": "planned",
|
|
18680
18701
|
"subjectStatus": "pending",
|
|
18702
|
+
"onApproved": "approved",
|
|
18681
18703
|
"goal": "Check the expense's facts and receipt and link the budget it counts against.",
|
|
18682
18704
|
"criteria": [
|
|
18683
18705
|
{
|
|
@@ -18700,7 +18722,7 @@ var DATA = {
|
|
|
18700
18722
|
"key": "approve",
|
|
18701
18723
|
"name": "Approve",
|
|
18702
18724
|
"category": "started",
|
|
18703
|
-
"
|
|
18725
|
+
"onApproved": "paid",
|
|
18704
18726
|
"goal": "A person approves the spend.",
|
|
18705
18727
|
"gate": {
|
|
18706
18728
|
"kind": "human"
|
|
@@ -18713,7 +18735,6 @@ var DATA = {
|
|
|
18713
18735
|
"key": "pay",
|
|
18714
18736
|
"name": "Pay",
|
|
18715
18737
|
"category": "completed",
|
|
18716
|
-
"subjectStatus": "paid",
|
|
18717
18738
|
"goal": "A person confirms the expense was paid; link the account it was paid from.",
|
|
18718
18739
|
"gate": {
|
|
18719
18740
|
"kind": "human"
|
|
@@ -27505,7 +27526,7 @@ Report the submission's current state as STRICT JSON, using ONLY these vocabular
|
|
|
27505
27526
|
{
|
|
27506
27527
|
"name": "Run a campaign",
|
|
27507
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.",
|
|
27508
|
-
"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.",
|
|
27509
27530
|
"subjectProfile": {
|
|
27510
27531
|
"profileSlug": "campaign"
|
|
27511
27532
|
},
|
|
@@ -27631,8 +27652,8 @@ Report the submission's current state as STRICT JSON, using ONLY these vocabular
|
|
|
27631
27652
|
"key": "report",
|
|
27632
27653
|
"name": "Report",
|
|
27633
27654
|
"category": "completed",
|
|
27634
|
-
"
|
|
27635
|
-
"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.",
|
|
27636
27657
|
"criteria": [
|
|
27637
27658
|
{
|
|
27638
27659
|
"key": "campaign-results",
|
|
@@ -30074,7 +30095,7 @@ Recent conversation (oldest first, JSON): {{steps.read-comms.output.messages}}`
|
|
|
30074
30095
|
{
|
|
30075
30096
|
"name": "Deliver a client engagement",
|
|
30076
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.",
|
|
30077
|
-
"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.",
|
|
30078
30099
|
"subjectProfile": {
|
|
30079
30100
|
"profileSlug": "engagement"
|
|
30080
30101
|
},
|
|
@@ -30172,6 +30193,7 @@ Recent conversation (oldest first, JSON): {{steps.read-comms.output.messages}}`
|
|
|
30172
30193
|
"key": "deliver",
|
|
30173
30194
|
"name": "Deliver",
|
|
30174
30195
|
"category": "started",
|
|
30196
|
+
"onApproved": "completed",
|
|
30175
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.",
|
|
30176
30198
|
"indefinite": true,
|
|
30177
30199
|
"criteria": [
|
|
@@ -30195,7 +30217,6 @@ Recent conversation (oldest first, JSON): {{steps.read-comms.output.messages}}`
|
|
|
30195
30217
|
"key": "close",
|
|
30196
30218
|
"name": "Close",
|
|
30197
30219
|
"category": "completed",
|
|
30198
|
-
"subjectStatus": "completed",
|
|
30199
30220
|
"goal": "Write the closing review, create the closing invoice, propose the renewal; a person approves the close.",
|
|
30200
30221
|
"gate": {
|
|
30201
30222
|
"kind": "human"
|
|
@@ -30209,7 +30230,7 @@ Recent conversation (oldest first, JSON): {{steps.read-comms.output.messages}}`
|
|
|
30209
30230
|
{
|
|
30210
30231
|
"name": "Deliver a deliverable",
|
|
30211
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.",
|
|
30212
|
-
"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.",
|
|
30213
30234
|
"subjectProfile": {
|
|
30214
30235
|
"profileSlug": "deliverable"
|
|
30215
30236
|
},
|
|
@@ -30294,7 +30315,7 @@ Recent conversation (oldest first, JSON): {{steps.read-comms.output.messages}}`
|
|
|
30294
30315
|
"key": "send",
|
|
30295
30316
|
"name": "Send to client",
|
|
30296
30317
|
"category": "started",
|
|
30297
|
-
"
|
|
30318
|
+
"onApproved": "delivered",
|
|
30298
30319
|
"goal": "A person approves sending; record the delivered date.",
|
|
30299
30320
|
"gate": {
|
|
30300
30321
|
"kind": "human"
|
|
@@ -30339,7 +30360,7 @@ Recent conversation (oldest first, JSON): {{steps.read-comms.output.messages}}`
|
|
|
30339
30360
|
{
|
|
30340
30361
|
"name": "Get a contract signed",
|
|
30341
30362
|
"description": "Take a client contract from draft to signed and active, with a person approving what is sent and confirming the signature.",
|
|
30342
|
-
"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.",
|
|
30343
30364
|
"subjectProfile": {
|
|
30344
30365
|
"profileSlug": "contract"
|
|
30345
30366
|
},
|
|
@@ -30393,7 +30414,7 @@ Recent conversation (oldest first, JSON): {{steps.read-comms.output.messages}}`
|
|
|
30393
30414
|
"key": "send",
|
|
30394
30415
|
"name": "Send",
|
|
30395
30416
|
"category": "started",
|
|
30396
|
-
"
|
|
30417
|
+
"onApproved": "sent",
|
|
30397
30418
|
"goal": "A person approves the contract before it goes to the client.",
|
|
30398
30419
|
"gate": {
|
|
30399
30420
|
"kind": "human"
|
|
@@ -30434,8 +30455,8 @@ Recent conversation (oldest first, JSON): {{steps.read-comms.output.messages}}`
|
|
|
30434
30455
|
"key": "active",
|
|
30435
30456
|
"name": "Active",
|
|
30436
30457
|
"category": "completed",
|
|
30437
|
-
"
|
|
30438
|
-
"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.",
|
|
30439
30460
|
"criteria": [
|
|
30440
30461
|
{
|
|
30441
30462
|
"key": "contract-document-linked",
|
|
@@ -32296,7 +32317,7 @@ Recent conversation (oldest first, JSON): {{steps.read-comms.output.messages}}`
|
|
|
32296
32317
|
{
|
|
32297
32318
|
"name": "Research a Question",
|
|
32298
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.",
|
|
32299
|
-
"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.",
|
|
32300
32321
|
"subjectProfile": {
|
|
32301
32322
|
"profileSlug": "question"
|
|
32302
32323
|
},
|
|
@@ -32373,6 +32394,7 @@ Recent conversation (oldest first, JSON): {{steps.read-comms.output.messages}}`
|
|
|
32373
32394
|
"key": "weigh",
|
|
32374
32395
|
"name": "Weigh",
|
|
32375
32396
|
"category": "started",
|
|
32397
|
+
"onApproved": "answered",
|
|
32376
32398
|
"goal": "Form hypotheses, link evidence for and against, and emit findings with calibrated confidence.",
|
|
32377
32399
|
"criteria": [
|
|
32378
32400
|
{
|
|
@@ -32395,7 +32417,6 @@ Recent conversation (oldest first, JSON): {{steps.read-comms.output.messages}}`
|
|
|
32395
32417
|
"key": "answer",
|
|
32396
32418
|
"name": "Answer",
|
|
32397
32419
|
"category": "completed",
|
|
32398
|
-
"subjectStatus": "answered",
|
|
32399
32420
|
"goal": "Record the research, its conclusion and confidence, and mark the question answered.",
|
|
32400
32421
|
"gate": {
|
|
32401
32422
|
"kind": "check"
|
|
@@ -32868,6 +32889,7 @@ counter-evidence: research that only kept what agreed with it isn't research.
|
|
|
32868
32889
|
"name": "Prepare",
|
|
32869
32890
|
"category": "started",
|
|
32870
32891
|
"subjectStatus": "proposed",
|
|
32892
|
+
"onApproved": "accepted",
|
|
32871
32893
|
"goal": "Summarise the question, the options, the evidence and the recommendation in one screen.",
|
|
32872
32894
|
"criteria": [
|
|
32873
32895
|
{
|
|
@@ -32883,7 +32905,6 @@ counter-evidence: research that only kept what agreed with it isn't research.
|
|
|
32883
32905
|
"key": "accept",
|
|
32884
32906
|
"name": "Accept",
|
|
32885
32907
|
"category": "completed",
|
|
32886
|
-
"subjectStatus": "accepted",
|
|
32887
32908
|
"goal": "A person accepts the decision.",
|
|
32888
32909
|
"gate": {
|
|
32889
32910
|
"kind": "human"
|
|
@@ -33887,6 +33908,138 @@ function groupByDomain(items, domainOf) {
|
|
|
33887
33908
|
|
|
33888
33909
|
// src/validate-flow.ts
|
|
33889
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
|
|
33890
34043
|
var FLOW_NODE_TYPES = [
|
|
33891
34044
|
"trigger",
|
|
33892
34045
|
"command",
|
|
@@ -34030,11 +34183,22 @@ function validateFlowDefinition(flow, resolvers) {
|
|
|
34030
34183
|
const data = isRecord(node.data) ? node.data : {};
|
|
34031
34184
|
switch (type) {
|
|
34032
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
|
+
}
|
|
34033
34197
|
if (!nonEmptyString(data.verbId)) {
|
|
34034
34198
|
errors.push({
|
|
34035
34199
|
nodeId,
|
|
34036
34200
|
code: "capability_missing_verbId",
|
|
34037
|
-
message: `Capability node "${nodeId}" has no \`verbId
|
|
34201
|
+
message: `Capability node "${nodeId}" has no \`verbId\` (or \`need\`). Pick a verb on the selected tool, or name a need.`
|
|
34038
34202
|
});
|
|
34039
34203
|
} else if (resolvers?.verbExists && !resolvers.verbExists(data.verbId)) {
|
|
34040
34204
|
errors.push({
|
|
@@ -35836,102 +36000,6 @@ var OBJECT_KIND_ROWS = {
|
|
|
35836
36000
|
};
|
|
35837
36001
|
var OBJECT_KINDS = OBJECT_KIND_ROWS;
|
|
35838
36002
|
|
|
35839
|
-
// ../../../synap-backend/packages/types/dist/needs/index.js
|
|
35840
|
-
var NEEDS = [
|
|
35841
|
-
{
|
|
35842
|
-
slug: "code-host",
|
|
35843
|
-
label: "Code host",
|
|
35844
|
-
description: "Where the code lives: repositories, branches, pull requests.",
|
|
35845
|
-
intents: ["fetch_record", "list_records", "run_external_job"],
|
|
35846
|
-
aliases: ["git-host", "repository"]
|
|
35847
|
-
},
|
|
35848
|
-
{
|
|
35849
|
-
slug: "deploy-target",
|
|
35850
|
-
label: "Deploy target",
|
|
35851
|
-
description: "Where a change is deployed and served.",
|
|
35852
|
-
intents: ["run_external_job", "fetch_record"],
|
|
35853
|
-
aliases: ["hosting"]
|
|
35854
|
-
},
|
|
35855
|
-
{
|
|
35856
|
-
slug: "gate",
|
|
35857
|
-
label: "Gate",
|
|
35858
|
-
description: "What checks a change before it lands: tests, typecheck, CI.",
|
|
35859
|
-
intents: ["run_external_job", "fetch_record"],
|
|
35860
|
-
aliases: ["ci"]
|
|
35861
|
-
},
|
|
35862
|
-
{
|
|
35863
|
-
slug: "payments",
|
|
35864
|
-
label: "Payments",
|
|
35865
|
-
description: "Where money is charged and recorded.",
|
|
35866
|
-
intents: ["list_records", "fetch_record"],
|
|
35867
|
-
aliases: []
|
|
35868
|
-
},
|
|
35869
|
-
{
|
|
35870
|
-
slug: "messaging",
|
|
35871
|
-
label: "Messaging",
|
|
35872
|
-
description: "Where messages are sent to people outside the pod.",
|
|
35873
|
-
intents: ["send_message", "request_connection"],
|
|
35874
|
-
aliases: ["chat"]
|
|
35875
|
-
},
|
|
35876
|
-
{
|
|
35877
|
-
slug: "email",
|
|
35878
|
-
label: "Email",
|
|
35879
|
-
description: "The mailbox that sends and reads email.",
|
|
35880
|
-
intents: ["send_message", "list_records", "fetch_record"],
|
|
35881
|
-
aliases: ["mail"]
|
|
35882
|
-
},
|
|
35883
|
-
{
|
|
35884
|
-
slug: "calendar",
|
|
35885
|
-
label: "Calendar",
|
|
35886
|
-
description: "Where meetings and events are scheduled.",
|
|
35887
|
-
intents: ["schedule_event", "list_records"],
|
|
35888
|
-
aliases: []
|
|
35889
|
-
},
|
|
35890
|
-
{
|
|
35891
|
-
slug: "file-store",
|
|
35892
|
-
label: "File store",
|
|
35893
|
-
description: "Where files are kept outside the pod.",
|
|
35894
|
-
intents: ["manage_file", "fetch_record", "list_records"],
|
|
35895
|
-
aliases: ["storage", "drive"]
|
|
35896
|
-
},
|
|
35897
|
-
{
|
|
35898
|
-
slug: "media-generation",
|
|
35899
|
-
label: "Media generation",
|
|
35900
|
-
description: "What makes and edits images, video and audio.",
|
|
35901
|
-
intents: ["generate_media", "edit_video", "transcribe_media"],
|
|
35902
|
-
aliases: ["media"]
|
|
35903
|
-
},
|
|
35904
|
-
{
|
|
35905
|
-
slug: "social-publishing",
|
|
35906
|
-
label: "Social publishing",
|
|
35907
|
-
description: "Where posts are published to social networks.",
|
|
35908
|
-
intents: ["publish_post"],
|
|
35909
|
-
aliases: ["social"]
|
|
35910
|
-
},
|
|
35911
|
-
{
|
|
35912
|
-
slug: "linkedin-reach",
|
|
35913
|
-
label: "LinkedIn reach",
|
|
35914
|
-
description: "What finds people and reaches them on LinkedIn.",
|
|
35915
|
-
intents: [
|
|
35916
|
-
"find_people",
|
|
35917
|
-
"request_connection",
|
|
35918
|
-
"send_message",
|
|
35919
|
-
"enrich_entity"
|
|
35920
|
-
],
|
|
35921
|
-
aliases: ["linkedin"]
|
|
35922
|
-
},
|
|
35923
|
-
{
|
|
35924
|
-
slug: "analytics",
|
|
35925
|
-
label: "Analytics",
|
|
35926
|
-
description: "Where usage and traffic are measured.",
|
|
35927
|
-
intents: ["list_records", "fetch_record"],
|
|
35928
|
-
aliases: []
|
|
35929
|
-
}
|
|
35930
|
-
];
|
|
35931
|
-
var NEED_SLUGS = NEEDS.map((n) => n.slug);
|
|
35932
|
-
var BY_SLUG = new Map(NEEDS.map((n) => [n.slug, n]));
|
|
35933
|
-
var BY_ALIAS = new Map(NEEDS.flatMap((n) => n.aliases.map((a) => [a, n.slug])));
|
|
35934
|
-
|
|
35935
36003
|
// ../../../synap-backend/packages/types/dist/vocabulary/tool-labels.js
|
|
35936
36004
|
function moods(progressive, past, imperative) {
|
|
35937
36005
|
return { progressive, past, imperative };
|
|
@@ -37675,6 +37743,11 @@ function knownRelationTypes(tpl, resolveDep, corpus) {
|
|
|
37675
37743
|
}
|
|
37676
37744
|
var MAX_SESSION_CRITERIA = 12;
|
|
37677
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
|
+
}
|
|
37678
37751
|
function checkProcessContract(tpl, resolveDep, corpus, add) {
|
|
37679
37752
|
let relations = null;
|
|
37680
37753
|
const relationsOnce = () => relations ??= knownRelationTypes(tpl, resolveDep, corpus);
|
|
@@ -37697,6 +37770,7 @@ function checkProcessContract(tpl, resolveDep, corpus, add) {
|
|
|
37697
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)`
|
|
37698
37771
|
);
|
|
37699
37772
|
let statuses = null;
|
|
37773
|
+
let labels = null;
|
|
37700
37774
|
let lifecycleProperty;
|
|
37701
37775
|
let judgeable = hasCorpus(resolveDep);
|
|
37702
37776
|
if (kind) {
|
|
@@ -37706,6 +37780,7 @@ function checkProcessContract(tpl, resolveDep, corpus, add) {
|
|
|
37706
37780
|
if (declared) {
|
|
37707
37781
|
lifecycleProperty = declared.property;
|
|
37708
37782
|
statuses = new Set(declared.options.map((o) => o.key));
|
|
37783
|
+
labels = new Map(declared.options.map((o) => [o.key, o.label ?? o.key]));
|
|
37709
37784
|
}
|
|
37710
37785
|
}
|
|
37711
37786
|
const checkStatus = (rule, path, value) => {
|
|
@@ -37735,10 +37810,21 @@ function checkProcessContract(tpl, resolveDep, corpus, add) {
|
|
|
37735
37810
|
`${at}.criteria`,
|
|
37736
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`
|
|
37737
37812
|
);
|
|
37738
|
-
|
|
37813
|
+
stages.forEach((stage, i) => {
|
|
37739
37814
|
const sp = `${at}.stages.${stage.key}`;
|
|
37740
37815
|
if (stage.subjectStatus !== void 0)
|
|
37741
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
|
+
}
|
|
37742
37828
|
const toStage = stage.onFail?.toStage;
|
|
37743
37829
|
if (stage.onFail !== void 0 && (!toStage || !stageIds.has(toStage)))
|
|
37744
37830
|
add(
|
|
@@ -37746,7 +37832,7 @@ function checkProcessContract(tpl, resolveDep, corpus, add) {
|
|
|
37746
37832
|
`${sp}.onFail.toStage`,
|
|
37747
37833
|
`stage "${stage.key}" onFail.toStage "${String(toStage)}" names no stage of playbook "${pb.name}"`
|
|
37748
37834
|
);
|
|
37749
|
-
}
|
|
37835
|
+
});
|
|
37750
37836
|
(pb.activators ?? []).forEach((a, i) => {
|
|
37751
37837
|
const ap = `${at}.activators[${i}]`;
|
|
37752
37838
|
if (!TEMPLATE_ACTIVATOR_ON.includes(a.on))
|