@synap-core/workspace-templates 0.47.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.
- package/README.md +3 -2
- 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 +3 -2
- 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/wire.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { g as PackageDefinitionOutput, X as WorkspaceDefinitionInput } from './define-
|
|
1
|
+
import { g as PackageDefinitionOutput, X as WorkspaceDefinitionInput } from './define-Dto5_E47.js';
|
|
2
2
|
import '@synap-core/types/presentation';
|
|
3
3
|
import '@synap-core/types/space-brief';
|
|
4
4
|
import '@synap-core/types/capability-intents';
|
package/package.json
CHANGED
package/src/brand-library.yaml
CHANGED
|
@@ -1175,7 +1175,7 @@ playbooks:
|
|
|
1175
1175
|
- name: Make a brand asset
|
|
1176
1176
|
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.
|
|
1177
1177
|
goalTemplate: >-
|
|
1178
|
-
Make this brand asset ({asset}); each stage moves its status. DRAFT: read
|
|
1178
|
+
Make this brand asset ({asset}); each stage moves its status when its work is approved. DRAFT: read
|
|
1179
1179
|
the request and the approved brand only — approved colours, fonts,
|
|
1180
1180
|
references and the active token set; never a draft — and load the
|
|
1181
1181
|
creative-director skill to pick the recipe. Make the draft (or up to
|
|
@@ -1200,6 +1200,7 @@ playbooks:
|
|
|
1200
1200
|
name: Draft
|
|
1201
1201
|
category: started
|
|
1202
1202
|
subjectStatus: draft
|
|
1203
|
+
onApproved: approved
|
|
1203
1204
|
goal: Build the draft from approved brand sources only and record how it was made.
|
|
1204
1205
|
criteria:
|
|
1205
1206
|
- key: asset-approved-sources
|
|
@@ -1223,7 +1224,6 @@ playbooks:
|
|
|
1223
1224
|
- key: approve
|
|
1224
1225
|
name: Approve
|
|
1225
1226
|
category: completed
|
|
1226
|
-
subjectStatus: approved
|
|
1227
1227
|
goal: A person approves one draft as final; with variants, the one they kept.
|
|
1228
1228
|
gate: { kind: human }
|
|
1229
1229
|
onFail: { toStage: draft }
|
|
@@ -1231,7 +1231,7 @@ playbooks:
|
|
|
1231
1231
|
- name: Write the brand voice
|
|
1232
1232
|
description: Draft or revise the brand voice guide from what the brand already publishes, and approve it with a person.
|
|
1233
1233
|
goalTemplate: >-
|
|
1234
|
-
Write this brand voice guide ({guide}); each stage moves its status.
|
|
1234
|
+
Write this brand voice guide ({guide}); each stage moves its status when its work is approved.
|
|
1235
1235
|
DRAFT: read the brand identity, the approved assets and the last posts
|
|
1236
1236
|
and emails the brand published; write the voice in a few traits, each
|
|
1237
1237
|
with a do and a don't taken from real examples, and the words to use and
|
|
@@ -1248,6 +1248,7 @@ playbooks:
|
|
|
1248
1248
|
name: Draft
|
|
1249
1249
|
category: started
|
|
1250
1250
|
subjectStatus: draft
|
|
1251
|
+
onApproved: approved
|
|
1251
1252
|
goal: Write the voice traits with real do and don't examples, and the words to use and avoid.
|
|
1252
1253
|
criteria:
|
|
1253
1254
|
- key: voice-examples
|
|
@@ -1256,7 +1257,6 @@ playbooks:
|
|
|
1256
1257
|
- key: approve
|
|
1257
1258
|
name: Approve
|
|
1258
1259
|
category: completed
|
|
1259
|
-
subjectStatus: approved
|
|
1260
1260
|
goal: A person approves the guide.
|
|
1261
1261
|
gate: { kind: human }
|
|
1262
1262
|
onFail: { toStage: draft }
|
|
@@ -1264,7 +1264,7 @@ playbooks:
|
|
|
1264
1264
|
- name: Write a content guideline
|
|
1265
1265
|
description: Distil approved references into a content guideline (base, format or the frame for one goal), and approve it with a person.
|
|
1266
1266
|
goalTemplate: >-
|
|
1267
|
-
Write this content guideline ({guideline}); each stage moves its status.
|
|
1267
|
+
Write this content guideline ({guideline}); each stage moves its status when its work is approved.
|
|
1268
1268
|
DRAFT: read the brand identity, the approved voice guide and the approved
|
|
1269
1269
|
references; load the content-taste skill. Write what to take and what to
|
|
1270
1270
|
avoid as rules a maker can follow, link the guideline to every reference
|
|
@@ -1283,6 +1283,7 @@ playbooks:
|
|
|
1283
1283
|
name: Draft
|
|
1284
1284
|
category: started
|
|
1285
1285
|
subjectStatus: draft
|
|
1286
|
+
onApproved: approved
|
|
1286
1287
|
goal: Distil the approved references into rules a maker can follow, linked to their sources.
|
|
1287
1288
|
criteria:
|
|
1288
1289
|
- key: guideline-sources
|
|
@@ -1294,7 +1295,6 @@ playbooks:
|
|
|
1294
1295
|
- key: approve
|
|
1295
1296
|
name: Approve
|
|
1296
1297
|
category: completed
|
|
1297
|
-
subjectStatus: approved
|
|
1298
1298
|
goal: A person approves the guideline.
|
|
1299
1299
|
gate: { kind: human }
|
|
1300
1300
|
onFail: { toStage: draft }
|
package/src/builder.yaml
CHANGED
|
@@ -1811,6 +1811,7 @@ playbooks:
|
|
|
1811
1811
|
- key: verify
|
|
1812
1812
|
name: Verify
|
|
1813
1813
|
category: started
|
|
1814
|
+
onApproved: implemented
|
|
1814
1815
|
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.
|
|
1815
1816
|
gate: { kind: check }
|
|
1816
1817
|
onFail: { toStage: implement }
|
|
@@ -1831,7 +1832,6 @@ playbooks:
|
|
|
1831
1832
|
- key: done
|
|
1832
1833
|
name: Done
|
|
1833
1834
|
category: completed
|
|
1834
|
-
subjectStatus: implemented
|
|
1835
1835
|
goal: A person confirms the pull request merged and the screen matches the approved design; approving writes implemented.
|
|
1836
1836
|
# A HUMAN gate (as Content OS Publish): a check gate judges the stage
|
|
1837
1837
|
# being LEFT, so it would write implemented before anyone saw the merge.
|
|
@@ -2202,8 +2202,8 @@ playbooks:
|
|
|
2202
2202
|
- key: verify
|
|
2203
2203
|
name: Criteria verified
|
|
2204
2204
|
category: completed
|
|
2205
|
-
|
|
2206
|
-
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
|
|
2205
|
+
onApproved: done
|
|
2206
|
+
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.
|
|
2207
2207
|
criteria:
|
|
2208
2208
|
- key: criteria-verified
|
|
2209
2209
|
statement: Every criterion of the session is graded with its evidence, and nothing unverified is reported as verified.
|
|
@@ -2404,7 +2404,8 @@ playbooks:
|
|
|
2404
2404
|
optional: true
|
|
2405
2405
|
relationToSubject: relates_to
|
|
2406
2406
|
- key: verify
|
|
2407
|
-
|
|
2407
|
+
onApproved: done
|
|
2408
|
+
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.
|
|
2408
2409
|
name: Criteria verified
|
|
2409
2410
|
category: completed
|
|
2410
2411
|
criteria:
|
|
@@ -2414,7 +2415,6 @@ playbooks:
|
|
|
2414
2415
|
statement: Every criterion of the session is graded with its evidence, and nothing unverified is reported as verified.
|
|
2415
2416
|
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.'
|
|
2416
2417
|
tier: quick
|
|
2417
|
-
subjectStatus: done
|
|
2418
2418
|
|
|
2419
2419
|
# --- Fix a bug ---
|
|
2420
2420
|
- name: Fix a bug
|
|
@@ -2587,7 +2587,8 @@ playbooks:
|
|
|
2587
2587
|
optional: true
|
|
2588
2588
|
relationToSubject: relates_to
|
|
2589
2589
|
- key: verify
|
|
2590
|
-
|
|
2590
|
+
onApproved: fixed
|
|
2591
|
+
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.
|
|
2591
2592
|
name: Criteria verified
|
|
2592
2593
|
category: completed
|
|
2593
2594
|
criteria:
|
|
@@ -2597,7 +2598,6 @@ playbooks:
|
|
|
2597
2598
|
statement: Every criterion of the session is graded with its evidence, and nothing unverified is reported as verified.
|
|
2598
2599
|
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.'
|
|
2599
2600
|
tier: quick
|
|
2600
|
-
subjectStatus: fixed
|
|
2601
2601
|
|
|
2602
2602
|
# --- Investigate ---
|
|
2603
2603
|
- name: Investigate
|
|
@@ -3021,19 +3021,24 @@ playbooks:
|
|
|
3021
3021
|
stages:
|
|
3022
3022
|
- key: fix
|
|
3023
3023
|
name: Fix it
|
|
3024
|
-
goal: Find the root cause and ship the fix as a gated PR or commit
|
|
3024
|
+
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.
|
|
3025
3025
|
category: started
|
|
3026
3026
|
subjectStatus: fixing
|
|
3027
3027
|
- key: merged
|
|
3028
3028
|
name: Fix merged
|
|
3029
|
-
goal:
|
|
3029
|
+
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.
|
|
3030
3030
|
category: started
|
|
3031
|
-
|
|
3031
|
+
onApproved: fixed
|
|
3032
|
+
# REQUIRED (decision D2): the merge itself approves this stage — the merge
|
|
3033
|
+
# sweeper closes the slot whose ref is the merged pull request
|
|
3034
|
+
# (satisfyPullRequestByMerge), even after the run moved on.
|
|
3035
|
+
expectedOutputs:
|
|
3036
|
+
- { kind: pull_request, label: Merged fix, relationToSubject: none }
|
|
3032
3037
|
- key: verified
|
|
3033
3038
|
name: Live and verified
|
|
3034
|
-
goal: The fix runs on the pod (its build contains the fix) and the finding no longer happens
|
|
3039
|
+
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.
|
|
3035
3040
|
category: completed
|
|
3036
|
-
|
|
3041
|
+
onApproved: verified
|
|
3037
3042
|
|
|
3038
3043
|
# --- Fix in code ---
|
|
3039
3044
|
# The child run of a hand-off (design 8e1cc3e9, slice 1): "Fix a finding"'s
|
|
@@ -147,18 +147,27 @@ describe("Content OS owns the video / visual pipeline", () => {
|
|
|
147
147
|
|
|
148
148
|
// A stage's `subjectStatus` is written when the run ENTERS it, and the pod holds
|
|
149
149
|
// it only behind a HUMAN gate (a check gate judges the stage being left, so it
|
|
150
|
-
// passes on entry).
|
|
151
|
-
//
|
|
152
|
-
//
|
|
153
|
-
//
|
|
150
|
+
// passes on entry). Its `onApproved` (decision D2) is written when its outputs
|
|
151
|
+
// are all delivered, else when the NEXT stage's gate passes — and by nothing at
|
|
152
|
+
// all when it has neither. A status that claims an outside act — the post is
|
|
153
|
+
// live, the issue went out — or that starts ANOTHER process must therefore sit
|
|
154
|
+
// behind a person's approval, or be written by nothing but the act itself, or
|
|
155
|
+
// the record says it happened before anyone confirmed it (review M6: Repurpose
|
|
156
|
+
// fired on a post that never shipped).
|
|
154
157
|
describe("Content OS never writes an outside act before a person confirms it", () => {
|
|
155
158
|
const playbooks = (template.playbooks ?? []) as TemplatePlaybook[];
|
|
156
159
|
type Stage = NonNullable<TemplatePlaybook["stages"]>[number];
|
|
157
|
-
const bound: Array<{ playbook: string; stage: Stage }> =
|
|
158
|
-
(pb
|
|
159
|
-
.
|
|
160
|
-
|
|
161
|
-
|
|
160
|
+
const bound: Array<{ playbook: string; stage: Stage; value: string; via: "enter" | "reach"; next?: Stage }> =
|
|
161
|
+
playbooks.flatMap((pb) =>
|
|
162
|
+
(pb.stages ?? []).flatMap((stage, i, all) => [
|
|
163
|
+
...(typeof stage.subjectStatus === "string"
|
|
164
|
+
? [{ playbook: pb.name, stage, value: stage.subjectStatus, via: "enter" as const }]
|
|
165
|
+
: []),
|
|
166
|
+
...(typeof stage.onApproved === "string"
|
|
167
|
+
? [{ playbook: pb.name, stage, value: stage.onApproved, via: "reach" as const, next: all[i + 1] }]
|
|
168
|
+
: []),
|
|
169
|
+
]),
|
|
170
|
+
);
|
|
162
171
|
// Values another playbook's activator listens for, per subject kind.
|
|
163
172
|
const activatedElsewhere = (owner: string, kind: string | undefined, status: string) =>
|
|
164
173
|
playbooks.some(
|
|
@@ -170,24 +179,29 @@ describe("Content OS never writes an outside act before a person confirms it", (
|
|
|
170
179
|
const kindOf = (name: string) => playbooks.find((p) => p.name === name)?.subjectProfile?.profileSlug;
|
|
171
180
|
|
|
172
181
|
const mustBeHuman = bound.filter(
|
|
173
|
-
({ playbook, stage }) =>
|
|
174
|
-
stage.category === "completed" ||
|
|
175
|
-
activatedElsewhere(playbook, kindOf(playbook), stage.subjectStatus as string),
|
|
182
|
+
({ playbook, stage, value }) =>
|
|
183
|
+
stage.category === "completed" || activatedElsewhere(playbook, kindOf(playbook), value),
|
|
176
184
|
);
|
|
177
185
|
|
|
178
186
|
it("finds the stages it guards (non-vacuity)", () => {
|
|
179
|
-
expect(mustBeHuman.map(({ playbook, stage }) => `${playbook}/${stage.key}`).sort()).toEqual([
|
|
180
|
-
"Newsletter issue/sent",
|
|
181
|
-
"Produce Content/publish",
|
|
187
|
+
expect(mustBeHuman.map(({ playbook, stage, via }) => `${playbook}/${stage.key}/${via}`).sort()).toEqual([
|
|
188
|
+
"Newsletter issue/sent/enter",
|
|
189
|
+
"Produce Content/publish/reach",
|
|
182
190
|
]);
|
|
183
191
|
});
|
|
184
192
|
|
|
185
|
-
it("gates each of them on a person", () => {
|
|
186
|
-
for (const { playbook, stage } of mustBeHuman) {
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
gate: { kind: "human" }
|
|
190
|
-
|
|
193
|
+
it("gates each of them on a person, or leaves them to the act itself", () => {
|
|
194
|
+
for (const { playbook, stage, via, next } of mustBeHuman) {
|
|
195
|
+
const at = `${playbook}/${stage.key}`;
|
|
196
|
+
if (via === "enter") {
|
|
197
|
+
expect({ at, gate: stage.gate }).toEqual({ at, gate: { kind: "human" } });
|
|
198
|
+
continue;
|
|
199
|
+
}
|
|
200
|
+
// Reached: approved by the next stage's PERSON gate, or by nothing (no
|
|
201
|
+
// outputs, no next stage) — the sender or a person writes it.
|
|
202
|
+
const approvedBy =
|
|
203
|
+
(stage.expectedOutputs ?? []).length > 0 ? "its outputs" : next ? `next gate: ${next.gate?.kind ?? "none"}` : "nothing";
|
|
204
|
+
expect({ at, ok: approvedBy === "nothing" || approvedBy === "next gate: human" }).toEqual({ at, ok: true });
|
|
191
205
|
}
|
|
192
206
|
});
|
|
193
207
|
|
|
@@ -250,7 +264,9 @@ describe("Content OS scripts a post before generating it", () => {
|
|
|
250
264
|
"schedule",
|
|
251
265
|
"publish",
|
|
252
266
|
]);
|
|
253
|
-
|
|
267
|
+
// D2: Scripted is REACHED when the Script is approved, not on entry.
|
|
268
|
+
expect(stage("script")?.onApproved).toBe("Scripted");
|
|
269
|
+
expect(stage("script")?.subjectStatus).toBeUndefined();
|
|
254
270
|
expect(stage("script")?.expectedOutputs).toEqual([
|
|
255
271
|
expect.objectContaining({ kind: "document", label: "Script" }),
|
|
256
272
|
]);
|
|
@@ -332,11 +332,13 @@ describe("Produce Content moves the post's status with its stages", () => {
|
|
|
332
332
|
const produce = playbook("Produce Content");
|
|
333
333
|
const goalOf = (key: string) => (produce?.stages?.find((s) => s.key === key)?.goal ?? "").replace(/\s+/g, " ");
|
|
334
334
|
|
|
335
|
-
it("moves an Idea post to Briefed
|
|
335
|
+
it("moves an Idea post to Briefed once the brief is set, through the status door", () => {
|
|
336
336
|
expect(goalOf("brief")).toContain(
|
|
337
|
-
"
|
|
337
|
+
"Once the brief is set, move the post to Briefed if it still reads Idea (synap_update_entity, post-status Briefed, expectedStatus Idea)",
|
|
338
338
|
);
|
|
339
339
|
expect(goalOf("brief")).toContain("never skipping one, takes included");
|
|
340
|
+
// D2: a stage moves the post when its work is APPROVED, not on entry.
|
|
341
|
+
expect(goalOf("brief")).toContain("A stage moves the post when its work is APPROVED, not when it is entered");
|
|
340
342
|
});
|
|
341
343
|
|
|
342
344
|
it("makes a take's cut plan the script, and says the Draft gate's approval writes In Draft", () => {
|
package/src/content-os.yaml
CHANGED
|
@@ -259,6 +259,7 @@ profiles:
|
|
|
259
259
|
"Short Video",
|
|
260
260
|
"Long Video",
|
|
261
261
|
"Carousel",
|
|
262
|
+
"Text Post",
|
|
262
263
|
"Image Post",
|
|
263
264
|
"Story",
|
|
264
265
|
"Newsletter Section",
|
|
@@ -1978,9 +1979,12 @@ relationDefs:
|
|
|
1978
1979
|
# (playbooks.subject_profile->>'profileSlug') can offer it when one is captured.
|
|
1979
1980
|
#
|
|
1980
1981
|
# THE PROCESS CONTRACT (lifecycle-bound playbooks). A playbook FOLLOWS the kind's
|
|
1981
|
-
# declared lifecycle (`post-status`)
|
|
1982
|
-
#
|
|
1983
|
-
#
|
|
1982
|
+
# declared lifecycle (`post-status`). A stage's `subjectStatus` is the value the
|
|
1983
|
+
# subject holds WHILE the stage is worked — entering the stage writes it
|
|
1984
|
+
# (governed); its `onApproved` is the value the stage's APPROVED work reaches
|
|
1985
|
+
# (its outputs all delivered, else the next stage's gate passing; decision D2).
|
|
1986
|
+
# The subject entering a value advances an open run to the stage that enters
|
|
1987
|
+
# it, or to the stage AFTER the one that reaches it. A value no stage
|
|
1984
1988
|
# owns is derived by the pod; a person-only value is `humanOnly` on the lifecycle.
|
|
1985
1989
|
# `activators` are DECLARATIONS the pod compiles into governed propose-mode rules
|
|
1986
1990
|
# at install — never hand-written `automations:`. `relationToSubject` is the edge
|
|
@@ -1999,7 +2003,7 @@ playbooks:
|
|
|
1999
2003
|
re-derive it from a website capture — and load the creative-director skill
|
|
2000
2004
|
(linked to this space) to pick the approved brand-template (layout and
|
|
2001
2005
|
recipe), references and assets for this format and style; drafts never feed
|
|
2002
|
-
generation. Work the stages in order;
|
|
2006
|
+
generation. Work the stages in order; a stage's approved work moves the post's status.
|
|
2003
2007
|
SCRIPT before anything is made: write the script or outline for the format
|
|
2004
2008
|
(carousel slide outline, deck outline, video script and storyboard, or the
|
|
2005
2009
|
text draft) by filling the narrative frame for the post's goal — the
|
|
@@ -2035,8 +2039,9 @@ playbooks:
|
|
|
2035
2039
|
Schedule, a post whose account is a Postiz channel is queued through the
|
|
2036
2040
|
capability that serves publish_post (postiz_schedule_post); that queueing is
|
|
2037
2041
|
itself a proposal a person approves. Nothing publishes itself, and the post
|
|
2038
|
-
reads Published only once it went live:
|
|
2039
|
-
by a person
|
|
2042
|
+
reads Published only once it went live: written by Publish due posts,
|
|
2043
|
+
reported by Postiz, or moved by a person once it is live. The gate at
|
|
2044
|
+
Publish approves the schedule (the post reads Scheduled).
|
|
2040
2045
|
subjectProfile:
|
|
2041
2046
|
profileSlug: post
|
|
2042
2047
|
# Idea is where a capture lands and Archived is a person's call — no stage
|
|
@@ -2078,7 +2083,7 @@ playbooks:
|
|
|
2078
2083
|
- key: brief
|
|
2079
2084
|
name: Brief
|
|
2080
2085
|
category: planned
|
|
2081
|
-
|
|
2086
|
+
onApproved: Briefed
|
|
2082
2087
|
# A run is BORN at its first stage, and nothing writes a stage's status
|
|
2083
2088
|
# at birth (finding f36420d5: the pilot post stayed at Idea while its
|
|
2084
2089
|
# run reached Draft). Said here, not only in goalTemplate: a template
|
|
@@ -2086,11 +2091,14 @@ playbooks:
|
|
|
2086
2091
|
goal: >-
|
|
2087
2092
|
Pin down the post's angle, platform, format, pillar and journey stage
|
|
2088
2093
|
before anything is drafted. A run starts at this stage without moving
|
|
2089
|
-
the post
|
|
2090
|
-
(synap_update_entity, post-status Briefed, expectedStatus
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
+
the post. Once the brief is set, move the post to Briefed if it still
|
|
2095
|
+
reads Idea (synap_update_entity, post-status Briefed, expectedStatus
|
|
2096
|
+
Idea): Briefed means the brief is done. Then advance the run through
|
|
2097
|
+
every stage in order (currentStage), never skipping one, takes
|
|
2098
|
+
included. A stage moves the post when its work is APPROVED, not when
|
|
2099
|
+
it is entered: the approved Script moves it to Scripted, the Draft
|
|
2100
|
+
gate's approval to In Draft, the Publish gate's approval to
|
|
2101
|
+
Scheduled; a reply that says proposed is success.
|
|
2094
2102
|
criteria:
|
|
2095
2103
|
- key: brief-has-hook
|
|
2096
2104
|
statement: The post has a hook or headline that states its one idea.
|
|
@@ -2105,7 +2113,7 @@ playbooks:
|
|
|
2105
2113
|
- key: script
|
|
2106
2114
|
name: Script
|
|
2107
2115
|
category: started
|
|
2108
|
-
|
|
2116
|
+
onApproved: Scripted
|
|
2109
2117
|
goal: >-
|
|
2110
2118
|
Write the script or outline for the post's format — carousel slide
|
|
2111
2119
|
outline, deck outline, video script and storyboard, or the text draft —
|
|
@@ -2262,7 +2270,7 @@ playbooks:
|
|
|
2262
2270
|
- key: schedule
|
|
2263
2271
|
name: Schedule
|
|
2264
2272
|
category: started
|
|
2265
|
-
|
|
2273
|
+
onApproved: Scheduled
|
|
2266
2274
|
goal: >-
|
|
2267
2275
|
Set the publish date and queue the post on its account: its
|
|
2268
2276
|
post-account, else the Personal account (account-owner) of its
|
|
@@ -2302,20 +2310,22 @@ playbooks:
|
|
|
2302
2310
|
- key: publish
|
|
2303
2311
|
name: Publish
|
|
2304
2312
|
category: completed
|
|
2305
|
-
|
|
2313
|
+
onApproved: Published
|
|
2306
2314
|
goal: >-
|
|
2307
2315
|
The post is live at its URL. Armed for Unipile, Publish due posts
|
|
2308
2316
|
sends it on its day and writes Published, post-url and
|
|
2309
2317
|
published-at itself; a send that fails writes publish-outcome failed
|
|
2310
2318
|
and publish-error and leaves the post at Scheduled, for a person to
|
|
2311
2319
|
fix and arm again. Queued through Postiz, Postiz reports it (its
|
|
2312
|
-
webhook records the URL and Published); otherwise a person
|
|
2313
|
-
|
|
2314
|
-
# A HUMAN gate, not a check:
|
|
2315
|
-
#
|
|
2316
|
-
#
|
|
2317
|
-
#
|
|
2318
|
-
#
|
|
2320
|
+
webhook records the URL and Published); otherwise a person moves the
|
|
2321
|
+
post to Published once it is live.
|
|
2322
|
+
# A HUMAN gate, not a check: its approval is the approval of the
|
|
2323
|
+
# Schedule stage's work (decision D2), which moves the post to
|
|
2324
|
+
# Scheduled — what Publish due posts sends. Published is this stage's
|
|
2325
|
+
# onApproved, written by what sends the post (Publish due posts, the
|
|
2326
|
+
# Postiz webhook) or by a person once it is live: never by an
|
|
2327
|
+
# approval, so Repurpose never fires on a post that may not have
|
|
2328
|
+
# shipped.
|
|
2319
2329
|
gate: { kind: human }
|
|
2320
2330
|
onFail: { toStage: schedule }
|
|
2321
2331
|
criteria:
|
|
@@ -2705,7 +2715,7 @@ playbooks:
|
|
|
2705
2715
|
- key: scheduled
|
|
2706
2716
|
name: Scheduled
|
|
2707
2717
|
category: started
|
|
2708
|
-
|
|
2718
|
+
onApproved: Scheduled
|
|
2709
2719
|
goal: Set the send date and queue the issue.
|
|
2710
2720
|
criteria:
|
|
2711
2721
|
- key: send-date-set
|
|
@@ -111,7 +111,11 @@ describe("CRM absorbs Outreach & Comms", () => {
|
|
|
111
111
|
expect(reply.goalTemplate).toMatch(/meeting/);
|
|
112
112
|
expect(reply.goalTemplate).not.toMatch(/(?<!never )open a deal/i);
|
|
113
113
|
// The run starts at `sent`: no stage may move the message back to drafted or sent.
|
|
114
|
-
|
|
114
|
+
// D2: `replied` is REACHED when `wait` is approved (the replied stage's
|
|
115
|
+
// check gate); bounced and no_response are outcome stages: entering one
|
|
116
|
+
// IS the outcome, so they stay entered statuses.
|
|
117
|
+
expect((reply.stages ?? []).map((s) => s.subjectStatus).filter(Boolean)).toEqual(["bounced", "no_response"]);
|
|
118
|
+
expect((reply.stages ?? []).find((s) => s.key === "wait")?.onApproved).toBe("replied");
|
|
115
119
|
|
|
116
120
|
const outreach = playbookOf("Personalized Outreach");
|
|
117
121
|
expect(outreach.subjectProfile).toEqual({ profileSlug: "campaign" });
|
package/src/crm.yaml
CHANGED
|
@@ -1140,8 +1140,8 @@ playbooks:
|
|
|
1140
1140
|
- key: pursue
|
|
1141
1141
|
name: Pursue
|
|
1142
1142
|
category: completed
|
|
1143
|
-
|
|
1144
|
-
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.
|
|
1143
|
+
onApproved: qualified
|
|
1144
|
+
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.
|
|
1145
1145
|
criteria:
|
|
1146
1146
|
- key: lead-book-meeting
|
|
1147
1147
|
statement: The lead's nextAction is to book a meeting and its nextActionAt is set.
|
|
@@ -1196,7 +1196,8 @@ playbooks:
|
|
|
1196
1196
|
description: Take a deal from first conversation to won or lost — qualify it, write and send the proposal, negotiate, and hand a won deal to delivery, with a person deciding every commitment.
|
|
1197
1197
|
goalTemplate: >-
|
|
1198
1198
|
Work this deal ({deal}) through its stages; each stage moves the deal's
|
|
1199
|
-
commercial stage
|
|
1199
|
+
commercial stage when its work is approved (the sent proposal moves it
|
|
1200
|
+
to Proposal sent). QUALIFY: from the pod (the company, its people, every
|
|
1200
1201
|
past message and meeting) and public sources, establish the four facts a
|
|
1201
1202
|
proposal needs — the problem the buyer wants solved and what it costs
|
|
1202
1203
|
them, a budget range, who signs, and when they need it — and link the
|
|
@@ -1268,8 +1269,14 @@ playbooks:
|
|
|
1268
1269
|
- key: send
|
|
1269
1270
|
name: Send proposal
|
|
1270
1271
|
category: started
|
|
1271
|
-
|
|
1272
|
-
goal: A person approves the proposal; then send it to the decision maker and record when.
|
|
1272
|
+
onApproved: proposed
|
|
1273
|
+
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.
|
|
1274
|
+
# REQUIRED (decision D2): the proposal as sent approves this stage, so
|
|
1275
|
+
# the deal reaches Proposal sent only once it has gone. A document,
|
|
1276
|
+
# not a `messaging` output: in CRM that kind is a drafter's proposed
|
|
1277
|
+
# message (DRAFT RULES, crm-messages-cadence).
|
|
1278
|
+
expectedOutputs:
|
|
1279
|
+
- { kind: document, label: Sent proposal, relationToSubject: none }
|
|
1273
1280
|
gate: { kind: human }
|
|
1274
1281
|
onFail: { toStage: write }
|
|
1275
1282
|
- key: await-answer
|
|
@@ -1285,6 +1292,7 @@ playbooks:
|
|
|
1285
1292
|
name: Negotiate
|
|
1286
1293
|
category: started
|
|
1287
1294
|
subjectStatus: negotiating
|
|
1295
|
+
onApproved: won
|
|
1288
1296
|
goal: Answer objections, log every counter-offer on the deal, and propose the next step.
|
|
1289
1297
|
gate: { kind: check }
|
|
1290
1298
|
onFail: { toStage: await-answer }
|
|
@@ -1296,7 +1304,6 @@ playbooks:
|
|
|
1296
1304
|
- key: won
|
|
1297
1305
|
name: Won
|
|
1298
1306
|
category: completed
|
|
1299
|
-
subjectStatus: won
|
|
1300
1307
|
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.
|
|
1301
1308
|
gate: { kind: human }
|
|
1302
1309
|
onFail: { toStage: negotiate }
|
|
@@ -1993,7 +2000,8 @@ playbooks:
|
|
|
1993
2000
|
description: Run one outreach campaign — write the angle and its offer, pick the people, draft one personal first message each as a proposed message in their channel; a person approves the list, then approves each message, which the pod sends.
|
|
1994
2001
|
goalTemplate: >-
|
|
1995
2002
|
Run this outreach campaign ({campaign}) on {channel}; each stage moves
|
|
1996
|
-
its status
|
|
2003
|
+
its status when its work is approved, and at Finish you move it to
|
|
2004
|
+
completed yourself. If its type is not outreach, stop and say so. PREPARE: write
|
|
1997
2005
|
the target audience, the value proposition and the call to action (from
|
|
1998
2006
|
the By kind of lead row that fits the audience, when one does). Pick
|
|
1999
2007
|
the people to reach from the pod (and public sources when the pod has
|
|
@@ -2107,8 +2115,8 @@ playbooks:
|
|
|
2107
2115
|
- key: finish
|
|
2108
2116
|
name: Finish
|
|
2109
2117
|
category: completed
|
|
2110
|
-
|
|
2111
|
-
goal: Record how many messages were sent, how many got a reply and how many led to a booked meeting.
|
|
2118
|
+
onApproved: completed
|
|
2119
|
+
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.
|
|
2112
2120
|
criteria:
|
|
2113
2121
|
- key: outreach-reply-rate
|
|
2114
2122
|
statement: The campaign notes record how many messages were sent, replied to, and led to a booked meeting.
|
|
@@ -2141,7 +2149,7 @@ playbooks:
|
|
|
2141
2149
|
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 — the free estimate or a meeting — and never open a deal.
|
|
2142
2150
|
goalTemplate: >-
|
|
2143
2151
|
Watch this sent outreach message ({touch}) for a reply; each stage
|
|
2144
|
-
moves its status. WAIT: watch its conversation. Set it bounced when it
|
|
2152
|
+
moves its status when its work is approved. WAIT: watch its conversation. Set it bounced when it
|
|
2145
2153
|
did not reach the person, or no response when its lead's next action
|
|
2146
2154
|
date passes with no reply; that date is the cadence's (the sent day + 3
|
|
2147
2155
|
days after the first message, the sent day + 7 days after each
|
|
@@ -2181,6 +2189,7 @@ playbooks:
|
|
|
2181
2189
|
- key: wait
|
|
2182
2190
|
name: Waiting for a reply
|
|
2183
2191
|
category: started
|
|
2192
|
+
onApproved: replied
|
|
2184
2193
|
goal: Watch the conversation for a reply, a bounce, or the follow-up date passing in silence.
|
|
2185
2194
|
indefinite: true
|
|
2186
2195
|
criteria:
|
|
@@ -2190,7 +2199,6 @@ playbooks:
|
|
|
2190
2199
|
- key: replied
|
|
2191
2200
|
name: Replied
|
|
2192
2201
|
category: completed
|
|
2193
|
-
subjectStatus: replied
|
|
2194
2202
|
goal: Summarise the reply for a person and propose the next step — the free estimate or a meeting; never open a deal.
|
|
2195
2203
|
gate: { kind: check }
|
|
2196
2204
|
onFail: { toStage: wait }
|