@synap-core/workspace-templates 0.53.0 → 0.56.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/src/templates.ts CHANGED
@@ -5891,6 +5891,14 @@ const DATA = {
5891
5891
  "inputType": "text",
5892
5892
  "placeholder": "The app and screen it is for, e.g. browser › Settings › Agents"
5893
5893
  },
5894
+ {
5895
+ "slug": "design-app",
5896
+ "label": "App",
5897
+ "valueType": "entity_id",
5898
+ "targetProfileSlug": "devplane_app",
5899
+ "inputType": "entity_select",
5900
+ "description": "The app this design is for (one devplane_app, filed into the design's project). The Design app lists an app's designs by it; target-surface stays the screen's name."
5901
+ },
5894
5902
  {
5895
5903
  "slug": "design-scope",
5896
5904
  "label": "Scope",
@@ -5929,7 +5937,7 @@ const DATA = {
5929
5937
  {
5930
5938
  "slug": "design-json",
5931
5939
  "label": "Design (Puck JSON)",
5932
- "description": "A canvas (schema-version 3): a board { format, frames[] }, one frame per screen, each frame { id, name, x, y, w, h, page } holding a Puck page ({ content[] of { type, props: { id, … } }, root.props }) in flow layout, layout blocks taking token names, never px. A single screen is a canvas with one frame. Every type, at any depth and in every frame, is a component in the Storybook manifest.",
5940
+ "description": "A canvas (schema-version 3): a board { format, frames[] }, one frame per screen, each frame { id, name, x, y, w, h, page } holding a Puck page ({ content[] of { type, props: { id, … } }, root.props }) in flow layout on the page's column grid (12 / 8 / 4 columns by the frame's width class: under 600 compact, under 1024 medium, else expanded): a `Section` block is a band holding that grid; a block in a Section or Grid may carry `span` {compact 1-4, medium 1-8, expanded 1-12} and `hide` {<class>: true}; a frame may show another frame's page at its own width (`pageOf: <frameId>`, its own page empty); layout blocks take token names, never px. A single screen is a canvas with one frame. Every type, at any depth and in every frame, is a component in the Storybook manifest.",
5933
5941
  "valueType": "json",
5934
5942
  "inputType": "json"
5935
5943
  },
@@ -5981,10 +5989,17 @@ const DATA = {
5981
5989
  {
5982
5990
  "slug": "implemented-story-id",
5983
5991
  "label": "Implemented story",
5984
- "description": "The Storybook story id of the built screen — the \"after\" of the compare.",
5992
+ "description": "The Storybook story id of the built screen — the \"after\" of the compare. For a single-frame design; a multi-frame design records its stories per frame in frame-stories.",
5985
5993
  "valueType": "string",
5986
5994
  "inputType": "text"
5987
5995
  },
5996
+ {
5997
+ "slug": "frame-stories",
5998
+ "label": "Frame stories",
5999
+ "description": "The built stories of a design with several frames, as a map { \"<frameId>\": [\"<storyId>\", ...] }: each key is a frame id of design-json, each value the Storybook story ids built for that screen (one frame may serve several stories, for its states). For a single-frame design leave it empty and use implemented-story-id; for a multi-frame design this map is the record and implemented-story-id is left empty. Existing designs are not migrated: a reader falls back to implemented-story-id when the map is empty.",
6000
+ "valueType": "json",
6001
+ "inputType": "json"
6002
+ },
5988
6003
  {
5989
6004
  "slug": "design-notes",
5990
6005
  "label": "Notes",
@@ -6253,7 +6268,7 @@ const DATA = {
6253
6268
  {
6254
6269
  "name": "Design to implementation",
6255
6270
  "description": "Take a UI design request from three variants built only of real Storybook components, through a rubric critique and a person's review on the canvas, to a pull request verified by the gates, a before/after compare and a walk in the running app.",
6256
- "goalTemplate": "Take this UI design ({design}) for {surface} from draft to implemented. Load the designing-with-real-components skill first, and design-critique for the Critique stage. GENERATE: read the Storybook component manifest (/manifests/components.json, or the Storybook MCP), the design's goal and scope and the entities it references, and write THREE variants as Puck JSON as a canvas of frames, one per screen (one frame for a single screen) — this design and two sibling ui-designs sharing its variant-group — using ONLY components the manifest lists, with props each one declares, design tokens and named motion presets only; each variant lays out every state the screen has (empty, loading, failed, full, long content); fill components-used from the JSON (across every frame of a canvas) and set schema-version (always 3: a canvas of frames, one per screen; never 1 or 2). CRITIQUE: judge each variant with the design-critique rubric and write the findings into its critique; a checked or pattern blocker sends the run back to Generate; opinions are never applied. REVIEW: a person compares the variants on the canvas and approves one; nothing is implemented from an unapproved design, and only a person sets approved. IMPLEMENT: read design-json and the Storybook MCP, build the screen from those same real components, open a pull request and record its URL in implementation-pr and the built screen's story in implemented-story-id. VERIFY: typecheck, story coverage, interaction and accessibility tests, visual regression and the token guards are green, the implemented story was captured and compared with the design and the current story, and the screen was walked in the running app. Move the design's status only through its lifecycle (update_entity with expectedStatus); never invent a status.",
6271
+ "goalTemplate": "Take this UI design ({design}) for {surface} from draft to implemented. Load the designing-with-real-components skill first, and design-critique for the Critique stage. GENERATE: read the Storybook component manifest (/manifests/components.json, or the Storybook MCP), the design's goal and scope and the entities it references, and write THREE variants as Puck JSON as a canvas of frames, one per screen (one frame for a single screen) — this design and two sibling ui-designs sharing its variant-group — using ONLY components the manifest lists, with props each one declares, design tokens and named motion presets only; each variant lays out every state the screen has (empty, loading, failed, full, long content); fill components-used from the JSON (across every frame of a canvas) and set schema-version (always 3: a canvas of frames, one per screen; never 1 or 2). CRITIQUE: judge each variant with the design-critique rubric and write the findings into its critique; a checked or pattern blocker sends the run back to Generate; opinions are never applied. REVIEW: a person compares the variants on the canvas and approves one; nothing is implemented from an unapproved design, and only a person sets approved. IMPLEMENT: read design-json and the Storybook MCP, build the screen from those same real components, open a pull request and record its URL in implementation-pr and the built screen's story in implemented-story-id (a single-frame design) or, for a design of several frames, each frame's stories in frame-stories ({ frameId: [storyId, ...] }). VERIFY: typecheck, story coverage, interaction and accessibility tests, visual regression and the token guards are green, the implemented story was captured and compared with the design and the current story, and the screen was walked in the running app. Move the design's status only through its lifecycle (update_entity with expectedStatus); never invent a status.",
6257
6272
  "subjectProfile": {
6258
6273
  "profileSlug": "ui-design"
6259
6274
  },
@@ -6390,10 +6405,9 @@ const DATA = {
6390
6405
  },
6391
6406
  {
6392
6407
  "key": "implemented-story-linked",
6393
- "statement": "The Storybook story id of the built screen is recorded in implemented-story-id.",
6408
+ "statement": "The built stories are recorded on the design, in implemented-story-id for a single-frame design, or in frame-stories for each frame of a multi-frame design (every frame of design-json has at least one story).",
6394
6409
  "check": {
6395
- "kind": "evidence",
6396
- "evidenceKey": "implemented-story-id"
6410
+ "kind": "judge"
6397
6411
  }
6398
6412
  },
6399
6413
  {
@@ -16621,6 +16635,138 @@ const DATA = {
16621
16635
  ]
16622
16636
  }
16623
16637
  ],
16638
+ "automations": [
16639
+ {
16640
+ "key": "lead-converted-becomes-client",
16641
+ "name": "A lead signs: it becomes a client",
16642
+ "description": "When a lead moves to converted (the client signed; a person's move, so an agent's move is a proposal the person approves first), the lead is stamped with the date it converted and the same person or company gets the client role at onboarding, handed off to Operations. Operations' \"Onboard a client\" starts when the client role is attached. The converted lead role stays as the history of the sale. Attaching the client role again is a no-op, so the CRM app's own handoff and this rule never add a second client role.",
16643
+ "triggerType": "event",
16644
+ "triggerConfig": {
16645
+ "eventPattern": "entity.transition.completed",
16646
+ "filters": {
16647
+ "lifecycleProfile": "lead",
16648
+ "to": "converted"
16649
+ }
16650
+ },
16651
+ "status": "active",
16652
+ "flow": {
16653
+ "nodes": [
16654
+ {
16655
+ "id": "t",
16656
+ "type": "trigger",
16657
+ "position": {
16658
+ "x": 0,
16659
+ "y": 0
16660
+ },
16661
+ "data": {
16662
+ "label": "A lead moved to converted",
16663
+ "triggerType": "event",
16664
+ "config": {
16665
+ "eventPattern": "entity.transition.completed",
16666
+ "filters": {
16667
+ "lifecycleProfile": "lead",
16668
+ "to": "converted"
16669
+ }
16670
+ }
16671
+ }
16672
+ },
16673
+ {
16674
+ "id": "has-entity",
16675
+ "type": "guard",
16676
+ "position": {
16677
+ "x": 0,
16678
+ "y": 120
16679
+ },
16680
+ "data": {
16681
+ "label": "The move names the person or company that signed",
16682
+ "checks": [
16683
+ {
16684
+ "path": "trigger.payload.data.entityId",
16685
+ "minLength": 36,
16686
+ "message": "The lead's move names no person or company: there is no one to make a client."
16687
+ }
16688
+ ]
16689
+ }
16690
+ },
16691
+ {
16692
+ "id": "now",
16693
+ "type": "compute",
16694
+ "position": {
16695
+ "x": 0,
16696
+ "y": 240
16697
+ },
16698
+ "data": {
16699
+ "label": "When the lead signed",
16700
+ "operation": "now"
16701
+ }
16702
+ },
16703
+ {
16704
+ "id": "stamp-lead",
16705
+ "type": "output",
16706
+ "position": {
16707
+ "x": 0,
16708
+ "y": 360
16709
+ },
16710
+ "data": {
16711
+ "label": "Stamp the lead with the date it converted",
16712
+ "outputType": "facet_update",
16713
+ "config": {
16714
+ "entityId": "{{trigger.payload.data.entityId}}",
16715
+ "facetSlug": "lead",
16716
+ "properties": {
16717
+ "convertedAt": "{{steps.now.output.result}}"
16718
+ }
16719
+ }
16720
+ }
16721
+ },
16722
+ {
16723
+ "id": "become-client",
16724
+ "type": "output",
16725
+ "position": {
16726
+ "x": 0,
16727
+ "y": 480
16728
+ },
16729
+ "data": {
16730
+ "label": "Attach the client role at onboarding, handed off to Operations",
16731
+ "outputType": "facet_attach",
16732
+ "config": {
16733
+ "entityId": "{{trigger.payload.data.entityId}}",
16734
+ "facetSlug": "client",
16735
+ "properties": {
16736
+ "clientStatus": "onboarding",
16737
+ "becameClientAt": "{{steps.now.output.result}}",
16738
+ "handoffStatus": "handed_off",
16739
+ "handoffDestination": "Operations"
16740
+ }
16741
+ }
16742
+ }
16743
+ }
16744
+ ],
16745
+ "edges": [
16746
+ {
16747
+ "id": "e1",
16748
+ "source": "t",
16749
+ "target": "has-entity"
16750
+ },
16751
+ {
16752
+ "id": "e2",
16753
+ "source": "has-entity",
16754
+ "target": "now"
16755
+ },
16756
+ {
16757
+ "id": "e3",
16758
+ "source": "now",
16759
+ "target": "stamp-lead"
16760
+ },
16761
+ {
16762
+ "id": "e4",
16763
+ "source": "stamp-lead",
16764
+ "target": "become-client"
16765
+ }
16766
+ ]
16767
+ }
16768
+ }
16769
+ ],
16624
16770
  "actionPlacements": [
16625
16771
  {
16626
16772
  "profileSlug": "person",
@@ -1,89 +0,0 @@
1
- {
2
- "name": "A lead signs: it becomes a client",
3
- "description": "When a lead moves to converted (the client signed; a person's move, so an agent's move is a proposal the person approves first), the lead is stamped with the date it converted and the same person or company gets the client role, handed off to Operations. Operations' \"Onboard a client\" starts when the client role is attached. The converted lead role stays as the history of the sale. Attaching the client role again is a no-op, so the CRM app's own handoff and this rule never add a second client role.",
4
- "triggerType": "event",
5
- "status": "active",
6
- "triggerConfig": {
7
- "eventPattern": "entity.transition.completed",
8
- "filters": { "lifecycleProfile": "lead", "to": "converted" }
9
- },
10
- "flowDefinition": {
11
- "nodes": [
12
- {
13
- "id": "t",
14
- "type": "trigger",
15
- "position": { "x": 0, "y": 0 },
16
- "data": {
17
- "label": "A lead moved to converted",
18
- "triggerType": "event",
19
- "config": {
20
- "eventPattern": "entity.transition.completed",
21
- "filters": { "lifecycleProfile": "lead", "to": "converted" }
22
- }
23
- }
24
- },
25
- {
26
- "id": "has-entity",
27
- "type": "guard",
28
- "position": { "x": 0, "y": 120 },
29
- "data": {
30
- "label": "The move names the person or company that signed",
31
- "checks": [
32
- {
33
- "path": "trigger.payload.data.entityId",
34
- "minLength": 36,
35
- "message": "The lead's move names no person or company: there is no one to make a client."
36
- }
37
- ]
38
- }
39
- },
40
- {
41
- "id": "now",
42
- "type": "compute",
43
- "position": { "x": 0, "y": 240 },
44
- "data": {
45
- "label": "When the lead signed",
46
- "operation": "now"
47
- }
48
- },
49
- {
50
- "id": "stamp-lead",
51
- "type": "output",
52
- "position": { "x": 0, "y": 360 },
53
- "data": {
54
- "label": "Stamp the lead with the date it converted",
55
- "outputType": "facet_update",
56
- "config": {
57
- "entityId": "{{trigger.payload.data.entityId}}",
58
- "facetSlug": "lead",
59
- "properties": { "convertedAt": "{{steps.now.output.result}}" }
60
- }
61
- }
62
- },
63
- {
64
- "id": "become-client",
65
- "type": "output",
66
- "position": { "x": 0, "y": 480 },
67
- "data": {
68
- "label": "Attach the client role, handed off to Operations",
69
- "outputType": "facet_attach",
70
- "config": {
71
- "entityId": "{{trigger.payload.data.entityId}}",
72
- "facetSlug": "client",
73
- "properties": {
74
- "becameClientAt": "{{steps.now.output.result}}",
75
- "handoffStatus": "handed_off",
76
- "handoffDestination": "Operations"
77
- }
78
- }
79
- }
80
- }
81
- ],
82
- "edges": [
83
- { "id": "e1", "source": "t", "target": "has-entity" },
84
- { "id": "e2", "source": "has-entity", "target": "now" },
85
- { "id": "e3", "source": "now", "target": "stamp-lead" },
86
- { "id": "e4", "source": "stamp-lead", "target": "become-client" }
87
- ]
88
- }
89
- }
@@ -1,13 +0,0 @@
1
- {
2
- "apiVersion": "synap/v1",
3
- "kind": "automation",
4
- "meta": {
5
- "slug": "lead-converted-becomes-client",
6
- "name": "A lead signs: it becomes a client",
7
- "description": "When a person moves a lead to converted (signed), the lead is stamped with the date and the same person or company gets the client role, handed off to Operations, where \"Onboard a client\" starts. Needs the lead and client roles (foundation); attaching the role twice is a no-op.",
8
- "tags": ["automation", "crm", "lead", "client", "operations"],
9
- "isPublic": false,
10
- "owner": "template-owner"
11
- },
12
- "dependencies": []
13
- }