@synap-core/workspace-templates 0.67.0 → 0.68.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.
@@ -30,10 +30,12 @@ const tpl = (slug: string, c: WorkspaceYaml[] = corpus) => {
30
30
  if (!t) throw new Error(`template ${slug} not in the corpus`);
31
31
  return t;
32
32
  };
33
- const profileOf = (t: WorkspaceYaml, slug: string) => t.profiles.find((p) => p.slug === slug);
33
+ const profileOf = (t: WorkspaceYaml, slug: string) =>
34
+ t.profiles.find((p) => p.slug === slug);
34
35
  const propOf = (t: WorkspaceYaml, profile: string, prop: string) =>
35
36
  profileOf(t, profile)?.properties.find((p) => p.slug === prop);
36
- const playbookOf = (t: WorkspaceYaml, name: string) => t.playbooks?.find((p) => p.name === name);
37
+ const playbookOf = (t: WorkspaceYaml, name: string) =>
38
+ t.playbooks?.find((p) => p.name === name);
37
39
  const errorsOf = (t: WorkspaceYaml, c: WorkspaceYaml[] = corpus) =>
38
40
  validateTemplate(t, { corpus: c }).errors.map((e) => `${e.rule} ${e.path}`);
39
41
 
@@ -44,10 +46,17 @@ describe("decision 1 — Business Developer folds into CRM", () => {
44
46
  });
45
47
 
46
48
  it("business-developer is a tombstone replaced by crm, and no live template depends on it", async () => {
47
- expect(corpus.some((t) => t.meta.slug === "business-developer")).toBe(false);
49
+ expect(corpus.some((t) => t.meta.slug === "business-developer")).toBe(
50
+ false
51
+ );
48
52
  const { retired } = await loadRetired();
49
- expect(retired.find((r) => r.slug === "business-developer")).toMatchObject({ kind: "workspace", replacedBy: "crm" });
50
- const dependents = corpus.filter((t) => (t.dependencies ?? []).some((d) => d.slug === "business-developer"));
53
+ expect(retired.find((r) => r.slug === "business-developer")).toMatchObject({
54
+ kind: "workspace",
55
+ replacedBy: "crm",
56
+ });
57
+ const dependents = corpus.filter((t) =>
58
+ (t.dependencies ?? []).some((d) => d.slug === "business-developer")
59
+ );
51
60
  expect(dependents.map((t) => t.meta.slug)).toEqual([]);
52
61
  });
53
62
 
@@ -59,22 +68,35 @@ describe("decision 1 — Business Developer folds into CRM", () => {
59
68
  // lead and burned the budget; "Score a list" scores a whole list in one run.
60
69
  expect(pb?.activators).toEqual([{ on: "manual", mode: "propose" }]);
61
70
  // The subject is a ROLE, declared pod-wide by foundation.
62
- expect(profileOf(tpl("foundation"), "lead")).toMatchObject({ profileKind: "role", scope: "shared" });
71
+ expect(profileOf(tpl("foundation"), "lead")).toMatchObject({
72
+ profileKind: "role",
73
+ scope: "shared",
74
+ });
63
75
  // It owns researching and qualified; the other leadStage values belong to a
64
76
  // person or another flow — derived by the pod, never listed (One model
65
77
  // decision 4, 7 Nov 2026; conflict C2 on `outreach` closed).
66
- const owned = (pb?.stages ?? []).flatMap((s) => [s.subjectStatus, s.onApproved]).filter(Boolean);
78
+ const owned = (pb?.stages ?? [])
79
+ .flatMap((s) => [s.subjectStatus, s.onApproved])
80
+ .filter(Boolean);
67
81
  expect(owned).toEqual(["researching", "qualified"]);
68
- for (const s of owned) expect(propOf(tpl("foundation"), "lead", "leadStage")?.enumValues).toContain(s);
82
+ for (const s of owned)
83
+ expect(
84
+ propOf(tpl("foundation"), "lead", "leadStage")?.enumValues
85
+ ).toContain(s);
69
86
  // The last stage, reached when the person chose pursue, DECLARES
70
87
  // qualified (the follow and flow.of read it) but nothing approves it
71
88
  // (ungated, no output), so the pod never writes it: its goal tells the
72
89
  // run to move the lead through the role's status door (decision D2). It
73
90
  // opens no deal (CRM build plan A4, 2026-10-22): a deal is opened when a
74
91
  // person records a booked meeting.
75
- expect(pb?.stages?.at(-1)).toMatchObject({ key: "pursue", onApproved: "qualified" });
92
+ expect(pb?.stages?.at(-1)).toMatchObject({
93
+ key: "pursue",
94
+ onApproved: "qualified",
95
+ });
76
96
  expect(pb?.stages?.at(-1)?.subjectStatus).toBeUndefined();
77
- expect(pb?.stages?.at(-1)?.goal).toMatch(/set the lead qualified yourself \(update_facet on the lead role, leadStage qualified/);
97
+ expect(pb?.stages?.at(-1)?.goal).toMatch(
98
+ /set the lead qualified yourself \(update_facet on the lead role, leadStage qualified/
99
+ );
78
100
  expect(pb?.stages?.flatMap((s) => s.expectedOutputs ?? [])).toEqual([]);
79
101
  expect(pb?.expectedOutputs).toBeUndefined();
80
102
  });
@@ -84,42 +106,61 @@ describe("decision 1 — Business Developer folds into CRM", () => {
84
106
  const c = structuredClone(corpus);
85
107
  const pb = playbookOf(tpl("crm", c), "Qualify a lead")!;
86
108
  pb.stages![0]!.subjectStatus = "won"; // a deal status, not a leadStage one
87
- expect(errorsOf(tpl("crm", c), c)).toContain('stage-subject-status-unknown playbooks."Qualify a lead".stages.research.subjectStatus');
109
+ expect(errorsOf(tpl("crm", c), c)).toContain(
110
+ 'stage-subject-status-unknown playbooks."Qualify a lead".stages.research.subjectStatus'
111
+ );
88
112
  });
89
113
 
90
114
  it("an onApproved outside the lifecycle is refused (D2)", () => {
91
115
  const c = structuredClone(corpus);
92
116
  const pb = playbookOf(tpl("crm", c), "Qualify a lead")!;
93
117
  pb.stages![0]!.onApproved = "won";
94
- expect(errorsOf(tpl("crm", c), c)).toContain('stage-on-approved-unknown playbooks."Qualify a lead".stages.research.onApproved');
118
+ expect(errorsOf(tpl("crm", c), c)).toContain(
119
+ 'stage-on-approved-unknown playbooks."Qualify a lead".stages.research.onApproved'
120
+ );
95
121
  });
96
122
 
97
123
  it("an onApproved nothing approves is KEPT when the stage's goal names the move, refused when it does not (D2)", () => {
98
124
  // The shipped catalog: every no-signal onApproved names its move.
99
- const noSignal = corpus.flatMap((t) => errorsOf(t).filter((e) => e.startsWith("stage-on-approved-no-signal ")));
125
+ const noSignal = corpus.flatMap((t) =>
126
+ errorsOf(t).filter((e) => e.startsWith("stage-on-approved-no-signal "))
127
+ );
100
128
  expect(noSignal).toEqual([]);
101
129
  // NEGATIVE: the same last stage, its goal silent on the move.
102
130
  const c = structuredClone(corpus);
103
131
  const pursue = playbookOf(tpl("crm", c), "Qualify a lead")!.stages!.at(-1)!;
104
132
  expect(pursue.onApproved).toBe("qualified");
105
- pursue.goal = "Only after the person chose pursue, set the next action to book a meeting.";
106
- expect(errorsOf(tpl("crm", c), c)).toContain('stage-on-approved-no-signal playbooks."Qualify a lead".stages.pursue.onApproved');
133
+ pursue.goal =
134
+ "Only after the person chose pursue, set the next action to book a meeting.";
135
+ expect(errorsOf(tpl("crm", c), c)).toContain(
136
+ 'stage-on-approved-no-signal playbooks."Qualify a lead".stages.pursue.onApproved'
137
+ );
107
138
  });
108
139
 
109
140
  it("no-signal is the pod's: a required output or the NEXT stage's gate approves; the stage's own gate and an optional output do not (D2)", () => {
110
141
  const rule = (c: WorkspaceYaml[]) =>
111
- errorsOf(tpl("crm", c), c).filter((e) => e.startsWith("stage-on-approved-no-signal ") && e.includes('"Win a deal"'));
112
- const send = 'stage-on-approved-no-signal playbooks."Win a deal".stages.send.onApproved';
142
+ errorsOf(tpl("crm", c), c).filter(
143
+ (e) =>
144
+ e.startsWith("stage-on-approved-no-signal ") &&
145
+ e.includes('"Win a deal"')
146
+ );
147
+ const send =
148
+ 'stage-on-approved-no-signal playbooks."Win a deal".stages.send.onApproved';
113
149
  const silent = () => {
114
150
  const c = structuredClone(corpus);
115
- const s = playbookOf(tpl("crm", c), "Win a deal")!.stages!.find((x) => x.key === "send")!;
151
+ const s = playbookOf(tpl("crm", c), "Win a deal")!.stages!.find(
152
+ (x) => x.key === "send"
153
+ )!;
116
154
  // send carries its own human gate; the next stage (await-answer) has none.
117
155
  expect(s.gate).toEqual({ kind: "human" });
118
156
  // The shipped stage owes its Sent proposal (signal 1): strip it to judge
119
157
  // the gates alone.
120
- expect(s.expectedOutputs).toEqual([{ kind: "document", label: "Sent proposal", relationToSubject: "none" }]);
158
+ expect(s.expectedOutputs).toEqual([
159
+ { kind: "document", label: "Sent proposal", relationToSubject: "none" },
160
+ ]);
121
161
  s.expectedOutputs = undefined;
122
- s.goal = "A person approves the proposal; then send it to the decision maker.";
162
+ s.goal =
163
+ "A person approves the proposal; then send it to the decision maker.";
123
164
  return { c, s, pb: playbookOf(tpl("crm", c), "Win a deal")! };
124
165
  };
125
166
  // Its own gate does not approve it: the goal must name the move.
@@ -127,7 +168,9 @@ describe("decision 1 — Business Developer folds into CRM", () => {
127
168
  // An optional output does not either.
128
169
  {
129
170
  const { c, s } = silent();
130
- s.expectedOutputs = [{ kind: "document", label: "Sent proposal", optional: true }];
171
+ s.expectedOutputs = [
172
+ { kind: "document", label: "Sent proposal", optional: true },
173
+ ];
131
174
  expect(rule(c)).toEqual([send]);
132
175
  }
133
176
  // A required output does.
@@ -139,13 +182,16 @@ describe("decision 1 — Business Developer folds into CRM", () => {
139
182
  // So does a gate on the NEXT stage.
140
183
  {
141
184
  const { c, pb } = silent();
142
- pb.stages!.find((x) => x.key === "await-answer")!.gate = { kind: "human" };
185
+ pb.stages!.find((x) => x.key === "await-answer")!.gate = {
186
+ kind: "human",
187
+ };
143
188
  expect(rule(c)).toEqual([]);
144
189
  }
145
190
  // The option's LABEL names the move as well as its key ("Proposal sent").
146
191
  {
147
192
  const { c, s } = silent();
148
- s.goal = "A person approves the proposal; send it, then move the deal to Proposal sent.";
193
+ s.goal =
194
+ "A person approves the proposal; send it, then move the deal to Proposal sent.";
149
195
  expect(rule(c)).toEqual([]);
150
196
  }
151
197
  });
@@ -159,34 +205,78 @@ describe("decision 1 — Business Developer folds into CRM", () => {
159
205
 
160
206
  it("CRM carries the moved lead/client fields, the campaign kind and member_of", () => {
161
207
  const crm = tpl("crm");
162
- for (const p of ["icpScore", "qualificationNotes", "nextAction", "outreachChannels", "convertedAt", "disqualificationReason"])
208
+ for (const p of [
209
+ "icpScore",
210
+ "qualificationNotes",
211
+ "nextAction",
212
+ "outreachChannels",
213
+ "convertedAt",
214
+ "disqualificationReason",
215
+ ])
163
216
  expect(propOf(crm, "lead", p), `lead.${p}`).toBeDefined();
164
- for (const p of ["becameClientAt", "handoffStatus", "handoffDestination", "handoffNotes"])
217
+ for (const p of [
218
+ "becameClientAt",
219
+ "handoffStatus",
220
+ "handoffDestination",
221
+ "handoffNotes",
222
+ ])
165
223
  expect(propOf(crm, "client", p), `client.${p}`).toBeDefined();
166
224
  expect(profileOf(crm, "campaign")?.semanticSlug).toBe("marketing.campaign");
167
- expect(crm.entityLinks?.filter((l) => l.type === "member_of").map((l) => l.sourceProfileSlug)).toEqual(["person", "company"]);
225
+ expect(
226
+ crm.entityLinks
227
+ ?.filter((l) => l.type === "member_of")
228
+ .map((l) => l.sourceProfileSlug)
229
+ ).toEqual(["person", "company"]);
168
230
  });
169
231
 
170
232
  it("the Synap-fee and commission model left the catalog with arch-sales and the-arch, both tombstones", async () => {
171
- const FEE = ["synapFeeModel", "synapFixedFee", "synapSuccessFeeRate", "synapFeeAmount", "sourcedByUserId", "commissionEntitlementId", "commissionStatus"];
233
+ const FEE = [
234
+ "synapFeeModel",
235
+ "synapFixedFee",
236
+ "synapSuccessFeeRate",
237
+ "synapFeeAmount",
238
+ "sourcedByUserId",
239
+ "commissionEntitlementId",
240
+ "commissionStatus",
241
+ ];
172
242
  const { retired } = await loadRetired();
173
243
  for (const slug of ["arch-sales", "the-arch"]) {
174
- expect(corpus.some((t) => t.meta.slug === slug), `${slug} is live`).toBe(false);
244
+ expect(
245
+ corpus.some((t) => t.meta.slug === slug),
246
+ `${slug} is live`
247
+ ).toBe(false);
175
248
  const stone = retired.find((r) => r.slug === slug);
176
- expect(stone, `${slug} tombstone`).toMatchObject({ kind: "workspace", since: "2026-10-12" });
249
+ expect(stone, `${slug} tombstone`).toMatchObject({
250
+ kind: "workspace",
251
+ since: "2026-10-12",
252
+ });
177
253
  expect(stone?.replacedBy, `${slug} has no replacement`).toBeUndefined();
178
- const dependents = corpus.filter((t) => (t.dependencies ?? []).some((d) => d.slug === slug));
179
- expect(dependents.map((t) => t.meta.slug), `dependents of ${slug}`).toEqual([]);
254
+ const dependents = corpus.filter((t) =>
255
+ (t.dependencies ?? []).some((d) => d.slug === slug)
256
+ );
257
+ expect(
258
+ dependents.map((t) => t.meta.slug),
259
+ `dependents of ${slug}`
260
+ ).toEqual([]);
180
261
  }
181
262
  // No live template's deal carries the fee model any more (networking's
182
263
  // `intro` keeps its own copy of the fee vocabulary: a separate decision).
183
264
  for (const p of FEE) {
184
- const holders = corpus.filter((t) => !!propOf(t, "deal", p)).map((t) => t.meta.slug);
265
+ const holders = corpus
266
+ .filter((t) => !!propOf(t, "deal", p))
267
+ .map((t) => t.meta.slug);
185
268
  expect(holders, `deal.${p}`).toEqual([]);
186
269
  }
187
- const holders = (pred: (t: WorkspaceYaml) => boolean) => corpus.filter(pred).map((t) => t.meta.slug);
188
- expect(holders((t) => !!profileOf(t, "crm-commission-entitlement"))).toEqual([]);
189
- expect(holders((t) => (t.automations ?? []).some((a) => a.name === "Win and hand off"))).toEqual([]);
270
+ const holders = (pred: (t: WorkspaceYaml) => boolean) =>
271
+ corpus.filter(pred).map((t) => t.meta.slug);
272
+ expect(
273
+ holders((t) => !!profileOf(t, "crm-commission-entitlement"))
274
+ ).toEqual([]);
275
+ expect(
276
+ holders((t) =>
277
+ (t.automations ?? []).some((a) => a.name === "Win and hand off")
278
+ )
279
+ ).toEqual([]);
190
280
  });
191
281
  });
192
282
 
@@ -194,7 +284,9 @@ describe("decision 4 — 'Deliver a deliverable' starts when the deliverable ent
194
284
  const pb = playbookOf(tpl("operations"), "Deliver a deliverable")!;
195
285
 
196
286
  it("its one activator is entering in-progress", () => {
197
- expect(pb.activators).toEqual([{ on: "enters_status", status: "in-progress", mode: "propose" }]);
287
+ expect(pb.activators).toEqual([
288
+ { on: "enters_status", status: "in-progress", mode: "propose" },
289
+ ]);
198
290
  });
199
291
 
200
292
  it("no stage writes not-started (a run started at in-progress never moves the deliverable back)", () => {
@@ -208,7 +300,9 @@ describe("decision 4 — 'Deliver a deliverable' starts when the deliverable ent
208
300
 
209
301
  describe("decision 5 — billing", () => {
210
302
  it("an engagement chooses at-close (default) or per-deliverable billing", () => {
211
- expect(propOf(tpl("operations"), "engagement", "engagement-billing-mode")).toMatchObject({
303
+ expect(
304
+ propOf(tpl("operations"), "engagement", "engagement-billing-mode")
305
+ ).toMatchObject({
212
306
  inputType: "select",
213
307
  enumValues: ["at-close", "per-deliverable"],
214
308
  constraints: { defaultValue: "at-close" },
@@ -216,7 +310,10 @@ describe("decision 5 — billing", () => {
216
310
  });
217
311
 
218
312
  it("an accepted deliverable may produce its milestone invoice (an optional slot)", () => {
219
- const accepted = playbookOf(tpl("operations"), "Deliver a deliverable")!.stages!.find((s) => s.key === "accepted");
313
+ const accepted = playbookOf(
314
+ tpl("operations"),
315
+ "Deliver a deliverable"
316
+ )!.stages!.find((s) => s.key === "accepted");
220
317
  expect(accepted?.expectedOutputs?.map((o) => o.kind)).toEqual(["invoice"]);
221
318
  // Owed by nobody (synap-backend 30a9ab85): an at-close run never shows it pending.
222
319
  expect(accepted?.expectedOutputs?.[0]?.optional).toBe(true);
@@ -228,9 +325,13 @@ describe("decision 5 — billing", () => {
228
325
  const pb = playbookOf(finance, "Bill a recurring fee")!;
229
326
  expect(pb.subjectProfile?.profileSlug).toBe("revenue-stream");
230
327
  // One run per stream, every month, running (not asking first).
231
- expect(pb.activators).toEqual([{ on: "schedule", cron: "0 8 1 * *", size: "per_thing", mode: "run" }]);
328
+ expect(pb.activators).toEqual([
329
+ { on: "schedule", cron: "0 8 1 * *", size: "per_thing", mode: "run" },
330
+ ]);
232
331
  expect(pb).not.toHaveProperty("schedule");
233
- expect(pb.metadata).toMatchObject({ governance: { forceProposeWrites: true } });
332
+ expect(pb.metadata).toMatchObject({
333
+ governance: { forceProposeWrites: true },
334
+ });
234
335
  // The pod's query filter grammar is a JSON string; it selects the streams the tick runs over.
235
336
  const filter = pb.subjectProfile?.filter;
236
337
  expect(typeof filter).toBe("string");
@@ -238,7 +339,11 @@ describe("decision 5 — billing", () => {
238
339
  expect(Object.keys(parsed).length).toBeGreaterThan(0);
239
340
  // Reachability: every filtered key is a property of revenue-stream and every value one of its options.
240
341
  for (const [key, value] of Object.entries(parsed)) {
241
- const prop = propOf(finance, "revenue-stream", key.replace(/^properties\./, ""));
342
+ const prop = propOf(
343
+ finance,
344
+ "revenue-stream",
345
+ key.replace(/^properties\./, "")
346
+ );
242
347
  expect(prop?.enumValues, key).toContain(value);
243
348
  }
244
349
  expect(pb.expectedOutputs?.map((o) => o.kind)).toEqual(["invoice"]);
@@ -246,13 +351,18 @@ describe("decision 5 — billing", () => {
246
351
  });
247
352
 
248
353
  it("the drafted invoice is taken over by 'Bill a client' (its created activator)", () => {
249
- expect(playbookOf(tpl("finance"), "Bill a client")?.activators).toContainEqual({ on: "created", mode: "propose" });
354
+ expect(
355
+ playbookOf(tpl("finance"), "Bill a client")?.activators
356
+ ).toContainEqual({ on: "created", mode: "propose" });
250
357
  });
251
358
  });
252
359
 
253
360
  describe("settled item — a new brand voice guide is a draft", () => {
254
361
  it("voice-status defaults to draft", () => {
255
- expect(propOf(tpl("brand-library"), "brand-voice-guide", "voice-status")?.constraints).toEqual({ defaultValue: "draft" });
362
+ expect(
363
+ propOf(tpl("brand-library"), "brand-voice-guide", "voice-status")
364
+ ?.constraints
365
+ ).toEqual({ defaultValue: "draft" });
256
366
  });
257
367
  });
258
368
 
@@ -262,7 +372,9 @@ describe("decision D2 — where a real artifact exists, the work itself reaches
262
372
  it("Fix a finding's merged stage owes the merged pull request; the merge moves the finding to fixed", () => {
263
373
  const merged = stageOf("builder-workspace", "Fix a finding", "merged");
264
374
  expect(merged.onApproved).toBe("fixed");
265
- expect(merged.expectedOutputs).toEqual([{ kind: "pull_request", label: "Merged fix", relationToSubject: "none" }]);
375
+ expect(merged.expectedOutputs).toEqual([
376
+ { kind: "pull_request", label: "Merged fix", relationToSubject: "none" },
377
+ ]);
266
378
  expect(merged.goal).toMatch(/with its url as the ref, and leave it open/);
267
379
  expect(merged.goal).toMatch(/Never move the finding yourself/);
268
380
  // Never the child's "Fix PR" label: the hand-off's draft PR must not close it.
@@ -270,12 +382,24 @@ describe("decision D2 — where a real artifact exists, the work itself reaches
270
382
  });
271
383
  it("Win a deal's send and Bill a client's send owe what was sent, and never move the subject themselves", () => {
272
384
  for (const [slug, pb, label, output] of [
273
- ["crm", "Win a deal", "Sent proposal", { kind: "document", label: "Sent proposal", relationToSubject: "none" }],
274
- ["finance", "Bill a client", "Invoice sent to the client", { kind: "document", label: "Invoice sent to the client" }],
385
+ [
386
+ "crm",
387
+ "Win a deal",
388
+ "Sent proposal",
389
+ { kind: "document", label: "Sent proposal", relationToSubject: "none" },
390
+ ],
391
+ [
392
+ "finance",
393
+ "Bill a client",
394
+ "Invoice sent to the client",
395
+ { kind: "document", label: "Invoice sent to the client" },
396
+ ],
275
397
  ] as const) {
276
398
  const send = stageOf(slug, pb, "send");
277
399
  expect(send.expectedOutputs, pb).toEqual([output]);
278
- expect(send.goal, pb).toContain(`${label} output done with the sent message as its ref (update_run)`);
400
+ expect(send.goal, pb).toContain(
401
+ `${label} output done with the sent message as its ref (update_run)`
402
+ );
279
403
  expect(send.goal, pb).toMatch(/Never move the (deal|invoice) yourself/);
280
404
  expect(send.goal, pb).not.toMatch(/update_entity/);
281
405
  }
@@ -451,7 +451,13 @@ playbooks:
451
451
  # workspace never silently starts paid AI runs — the user turns it on when
452
452
  # they want the watch.
453
453
  activators:
454
- - { on: schedule, cron: "0 9 * * 1", size: per_thing, mode: run, startsPaused: true }
454
+ - {
455
+ on: schedule,
456
+ cron: "0 9 * * 1",
457
+ size: per_thing,
458
+ mode: run,
459
+ startsPaused: true,
460
+ }
455
461
  tools: [update_entity, exa_search, apify_run_actor, entity.create]
456
462
  status: active
457
463
 
package/src/finance.yaml CHANGED
@@ -686,7 +686,11 @@ playbooks:
686
686
  forceProposeWrites: true
687
687
  tools: [create_entity, create_relation, list_records]
688
688
  expectedOutputs:
689
- - { kind: invoice, label: This month's invoice, relationToSubject: relates_to }
689
+ - {
690
+ kind: invoice,
691
+ label: This month's invoice,
692
+ relationToSubject: relates_to,
693
+ }
690
694
 
691
695
  - name: Approve an expense
692
696
  description: Review an expense against its budget, get a person's approval, and record the payment.
@@ -753,10 +757,19 @@ playbooks:
753
757
  executor: is-agent
754
758
  status: active
755
759
  activators:
756
- - { on: schedule, cron: "0 9 1 * *", mode: appointment, startsPaused: true }
760
+ - {
761
+ on: schedule,
762
+ cron: "0 9 1 * *",
763
+ mode: appointment,
764
+ startsPaused: true,
765
+ }
757
766
  tools: [fetch_record, list_records]
758
767
  expectedOutputs:
759
- - { kind: financial-metric, label: Month-end metrics, relationToSubject: none }
768
+ - {
769
+ kind: financial-metric,
770
+ label: Month-end metrics,
771
+ relationToSubject: none,
772
+ }
760
773
  - { kind: document, label: Month-end note, relationToSubject: none }
761
774
  stages:
762
775
  - key: reconcile
@@ -777,8 +790,17 @@ playbooks:
777
790
  ask:
778
791
  mode: choose
779
792
  options:
780
- - { label: Go on with the close, value: continue, recommended: true, description: Unconnected accounts stay listed in the month-end note }
781
- - { label: "I connected them: reconcile again", value: reconcile_again, description: The run reconciles the newly connected accounts first }
793
+ - {
794
+ label: Go on with the close,
795
+ value: continue,
796
+ recommended: true,
797
+ description: Unconnected accounts stay listed in the month-end note,
798
+ }
799
+ - {
800
+ label: "I connected them: reconcile again",
801
+ value: reconcile_again,
802
+ description: The run reconciles the newly connected accounts first,
803
+ }
782
804
  - key: receivables
783
805
  name: Receivables
784
806
  category: started
@@ -294,6 +294,10 @@ describe("lifecycle declarations — coverage (derived from the playbooks)", ()
294
294
  * playbook renders into the AI's instructions, design b199a3a4, 8 Nov 2026),
295
295
  * content-composition.approved ("Ready": the person signs a piece off,
296
296
  * founder 6 Nov declaration 305683a8, kept by the piece model of 12 Nov 2026).
297
+ * ui-component.deprecated / ui-page.deprecated and user-flow.live / retired
298
+ * (the UI inventory, plan 48854969 §9, 23 Nov 2026: the Storybook sync owns
299
+ * every other status and moves a dropped record to `gone`; retiring a
300
+ * component or page, and calling a flow live or retired, is a person's call).
297
301
  */
298
302
  const HUMAN_ONLY = [
299
303
  "brand-library:brand-asset.deprecated",
@@ -305,8 +309,12 @@ describe("lifecycle declarations — coverage (derived from the playbooks)", ()
305
309
  "builder-workspace:finding.superseded",
306
310
  "builder-workspace:finding.wont_fix",
307
311
  "builder-workspace:issue.wont_fix",
312
+ "builder-workspace:ui-component.deprecated",
308
313
  "builder-workspace:ui-design.approved",
309
314
  "builder-workspace:ui-design.archived",
315
+ "builder-workspace:ui-page.deprecated",
316
+ "builder-workspace:user-flow.live",
317
+ "builder-workspace:user-flow.retired",
310
318
  "content-os:campaign.cancelled",
311
319
  "content-os:campaign.paused",
312
320
  "content-os:content-composition.approved",
@@ -130,8 +130,7 @@ profiles:
130
130
  label: Type
131
131
  valueType: string
132
132
  inputType: select
133
- enumValues:
134
- [scoping, outreach, live, partnership, event, other]
133
+ enumValues: [scoping, outreach, live, partnership, event, other]
135
134
  constraints: { defaultValue: outreach }
136
135
  # `campaign-color` backs the per-campaign colour the CRM surfaces render.
137
136
  # Stored as a palette NAME (see apps/crm/lib/campaignColors.ts), not a hex.
@@ -424,7 +423,11 @@ playbooks:
424
423
  tools: [publish_post, send_message, list_records]
425
424
  expectedOutputs:
426
425
  - { kind: post, label: Campaign pieces, relationToSubject: relates_to }
427
- - { kind: person, label: Leads from the campaign, relationToSubject: relates_to }
426
+ - {
427
+ kind: person,
428
+ label: Leads from the campaign,
429
+ relationToSubject: relates_to,
430
+ }
428
431
  - { kind: document, label: Campaign report }
429
432
  stages:
430
433
  - key: brief