@synap-core/workspace-templates 0.67.0 → 0.69.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 +135 -68
- package/capabilities/design.capability.json +126 -643
- package/capabilities/storybook.capability.json +84 -0
- package/capabilities/vast-ai-compute-worker.capability.json +178 -76
- package/dist/index.js +1588 -104
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/skills/designing-with-real-components/SKILL.md +7 -1
- package/src/agency-os.yaml +22 -4
- package/src/builder.yaml +1480 -773
- package/src/campaign-channel-platforms.template.test.ts +13 -2
- package/src/catalog-safety.test.ts +14 -3
- package/src/content-os.campaigns.template.test.ts +63 -20
- package/src/content-os.piece-model.template.test.ts +185 -41
- package/src/content-os.template.test.ts +174 -58
- package/src/content-os.yaml +170 -28
- package/src/crm.yaml +289 -46
- package/src/decisions-wave.template.test.ts +171 -47
- package/src/design-system.template.test.ts +87 -0
- package/src/design-system.yaml +173 -0
- package/src/ecosystem.yaml +7 -1
- package/src/finance.yaml +27 -5
- package/src/lifecycle-declarations.test.ts +8 -0
- package/src/marketing.yaml +6 -3
- package/src/process-contract.validate.test.ts +217 -71
- package/src/templates.ts +2522 -1310
- package/src/types.ts +35 -6
- package/src/ui-inventory.template.test.ts +256 -0
- package/src/validate.ts +541 -130
package/dist/index.js
CHANGED
|
@@ -3688,6 +3688,20 @@ var DATA = {
|
|
|
3688
3688
|
"devplane.workspace"
|
|
3689
3689
|
]
|
|
3690
3690
|
},
|
|
3691
|
+
"dependencies": [
|
|
3692
|
+
{
|
|
3693
|
+
"slug": "designing-with-real-components",
|
|
3694
|
+
"kind": "skill",
|
|
3695
|
+
"relation": "require",
|
|
3696
|
+
"reason": "How a screen is designed as Puck JSON from the real components, and carried to an implemented pull request."
|
|
3697
|
+
},
|
|
3698
|
+
{
|
|
3699
|
+
"slug": "design-critique",
|
|
3700
|
+
"kind": "skill",
|
|
3701
|
+
"relation": "require",
|
|
3702
|
+
"reason": "The rubric every design and every UI component review is judged by (checked, pattern and opinion rules with stable ids)."
|
|
3703
|
+
}
|
|
3704
|
+
],
|
|
3691
3705
|
"profiles": [
|
|
3692
3706
|
{
|
|
3693
3707
|
"slug": "devplane_app",
|
|
@@ -6086,6 +6100,422 @@ var DATA = {
|
|
|
6086
6100
|
"inputType": "textarea"
|
|
6087
6101
|
}
|
|
6088
6102
|
]
|
|
6103
|
+
},
|
|
6104
|
+
{
|
|
6105
|
+
"slug": "ui-component",
|
|
6106
|
+
"displayName": "UI component",
|
|
6107
|
+
"icon": "component",
|
|
6108
|
+
"color": "violet",
|
|
6109
|
+
"description": "A component of an app's Storybook (from a primitive to a whole section), mirrored by the Storybook sync, with its stories, screenshot, props, composition and review state.",
|
|
6110
|
+
"entityScope": "pod",
|
|
6111
|
+
"lifecycle": {
|
|
6112
|
+
"property": "ui-status",
|
|
6113
|
+
"options": [
|
|
6114
|
+
{
|
|
6115
|
+
"key": "proposed",
|
|
6116
|
+
"category": "open"
|
|
6117
|
+
},
|
|
6118
|
+
{
|
|
6119
|
+
"key": "stable",
|
|
6120
|
+
"category": "active"
|
|
6121
|
+
},
|
|
6122
|
+
{
|
|
6123
|
+
"key": "consolidate",
|
|
6124
|
+
"category": "active"
|
|
6125
|
+
},
|
|
6126
|
+
{
|
|
6127
|
+
"key": "deprecated",
|
|
6128
|
+
"category": "done",
|
|
6129
|
+
"humanOnly": true
|
|
6130
|
+
},
|
|
6131
|
+
{
|
|
6132
|
+
"key": "gone",
|
|
6133
|
+
"category": "lost"
|
|
6134
|
+
}
|
|
6135
|
+
]
|
|
6136
|
+
},
|
|
6137
|
+
"presentation": {
|
|
6138
|
+
"family": "media",
|
|
6139
|
+
"media": {
|
|
6140
|
+
"source": {
|
|
6141
|
+
"entityRef": "screenshot"
|
|
6142
|
+
},
|
|
6143
|
+
"kind": "image"
|
|
6144
|
+
}
|
|
6145
|
+
},
|
|
6146
|
+
"properties": [
|
|
6147
|
+
{
|
|
6148
|
+
"slug": "ui-status",
|
|
6149
|
+
"label": "Status",
|
|
6150
|
+
"valueType": "string",
|
|
6151
|
+
"inputType": "select",
|
|
6152
|
+
"enumValues": [
|
|
6153
|
+
"proposed",
|
|
6154
|
+
"stable",
|
|
6155
|
+
"consolidate",
|
|
6156
|
+
"deprecated",
|
|
6157
|
+
"gone"
|
|
6158
|
+
],
|
|
6159
|
+
"constraints": {
|
|
6160
|
+
"defaultValue": "proposed"
|
|
6161
|
+
}
|
|
6162
|
+
},
|
|
6163
|
+
{
|
|
6164
|
+
"slug": "component-level",
|
|
6165
|
+
"label": "Level",
|
|
6166
|
+
"description": "How big it is. primitive (a button), composite (a card, a row), section (a band of a page), layout (a frame other components sit in).",
|
|
6167
|
+
"valueType": "string",
|
|
6168
|
+
"inputType": "select",
|
|
6169
|
+
"enumValues": [
|
|
6170
|
+
"primitive",
|
|
6171
|
+
"composite",
|
|
6172
|
+
"section",
|
|
6173
|
+
"layout"
|
|
6174
|
+
]
|
|
6175
|
+
},
|
|
6176
|
+
{
|
|
6177
|
+
"slug": "source-path",
|
|
6178
|
+
"label": "Source file",
|
|
6179
|
+
"description": "The repo path of the file that exports it (written by the sync).",
|
|
6180
|
+
"valueType": "string",
|
|
6181
|
+
"inputType": "text"
|
|
6182
|
+
},
|
|
6183
|
+
{
|
|
6184
|
+
"slug": "export-name",
|
|
6185
|
+
"label": "Export",
|
|
6186
|
+
"description": "The name it is exported as from its source file (written by the sync).",
|
|
6187
|
+
"valueType": "string",
|
|
6188
|
+
"inputType": "text"
|
|
6189
|
+
},
|
|
6190
|
+
{
|
|
6191
|
+
"slug": "story-ids",
|
|
6192
|
+
"label": "Stories",
|
|
6193
|
+
"description": "The Storybook story ids that show it (written by the sync).",
|
|
6194
|
+
"valueType": "array",
|
|
6195
|
+
"inputType": "text"
|
|
6196
|
+
},
|
|
6197
|
+
{
|
|
6198
|
+
"slug": "story-url",
|
|
6199
|
+
"label": "Story link",
|
|
6200
|
+
"valueType": "string",
|
|
6201
|
+
"inputType": "url"
|
|
6202
|
+
},
|
|
6203
|
+
{
|
|
6204
|
+
"slug": "screenshot",
|
|
6205
|
+
"label": "Screenshot",
|
|
6206
|
+
"valueType": "entity_id",
|
|
6207
|
+
"targetProfileSlug": "file",
|
|
6208
|
+
"inputType": "entity_select",
|
|
6209
|
+
"description": "A render of its main story, for review at a glance."
|
|
6210
|
+
},
|
|
6211
|
+
{
|
|
6212
|
+
"slug": "props-summary",
|
|
6213
|
+
"label": "Props",
|
|
6214
|
+
"description": "Its props as the Storybook manifest declares them: a list of { name, type, required, default } (written by the sync).",
|
|
6215
|
+
"valueType": "json",
|
|
6216
|
+
"inputType": "json"
|
|
6217
|
+
},
|
|
6218
|
+
{
|
|
6219
|
+
"slug": "component-family",
|
|
6220
|
+
"label": "Family",
|
|
6221
|
+
"description": "The inventory family it belongs to (apps/storybook/inventory/components.json), shared by its copies and variants.",
|
|
6222
|
+
"valueType": "string",
|
|
6223
|
+
"inputType": "text"
|
|
6224
|
+
},
|
|
6225
|
+
{
|
|
6226
|
+
"slug": "kit",
|
|
6227
|
+
"label": "Kit",
|
|
6228
|
+
"description": "The component kit it is part of, e.g. synap (spatial-ui) or an app's own kit.",
|
|
6229
|
+
"valueType": "string",
|
|
6230
|
+
"inputType": "text"
|
|
6231
|
+
},
|
|
6232
|
+
{
|
|
6233
|
+
"slug": "design-app",
|
|
6234
|
+
"label": "App",
|
|
6235
|
+
"valueType": "entity_id",
|
|
6236
|
+
"targetProfileSlug": "devplane_app",
|
|
6237
|
+
"inputType": "entity_select",
|
|
6238
|
+
"description": "The app (devplane_app) whose Storybook it comes from."
|
|
6239
|
+
},
|
|
6240
|
+
{
|
|
6241
|
+
"slug": "source-hash",
|
|
6242
|
+
"label": "Source hash",
|
|
6243
|
+
"description": "A content hash of the component at the last sync (its source or what its stories show). It differs from reviewed-hash when the component changed since its last review.",
|
|
6244
|
+
"valueType": "string",
|
|
6245
|
+
"inputType": "text"
|
|
6246
|
+
},
|
|
6247
|
+
{
|
|
6248
|
+
"slug": "reviewed-hash",
|
|
6249
|
+
"label": "Reviewed hash",
|
|
6250
|
+
"description": 'The source-hash it had when it was last reviewed ("Review a UI component" writes it at the end of a review).',
|
|
6251
|
+
"valueType": "string",
|
|
6252
|
+
"inputType": "text"
|
|
6253
|
+
},
|
|
6254
|
+
{
|
|
6255
|
+
"slug": "review-state",
|
|
6256
|
+
"label": "Review",
|
|
6257
|
+
"description": "fresh (reviewed at its current source), changed (its source moved since the last review; the sync sets it), in-review (a review is running).",
|
|
6258
|
+
"valueType": "string",
|
|
6259
|
+
"inputType": "select",
|
|
6260
|
+
"enumValues": [
|
|
6261
|
+
"fresh",
|
|
6262
|
+
"changed",
|
|
6263
|
+
"in-review"
|
|
6264
|
+
]
|
|
6265
|
+
}
|
|
6266
|
+
]
|
|
6267
|
+
},
|
|
6268
|
+
{
|
|
6269
|
+
"slug": "ui-page",
|
|
6270
|
+
"displayName": "Page",
|
|
6271
|
+
"icon": "app-window",
|
|
6272
|
+
"color": "violet",
|
|
6273
|
+
"description": "A page or phone screen of an app, as its Storybook page story shows it, mirrored by the Storybook sync with its template, layout, route and screenshot.",
|
|
6274
|
+
"entityScope": "pod",
|
|
6275
|
+
"lifecycle": {
|
|
6276
|
+
"property": "ui-status",
|
|
6277
|
+
"options": [
|
|
6278
|
+
{
|
|
6279
|
+
"key": "proposed",
|
|
6280
|
+
"category": "open"
|
|
6281
|
+
},
|
|
6282
|
+
{
|
|
6283
|
+
"key": "stable",
|
|
6284
|
+
"category": "active"
|
|
6285
|
+
},
|
|
6286
|
+
{
|
|
6287
|
+
"key": "consolidate",
|
|
6288
|
+
"category": "active"
|
|
6289
|
+
},
|
|
6290
|
+
{
|
|
6291
|
+
"key": "deprecated",
|
|
6292
|
+
"category": "done",
|
|
6293
|
+
"humanOnly": true
|
|
6294
|
+
},
|
|
6295
|
+
{
|
|
6296
|
+
"key": "gone",
|
|
6297
|
+
"category": "lost"
|
|
6298
|
+
}
|
|
6299
|
+
]
|
|
6300
|
+
},
|
|
6301
|
+
"presentation": {
|
|
6302
|
+
"family": "media",
|
|
6303
|
+
"media": {
|
|
6304
|
+
"source": {
|
|
6305
|
+
"entityRef": "screenshot"
|
|
6306
|
+
},
|
|
6307
|
+
"kind": "image"
|
|
6308
|
+
}
|
|
6309
|
+
},
|
|
6310
|
+
"properties": [
|
|
6311
|
+
{
|
|
6312
|
+
"slug": "ui-status",
|
|
6313
|
+
"label": "Status",
|
|
6314
|
+
"valueType": "string",
|
|
6315
|
+
"inputType": "select",
|
|
6316
|
+
"enumValues": [
|
|
6317
|
+
"proposed",
|
|
6318
|
+
"stable",
|
|
6319
|
+
"consolidate",
|
|
6320
|
+
"deprecated",
|
|
6321
|
+
"gone"
|
|
6322
|
+
],
|
|
6323
|
+
"constraints": {
|
|
6324
|
+
"defaultValue": "proposed"
|
|
6325
|
+
}
|
|
6326
|
+
},
|
|
6327
|
+
{
|
|
6328
|
+
"slug": "surface",
|
|
6329
|
+
"label": "Surface",
|
|
6330
|
+
"valueType": "string",
|
|
6331
|
+
"inputType": "select",
|
|
6332
|
+
"enumValues": [
|
|
6333
|
+
"desktop",
|
|
6334
|
+
"phone"
|
|
6335
|
+
]
|
|
6336
|
+
},
|
|
6337
|
+
{
|
|
6338
|
+
"slug": "page-template",
|
|
6339
|
+
"label": "Template",
|
|
6340
|
+
"description": "What the page is for, one of the page grammar's nine templates.",
|
|
6341
|
+
"valueType": "string",
|
|
6342
|
+
"inputType": "select",
|
|
6343
|
+
"enumValues": [
|
|
6344
|
+
"hub",
|
|
6345
|
+
"collection",
|
|
6346
|
+
"object",
|
|
6347
|
+
"review",
|
|
6348
|
+
"conversation",
|
|
6349
|
+
"session-room",
|
|
6350
|
+
"view",
|
|
6351
|
+
"settings",
|
|
6352
|
+
"island"
|
|
6353
|
+
]
|
|
6354
|
+
},
|
|
6355
|
+
{
|
|
6356
|
+
"slug": "page-layout",
|
|
6357
|
+
"label": "Layout",
|
|
6358
|
+
"description": "How its regions sit, one of the page grammar's six layouts.",
|
|
6359
|
+
"valueType": "string",
|
|
6360
|
+
"inputType": "select",
|
|
6361
|
+
"enumValues": [
|
|
6362
|
+
"column",
|
|
6363
|
+
"column-rail",
|
|
6364
|
+
"list-detail",
|
|
6365
|
+
"main-pane",
|
|
6366
|
+
"fill",
|
|
6367
|
+
"cover"
|
|
6368
|
+
]
|
|
6369
|
+
},
|
|
6370
|
+
{
|
|
6371
|
+
"slug": "route",
|
|
6372
|
+
"label": "Route",
|
|
6373
|
+
"description": "Where it opens in the app, e.g. /work/:sessionId.",
|
|
6374
|
+
"valueType": "string",
|
|
6375
|
+
"inputType": "text"
|
|
6376
|
+
},
|
|
6377
|
+
{
|
|
6378
|
+
"slug": "story-id",
|
|
6379
|
+
"label": "Story",
|
|
6380
|
+
"description": "The Storybook story id of the page (written by the sync).",
|
|
6381
|
+
"valueType": "string",
|
|
6382
|
+
"inputType": "text"
|
|
6383
|
+
},
|
|
6384
|
+
{
|
|
6385
|
+
"slug": "story-url",
|
|
6386
|
+
"label": "Story link",
|
|
6387
|
+
"valueType": "string",
|
|
6388
|
+
"inputType": "url"
|
|
6389
|
+
},
|
|
6390
|
+
{
|
|
6391
|
+
"slug": "screenshot",
|
|
6392
|
+
"label": "Screenshot",
|
|
6393
|
+
"valueType": "entity_id",
|
|
6394
|
+
"targetProfileSlug": "file",
|
|
6395
|
+
"inputType": "entity_select",
|
|
6396
|
+
"description": "A render of the page story."
|
|
6397
|
+
},
|
|
6398
|
+
{
|
|
6399
|
+
"slug": "source-path",
|
|
6400
|
+
"label": "Source file",
|
|
6401
|
+
"valueType": "string",
|
|
6402
|
+
"inputType": "text"
|
|
6403
|
+
},
|
|
6404
|
+
{
|
|
6405
|
+
"slug": "source-hash",
|
|
6406
|
+
"label": "Source hash",
|
|
6407
|
+
"description": "A hash of its source and story files at the last sync.",
|
|
6408
|
+
"valueType": "string",
|
|
6409
|
+
"inputType": "text"
|
|
6410
|
+
},
|
|
6411
|
+
{
|
|
6412
|
+
"slug": "design-app",
|
|
6413
|
+
"label": "App",
|
|
6414
|
+
"valueType": "entity_id",
|
|
6415
|
+
"targetProfileSlug": "devplane_app",
|
|
6416
|
+
"inputType": "entity_select",
|
|
6417
|
+
"description": "The app (devplane_app) the page belongs to."
|
|
6418
|
+
}
|
|
6419
|
+
]
|
|
6420
|
+
},
|
|
6421
|
+
{
|
|
6422
|
+
"slug": "user-flow",
|
|
6423
|
+
"displayName": "User flow",
|
|
6424
|
+
"icon": "route",
|
|
6425
|
+
"color": "violet",
|
|
6426
|
+
"description": "A person's journey through an app's pages toward what they came to do, from where they enter to when it is done; the pages it traverses are linked.",
|
|
6427
|
+
"entityScope": "pod",
|
|
6428
|
+
"lifecycle": {
|
|
6429
|
+
"property": "flow-status",
|
|
6430
|
+
"options": [
|
|
6431
|
+
{
|
|
6432
|
+
"key": "draft",
|
|
6433
|
+
"category": "open"
|
|
6434
|
+
},
|
|
6435
|
+
{
|
|
6436
|
+
"key": "designed",
|
|
6437
|
+
"category": "active"
|
|
6438
|
+
},
|
|
6439
|
+
{
|
|
6440
|
+
"key": "built",
|
|
6441
|
+
"category": "active"
|
|
6442
|
+
},
|
|
6443
|
+
{
|
|
6444
|
+
"key": "live",
|
|
6445
|
+
"category": "done",
|
|
6446
|
+
"humanOnly": true
|
|
6447
|
+
},
|
|
6448
|
+
{
|
|
6449
|
+
"key": "retired",
|
|
6450
|
+
"category": "lost",
|
|
6451
|
+
"humanOnly": true
|
|
6452
|
+
}
|
|
6453
|
+
]
|
|
6454
|
+
},
|
|
6455
|
+
"properties": [
|
|
6456
|
+
{
|
|
6457
|
+
"slug": "flow-status",
|
|
6458
|
+
"label": "Status",
|
|
6459
|
+
"valueType": "string",
|
|
6460
|
+
"inputType": "select",
|
|
6461
|
+
"enumValues": [
|
|
6462
|
+
"draft",
|
|
6463
|
+
"designed",
|
|
6464
|
+
"built",
|
|
6465
|
+
"live",
|
|
6466
|
+
"retired"
|
|
6467
|
+
],
|
|
6468
|
+
"constraints": {
|
|
6469
|
+
"defaultValue": "draft"
|
|
6470
|
+
}
|
|
6471
|
+
},
|
|
6472
|
+
{
|
|
6473
|
+
"slug": "need",
|
|
6474
|
+
"label": "Need",
|
|
6475
|
+
"description": "The job the person comes to do, in their words.",
|
|
6476
|
+
"valueType": "string",
|
|
6477
|
+
"inputType": "textarea"
|
|
6478
|
+
},
|
|
6479
|
+
{
|
|
6480
|
+
"slug": "entry",
|
|
6481
|
+
"label": "Entry",
|
|
6482
|
+
"description": "Where they enter (a door: a link, a notification, a page).",
|
|
6483
|
+
"valueType": "string",
|
|
6484
|
+
"inputType": "text"
|
|
6485
|
+
},
|
|
6486
|
+
{
|
|
6487
|
+
"slug": "done-when",
|
|
6488
|
+
"label": "Done when",
|
|
6489
|
+
"description": "What the person sees when the journey has succeeded.",
|
|
6490
|
+
"valueType": "string",
|
|
6491
|
+
"inputType": "textarea"
|
|
6492
|
+
},
|
|
6493
|
+
{
|
|
6494
|
+
"slug": "surface",
|
|
6495
|
+
"label": "Surface",
|
|
6496
|
+
"valueType": "string",
|
|
6497
|
+
"inputType": "select",
|
|
6498
|
+
"enumValues": [
|
|
6499
|
+
"desktop",
|
|
6500
|
+
"phone",
|
|
6501
|
+
"both"
|
|
6502
|
+
]
|
|
6503
|
+
},
|
|
6504
|
+
{
|
|
6505
|
+
"slug": "flow-source-id",
|
|
6506
|
+
"label": "Flow source",
|
|
6507
|
+
"description": "The flow id in the Storybook flows (apps/storybook/flows), when the sync wrote it.",
|
|
6508
|
+
"valueType": "string",
|
|
6509
|
+
"inputType": "text"
|
|
6510
|
+
},
|
|
6511
|
+
{
|
|
6512
|
+
"slug": "steps",
|
|
6513
|
+
"label": "Steps",
|
|
6514
|
+
"description": "The steps in order: a list of { page, label }, where page is the ui-page key (page:<story id>) and label says what the person does there.",
|
|
6515
|
+
"valueType": "json",
|
|
6516
|
+
"inputType": "json"
|
|
6517
|
+
}
|
|
6518
|
+
]
|
|
6089
6519
|
}
|
|
6090
6520
|
],
|
|
6091
6521
|
"views": [
|
|
@@ -6323,6 +6753,90 @@ var DATA = {
|
|
|
6323
6753
|
"targetProfileSlug": "devplane_system_component",
|
|
6324
6754
|
"type": "depends_on",
|
|
6325
6755
|
"label": "Depends on"
|
|
6756
|
+
},
|
|
6757
|
+
{
|
|
6758
|
+
"sourceProfileSlug": "ui-component",
|
|
6759
|
+
"targetProfileSlug": "ui-component",
|
|
6760
|
+
"type": "composed_of",
|
|
6761
|
+
"label": "Made of"
|
|
6762
|
+
},
|
|
6763
|
+
{
|
|
6764
|
+
"sourceProfileSlug": "ui-page",
|
|
6765
|
+
"targetProfileSlug": "ui-component",
|
|
6766
|
+
"type": "composed_of",
|
|
6767
|
+
"label": "Made of"
|
|
6768
|
+
},
|
|
6769
|
+
{
|
|
6770
|
+
"sourceProfileSlug": "ui-component",
|
|
6771
|
+
"targetProfileSlug": "ui-component",
|
|
6772
|
+
"type": "extends",
|
|
6773
|
+
"label": "Variant of"
|
|
6774
|
+
},
|
|
6775
|
+
{
|
|
6776
|
+
"sourceProfileSlug": "user-flow",
|
|
6777
|
+
"targetProfileSlug": "ui-page",
|
|
6778
|
+
"type": "traverses",
|
|
6779
|
+
"label": "Goes through"
|
|
6780
|
+
},
|
|
6781
|
+
{
|
|
6782
|
+
"sourceProfileSlug": "ui-component",
|
|
6783
|
+
"targetProfileSlug": "devplane_app",
|
|
6784
|
+
"type": "belongs_to",
|
|
6785
|
+
"label": "Belongs to"
|
|
6786
|
+
},
|
|
6787
|
+
{
|
|
6788
|
+
"sourceProfileSlug": "ui-page",
|
|
6789
|
+
"targetProfileSlug": "devplane_app",
|
|
6790
|
+
"type": "belongs_to",
|
|
6791
|
+
"label": "Belongs to"
|
|
6792
|
+
},
|
|
6793
|
+
{
|
|
6794
|
+
"sourceProfileSlug": "user-flow",
|
|
6795
|
+
"targetProfileSlug": "devplane_app",
|
|
6796
|
+
"type": "belongs_to",
|
|
6797
|
+
"label": "Belongs to"
|
|
6798
|
+
}
|
|
6799
|
+
],
|
|
6800
|
+
"relationDefs": [
|
|
6801
|
+
{
|
|
6802
|
+
"slug": "composed_of",
|
|
6803
|
+
"displayName": "Composed of",
|
|
6804
|
+
"description": "The source is made of the target: a capability of sub-capabilities, a UI component of the smaller components it renders, a page of the components on it.",
|
|
6805
|
+
"isDirectional": true,
|
|
6806
|
+
"uiHints": {
|
|
6807
|
+
"category": "hierarchy",
|
|
6808
|
+
"inverseLabel": "Used in"
|
|
6809
|
+
}
|
|
6810
|
+
},
|
|
6811
|
+
{
|
|
6812
|
+
"slug": "extends",
|
|
6813
|
+
"displayName": "Extends",
|
|
6814
|
+
"description": "The source builds on the target: a UI component that is a variant of another (same family, one more option), or a thing that specialises a broader one.",
|
|
6815
|
+
"isDirectional": true,
|
|
6816
|
+
"uiHints": {
|
|
6817
|
+
"category": "hierarchy",
|
|
6818
|
+
"inverseLabel": "Extended by"
|
|
6819
|
+
}
|
|
6820
|
+
},
|
|
6821
|
+
{
|
|
6822
|
+
"slug": "traverses",
|
|
6823
|
+
"displayName": "Traverses",
|
|
6824
|
+
"description": "The source passes through the target on its way: a workflow through system components, a user flow through the pages a person goes through, in order.",
|
|
6825
|
+
"isDirectional": true,
|
|
6826
|
+
"uiHints": {
|
|
6827
|
+
"category": "workflow",
|
|
6828
|
+
"inverseLabel": "Traversed by"
|
|
6829
|
+
}
|
|
6830
|
+
},
|
|
6831
|
+
{
|
|
6832
|
+
"slug": "belongs_to",
|
|
6833
|
+
"displayName": "Belongs to",
|
|
6834
|
+
"description": "The source belongs to the target: an entity to its parent pillar or container, a UI component, page or user flow to the app it is part of.",
|
|
6835
|
+
"isDirectional": true,
|
|
6836
|
+
"uiHints": {
|
|
6837
|
+
"category": "hierarchy",
|
|
6838
|
+
"inverseLabel": "Contains"
|
|
6839
|
+
}
|
|
6326
6840
|
}
|
|
6327
6841
|
],
|
|
6328
6842
|
"playbooks": [
|
|
@@ -8385,6 +8899,525 @@ var DATA = {
|
|
|
8385
8899
|
]
|
|
8386
8900
|
}
|
|
8387
8901
|
]
|
|
8902
|
+
},
|
|
8903
|
+
{
|
|
8904
|
+
"name": "Review a UI component",
|
|
8905
|
+
"description": "Review one UI component of an app's Storybook against the design-critique rubric and decide what to do with it: nothing (fine, the run ends), a rewrite plan (the founder decides on it, nothing is built), or a small fix, built and gated on a branch and shown to the founder. Approving `approve` releases land, publish and done; no later stage asks the person again. Ends with the component marked reviewed at its current source.",
|
|
8906
|
+
"goalTemplate": "Review the UI component {component} and decide what to do with it. Load the design-critique skill first (and designing-with-real-components for a fix). Read the component record: its stories, screenshot, props, composition (composed_of), variants (extends), the pages that use it, its family in the inventory, and its source file at the synced sha; read what the pod already knows about it (recall first). Set review-state to in-review when you start. CRITIQUE: judge each of its stories with the rubric (each finding with its rule id, tier, severity and region); opinions are never applied. VERDICT, which branches before any code: fine ends the run (reviewed-hash = source-hash, review-state fresh, no build); rewrite writes a plan document and stops on the founder's ask, nothing is built; only a small fix goes on. IMPLEMENT and GATE the fix on a branch of the project's repo (nothing reaches main before Approve). APPROVE: the founder sees the before/after of the story, the diff summary and the green gate at the full head sha, and approves once; that releases LAND, PUBLISH and DONE, run through the project's ship actions, never by an agent pushing main by hand. DONE: reviewed-hash = source-hash and review-state fresh. Code facts of the record (name, props, stories, source, composition) belong to the Storybook sync: never edit them on the pod.",
|
|
8907
|
+
"scope": "session",
|
|
8908
|
+
"subjectProfile": {
|
|
8909
|
+
"profileSlug": "ui-component"
|
|
8910
|
+
},
|
|
8911
|
+
"activators": [
|
|
8912
|
+
{
|
|
8913
|
+
"on": "manual",
|
|
8914
|
+
"mode": "propose"
|
|
8915
|
+
},
|
|
8916
|
+
{
|
|
8917
|
+
"on": "schedule",
|
|
8918
|
+
"cron": "0 7 * * 1",
|
|
8919
|
+
"size": "per_thing",
|
|
8920
|
+
"only": {
|
|
8921
|
+
"property": "review-state",
|
|
8922
|
+
"in": [
|
|
8923
|
+
"changed"
|
|
8924
|
+
]
|
|
8925
|
+
},
|
|
8926
|
+
"mode": "propose",
|
|
8927
|
+
"maxPendingApprovals": 10,
|
|
8928
|
+
"startsPaused": true
|
|
8929
|
+
}
|
|
8930
|
+
],
|
|
8931
|
+
"params": [
|
|
8932
|
+
{
|
|
8933
|
+
"name": "component",
|
|
8934
|
+
"type": "entity",
|
|
8935
|
+
"label": "UI component",
|
|
8936
|
+
"required": true
|
|
8937
|
+
}
|
|
8938
|
+
],
|
|
8939
|
+
"executor": "is-agent",
|
|
8940
|
+
"status": "active",
|
|
8941
|
+
"stages": [
|
|
8942
|
+
{
|
|
8943
|
+
"key": "critique",
|
|
8944
|
+
"name": "Critique",
|
|
8945
|
+
"category": "started",
|
|
8946
|
+
"goal": "Set the component's review-state to in-review, then judge each of its stories with the design-critique rubric and write the findings (rule id, tier, severity, confidence, region, evidence) into the critique document.",
|
|
8947
|
+
"expectedOutputs": [
|
|
8948
|
+
{
|
|
8949
|
+
"kind": "document",
|
|
8950
|
+
"label": "Component critique (findings by story, tier and rule id)",
|
|
8951
|
+
"relationToSubject": "relates_to"
|
|
8952
|
+
}
|
|
8953
|
+
],
|
|
8954
|
+
"criteria": [
|
|
8955
|
+
{
|
|
8956
|
+
"key": "critique-findings-ruled",
|
|
8957
|
+
"statement": "Every finding in the critique names a rule id of the design-critique rubric, a tier, a severity and the story and region it is about.",
|
|
8958
|
+
"check": {
|
|
8959
|
+
"kind": "judge"
|
|
8960
|
+
}
|
|
8961
|
+
},
|
|
8962
|
+
{
|
|
8963
|
+
"key": "critique-every-story",
|
|
8964
|
+
"statement": "Every story id of the component (story-ids) is critiqued or named as skipped with why.",
|
|
8965
|
+
"check": {
|
|
8966
|
+
"kind": "judge"
|
|
8967
|
+
}
|
|
8968
|
+
}
|
|
8969
|
+
]
|
|
8970
|
+
},
|
|
8971
|
+
{
|
|
8972
|
+
"key": "verdict",
|
|
8973
|
+
"name": "Verdict",
|
|
8974
|
+
"category": "started",
|
|
8975
|
+
"goal": "Decide ONE verdict from the findings, with its reasons; it branches here, before any code. FINE: write reviewed-hash = source-hash and review-state fresh on the component, and stop there: the run ends, nothing is built. REWRITE: write a plan document naming what replaces the component, every caller (the pages and components made of it) and the order of the work; add an outcome owned by the person on this session (owner human, an ask confirming the rewrite) and pause on it; never go on to Implement in this run. SMALL FIX: draw the enhanced version as a ui-design (design-scope component, current-story-id the component's main story, design-goal what the fix achieves) from real components only, and go on to Implement.",
|
|
8976
|
+
"expectedOutputs": [
|
|
8977
|
+
{
|
|
8978
|
+
"kind": "decision",
|
|
8979
|
+
"label": "Review verdict (fine, small fix or rewrite)",
|
|
8980
|
+
"relationToSubject": "relates_to"
|
|
8981
|
+
},
|
|
8982
|
+
{
|
|
8983
|
+
"kind": "ui-design",
|
|
8984
|
+
"label": "Enhanced version (a small fix)",
|
|
8985
|
+
"relationToSubject": "relates_to",
|
|
8986
|
+
"optional": true
|
|
8987
|
+
},
|
|
8988
|
+
{
|
|
8989
|
+
"kind": "document",
|
|
8990
|
+
"label": "Rewrite plan",
|
|
8991
|
+
"relationToSubject": "relates_to",
|
|
8992
|
+
"optional": true
|
|
8993
|
+
}
|
|
8994
|
+
],
|
|
8995
|
+
"criteria": [
|
|
8996
|
+
{
|
|
8997
|
+
"key": "verdict-one-of-three",
|
|
8998
|
+
"statement": "The verdict is exactly one of fine, small fix or rewrite, and names the findings it rests on.",
|
|
8999
|
+
"check": {
|
|
9000
|
+
"kind": "judge"
|
|
9001
|
+
}
|
|
9002
|
+
},
|
|
9003
|
+
{
|
|
9004
|
+
"key": "verdict-branches-before-code",
|
|
9005
|
+
"statement": "Only a small fix went on to Implement; a fine verdict ended the run with the component marked reviewed, and a rewrite stopped on the person's ask with its plan document.",
|
|
9006
|
+
"check": {
|
|
9007
|
+
"kind": "judge"
|
|
9008
|
+
}
|
|
9009
|
+
}
|
|
9010
|
+
]
|
|
9011
|
+
},
|
|
9012
|
+
{
|
|
9013
|
+
"key": "implement",
|
|
9014
|
+
"name": "Implement",
|
|
9015
|
+
"category": "started",
|
|
9016
|
+
"goal": "Build the enhanced version in the component's source with the real components, on a branch of the project's repo, with its story updated, and capture the story before and after. Nothing reaches main here. Record the branch and its full head sha on the session.",
|
|
9017
|
+
"criteria": [
|
|
9018
|
+
{
|
|
9019
|
+
"key": "implement-matches-design",
|
|
9020
|
+
"statement": "The change builds the enhanced version and nothing else, with no invented component and no hard-coded colour, and its before/after captures are on the session.",
|
|
9021
|
+
"check": {
|
|
9022
|
+
"kind": "judge"
|
|
9023
|
+
}
|
|
9024
|
+
}
|
|
9025
|
+
]
|
|
9026
|
+
},
|
|
9027
|
+
{
|
|
9028
|
+
"key": "gate",
|
|
9029
|
+
"name": "Gate",
|
|
9030
|
+
"category": "started",
|
|
9031
|
+
"goal": "Run the smallest gate that answers on the full head sha (the component's tests and stories, typecheck of its package) and write the result; a red sends the run back to Implement.",
|
|
9032
|
+
"gate": {
|
|
9033
|
+
"kind": "check"
|
|
9034
|
+
},
|
|
9035
|
+
"onFail": {
|
|
9036
|
+
"toStage": "implement"
|
|
9037
|
+
},
|
|
9038
|
+
"expectedOutputs": [
|
|
9039
|
+
{
|
|
9040
|
+
"kind": "document",
|
|
9041
|
+
"label": "Gate summary (the full sha, each gate and its result)",
|
|
9042
|
+
"relationToSubject": "none"
|
|
9043
|
+
}
|
|
9044
|
+
],
|
|
9045
|
+
"criteria": [
|
|
9046
|
+
{
|
|
9047
|
+
"key": "gate-green-at-sha",
|
|
9048
|
+
"statement": "Every gate in the summary ran on the full head sha and is green, with no INFRA result counted as green.",
|
|
9049
|
+
"check": {
|
|
9050
|
+
"kind": "judge"
|
|
9051
|
+
}
|
|
9052
|
+
}
|
|
9053
|
+
]
|
|
9054
|
+
},
|
|
9055
|
+
{
|
|
9056
|
+
"key": "approve",
|
|
9057
|
+
"name": "Approve",
|
|
9058
|
+
"category": "started",
|
|
9059
|
+
"goal": "The card shows the before/after capture of the story, the diff summary and the green devbox run at the full head sha. Approving it releases land, publish and done; no later stage asks again. A change touching auth, keys, vault, billing or a migration, or publishing to anyone but this pod, files its own approval instead of riding this one.",
|
|
9060
|
+
"gate": {
|
|
9061
|
+
"kind": "human"
|
|
9062
|
+
},
|
|
9063
|
+
"onFail": {
|
|
9064
|
+
"toStage": "implement"
|
|
9065
|
+
},
|
|
9066
|
+
"expectedOutputs": [
|
|
9067
|
+
{
|
|
9068
|
+
"kind": "commit",
|
|
9069
|
+
"key": "approved-change",
|
|
9070
|
+
"label": "Approved change (the commit at the full head sha)",
|
|
9071
|
+
"relationToSubject": "none"
|
|
9072
|
+
}
|
|
9073
|
+
]
|
|
9074
|
+
},
|
|
9075
|
+
{
|
|
9076
|
+
"key": "land",
|
|
9077
|
+
"name": "Land",
|
|
9078
|
+
"category": "started",
|
|
9079
|
+
"goal": "The approved sha reaches the project's main through its ship action (a gated commit, or the merge of its pull request once its checks are green), started by this run, never by an agent pushing main by hand. Record it as the outcome commit-<repo>-<sha8>. If the diff changed after the approval, stop and ask again.",
|
|
9080
|
+
"expectedOutputs": [
|
|
9081
|
+
{
|
|
9082
|
+
"kind": "commit",
|
|
9083
|
+
"key": "landed-commit",
|
|
9084
|
+
"label": "Landed commit on main",
|
|
9085
|
+
"relationToSubject": "none"
|
|
9086
|
+
}
|
|
9087
|
+
],
|
|
9088
|
+
"criteria": [
|
|
9089
|
+
{
|
|
9090
|
+
"key": "land-main-has-approved",
|
|
9091
|
+
"statement": "Main contains the approved change, and the landed diff is the one that was approved.",
|
|
9092
|
+
"check": {
|
|
9093
|
+
"kind": "judge"
|
|
9094
|
+
}
|
|
9095
|
+
}
|
|
9096
|
+
]
|
|
9097
|
+
},
|
|
9098
|
+
{
|
|
9099
|
+
"key": "publish",
|
|
9100
|
+
"name": "Publish",
|
|
9101
|
+
"category": "started",
|
|
9102
|
+
"goal": "The landed change goes live (the project's publish that follows main; in app-bases the push to main publishes the catalog and SDK), Storybook is rebuilt and storybook.sync runs, so the component's record carries its new source-hash and screenshot.",
|
|
9103
|
+
"criteria": [
|
|
9104
|
+
{
|
|
9105
|
+
"key": "publish-record-current",
|
|
9106
|
+
"statement": "After the sync, the component's source-hash is the one of the landed sha and its screenshot shows the change.",
|
|
9107
|
+
"check": {
|
|
9108
|
+
"kind": "judge"
|
|
9109
|
+
}
|
|
9110
|
+
}
|
|
9111
|
+
]
|
|
9112
|
+
},
|
|
9113
|
+
{
|
|
9114
|
+
"key": "done",
|
|
9115
|
+
"name": "Done",
|
|
9116
|
+
"category": "completed",
|
|
9117
|
+
"goal": "Mark the component reviewed (update_entity) by writing reviewed-hash = its current source-hash and review-state fresh.",
|
|
9118
|
+
"criteria": [
|
|
9119
|
+
{
|
|
9120
|
+
"key": "done-reviewed-hash",
|
|
9121
|
+
"statement": "The component's reviewed-hash equals its source-hash and its review-state is fresh.",
|
|
9122
|
+
"check": {
|
|
9123
|
+
"kind": "judge"
|
|
9124
|
+
}
|
|
9125
|
+
}
|
|
9126
|
+
]
|
|
9127
|
+
}
|
|
9128
|
+
]
|
|
9129
|
+
},
|
|
9130
|
+
{
|
|
9131
|
+
"name": "Design a user flow (UX, from need to buildable design)",
|
|
9132
|
+
"description": 'Turn a wanted user flow into a researched, compared, challenged and validated UX, one step at a time, each step with its skill and one output on the pod. Ends by handing the chosen design to "Design to implementation". Reusable for any surface or page.',
|
|
9133
|
+
"goalTemplate": `Design the user flow {flow} for {surface}, from the intent "{intent}". One step at a time, each step with its skill and one output filed on the pod (a document linked to this session); stop at each person's gate. References to look at: {references}. Move the flow only through its lifecycle (update_entity with expectedStatus): draft while it is framed and drawn, designed once the person chooses a variant; never invent a status. Record the pages the flow goes through as traverses links to their ui-page records when they exist.`,
|
|
9134
|
+
"scope": "session",
|
|
9135
|
+
"subjectProfile": {
|
|
9136
|
+
"profileSlug": "user-flow"
|
|
9137
|
+
},
|
|
9138
|
+
"activators": [
|
|
9139
|
+
{
|
|
9140
|
+
"on": "manual",
|
|
9141
|
+
"mode": "propose"
|
|
9142
|
+
}
|
|
9143
|
+
],
|
|
9144
|
+
"params": [
|
|
9145
|
+
{
|
|
9146
|
+
"name": "flow",
|
|
9147
|
+
"type": "entity",
|
|
9148
|
+
"label": "User flow",
|
|
9149
|
+
"required": true
|
|
9150
|
+
},
|
|
9151
|
+
{
|
|
9152
|
+
"name": "intent",
|
|
9153
|
+
"type": "text",
|
|
9154
|
+
"label": "What should this experience let a person do? (the job, in their words)",
|
|
9155
|
+
"required": true
|
|
9156
|
+
},
|
|
9157
|
+
{
|
|
9158
|
+
"name": "surface",
|
|
9159
|
+
"type": "text",
|
|
9160
|
+
"label": "Surface(s) and existing page to start from (e.g. browser Work page, SessionRoomView)",
|
|
9161
|
+
"required": true
|
|
9162
|
+
},
|
|
9163
|
+
{
|
|
9164
|
+
"name": "references",
|
|
9165
|
+
"type": "text",
|
|
9166
|
+
"label": "Products or libraries to look at (optional)"
|
|
9167
|
+
}
|
|
9168
|
+
],
|
|
9169
|
+
"executor": "is-agent",
|
|
9170
|
+
"status": "active",
|
|
9171
|
+
"stages": [
|
|
9172
|
+
{
|
|
9173
|
+
"key": "frame",
|
|
9174
|
+
"name": "1. Frame",
|
|
9175
|
+
"category": "planned",
|
|
9176
|
+
"subjectStatus": "draft",
|
|
9177
|
+
"goal": "Load skills layers-orient, xp-triage, synap-context and the views skill (playbooks/design-a-user-flow/views). Pass the FULL session id on every write. Name which artifact each complaint is about (live code, a design board, a page) and the code baseline (repo, branch, sha). Read the existing page and what the pod knows (synap_ask; name entity ids). Name the weak layer. Output: framing brief (pod document, tables allowed) with the job, principle, starting page, surfaces with paths, existing reads, gaps and founder-only questions; then its view.",
|
|
9178
|
+
"expectedOutputs": [
|
|
9179
|
+
{
|
|
9180
|
+
"kind": "document",
|
|
9181
|
+
"label": "Framing brief",
|
|
9182
|
+
"relationToSubject": "relates_to"
|
|
9183
|
+
},
|
|
9184
|
+
{
|
|
9185
|
+
"kind": "view",
|
|
9186
|
+
"label": "Framing brief view",
|
|
9187
|
+
"relationToSubject": "none"
|
|
9188
|
+
}
|
|
9189
|
+
]
|
|
9190
|
+
},
|
|
9191
|
+
{
|
|
9192
|
+
"key": "needs",
|
|
9193
|
+
"name": "2. Needs",
|
|
9194
|
+
"category": "started",
|
|
9195
|
+
"goal": "Load skills layers-user-needs, layers-product-strategy, product-check (apply it against the company brief 05c14349 section 5 and the vision 8ca6767d, not PRODUCT.md). Use ONE lens for what needs the person: the pod-wide needs-you read, plus the goal's own read for a goal; state which. Rank jobs of each person from pod records; where no person was observed (no client yet) mark the row assumed and name the research to do. Output: ranked needs with ids, the riskiest assumption and its cheapest test; then its view.",
|
|
9196
|
+
"expectedOutputs": [
|
|
9197
|
+
{
|
|
9198
|
+
"kind": "document",
|
|
9199
|
+
"label": "Ranked needs with evidence",
|
|
9200
|
+
"relationToSubject": "relates_to"
|
|
9201
|
+
},
|
|
9202
|
+
{
|
|
9203
|
+
"kind": "view",
|
|
9204
|
+
"label": "Ranked needs view",
|
|
9205
|
+
"relationToSubject": "none"
|
|
9206
|
+
}
|
|
9207
|
+
]
|
|
9208
|
+
},
|
|
9209
|
+
{
|
|
9210
|
+
"key": "compare",
|
|
9211
|
+
"name": "3. Search and compare",
|
|
9212
|
+
"category": "started",
|
|
9213
|
+
"goal": "Can start with Frame (needs only the references param). Load research-decision-room, find-skills; WebSearch extended; agent-browser or headless Chrome for screenshots (the browser MCPs may not connect). Compare 5 to 8 products. Markdown document is the source; the HTML view is the decision-room page generated from it. Output: evidence ledger (source, confidence, unverified marked), comparison table, patterns, steal/avoid, licence and reuse, 5 ranked moves for the product.",
|
|
9214
|
+
"expectedOutputs": [
|
|
9215
|
+
{
|
|
9216
|
+
"kind": "document",
|
|
9217
|
+
"label": "Comparison table and evidence ledger",
|
|
9218
|
+
"relationToSubject": "relates_to"
|
|
9219
|
+
},
|
|
9220
|
+
{
|
|
9221
|
+
"kind": "view",
|
|
9222
|
+
"label": "Comparison view",
|
|
9223
|
+
"relationToSubject": "none"
|
|
9224
|
+
}
|
|
9225
|
+
]
|
|
9226
|
+
},
|
|
9227
|
+
{
|
|
9228
|
+
"key": "pov",
|
|
9229
|
+
"name": "4. Point of view",
|
|
9230
|
+
"category": "started",
|
|
9231
|
+
"goal": "Load layers-conceptual-model, layers-domain, ui-surface-design, lens-page. Use the vocabulary door words (Job, Request, Activity; read @synap-core/types/vocabulary); where it has no word (for example a branch), propose a default and name it so it can be overridden, never coin a label silently. Output: stance in 2 sentences, one definition per object, the questions the page answers, keep/change/cut for the existing page, what each surface shows, ranked first moves, what is rejected, and 3 to 5 decisions with a recommended default. The view IS the decision page: stance, then the choices as a card.",
|
|
9232
|
+
"gate": {
|
|
9233
|
+
"kind": "human"
|
|
9234
|
+
},
|
|
9235
|
+
"onFail": {
|
|
9236
|
+
"toStage": "needs"
|
|
9237
|
+
},
|
|
9238
|
+
"expectedOutputs": [
|
|
9239
|
+
{
|
|
9240
|
+
"kind": "document",
|
|
9241
|
+
"label": "Point of view",
|
|
9242
|
+
"relationToSubject": "relates_to"
|
|
9243
|
+
},
|
|
9244
|
+
{
|
|
9245
|
+
"kind": "view",
|
|
9246
|
+
"label": "Point of view decision page",
|
|
9247
|
+
"relationToSubject": "none"
|
|
9248
|
+
},
|
|
9249
|
+
{
|
|
9250
|
+
"kind": "decision",
|
|
9251
|
+
"label": "Point of view agreed",
|
|
9252
|
+
"relationToSubject": "none",
|
|
9253
|
+
"ask": {
|
|
9254
|
+
"mode": "choose",
|
|
9255
|
+
"stakes": "commitment",
|
|
9256
|
+
"allowOther": true,
|
|
9257
|
+
"consequence": "Steps 5 to 10 start from this point of view; a change sends the run back to Needs",
|
|
9258
|
+
"options": [
|
|
9259
|
+
{
|
|
9260
|
+
"label": "Agree with the defaults",
|
|
9261
|
+
"recommended": true
|
|
9262
|
+
},
|
|
9263
|
+
{
|
|
9264
|
+
"label": "Agree with changes"
|
|
9265
|
+
},
|
|
9266
|
+
{
|
|
9267
|
+
"label": "Send back to Needs"
|
|
9268
|
+
}
|
|
9269
|
+
]
|
|
9270
|
+
}
|
|
9271
|
+
}
|
|
9272
|
+
]
|
|
9273
|
+
},
|
|
9274
|
+
{
|
|
9275
|
+
"key": "flow",
|
|
9276
|
+
"name": "5. Flow and consolidation",
|
|
9277
|
+
"category": "started",
|
|
9278
|
+
"goal": "Load layers-interaction-flow, ui-consolidation, layers-surface, diagram-design, artifact-diagramming. Map the first door, places, affordances, and the edge and failure paths (empty, loading, failed read, offline, many waiting, nothing waiting, answered elsewhere, expired). Fold map: every surface that shows work or approvals is keep, redirect (to what) or cut, with its path. Write the flow's entry, done-when and steps (each step a page and what the person does there) on the user flow. Output: flow document, fold map, and one view with ONE diagram (happy path bold, failures dashed).",
|
|
9279
|
+
"expectedOutputs": [
|
|
9280
|
+
{
|
|
9281
|
+
"kind": "document",
|
|
9282
|
+
"label": "Flow and fold map",
|
|
9283
|
+
"relationToSubject": "relates_to"
|
|
9284
|
+
},
|
|
9285
|
+
{
|
|
9286
|
+
"kind": "view",
|
|
9287
|
+
"label": "Flow and fold map view",
|
|
9288
|
+
"relationToSubject": "none"
|
|
9289
|
+
}
|
|
9290
|
+
]
|
|
9291
|
+
},
|
|
9292
|
+
{
|
|
9293
|
+
"key": "options",
|
|
9294
|
+
"name": "6. Design options",
|
|
9295
|
+
"category": "started",
|
|
9296
|
+
"goal": "Load synap-design, impeccable, design-brief, dataviz, artifact-design. EVOLVE the existing page (name its file and the sections kept, changed, cut); never draw from scratch. 2 or 3 variants that differ by idea, on REAL data only, each screen in all states (full, empty, failed read with retry, many waiting capped with Show all, loading), light and dark, phone width. No screen has more than 7 things above the fold. Screenshot and look before publishing. Output: design-options document and the variants (Design canvas or one artifact).",
|
|
9297
|
+
"expectedOutputs": [
|
|
9298
|
+
{
|
|
9299
|
+
"kind": "document",
|
|
9300
|
+
"label": "Design options",
|
|
9301
|
+
"relationToSubject": "relates_to"
|
|
9302
|
+
},
|
|
9303
|
+
{
|
|
9304
|
+
"kind": "view",
|
|
9305
|
+
"label": "Design options view",
|
|
9306
|
+
"relationToSubject": "none"
|
|
9307
|
+
}
|
|
9308
|
+
]
|
|
9309
|
+
},
|
|
9310
|
+
{
|
|
9311
|
+
"key": "challenge",
|
|
9312
|
+
"name": "7. Challenge",
|
|
9313
|
+
"category": "started",
|
|
9314
|
+
"goal": "Load parallel-review. Separate read-only reviewers (UX, slop, architecture) and agents code-reviewer, product-owner; give each the document and the artifact URL, not your conclusion. Must-fix sends the run back to options; justified keeps are named with why. Output: findings board (must-fix first).",
|
|
9315
|
+
"gate": {
|
|
9316
|
+
"kind": "check"
|
|
9317
|
+
},
|
|
9318
|
+
"onFail": {
|
|
9319
|
+
"toStage": "options"
|
|
9320
|
+
},
|
|
9321
|
+
"expectedOutputs": [
|
|
9322
|
+
{
|
|
9323
|
+
"kind": "document",
|
|
9324
|
+
"label": "Challenge findings",
|
|
9325
|
+
"relationToSubject": "relates_to"
|
|
9326
|
+
},
|
|
9327
|
+
{
|
|
9328
|
+
"kind": "view",
|
|
9329
|
+
"label": "Challenge findings view",
|
|
9330
|
+
"relationToSubject": "none"
|
|
9331
|
+
}
|
|
9332
|
+
]
|
|
9333
|
+
},
|
|
9334
|
+
{
|
|
9335
|
+
"key": "choose",
|
|
9336
|
+
"name": "8. Choose",
|
|
9337
|
+
"category": "started",
|
|
9338
|
+
"goal": "Show the variants side by side with the challenge findings and one recommended. The person picks one or sends it back with what to change. Record the decision with alternatives and rationale. Choosing a variant moves the flow to designed.",
|
|
9339
|
+
"gate": {
|
|
9340
|
+
"kind": "human"
|
|
9341
|
+
},
|
|
9342
|
+
"onFail": {
|
|
9343
|
+
"toStage": "options"
|
|
9344
|
+
},
|
|
9345
|
+
"onApproved": "designed",
|
|
9346
|
+
"expectedOutputs": [
|
|
9347
|
+
{
|
|
9348
|
+
"kind": "decision",
|
|
9349
|
+
"label": "Chosen variant",
|
|
9350
|
+
"relationToSubject": "none",
|
|
9351
|
+
"ask": {
|
|
9352
|
+
"mode": "choose",
|
|
9353
|
+
"stakes": "commitment",
|
|
9354
|
+
"allowOther": true,
|
|
9355
|
+
"consequence": "The chosen variant goes to Design to implementation",
|
|
9356
|
+
"options": [
|
|
9357
|
+
{
|
|
9358
|
+
"label": "Variant A"
|
|
9359
|
+
},
|
|
9360
|
+
{
|
|
9361
|
+
"label": "Variant B"
|
|
9362
|
+
},
|
|
9363
|
+
{
|
|
9364
|
+
"label": "Send back"
|
|
9365
|
+
}
|
|
9366
|
+
]
|
|
9367
|
+
}
|
|
9368
|
+
}
|
|
9369
|
+
]
|
|
9370
|
+
},
|
|
9371
|
+
{
|
|
9372
|
+
"key": "validate",
|
|
9373
|
+
"name": "9. Validate",
|
|
9374
|
+
"category": "started",
|
|
9375
|
+
"goal": "Load dogfood and agent-browser. Walk the chosen flow on real data through the doors a user enters by; WORKS, BROKEN or CANNOT-TELL with screenshots; BROKEN goes back to options. Output: verdict page.",
|
|
9376
|
+
"gate": {
|
|
9377
|
+
"kind": "check"
|
|
9378
|
+
},
|
|
9379
|
+
"onFail": {
|
|
9380
|
+
"toStage": "options"
|
|
9381
|
+
},
|
|
9382
|
+
"expectedOutputs": [
|
|
9383
|
+
{
|
|
9384
|
+
"kind": "document",
|
|
9385
|
+
"label": "Dogfood verdict",
|
|
9386
|
+
"relationToSubject": "relates_to"
|
|
9387
|
+
},
|
|
9388
|
+
{
|
|
9389
|
+
"kind": "view",
|
|
9390
|
+
"label": "Dogfood verdict view",
|
|
9391
|
+
"relationToSubject": "none"
|
|
9392
|
+
}
|
|
9393
|
+
]
|
|
9394
|
+
},
|
|
9395
|
+
{
|
|
9396
|
+
"key": "handoff",
|
|
9397
|
+
"name": "10. Hand off and capture",
|
|
9398
|
+
"category": "completed",
|
|
9399
|
+
"goal": "Launch playbook Design to implementation with the chosen design. Load engineering-memory: file the decision, what we learned, and what the process got wrong; update the views skill (playbooks/design-a-user-flow/views) run notes. Close open asks; the run ends here. The flow moves to built when Design to implementation lands the design, not here.",
|
|
9400
|
+
"expectedOutputs": [
|
|
9401
|
+
{
|
|
9402
|
+
"kind": "document",
|
|
9403
|
+
"label": "Learnings and process notes",
|
|
9404
|
+
"relationToSubject": "relates_to"
|
|
9405
|
+
}
|
|
9406
|
+
]
|
|
9407
|
+
}
|
|
9408
|
+
]
|
|
9409
|
+
}
|
|
9410
|
+
],
|
|
9411
|
+
"skills": [
|
|
9412
|
+
{
|
|
9413
|
+
"slug": "designing-with-real-components",
|
|
9414
|
+
"when": "Designing, mocking up or implementing a screen or a component as a ui-design",
|
|
9415
|
+
"mode": "on-demand"
|
|
9416
|
+
},
|
|
9417
|
+
{
|
|
9418
|
+
"slug": "design-critique",
|
|
9419
|
+
"when": "Critiquing a ui-design, a built screen or a UI component (the review rubric)",
|
|
9420
|
+
"mode": "on-demand"
|
|
8388
9421
|
}
|
|
8389
9422
|
],
|
|
8390
9423
|
"onboarding": {
|
|
@@ -17027,6 +18060,185 @@ var DATA = {
|
|
|
17027
18060
|
"manage_file"
|
|
17028
18061
|
]
|
|
17029
18062
|
},
|
|
18063
|
+
"design-system": {
|
|
18064
|
+
"meta": {
|
|
18065
|
+
"slug": "design-system",
|
|
18066
|
+
"domain": "build",
|
|
18067
|
+
"name": "Design system on Synap",
|
|
18068
|
+
"description": "Mirror an app's Storybook into your pod \u2014 every component, page and user flow as a record with its screenshot, status and what it is made of \u2014 review the ones that change with the design-critique rubric, and tie it to your brand identity. Setup asks three things, one at a time.",
|
|
18069
|
+
"icon": "layout-template",
|
|
18070
|
+
"color": "#7C3AED",
|
|
18071
|
+
"tags": [
|
|
18072
|
+
"suite",
|
|
18073
|
+
"design",
|
|
18074
|
+
"storybook",
|
|
18075
|
+
"ui",
|
|
18076
|
+
"builder",
|
|
18077
|
+
"brand"
|
|
18078
|
+
],
|
|
18079
|
+
"isPublic": true
|
|
18080
|
+
},
|
|
18081
|
+
"dependencies": [
|
|
18082
|
+
{
|
|
18083
|
+
"slug": "builder-workspace",
|
|
18084
|
+
"kind": "workspace",
|
|
18085
|
+
"relation": "require",
|
|
18086
|
+
"reason": "The kinds the Storybook becomes (ui-component, ui-page, user-flow, the app), the review and design playbooks, and the design-critique rubric. Must resolve first: the setup process lands here."
|
|
18087
|
+
},
|
|
18088
|
+
{
|
|
18089
|
+
"slug": "brand-library",
|
|
18090
|
+
"kind": "workspace",
|
|
18091
|
+
"relation": "require",
|
|
18092
|
+
"reason": "The brand identity the Storybook expresses; the sync source names it."
|
|
18093
|
+
},
|
|
18094
|
+
{
|
|
18095
|
+
"slug": "storybook",
|
|
18096
|
+
"kind": "capability",
|
|
18097
|
+
"relation": "require",
|
|
18098
|
+
"reason": "storybook.sync mirrors the Storybook into the records; storybook.changed lists the components changed since their last review."
|
|
18099
|
+
}
|
|
18100
|
+
],
|
|
18101
|
+
"workspace": {
|
|
18102
|
+
"name": "Design system on Synap",
|
|
18103
|
+
"description": "Setting up an app's Storybook as pod records, layered onto the Dev space."
|
|
18104
|
+
},
|
|
18105
|
+
"profiles": [],
|
|
18106
|
+
"playbooks": [
|
|
18107
|
+
{
|
|
18108
|
+
"name": "Set up a design system",
|
|
18109
|
+
"description": "Connect one app's Storybook to the pod in three questions asked one at a time: where the Storybook is (a public URL, or a computer that builds and uploads it), which app or project it belongs to, and which brand identity it expresses. Ends with the first sync's import proposal filed for the person and the sync kept current.",
|
|
18110
|
+
"goalTemplate": "Set up the design system of one app on this pod. Load the designing-with-real-components skill first. The pod asks the person three things, one per stage, when your turn ends that stage: never ask them yourself and never ask two at once. WHERE: read what the pod already has (the apps, the brand identities, any ui-component records and the app they belong to) and list the apps and brand identities by name, so the next answers can name one. APP: resolve the app the person named (an existing devplane_app first; never a second record for one that exists; a new one is created through a proposal, filed into the person's project). BRAND: resolve the brand identity they named (brand-identity, Brand space); none named: the source carries none. CONNECT: a public https URL \u2192 run storybook.sync with url, appId and brandIdentityId; a computer \u2192 hand the build-and-upload step to the person's computer (hand-off skill): it builds Storybook, writes a synap.storybook-bundle/v1 file, uploads it to the pod and runs storybook.sync with bundleFileId, appId and brandIdentityId. The first run of a source is ONE import proposal the person approves; never write the records yourself. KEEP CURRENT: the pod does not re-sync a Storybook on its own; for a URL, file a daily automation that runs storybook.sync with the same three values; for a computer, the same build, upload and sync runs after each push to the app's main. The brand identity goes only to storybook.sync (the source's config), never onto the records.",
|
|
18111
|
+
"executor": "is-agent",
|
|
18112
|
+
"status": "active",
|
|
18113
|
+
"stages": [
|
|
18114
|
+
{
|
|
18115
|
+
"key": "where",
|
|
18116
|
+
"name": "Where the Storybook is",
|
|
18117
|
+
"category": "planned",
|
|
18118
|
+
"goal": "Read the pod's apps (devplane_app), brand identities (brand-identity) and any ui-component records with the app they belong to, and list the apps and brand identities by name in your message. Ask nothing yourself; when your turn ends the pod asks where the Storybook is.",
|
|
18119
|
+
"endAsk": {
|
|
18120
|
+
"label": "Where the Storybook is",
|
|
18121
|
+
"why": "The pod reads a public Storybook over https, or a bundle a computer of yours builds and uploads after each push.",
|
|
18122
|
+
"unblocks": "The run asks which app the Storybook belongs to",
|
|
18123
|
+
"ask": {
|
|
18124
|
+
"mode": "form",
|
|
18125
|
+
"form": {
|
|
18126
|
+
"title": "Where is the Storybook?",
|
|
18127
|
+
"fields": [
|
|
18128
|
+
{
|
|
18129
|
+
"key": "storybookUrl",
|
|
18130
|
+
"label": "Public Storybook URL (https)",
|
|
18131
|
+
"type": "url",
|
|
18132
|
+
"required": false,
|
|
18133
|
+
"help": "Leave it empty when the Storybook is private; a computer of yours then builds it and uploads it to the pod after each push."
|
|
18134
|
+
}
|
|
18135
|
+
]
|
|
18136
|
+
}
|
|
18137
|
+
}
|
|
18138
|
+
}
|
|
18139
|
+
},
|
|
18140
|
+
{
|
|
18141
|
+
"key": "app",
|
|
18142
|
+
"name": "Which app",
|
|
18143
|
+
"category": "started",
|
|
18144
|
+
"goal": "Read the Storybook answer (a URL must be https; an empty answer means a computer uploads). Ask nothing yourself; when your turn ends the pod asks which app or project the Storybook belongs to.",
|
|
18145
|
+
"endAsk": {
|
|
18146
|
+
"label": "Which app the Storybook belongs to",
|
|
18147
|
+
"why": "Every component, page and flow is recorded as part of one app.",
|
|
18148
|
+
"unblocks": "The run asks which brand identity the Storybook expresses",
|
|
18149
|
+
"ask": {
|
|
18150
|
+
"mode": "form",
|
|
18151
|
+
"form": {
|
|
18152
|
+
"title": "Which app or project is it?",
|
|
18153
|
+
"fields": [
|
|
18154
|
+
{
|
|
18155
|
+
"key": "app",
|
|
18156
|
+
"label": "The app (or project) this Storybook belongs to, by name",
|
|
18157
|
+
"type": "text",
|
|
18158
|
+
"required": true,
|
|
18159
|
+
"help": "One of the apps listed above. A new name becomes a new app once you approve it."
|
|
18160
|
+
}
|
|
18161
|
+
]
|
|
18162
|
+
}
|
|
18163
|
+
}
|
|
18164
|
+
}
|
|
18165
|
+
},
|
|
18166
|
+
{
|
|
18167
|
+
"key": "brand",
|
|
18168
|
+
"name": "Which brand identity",
|
|
18169
|
+
"category": "started",
|
|
18170
|
+
"goal": "Resolve the app the person named (an existing devplane_app first, never a twin; a new one through a proposal filed into their project). Ask nothing yourself; when your turn ends the pod asks which brand identity the Storybook expresses.",
|
|
18171
|
+
"criteria": [
|
|
18172
|
+
{
|
|
18173
|
+
"key": "app-resolved-once",
|
|
18174
|
+
"statement": "The named app resolves to exactly one devplane_app, an existing one or one proposed in this run; no second record of an existing app was created.",
|
|
18175
|
+
"check": {
|
|
18176
|
+
"kind": "judge"
|
|
18177
|
+
}
|
|
18178
|
+
}
|
|
18179
|
+
],
|
|
18180
|
+
"endAsk": {
|
|
18181
|
+
"label": "Which brand identity it expresses",
|
|
18182
|
+
"why": "The sync source names the brand identity, so reviews and designs read the right brand.",
|
|
18183
|
+
"unblocks": "The run connects the Storybook and starts its first sync",
|
|
18184
|
+
"ask": {
|
|
18185
|
+
"mode": "form",
|
|
18186
|
+
"form": {
|
|
18187
|
+
"title": "Which brand identity?",
|
|
18188
|
+
"fields": [
|
|
18189
|
+
{
|
|
18190
|
+
"key": "brand",
|
|
18191
|
+
"label": "The brand identity this Storybook expresses, by name",
|
|
18192
|
+
"type": "text",
|
|
18193
|
+
"required": false,
|
|
18194
|
+
"help": "From the Brand space. Leave it empty to connect the Storybook without a brand."
|
|
18195
|
+
}
|
|
18196
|
+
]
|
|
18197
|
+
}
|
|
18198
|
+
}
|
|
18199
|
+
}
|
|
18200
|
+
},
|
|
18201
|
+
{
|
|
18202
|
+
"key": "connect",
|
|
18203
|
+
"name": "Connect and first sync",
|
|
18204
|
+
"category": "started",
|
|
18205
|
+
"goal": "Resolve the brand identity the person named (brand-identity in the Brand space; empty: none). A URL: run storybook.sync with url, appId and brandIdentityId. A computer: hand the step to the person's computer (hand-off skill): build Storybook, write a synap.storybook-bundle/v1 file, upload it to the pod, run storybook.sync with bundleFileId, appId and brandIdentityId. The first run is one import proposal for the person; a refused or failed sync is reported with its reason, never retried blindly.",
|
|
18206
|
+
"criteria": [
|
|
18207
|
+
{
|
|
18208
|
+
"key": "sync-ran-with-answers",
|
|
18209
|
+
"statement": "storybook.sync ran once with the person's source (url, or a bundle file a computer uploaded), the resolved appId and, when one was named, the brandIdentityId, and its import proposal is filed or its refusal is reported with the reason.",
|
|
18210
|
+
"check": {
|
|
18211
|
+
"kind": "judge"
|
|
18212
|
+
}
|
|
18213
|
+
},
|
|
18214
|
+
{
|
|
18215
|
+
"key": "brand-only-on-source",
|
|
18216
|
+
"statement": "The brand identity was passed to storybook.sync only; no mirrored record was written by hand.",
|
|
18217
|
+
"check": {
|
|
18218
|
+
"kind": "judge"
|
|
18219
|
+
}
|
|
18220
|
+
}
|
|
18221
|
+
]
|
|
18222
|
+
},
|
|
18223
|
+
{
|
|
18224
|
+
"key": "keep-current",
|
|
18225
|
+
"name": "Keep it current",
|
|
18226
|
+
"category": "completed",
|
|
18227
|
+
"goal": "A URL: file a daily automation (create_automation, cron) whose one capability step runs storybook.sync with the same url, appId and brandIdentityId. A computer: record on the session that the build, upload and sync run after each push to the app's main, and on which computer. Then say how the weekly review of changed components is turned on (the schedule of Review a UI component is installed paused).",
|
|
18228
|
+
"criteria": [
|
|
18229
|
+
{
|
|
18230
|
+
"key": "sync-kept-current",
|
|
18231
|
+
"statement": "For a URL a daily storybook.sync automation is filed with the same three values; for a computer the session names the computer and the push that triggers the upload.",
|
|
18232
|
+
"check": {
|
|
18233
|
+
"kind": "judge"
|
|
18234
|
+
}
|
|
18235
|
+
}
|
|
18236
|
+
]
|
|
18237
|
+
}
|
|
18238
|
+
]
|
|
18239
|
+
}
|
|
18240
|
+
]
|
|
18241
|
+
},
|
|
17030
18242
|
"ecosystem": {
|
|
17031
18243
|
"meta": {
|
|
17032
18244
|
"slug": "ecosystem",
|
|
@@ -35110,10 +36322,8 @@ var vocabularyFr = {
|
|
|
35110
36322
|
"kind.entity.other": "\xC9l\xE9ments",
|
|
35111
36323
|
"kind.view.one": "Vue",
|
|
35112
36324
|
"kind.view.other": "Vues",
|
|
35113
|
-
"kind.
|
|
35114
|
-
"kind.
|
|
35115
|
-
"kind.cell.one": "Carte",
|
|
35116
|
-
"kind.cell.other": "Cartes",
|
|
36325
|
+
"kind.cell.one": "Cellule",
|
|
36326
|
+
"kind.cell.other": "Cellules",
|
|
35117
36327
|
"kind.document.one": "Document",
|
|
35118
36328
|
"kind.document.other": "Documents",
|
|
35119
36329
|
"kind.channel.one": "Canal",
|
|
@@ -35615,6 +36825,9 @@ var vocabularyFr = {
|
|
|
35615
36825
|
"status.wont_fix": "Ne sera pas corrig\xE9",
|
|
35616
36826
|
"status.muted": "En sourdine",
|
|
35617
36827
|
"status.no_effect": "Aucun changement",
|
|
36828
|
+
"status.not_done": "Non abouti",
|
|
36829
|
+
"status.stopped_on_error": "Arr\xEAt\xE9e sur une erreur",
|
|
36830
|
+
"status.stopped_at_limit": "Arr\xEAt\xE9 \xE0 sa limite",
|
|
35618
36831
|
"status.blocked_by_policy": "Bloqu\xE9 par une r\xE8gle",
|
|
35619
36832
|
"status.no_active_goal": "Aucun objectif actif",
|
|
35620
36833
|
"status.stalled": "\xC0 l\u2019arr\xEAt",
|
|
@@ -35979,29 +37192,22 @@ var OBJECT_KIND_ROWS = {
|
|
|
35979
37192
|
labelPlural: "Views",
|
|
35980
37193
|
glyph: "\u25F0"
|
|
35981
37194
|
},
|
|
35982
|
-
|
|
35983
|
-
|
|
35984
|
-
|
|
35985
|
-
|
|
35986
|
-
|
|
35987
|
-
|
|
35988
|
-
labelPlural: "Widgets",
|
|
35989
|
-
glyph: "\u229E"
|
|
35990
|
-
},
|
|
35991
|
-
/* The kind stays `cell` — that is the engine's word and the DB's. The LABEL is
|
|
35992
|
-
"Card" because that is the only word a user may see: NORTH-STAR (team pod) §5 —
|
|
35993
|
-
"User-facing word is Card. 'Cell' is the internal engine term — never shown
|
|
35994
|
-
to users." This row said "Cell", so every surface resolving through the
|
|
35995
|
-
vocabulary printed "Install cell" / "Cell installed" at users. Fixing it
|
|
35996
|
-
here, at the one door, fixes all of them at once — which is exactly why a
|
|
35997
|
-
local label map at a call site is forbidden. */
|
|
37195
|
+
/* The made UI block is a Cell, for users and agents alike (founder decision,
|
|
37196
|
+
23 Nov 2026: "Cell everywhere"; "card" is only a renderer slot). It
|
|
37197
|
+
replaced "Card" (D3, 31 Oct 2026) and the retired `widget` kind, which now
|
|
37198
|
+
resolves here through `OBJECT_KIND_ALIASES` (`widget` → `cell`). Fixing
|
|
37199
|
+
the word at this one door fixes every surface at once — which is exactly
|
|
37200
|
+
why a local label map at a call site is forbidden. */
|
|
35998
37201
|
cell: {
|
|
35999
37202
|
kind: "cell",
|
|
36000
37203
|
category: "cell",
|
|
36001
37204
|
icon: "SquareDashedBottomCode",
|
|
36002
37205
|
color: ID(5),
|
|
36003
|
-
label: "
|
|
36004
|
-
labelPlural: "
|
|
37206
|
+
label: "Cell",
|
|
37207
|
+
labelPlural: "Cells",
|
|
37208
|
+
// Stored text filed before the rename says "Card" or "Widget".
|
|
37209
|
+
formerLabels: ["Card", "Cards", "Widget", "Widgets"],
|
|
37210
|
+
glyph: "\u229E"
|
|
36005
37211
|
},
|
|
36006
37212
|
document: {
|
|
36007
37213
|
kind: "document",
|
|
@@ -37201,6 +38407,13 @@ var STATUS_LABEL_ROWS = {
|
|
|
37201
38407
|
// operation COMPLETED and deliberately changed nothing (an acknowledged
|
|
37202
38408
|
// no-op door, an idempotent re-apply that matched 0 rows). Not a failure.
|
|
37203
38409
|
no_effect: "No change",
|
|
38410
|
+
// A session closed with required work still open (`sessionClosedAs`
|
|
38411
|
+
// not_done): it ended, it did not deliver.
|
|
38412
|
+
not_done: "Not done",
|
|
38413
|
+
// An automation the pod stopped on a fault (`automations.status` error).
|
|
38414
|
+
stopped_on_error: "Stopped on error",
|
|
38415
|
+
// A run that reached its budget or step limit: nothing broke.
|
|
38416
|
+
stopped_at_limit: "Stopped at its limit",
|
|
37204
38417
|
// A run or step whose effect a GOVERNANCE verdict refused
|
|
37205
38418
|
// (`automation_runs.status`, `automation_step_runs.status`): a calm outcome,
|
|
37206
38419
|
// not a failure; its unit state is `blocked` on a rule (`units/state.ts`).
|
|
@@ -37893,7 +39106,10 @@ var SYSTEM_PROFILES = /* @__PURE__ */ new Set([
|
|
|
37893
39106
|
"tool_request"
|
|
37894
39107
|
]);
|
|
37895
39108
|
var TEMPLATE_FORBIDDEN_SYSTEM_PROFILE_SLUGS = /* @__PURE__ */ new Set(["knowledge"]);
|
|
37896
|
-
var RESERVED_PROFILE_SLUGS = /* @__PURE__ */ new Set([
|
|
39109
|
+
var RESERVED_PROFILE_SLUGS = /* @__PURE__ */ new Set([
|
|
39110
|
+
"project",
|
|
39111
|
+
"projects"
|
|
39112
|
+
]);
|
|
37897
39113
|
var KNOWLEDGE_FORMS = /* @__PURE__ */ new Set(["insight", "caution"]);
|
|
37898
39114
|
var LEGACY_KNOWLEDGE_SEED_FIELDS = /* @__PURE__ */ new Set(["ek_type", "type"]);
|
|
37899
39115
|
function isPodWideProfile(p) {
|
|
@@ -37925,7 +39141,8 @@ function composeBaseDocumentSlugs(data, resolveDep, seen = /* @__PURE__ */ new S
|
|
|
37925
39141
|
const base = resolveDep(dep.slug);
|
|
37926
39142
|
if (!base) continue;
|
|
37927
39143
|
for (const d of base.documents || []) if (d?.slug) out.add(d.slug);
|
|
37928
|
-
for (const s of composeBaseDocumentSlugs(base, resolveDep, seen))
|
|
39144
|
+
for (const s of composeBaseDocumentSlugs(base, resolveDep, seen))
|
|
39145
|
+
out.add(s);
|
|
37929
39146
|
}
|
|
37930
39147
|
return out;
|
|
37931
39148
|
}
|
|
@@ -38099,11 +39316,25 @@ function knownRelationTypes(tpl, resolveDep, corpus) {
|
|
|
38099
39316
|
return out;
|
|
38100
39317
|
}
|
|
38101
39318
|
var MAX_SESSION_CRITERIA = 12;
|
|
38102
|
-
var TEMPLATE_ACTIVATOR_ON = [
|
|
39319
|
+
var TEMPLATE_ACTIVATOR_ON = [
|
|
39320
|
+
"created",
|
|
39321
|
+
"enters_status",
|
|
39322
|
+
"count",
|
|
39323
|
+
"schedule",
|
|
39324
|
+
"manual",
|
|
39325
|
+
"run_ended"
|
|
39326
|
+
];
|
|
38103
39327
|
function goalNamesStatus(goal, value, labels) {
|
|
38104
39328
|
if (typeof goal !== "string" || typeof value !== "string") return false;
|
|
38105
|
-
const names = [value, labels?.get(value)].filter(
|
|
38106
|
-
|
|
39329
|
+
const names = [value, labels?.get(value)].filter(
|
|
39330
|
+
(n) => !!n && n.trim() !== ""
|
|
39331
|
+
);
|
|
39332
|
+
return names.some(
|
|
39333
|
+
(n) => new RegExp(
|
|
39334
|
+
`(^|[^\\p{L}\\p{N}_])${n.trim().replace(/[.*+?^${}()|[\]\\]/g, "\\$&")}($|[^\\p{L}\\p{N}_])`,
|
|
39335
|
+
"iu"
|
|
39336
|
+
).test(goal)
|
|
39337
|
+
);
|
|
38107
39338
|
}
|
|
38108
39339
|
function checkProcessContract(tpl, resolveDep, corpus, add) {
|
|
38109
39340
|
let relations = null;
|
|
@@ -38114,11 +39345,17 @@ function checkProcessContract(tpl, resolveDep, corpus, add) {
|
|
|
38114
39345
|
const raw = pb;
|
|
38115
39346
|
const subjectRaw = pb.subjectProfile ?? {};
|
|
38116
39347
|
for (const [field, present] of [
|
|
38117
|
-
[
|
|
39348
|
+
[
|
|
39349
|
+
"subjectProfile.statusProperty",
|
|
39350
|
+
subjectRaw.statusProperty !== void 0
|
|
39351
|
+
],
|
|
38118
39352
|
["subjectProfile.onEnd", subjectRaw.onEnd !== void 0],
|
|
38119
39353
|
["onEnd", raw.onEnd !== void 0],
|
|
38120
39354
|
["humanOnlyStatuses", raw.humanOnlyStatuses !== void 0],
|
|
38121
|
-
[
|
|
39355
|
+
[
|
|
39356
|
+
"subjectProfile.humanOnlyStatuses",
|
|
39357
|
+
subjectRaw.humanOnlyStatuses !== void 0
|
|
39358
|
+
]
|
|
38122
39359
|
])
|
|
38123
39360
|
if (present)
|
|
38124
39361
|
add(
|
|
@@ -38143,7 +39380,9 @@ function checkProcessContract(tpl, resolveDep, corpus, add) {
|
|
|
38143
39380
|
if (declared) {
|
|
38144
39381
|
lifecycleProperty = declared.property;
|
|
38145
39382
|
statuses = new Set(declared.options.map((o) => o.key));
|
|
38146
|
-
labels = new Map(
|
|
39383
|
+
labels = new Map(
|
|
39384
|
+
declared.options.map((o) => [o.key, o.label ?? o.key])
|
|
39385
|
+
);
|
|
38147
39386
|
}
|
|
38148
39387
|
}
|
|
38149
39388
|
const checkStatus = (rule, path, value) => {
|
|
@@ -38176,10 +39415,20 @@ function checkProcessContract(tpl, resolveDep, corpus, add) {
|
|
|
38176
39415
|
stages.forEach((stage, i) => {
|
|
38177
39416
|
const sp = `${at}.stages.${stage.key}`;
|
|
38178
39417
|
if (stage.subjectStatus !== void 0)
|
|
38179
|
-
checkStatus(
|
|
39418
|
+
checkStatus(
|
|
39419
|
+
"stage-subject-status-unknown",
|
|
39420
|
+
`${sp}.subjectStatus`,
|
|
39421
|
+
stage.subjectStatus
|
|
39422
|
+
);
|
|
38180
39423
|
if (stage.onApproved !== void 0) {
|
|
38181
|
-
checkStatus(
|
|
38182
|
-
|
|
39424
|
+
checkStatus(
|
|
39425
|
+
"stage-on-approved-unknown",
|
|
39426
|
+
`${sp}.onApproved`,
|
|
39427
|
+
stage.onApproved
|
|
39428
|
+
);
|
|
39429
|
+
const owesOutput = (stage.expectedOutputs ?? []).some(
|
|
39430
|
+
(o) => o.optional !== true
|
|
39431
|
+
);
|
|
38183
39432
|
const nextGated = !!stages[i + 1]?.gate;
|
|
38184
39433
|
if (!owesOutput && !nextGated && !goalNamesStatus(stage.goal, stage.onApproved, labels))
|
|
38185
39434
|
add(
|
|
@@ -38199,20 +39448,40 @@ function checkProcessContract(tpl, resolveDep, corpus, add) {
|
|
|
38199
39448
|
(pb.activators ?? []).forEach((a, i) => {
|
|
38200
39449
|
const ap = `${at}.activators[${i}]`;
|
|
38201
39450
|
if (!TEMPLATE_ACTIVATOR_ON.includes(a.on))
|
|
38202
|
-
add(
|
|
39451
|
+
add(
|
|
39452
|
+
"activator-on-invalid",
|
|
39453
|
+
`${ap}.on`,
|
|
39454
|
+
`${ap}.on "${String(a.on)}" must be one of ${TEMPLATE_ACTIVATOR_ON.join(", ")}`
|
|
39455
|
+
);
|
|
38203
39456
|
if (a.mode !== "run" && a.mode !== "propose" && a.mode !== "appointment")
|
|
38204
|
-
add(
|
|
39457
|
+
add(
|
|
39458
|
+
"activator-mode-invalid",
|
|
39459
|
+
`${ap}.mode`,
|
|
39460
|
+
`${ap}.mode "${String(a.mode)}" must be "run", "propose" or "appointment"`
|
|
39461
|
+
);
|
|
38205
39462
|
if (!kind && a.on !== "schedule")
|
|
38206
|
-
add(
|
|
39463
|
+
add(
|
|
39464
|
+
"activator-no-subject",
|
|
39465
|
+
ap,
|
|
39466
|
+
`${ap} needs subjectProfile.profileSlug \u2014 an activator fires on an entity of that kind`
|
|
39467
|
+
);
|
|
38207
39468
|
if (a.on === "enters_status" || a.on === "count") {
|
|
38208
39469
|
if (a.status === void 0)
|
|
38209
|
-
add(
|
|
39470
|
+
add(
|
|
39471
|
+
"activator-status-required",
|
|
39472
|
+
`${ap}.status`,
|
|
39473
|
+
`${ap} on "${a.on}" names no status`
|
|
39474
|
+
);
|
|
38210
39475
|
else checkStatus("activator-status-unknown", `${ap}.status`, a.status);
|
|
38211
39476
|
} else if (a.on === "schedule") {
|
|
38212
39477
|
for (const st of a.status === void 0 ? [] : typeof a.status === "string" ? [a.status] : a.status)
|
|
38213
39478
|
checkStatus("activator-status-unknown", `${ap}.status`, st);
|
|
38214
39479
|
} else if (a.status !== void 0) {
|
|
38215
|
-
add(
|
|
39480
|
+
add(
|
|
39481
|
+
"activator-status-unexpected",
|
|
39482
|
+
`${ap}.status`,
|
|
39483
|
+
`${ap}.status is not read when on = "${a.on}"`
|
|
39484
|
+
);
|
|
38216
39485
|
}
|
|
38217
39486
|
});
|
|
38218
39487
|
const outputs = [
|
|
@@ -38233,18 +39502,36 @@ function checkProcessContract(tpl, resolveDep, corpus, add) {
|
|
|
38233
39502
|
];
|
|
38234
39503
|
for (const o of outputs)
|
|
38235
39504
|
if (o.optional !== void 0 && typeof o.optional !== "boolean")
|
|
38236
|
-
add(
|
|
39505
|
+
add(
|
|
39506
|
+
"output-optional-not-boolean",
|
|
39507
|
+
`${o.at}.optional`,
|
|
39508
|
+
`${o.at}.optional = ${JSON.stringify(o.optional)} must be true or false \u2014 the pod treats anything but a real true as required`
|
|
39509
|
+
);
|
|
38237
39510
|
for (const { path, rel } of outputs) {
|
|
38238
39511
|
if (rel === void 0 || rel === NO_SUBJECT_RELATION) continue;
|
|
38239
39512
|
if (!kind) {
|
|
38240
|
-
add(
|
|
39513
|
+
add(
|
|
39514
|
+
"output-relation-no-subject",
|
|
39515
|
+
path,
|
|
39516
|
+
`${path} = "${String(rel)}" but playbook "${pb.name}" has no subject to relate to (use "${NO_SUBJECT_RELATION}")`
|
|
39517
|
+
);
|
|
38241
39518
|
} else if (typeof rel !== "string" || !relationsOnce().has(rel)) {
|
|
38242
|
-
add(
|
|
39519
|
+
add(
|
|
39520
|
+
"output-relation-unknown",
|
|
39521
|
+
path,
|
|
39522
|
+
`${path} = "${String(rel)}" is not a relation the corpus defines (entityLinks[].type / relationDefs[].slug)`
|
|
39523
|
+
);
|
|
38243
39524
|
}
|
|
38244
39525
|
}
|
|
38245
39526
|
}
|
|
38246
39527
|
}
|
|
38247
|
-
var LIFECYCLE_CATEGORIES = [
|
|
39528
|
+
var LIFECYCLE_CATEGORIES = [
|
|
39529
|
+
"open",
|
|
39530
|
+
"active",
|
|
39531
|
+
"paused",
|
|
39532
|
+
"done",
|
|
39533
|
+
"lost"
|
|
39534
|
+
];
|
|
38248
39535
|
var STUCK_AFTER_DAYS_MAX = 3650;
|
|
38249
39536
|
var LIFECYCLE_OPTION_FIELDS = [
|
|
38250
39537
|
"key",
|
|
@@ -38257,8 +39544,21 @@ var LIFECYCLE_OPTION_FIELDS = [
|
|
|
38257
39544
|
"waits",
|
|
38258
39545
|
"requires"
|
|
38259
39546
|
];
|
|
38260
|
-
var LIFECYCLE_OPTION_WAITS_FIELDS = [
|
|
38261
|
-
|
|
39547
|
+
var LIFECYCLE_OPTION_WAITS_FIELDS = [
|
|
39548
|
+
"on",
|
|
39549
|
+
"waitKind",
|
|
39550
|
+
"refFrom",
|
|
39551
|
+
"dateBinding"
|
|
39552
|
+
];
|
|
39553
|
+
var LIFECYCLE_WAITS_ON = [
|
|
39554
|
+
"person",
|
|
39555
|
+
"agent",
|
|
39556
|
+
"external",
|
|
39557
|
+
"thing",
|
|
39558
|
+
"decision",
|
|
39559
|
+
"date",
|
|
39560
|
+
"nobody"
|
|
39561
|
+
];
|
|
38262
39562
|
var LIFECYCLE_WAIT_KINDS = [
|
|
38263
39563
|
"answer",
|
|
38264
39564
|
"approval",
|
|
@@ -38306,16 +39606,22 @@ function lifecycleOptionWaitsProblems(option2) {
|
|
|
38306
39606
|
return out;
|
|
38307
39607
|
};
|
|
38308
39608
|
if (!w || typeof w !== "object" || Array.isArray(w))
|
|
38309
|
-
return fail(
|
|
39609
|
+
return fail(
|
|
39610
|
+
`option "${key}" waits must be an object { on, waitKind?, refFrom?, dateBinding? }`
|
|
39611
|
+
);
|
|
38310
39612
|
if (finished)
|
|
38311
39613
|
return fail(
|
|
38312
39614
|
`option "${key}" is ${String(option2.category)}: a finished thing waits on nothing (waits is for open, active or paused options)`
|
|
38313
39615
|
);
|
|
38314
39616
|
const waits = w;
|
|
38315
39617
|
if (typeof waits.on !== "string" || !LIFECYCLE_WAITS_ON.includes(waits.on))
|
|
38316
|
-
return fail(
|
|
39618
|
+
return fail(
|
|
39619
|
+
`option "${key}" waits.on must be one of ${LIFECYCLE_WAITS_ON.join(" | ")}`
|
|
39620
|
+
);
|
|
38317
39621
|
if (waits.waitKind !== void 0 && (typeof waits.waitKind !== "string" || !LIFECYCLE_WAIT_KINDS.includes(waits.waitKind)))
|
|
38318
|
-
return fail(
|
|
39622
|
+
return fail(
|
|
39623
|
+
`option "${key}" waits.waitKind is not a wait kind (WAIT_KINDS)`
|
|
39624
|
+
);
|
|
38319
39625
|
for (const field of ["refFrom", "dateBinding"]) {
|
|
38320
39626
|
const v = waits[field];
|
|
38321
39627
|
if (v !== void 0 && (typeof v !== "string" || !LIFECYCLE_PROPERTY_SLUG.test(v)))
|
|
@@ -38326,7 +39632,10 @@ function lifecycleOptionWaitsProblems(option2) {
|
|
|
38326
39632
|
const unknown = Object.keys(waits).filter(
|
|
38327
39633
|
(k) => !LIFECYCLE_OPTION_WAITS_FIELDS.includes(k)
|
|
38328
39634
|
);
|
|
38329
|
-
if (unknown.length > 0)
|
|
39635
|
+
if (unknown.length > 0)
|
|
39636
|
+
return fail(
|
|
39637
|
+
`option "${key}" waits has unknown field(s): ${unknown.join(", ")}`
|
|
39638
|
+
);
|
|
38330
39639
|
return out;
|
|
38331
39640
|
}
|
|
38332
39641
|
var LIFECYCLE_REQUIREMENT_OWNERS = ["you", "agent"];
|
|
@@ -38338,35 +39647,54 @@ function lifecycleOptionRequiresProblem(option2) {
|
|
|
38338
39647
|
if (raw === void 0) return null;
|
|
38339
39648
|
const key = String(option2.key);
|
|
38340
39649
|
const at = (i) => `option "${key}" requires[${i}]`;
|
|
38341
|
-
if (!Array.isArray(raw))
|
|
39650
|
+
if (!Array.isArray(raw))
|
|
39651
|
+
return `option "${key}" requires must be a list of { kind: "link" | "property", blockerKey, ... }`;
|
|
38342
39652
|
if (raw.length > 0 && (option2.category === "done" || option2.category === "lost"))
|
|
38343
39653
|
return `option "${key}" is ${String(option2.category)}: a finished thing requires nothing (requires is for open, active or paused options)`;
|
|
38344
|
-
if (raw.length > REQUIREMENTS_PER_OPTION_MAX)
|
|
39654
|
+
if (raw.length > REQUIREMENTS_PER_OPTION_MAX)
|
|
39655
|
+
return `option "${key}" requires at most ${REQUIREMENTS_PER_OPTION_MAX} things`;
|
|
38345
39656
|
const seen = /* @__PURE__ */ new Set();
|
|
38346
39657
|
for (const [i, item] of raw.entries()) {
|
|
38347
|
-
if (!item || typeof item !== "object" || Array.isArray(item))
|
|
39658
|
+
if (!item || typeof item !== "object" || Array.isArray(item))
|
|
39659
|
+
return `${at(i)} must be an object`;
|
|
38348
39660
|
const r = item;
|
|
38349
39661
|
if (typeof r.blockerKey !== "string" || !BLOCKER_KEY.test(r.blockerKey))
|
|
38350
39662
|
return `${at(i)}.blockerKey must be a lowercase name (letters, digits, _), e.g. "no_contact"`;
|
|
38351
|
-
if (seen.has(r.blockerKey))
|
|
39663
|
+
if (seen.has(r.blockerKey))
|
|
39664
|
+
return `${at(i)}.blockerKey "${r.blockerKey}" is declared twice`;
|
|
38352
39665
|
seen.add(r.blockerKey);
|
|
38353
|
-
if (r.label !== void 0 && (typeof r.label !== "string" || !r.label.trim()))
|
|
39666
|
+
if (r.label !== void 0 && (typeof r.label !== "string" || !r.label.trim()))
|
|
39667
|
+
return `${at(i)}.label must be words`;
|
|
38354
39668
|
if (r.owner !== void 0 && !LIFECYCLE_REQUIREMENT_OWNERS.includes(r.owner))
|
|
38355
39669
|
return `${at(i)}.owner must be one of ${LIFECYCLE_REQUIREMENT_OWNERS.join(" | ")}`;
|
|
38356
39670
|
if (r.clearedBy !== void 0 && !requirementClearedByOk(r.clearedBy))
|
|
38357
39671
|
return `${at(i)}.clearedBy must be one of { answer: true } | { intent } | { playbookId } | { capability }`;
|
|
38358
|
-
if (r.forKinds !== void 0 && (!Array.isArray(r.forKinds) || r.forKinds.length === 0 || !r.forKinds.every(
|
|
39672
|
+
if (r.forKinds !== void 0 && (!Array.isArray(r.forKinds) || r.forKinds.length === 0 || !r.forKinds.every(
|
|
39673
|
+
(k) => typeof k === "string" && LIFECYCLE_PROPERTY_SLUG.test(k)
|
|
39674
|
+
)))
|
|
38359
39675
|
return `${at(i)}.forKinds must be a list of kind slugs (e.g. ["person"])`;
|
|
38360
|
-
const common = [
|
|
39676
|
+
const common = [
|
|
39677
|
+
"kind",
|
|
39678
|
+
"blockerKey",
|
|
39679
|
+
"label",
|
|
39680
|
+
"owner",
|
|
39681
|
+
"clearedBy",
|
|
39682
|
+
"forKinds"
|
|
39683
|
+
];
|
|
38361
39684
|
if (r.kind === "link") {
|
|
38362
39685
|
if (typeof r.relation !== "string" || !LIFECYCLE_PROPERTY_SLUG.test(r.relation))
|
|
38363
39686
|
return `${at(i)}.relation must name a relation type (its slug, e.g. "works_at")`;
|
|
38364
|
-
if (!LIFECYCLE_REQUIREMENT_DIRECTIONS.includes(
|
|
39687
|
+
if (!LIFECYCLE_REQUIREMENT_DIRECTIONS.includes(
|
|
39688
|
+
r.direction
|
|
39689
|
+
))
|
|
38365
39690
|
return `${at(i)}.direction must be "out" (the thing is the link's source) or "in" (its target)`;
|
|
38366
39691
|
if (r.min !== void 0 && !(typeof r.min === "number" && Number.isInteger(r.min) && r.min >= 1 && r.min <= 1e3))
|
|
38367
39692
|
return `${at(i)}.min must be a whole number from 1 to 1000`;
|
|
38368
|
-
const unknown = Object.keys(r).filter(
|
|
38369
|
-
|
|
39693
|
+
const unknown = Object.keys(r).filter(
|
|
39694
|
+
(k) => ![...common, "relation", "direction", "min"].includes(k)
|
|
39695
|
+
);
|
|
39696
|
+
if (unknown.length > 0)
|
|
39697
|
+
return `${at(i)} has unknown field(s): ${unknown.join(", ")}`;
|
|
38370
39698
|
continue;
|
|
38371
39699
|
}
|
|
38372
39700
|
if (r.kind === "property") {
|
|
@@ -38374,8 +39702,11 @@ function lifecycleOptionRequiresProblem(option2) {
|
|
|
38374
39702
|
return `${at(i)}.property must name a property (its slug, e.g. "linkedinUrl")`;
|
|
38375
39703
|
if (r.in !== void 0 && !(Array.isArray(r.in) && r.in.length > 0 && r.in.every((v) => typeof v === "string" && v.trim())))
|
|
38376
39704
|
return `${at(i)}.in must be a non-empty list of values`;
|
|
38377
|
-
const unknown = Object.keys(r).filter(
|
|
38378
|
-
|
|
39705
|
+
const unknown = Object.keys(r).filter(
|
|
39706
|
+
(k) => ![...common, "property", "in"].includes(k)
|
|
39707
|
+
);
|
|
39708
|
+
if (unknown.length > 0)
|
|
39709
|
+
return `${at(i)} has unknown field(s): ${unknown.join(", ")}`;
|
|
38379
39710
|
continue;
|
|
38380
39711
|
}
|
|
38381
39712
|
return `${at(i)}.kind must be "link" or "property"`;
|
|
@@ -38387,12 +39718,16 @@ function requirementClearedByOk(raw) {
|
|
|
38387
39718
|
const c = raw;
|
|
38388
39719
|
if (Object.keys(c).length !== 1) return false;
|
|
38389
39720
|
if (c.answer === true) return true;
|
|
38390
|
-
return ["intent", "playbookId", "capability"].some(
|
|
39721
|
+
return ["intent", "playbookId", "capability"].some(
|
|
39722
|
+
(k) => typeof c[k] === "string" && c[k].trim() !== ""
|
|
39723
|
+
);
|
|
38391
39724
|
}
|
|
38392
39725
|
function stableJson(v) {
|
|
38393
39726
|
if (Array.isArray(v)) return `[${v.map(stableJson).join(",")}]`;
|
|
38394
39727
|
if (v && typeof v === "object")
|
|
38395
|
-
return `{${Object.keys(v).filter((k) => v[k] !== void 0).sort().map(
|
|
39728
|
+
return `{${Object.keys(v).filter((k) => v[k] !== void 0).sort().map(
|
|
39729
|
+
(k) => `${JSON.stringify(k)}:${stableJson(v[k])}`
|
|
39730
|
+
).join(",")}}`;
|
|
38396
39731
|
return JSON.stringify(v);
|
|
38397
39732
|
}
|
|
38398
39733
|
function checkLifecycleDeclarations(tpl, resolveDep, corpus, add) {
|
|
@@ -38401,7 +39736,9 @@ function checkLifecycleDeclarations(tpl, resolveDep, corpus, add) {
|
|
|
38401
39736
|
const lc = profile.lifecycle;
|
|
38402
39737
|
const at = `profiles.${profile.slug}.lifecycle`;
|
|
38403
39738
|
if (lc !== void 0) {
|
|
38404
|
-
const prop = (profile.properties ?? []).find(
|
|
39739
|
+
const prop = (profile.properties ?? []).find(
|
|
39740
|
+
(p) => p.slug === lc?.property
|
|
39741
|
+
);
|
|
38405
39742
|
if (!prop || prop.inputType !== "select" || !Array.isArray(prop.enumValues) || prop.enumValues.length === 0) {
|
|
38406
39743
|
add(
|
|
38407
39744
|
"lifecycle-property-unknown",
|
|
@@ -38425,7 +39762,11 @@ function checkLifecycleDeclarations(tpl, resolveDep, corpus, add) {
|
|
|
38425
39762
|
`option "${String(o?.key)}" category "${String(o?.category)}" is not one of ${LIFECYCLE_CATEGORIES.join(" \xB7 ")}`
|
|
38426
39763
|
);
|
|
38427
39764
|
if (o?.humanOnly !== void 0 && typeof o.humanOnly !== "boolean")
|
|
38428
|
-
add(
|
|
39765
|
+
add(
|
|
39766
|
+
"lifecycle-option-shape",
|
|
39767
|
+
`${at}.options[${i}].humanOnly`,
|
|
39768
|
+
`option "${String(o?.key)}" humanOnly must be a boolean`
|
|
39769
|
+
);
|
|
38429
39770
|
const stuck = o?.stuckAfterDays;
|
|
38430
39771
|
if (stuck !== void 0) {
|
|
38431
39772
|
if (typeof stuck !== "number" || !Number.isInteger(stuck) || stuck < 1 || stuck > STUCK_AFTER_DAYS_MAX)
|
|
@@ -38442,9 +39783,18 @@ function checkLifecycleDeclarations(tpl, resolveDep, corpus, add) {
|
|
|
38442
39783
|
);
|
|
38443
39784
|
}
|
|
38444
39785
|
for (const p of lifecycleOptionWaitsProblems(o ?? {}))
|
|
38445
|
-
add(
|
|
39786
|
+
add(
|
|
39787
|
+
"lifecycle-option-shape",
|
|
39788
|
+
`${at}.options[${i}].${p.field}`,
|
|
39789
|
+
p.message
|
|
39790
|
+
);
|
|
38446
39791
|
const requiresProblem = lifecycleOptionRequiresProblem(o ?? {});
|
|
38447
|
-
if (requiresProblem)
|
|
39792
|
+
if (requiresProblem)
|
|
39793
|
+
add(
|
|
39794
|
+
"lifecycle-option-shape",
|
|
39795
|
+
`${at}.options[${i}].requires`,
|
|
39796
|
+
requiresProblem
|
|
39797
|
+
);
|
|
38448
39798
|
});
|
|
38449
39799
|
}
|
|
38450
39800
|
}
|
|
@@ -38479,9 +39829,14 @@ function checkPresentationDeclarations(tpl, resolveDep, corpus, add) {
|
|
|
38479
39829
|
const named = [];
|
|
38480
39830
|
declaredMediaSources(parsed.value).forEach((source, i) => {
|
|
38481
39831
|
const where = i === 0 ? `${at}.media.source` : `${at}.media.fallbacks[${i - 1}]`;
|
|
38482
|
-
if ("property" in source)
|
|
39832
|
+
if ("property" in source)
|
|
39833
|
+
named.push({ path: `${where}.property`, slug: source.property });
|
|
38483
39834
|
if ("entityRef" in source)
|
|
38484
|
-
named.push({
|
|
39835
|
+
named.push({
|
|
39836
|
+
path: `${where}.entityRef`,
|
|
39837
|
+
slug: source.entityRef,
|
|
39838
|
+
entityRef: true
|
|
39839
|
+
});
|
|
38485
39840
|
});
|
|
38486
39841
|
for (const alt of ["card", "row"])
|
|
38487
39842
|
(parsed.value.fields?.[alt] ?? []).forEach(
|
|
@@ -38529,7 +39884,11 @@ function checkKanbanGrouping(tpl, resolveDep, corpus, add) {
|
|
|
38529
39884
|
);
|
|
38530
39885
|
const field = v.config?.groupByField;
|
|
38531
39886
|
if (typeof field !== "string" || !field.trim()) {
|
|
38532
|
-
add(
|
|
39887
|
+
add(
|
|
39888
|
+
"view-kanban-group-missing",
|
|
39889
|
+
`${at}.config.groupByField`,
|
|
39890
|
+
`kanban "${v.name}" names no config.groupByField \u2014 its columns would be the values of "status"`
|
|
39891
|
+
);
|
|
38533
39892
|
continue;
|
|
38534
39893
|
}
|
|
38535
39894
|
const kind = v.scopeProfileSlug;
|
|
@@ -38559,7 +39918,11 @@ function checkIntent(tpl, resolveDep, add) {
|
|
|
38559
39918
|
return;
|
|
38560
39919
|
}
|
|
38561
39920
|
if (!intent || typeof intent !== "object" || Array.isArray(intent)) {
|
|
38562
|
-
add(
|
|
39921
|
+
add(
|
|
39922
|
+
"intent-shape",
|
|
39923
|
+
"meta.intent",
|
|
39924
|
+
"meta.intent must be { label, primary?, produces?: [{ profile }] }"
|
|
39925
|
+
);
|
|
38563
39926
|
return;
|
|
38564
39927
|
}
|
|
38565
39928
|
const { label, produces, primary } = intent;
|
|
@@ -38571,7 +39934,11 @@ function checkIntent(tpl, resolveDep, add) {
|
|
|
38571
39934
|
);
|
|
38572
39935
|
const producedSlugs = Array.isArray(produces) ? produces.map((e) => e?.profile).filter((s) => typeof s === "string") : [];
|
|
38573
39936
|
if (primary !== void 0 && (typeof primary !== "string" || !primary.trim()))
|
|
38574
|
-
add(
|
|
39937
|
+
add(
|
|
39938
|
+
"intent-shape",
|
|
39939
|
+
"meta.intent.primary",
|
|
39940
|
+
`meta.intent.primary must be a profile slug (got ${JSON.stringify(primary)})`
|
|
39941
|
+
);
|
|
38575
39942
|
else if (primary === void 0 && producedSlugs.length > 0)
|
|
38576
39943
|
add(
|
|
38577
39944
|
"intent-primary-missing",
|
|
@@ -38592,32 +39959,50 @@ function checkIntent(tpl, resolveDep, add) {
|
|
|
38592
39959
|
);
|
|
38593
39960
|
if (produces === void 0) return;
|
|
38594
39961
|
if (!Array.isArray(produces)) {
|
|
38595
|
-
add(
|
|
39962
|
+
add(
|
|
39963
|
+
"intent-shape",
|
|
39964
|
+
"meta.intent.produces",
|
|
39965
|
+
"meta.intent.produces must be a list of { profile }"
|
|
39966
|
+
);
|
|
38596
39967
|
return;
|
|
38597
39968
|
}
|
|
38598
39969
|
const closure = [...collectDependencyClosure(tpl, resolveDep)];
|
|
38599
|
-
const sources = [
|
|
39970
|
+
const sources = [
|
|
39971
|
+
tpl,
|
|
39972
|
+
...closure.map(resolveDep).filter((t) => !!t)
|
|
39973
|
+
];
|
|
38600
39974
|
const unresolved = closure.some((d) => !resolveDep(d));
|
|
38601
39975
|
const seen = /* @__PURE__ */ new Set();
|
|
38602
39976
|
produces.forEach((entry, i) => {
|
|
38603
39977
|
const at = `meta.intent.produces[${i}]`;
|
|
38604
39978
|
const slug = entry?.profile;
|
|
38605
39979
|
if (typeof slug !== "string" || !slug) {
|
|
38606
|
-
add(
|
|
39980
|
+
add(
|
|
39981
|
+
"intent-shape",
|
|
39982
|
+
`${at}.profile`,
|
|
39983
|
+
`${at} must be { profile: <profile slug> }`
|
|
39984
|
+
);
|
|
38607
39985
|
return;
|
|
38608
39986
|
}
|
|
38609
|
-
if (seen.has(slug))
|
|
39987
|
+
if (seen.has(slug))
|
|
39988
|
+
add("intent-duplicate", `${at}.profile`, `"${slug}" is produced twice`);
|
|
38610
39989
|
seen.add(slug);
|
|
38611
39990
|
const as = entry.as;
|
|
38612
39991
|
if (as !== void 0 && !TEMPLATE_KIND_AS.includes(as))
|
|
38613
|
-
add(
|
|
39992
|
+
add(
|
|
39993
|
+
"intent-shape",
|
|
39994
|
+
`${at}.as`,
|
|
39995
|
+
`${at}.as must be one of ${TEMPLATE_KIND_AS.join(", ")} (got ${JSON.stringify(as)})`
|
|
39996
|
+
);
|
|
38614
39997
|
if (as === "helper" && slug === primary)
|
|
38615
39998
|
add(
|
|
38616
39999
|
"intent-primary-helper",
|
|
38617
40000
|
`${at}.as`,
|
|
38618
40001
|
`"${slug}" is the space's primary output and cannot be a helper \u2014 a helper is worked to serve an output, it is not one`
|
|
38619
40002
|
);
|
|
38620
|
-
const decls = sources.flatMap(
|
|
40003
|
+
const decls = sources.flatMap(
|
|
40004
|
+
(t) => (t.profiles ?? []).filter((p) => p.slug === slug)
|
|
40005
|
+
);
|
|
38621
40006
|
if (decls.length === 0) {
|
|
38622
40007
|
if (!unresolved)
|
|
38623
40008
|
add(
|
|
@@ -38640,78 +40025,157 @@ function checkStart(tpl, resolveDep, corpus, add) {
|
|
|
38640
40025
|
if (raw === void 0) return;
|
|
38641
40026
|
const why = ownsNoWorkspace(tpl);
|
|
38642
40027
|
if (why) {
|
|
38643
|
-
add(
|
|
40028
|
+
add(
|
|
40029
|
+
"start-no-workspace",
|
|
40030
|
+
"meta.start",
|
|
40031
|
+
`"${tpl.meta.slug}" is ${why} \u2014 it owns no space, so it cannot be an onboarding start`
|
|
40032
|
+
);
|
|
38644
40033
|
return;
|
|
38645
40034
|
}
|
|
38646
40035
|
const isStr = (v) => typeof v === "string" && v.trim().length > 0;
|
|
38647
40036
|
const strList = (v) => Array.isArray(v) && v.every(isStr);
|
|
38648
40037
|
const st = raw;
|
|
38649
40038
|
const fs = st?.firstSession;
|
|
38650
|
-
const shapeOk = !!st && typeof st === "object" && !Array.isArray(st) && Number.isInteger(st.order) && st.order > 0 && isStr(st.label) && isStr(st.promise) && strList(st.suggestFor) && (st.profile === void 0 || isStr(st.profile)) && strList(st.views) && strList(st.starters) && Array.isArray(st.example) && st.example.every(
|
|
40039
|
+
const shapeOk = !!st && typeof st === "object" && !Array.isArray(st) && Number.isInteger(st.order) && st.order > 0 && isStr(st.label) && isStr(st.promise) && strList(st.suggestFor) && (st.profile === void 0 || isStr(st.profile)) && strList(st.views) && strList(st.starters) && Array.isArray(st.example) && st.example.every(
|
|
40040
|
+
(e) => e && isStr(e.title) && (e.values === void 0 || typeof e.values === "object" && e.values !== null && !Array.isArray(e.values))
|
|
40041
|
+
) && !!fs && isStr(fs.title) && isStr(fs.goal);
|
|
38651
40042
|
if (!shapeOk) {
|
|
38652
|
-
add(
|
|
40043
|
+
add(
|
|
40044
|
+
"start-shape",
|
|
40045
|
+
"meta.start",
|
|
40046
|
+
"meta.start must be { order (int \u2265 1), label, promise, suggestFor[], profile?, views[], example[{ title, values? }], firstSession{ title, goal }, starters[] }"
|
|
40047
|
+
);
|
|
38653
40048
|
return;
|
|
38654
40049
|
}
|
|
38655
40050
|
const start = st;
|
|
38656
40051
|
const primary = tpl.meta.intent?.primary;
|
|
38657
40052
|
if (start.profile !== void 0 && start.profile === primary)
|
|
38658
|
-
add(
|
|
40053
|
+
add(
|
|
40054
|
+
"start-profile-redundant",
|
|
40055
|
+
"meta.start.profile",
|
|
40056
|
+
`meta.start.profile repeats meta.intent.primary "${primary}" \u2014 omit it (the start defaults to the primary output)`
|
|
40057
|
+
);
|
|
38659
40058
|
const profile = startProfileOf(tpl.meta);
|
|
38660
40059
|
if (!profile) {
|
|
38661
|
-
add(
|
|
40060
|
+
add(
|
|
40061
|
+
"start-profile-missing",
|
|
40062
|
+
"meta.profile",
|
|
40063
|
+
`meta.start names no kind and "${tpl.meta.slug}" declares no meta.intent.primary to default to`
|
|
40064
|
+
);
|
|
38662
40065
|
return;
|
|
38663
40066
|
}
|
|
38664
40067
|
if (start.label.trim().length > INTENT_LABEL_MAX)
|
|
38665
|
-
add(
|
|
40068
|
+
add(
|
|
40069
|
+
"start-label",
|
|
40070
|
+
"meta.start.label",
|
|
40071
|
+
`meta.start.label must be at most ${INTENT_LABEL_MAX} characters (got ${JSON.stringify(start.label)})`
|
|
40072
|
+
);
|
|
38666
40073
|
const [exMin, exMax] = START_EXAMPLE_RANGE;
|
|
38667
40074
|
if (start.example.length < exMin || start.example.length > exMax)
|
|
38668
|
-
add(
|
|
40075
|
+
add(
|
|
40076
|
+
"start-example-count",
|
|
40077
|
+
"meta.start.example",
|
|
40078
|
+
`meta.start.example needs ${exMin}-${exMax} rows (got ${start.example.length})`
|
|
40079
|
+
);
|
|
38669
40080
|
const [stMin, stMax] = START_STARTERS_RANGE;
|
|
38670
40081
|
if (start.starters.length < stMin || start.starters.length > stMax)
|
|
38671
|
-
add(
|
|
40082
|
+
add(
|
|
40083
|
+
"start-starters-count",
|
|
40084
|
+
"meta.start.starters",
|
|
40085
|
+
`meta.start.starters needs ${stMin}-${stMax} chips (got ${start.starters.length})`
|
|
40086
|
+
);
|
|
38672
40087
|
if (start.views.length < 1 || start.views.length > START_VIEWS_MAX)
|
|
38673
|
-
add(
|
|
40088
|
+
add(
|
|
40089
|
+
"start-views-count",
|
|
40090
|
+
"meta.start.views",
|
|
40091
|
+
`meta.start.views needs 1-${START_VIEWS_MAX} view slugs (got ${start.views.length})`
|
|
40092
|
+
);
|
|
38674
40093
|
start.views.forEach((slug, i) => {
|
|
38675
40094
|
const at = `meta.start.views[${i}]`;
|
|
38676
40095
|
const view = (tpl.views ?? []).find((v) => v.slug === slug);
|
|
38677
40096
|
if (!view) {
|
|
38678
|
-
add(
|
|
40097
|
+
add(
|
|
40098
|
+
"start-views-exist",
|
|
40099
|
+
at,
|
|
40100
|
+
`"${slug}" is not a view (by slug) of "${tpl.meta.slug}"`
|
|
40101
|
+
);
|
|
38679
40102
|
return;
|
|
38680
40103
|
}
|
|
38681
|
-
const scope = [
|
|
40104
|
+
const scope = [
|
|
40105
|
+
view.scopeProfileSlug,
|
|
40106
|
+
...view.scopeProfileSlugs ?? []
|
|
40107
|
+
].filter(Boolean);
|
|
38682
40108
|
if (!scope.includes(profile))
|
|
38683
|
-
add(
|
|
40109
|
+
add(
|
|
40110
|
+
"start-views-scope",
|
|
40111
|
+
at,
|
|
40112
|
+
`view "${slug}" is not scoped to "${profile}" (scope: ${scope.join(", ") || "none"})`
|
|
40113
|
+
);
|
|
38684
40114
|
});
|
|
38685
40115
|
const closure = [...collectDependencyClosure(tpl, resolveDep)];
|
|
38686
|
-
const sources = [
|
|
38687
|
-
|
|
40116
|
+
const sources = [
|
|
40117
|
+
tpl,
|
|
40118
|
+
...closure.map(resolveDep).filter((t) => !!t)
|
|
40119
|
+
];
|
|
40120
|
+
const decls = sources.flatMap(
|
|
40121
|
+
(t) => (t.profiles ?? []).filter((p) => p.slug === profile)
|
|
40122
|
+
);
|
|
38688
40123
|
if (decls.length === 0) {
|
|
38689
40124
|
if (!closure.some((d) => !resolveDep(d)))
|
|
38690
|
-
add(
|
|
40125
|
+
add(
|
|
40126
|
+
"start-profile-unknown",
|
|
40127
|
+
"meta.profile",
|
|
40128
|
+
`"${profile}" is neither declared by "${tpl.meta.slug}" nor by a template it depends on`
|
|
40129
|
+
);
|
|
38691
40130
|
} else {
|
|
38692
|
-
const props = new Map(
|
|
40131
|
+
const props = new Map(
|
|
40132
|
+
decls.flatMap((p) => p.properties ?? []).map((p) => [p.slug, p])
|
|
40133
|
+
);
|
|
38693
40134
|
start.example.forEach((row, i) => {
|
|
38694
40135
|
for (const [key, value] of Object.entries(row.values ?? {})) {
|
|
38695
40136
|
const at = `meta.start.example[${i}].values.${key}`;
|
|
38696
40137
|
const prop = props.get(key);
|
|
38697
|
-
if (!prop)
|
|
40138
|
+
if (!prop)
|
|
40139
|
+
add(
|
|
40140
|
+
"start-example-property",
|
|
40141
|
+
at,
|
|
40142
|
+
`"${key}" is not a property of "${profile}"`
|
|
40143
|
+
);
|
|
38698
40144
|
else if (prop.enumValues?.length && !prop.enumValues.includes(value))
|
|
38699
|
-
add(
|
|
40145
|
+
add(
|
|
40146
|
+
"start-example-enum",
|
|
40147
|
+
at,
|
|
40148
|
+
`${JSON.stringify(value)} is not one of ${profile}.${key}: ${prop.enumValues.join(", ")}`
|
|
40149
|
+
);
|
|
38700
40150
|
}
|
|
38701
40151
|
});
|
|
38702
40152
|
}
|
|
38703
40153
|
const ids = /* @__PURE__ */ new Set();
|
|
38704
40154
|
start.suggestFor.forEach((id, i) => {
|
|
38705
|
-
if (ids.has(id))
|
|
40155
|
+
if (ids.has(id))
|
|
40156
|
+
add(
|
|
40157
|
+
"start-suggest-duplicate",
|
|
40158
|
+
`meta.start.suggestFor[${i}]`,
|
|
40159
|
+
`identity "${id}" is listed twice`
|
|
40160
|
+
);
|
|
38706
40161
|
ids.add(id);
|
|
38707
40162
|
});
|
|
38708
40163
|
for (const other of corpus ?? []) {
|
|
38709
40164
|
const o = other.meta?.start;
|
|
38710
40165
|
if (!o || other.meta.slug === tpl.meta.slug) continue;
|
|
38711
40166
|
if (o.order === start.order)
|
|
38712
|
-
add(
|
|
40167
|
+
add(
|
|
40168
|
+
"start-order-duplicate",
|
|
40169
|
+
"meta.start.order",
|
|
40170
|
+
`order ${start.order} is also used by "${other.meta.slug}"`
|
|
40171
|
+
);
|
|
38713
40172
|
for (const id of o.suggestFor ?? [])
|
|
38714
|
-
if (ids.has(id))
|
|
40173
|
+
if (ids.has(id))
|
|
40174
|
+
add(
|
|
40175
|
+
"start-suggest-duplicate",
|
|
40176
|
+
"meta.start.suggestFor",
|
|
40177
|
+
`identity "${id}" is also suggested by "${other.meta.slug}"`
|
|
40178
|
+
);
|
|
38715
40179
|
}
|
|
38716
40180
|
}
|
|
38717
40181
|
function hasCorpus(resolveDep) {
|
|
@@ -38839,9 +40303,17 @@ function validateTemplate(authored, authoredOpts = {}) {
|
|
|
38839
40303
|
for (const [i, cell] of (tpl.spacePackage?.cells ?? []).entries()) {
|
|
38840
40304
|
const at = `spacePackage.cells[${i}]`;
|
|
38841
40305
|
if (!/^[a-z0-9]+(-[a-z0-9]+)*$/.test(cell.key ?? "")) {
|
|
38842
|
-
add(
|
|
40306
|
+
add(
|
|
40307
|
+
"space-package-cell-key",
|
|
40308
|
+
`${at}.key`,
|
|
40309
|
+
"A space package cell needs a kebab-case key"
|
|
40310
|
+
);
|
|
38843
40311
|
} else if (packageCellKeys.has(cell.key)) {
|
|
38844
|
-
add(
|
|
40312
|
+
add(
|
|
40313
|
+
"space-package-cell-key-duplicate",
|
|
40314
|
+
`${at}.key`,
|
|
40315
|
+
`Space package cell key "${cell.key}" is declared twice`
|
|
40316
|
+
);
|
|
38845
40317
|
} else {
|
|
38846
40318
|
packageCellKeys.add(cell.key);
|
|
38847
40319
|
}
|
|
@@ -38856,7 +40328,10 @@ function validateTemplate(authored, authoredOpts = {}) {
|
|
|
38856
40328
|
}
|
|
38857
40329
|
const entryCellKeys = [
|
|
38858
40330
|
["app.cellKey", tpl.app?.kind === "stored" ? tpl.app.cellKey : void 0],
|
|
38859
|
-
[
|
|
40331
|
+
[
|
|
40332
|
+
"layout.primarySurface.cellKey",
|
|
40333
|
+
authoredPrimary?.kind === "cell" ? authoredPrimary.cellKey : void 0
|
|
40334
|
+
]
|
|
38860
40335
|
];
|
|
38861
40336
|
for (const [path, cellKey] of entryCellKeys) {
|
|
38862
40337
|
if (!cellKey?.startsWith("cell:")) continue;
|
|
@@ -38881,7 +40356,8 @@ function validateTemplate(authored, authoredOpts = {}) {
|
|
|
38881
40356
|
);
|
|
38882
40357
|
}
|
|
38883
40358
|
for (const profile of tpl.profiles || []) {
|
|
38884
|
-
if (!RESERVED_PROFILE_SLUGS.has(String(profile.slug).trim().toLowerCase()))
|
|
40359
|
+
if (!RESERVED_PROFILE_SLUGS.has(String(profile.slug).trim().toLowerCase()))
|
|
40360
|
+
continue;
|
|
38885
40361
|
add(
|
|
38886
40362
|
"profile-slug-reserved",
|
|
38887
40363
|
`profiles.${profile.slug}`,
|
|
@@ -39135,7 +40611,11 @@ function validateTemplate(authored, authoredOpts = {}) {
|
|
|
39135
40611
|
"a template rule needs a kebab-case `key` (its identity across versions)"
|
|
39136
40612
|
);
|
|
39137
40613
|
} else if (ruleKeys.has(r.key)) {
|
|
39138
|
-
add(
|
|
40614
|
+
add(
|
|
40615
|
+
"rule-key-duplicate",
|
|
40616
|
+
`${where}.key`,
|
|
40617
|
+
`duplicate rule key "${r.key}"`
|
|
40618
|
+
);
|
|
39139
40619
|
} else {
|
|
39140
40620
|
ruleKeys.add(r.key);
|
|
39141
40621
|
}
|
|
@@ -39156,7 +40636,11 @@ function validateTemplate(authored, authoredOpts = {}) {
|
|
|
39156
40636
|
continue;
|
|
39157
40637
|
}
|
|
39158
40638
|
if (skillSlugs.has(s.slug)) {
|
|
39159
|
-
add(
|
|
40639
|
+
add(
|
|
40640
|
+
"skill-duplicate",
|
|
40641
|
+
`${where}.slug`,
|
|
40642
|
+
`duplicate skill slug "${s.slug}"`
|
|
40643
|
+
);
|
|
39160
40644
|
} else {
|
|
39161
40645
|
skillSlugs.add(s.slug);
|
|
39162
40646
|
}
|