@synap-core/workspace-templates 0.12.0 → 0.23.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.
Files changed (245) hide show
  1. package/README.md +483 -0
  2. package/automations/bookmark-enrichment.automation.json +321 -0
  3. package/automations/github-pr-events.automation.json +505 -0
  4. package/automations/mail-feed.automation.json +86 -0
  5. package/automations/ship-a-change-checks-green.automation.json +106 -0
  6. package/automations/ship-a-change-checks-red.automation.json +106 -0
  7. package/automations/ship-a-change-deployed.automation.json +56 -0
  8. package/automations/ship-a-change-pr-merged.automation.json +110 -0
  9. package/automations/ship-a-change-pr-opened.automation.json +104 -0
  10. package/automations/url-bookmark-capture.automation.json +132 -0
  11. package/capabilities/agency-skills.capability.json +157 -0
  12. package/capabilities/apify.capability.json +265 -0
  13. package/capabilities/apollo.capability.json +120 -0
  14. package/capabilities/arch-backend.capability.json +97 -0
  15. package/capabilities/arch-client-intelligence.capability.json +401 -0
  16. package/capabilities/backblaze-b2.capability.json +205 -0
  17. package/capabilities/cal-com.capability.json +266 -0
  18. package/capabilities/canva.capability.json +274 -0
  19. package/capabilities/claude-code-routines.capability.json +172 -0
  20. package/capabilities/claude-managed-agents.capability.json +215 -0
  21. package/capabilities/client-comms-report.capability.json +246 -0
  22. package/capabilities/content-idea-to-production.capability.json +29 -0
  23. package/capabilities/datagouv.capability.json +315 -0
  24. package/capabilities/discord-bot.capability.json +157 -0
  25. package/capabilities/dropbox.capability.json +281 -0
  26. package/capabilities/exa.capability.json +109 -0
  27. package/capabilities/fal-ai.capability.json +83 -0
  28. package/capabilities/fal-media-lab.capability.json +158 -0
  29. package/capabilities/fireflies.capability.json +191 -0
  30. package/capabilities/freellmapi.capability.json +114 -0
  31. package/capabilities/generic-apikey.capability.json +92 -0
  32. package/capabilities/github-merge.capability.json +99 -0
  33. package/capabilities/github-read.capability.json +325 -0
  34. package/capabilities/governance-tighten-recommender.capability.json +81 -0
  35. package/capabilities/jev.capability.json +226 -0
  36. package/capabilities/lead-conversion-enrollment.capability.json +246 -0
  37. package/capabilities/mail-feed.capability.json +277 -0
  38. package/capabilities/mailgun.capability.json +52 -0
  39. package/capabilities/nango-google.capability.json +639 -0
  40. package/capabilities/notion.capability.json +417 -0
  41. package/capabilities/omniroute.capability.json +137 -0
  42. package/capabilities/posthog-analytics.capability.json +258 -0
  43. package/capabilities/postiz.capability.json +467 -0
  44. package/capabilities/proactive-digest.capability.json +190 -0
  45. package/capabilities/proton.capability.json +288 -0
  46. package/capabilities/replicate-rvm.capability.json +97 -0
  47. package/capabilities/research-methods.capability.json +57 -0
  48. package/capabilities/shopify.capability.json +395 -0
  49. package/capabilities/slack.capability.json +369 -0
  50. package/capabilities/stripe.capability.json +420 -0
  51. package/capabilities/telegram-bridge.capability.json +56 -0
  52. package/capabilities/treg.capability.json +102 -0
  53. package/capabilities/unipile-linkedin.capability.json +471 -0
  54. package/capabilities/vercel.capability.json +424 -0
  55. package/dist/define-CPS0n8BV.d.ts +1331 -0
  56. package/dist/index.d.ts +174 -900
  57. package/dist/index.js +26148 -23931
  58. package/dist/index.js.map +1 -1
  59. package/dist/wire.d.ts +222 -0
  60. package/dist/wire.js +77 -0
  61. package/dist/wire.js.map +1 -0
  62. package/package.json +27 -4
  63. package/packs/bookmark-views-pack.json +33 -0
  64. package/packs/crm-pack.json +76 -0
  65. package/packs/customer-profile.json +28 -0
  66. package/packs/deep-research.playbook.json +30 -0
  67. package/packs/event-views-pack.json +33 -0
  68. package/packs/habit-profile.json +27 -0
  69. package/packs/hr-pack.json +54 -0
  70. package/packs/invoice-profile.json +28 -0
  71. package/packs/knowledge-base-pack.json +56 -0
  72. package/packs/meeting-profile.json +29 -0
  73. package/packs/product-profile.json +30 -0
  74. package/packs/project-management-pack.json +49 -0
  75. package/packs/recipe-profile.json +29 -0
  76. package/packs/task-views-pack.json +39 -0
  77. package/retired.yaml +136 -0
  78. package/skills/app-factory-build-slice/SKILL.md +70 -0
  79. package/skills/app-factory-build-slice.catalog.json +17 -0
  80. package/skills/app-factory-design-canvas/SKILL.md +96 -0
  81. package/skills/app-factory-design-canvas.catalog.json +17 -0
  82. package/skills/app-factory-design-review/SKILL.md +99 -0
  83. package/skills/app-factory-design-review.catalog.json +18 -0
  84. package/skills/app-factory-research/SKILL.md +123 -0
  85. package/skills/app-factory-research.catalog.json +17 -0
  86. package/skills/bookmark-enrichment/SKILL.md +40 -0
  87. package/skills/carousel-format/carousel-format.skill.json +18 -0
  88. package/skills/collage-broll/collage-broll.skill.json +20 -0
  89. package/skills/content-taste/content-taste.skill.json +18 -0
  90. package/skills/creative-director/creative-director.skill.json +18 -0
  91. package/skills/design-critique/SKILL.md +135 -0
  92. package/skills/design-critique.catalog.json +12 -0
  93. package/skills/designing-with-real-components/SKILL.md +140 -0
  94. package/skills/designing-with-real-components.catalog.json +12 -0
  95. package/skills/edit-loop/edit-loop.skill.json +25 -0
  96. package/skills/facecam-edit/facecam-edit.skill.json +24 -0
  97. package/skills/mapping-the-server/SKILL.md +54 -0
  98. package/skills/math-explainer-manimgx/math-explainer-manimgx.skill.json +20 -0
  99. package/skills/motion-quality-gates/motion-quality-gates.skill.json +20 -0
  100. package/skills/open-design-edit/open-design-edit.skill.json +24 -0
  101. package/skills/reading-client-progress/SKILL.md +65 -0
  102. package/skills/routing-to-channels/SKILL.md +54 -0
  103. package/skills/stellar-scf-grants-advisor/ASSOCIATE-CHEATSHEET.md +133 -0
  104. package/skills/stellar-scf-grants-advisor/ASSOCIATE-ONBOARDING-GUIDE.md +761 -0
  105. package/skills/stellar-scf-grants-advisor/CLIENT-FAQ.md +181 -0
  106. package/skills/stellar-scf-grants-advisor/PARTNER-HANDOVER.md +130 -0
  107. package/skills/stellar-scf-grants-advisor/SKILL.md +102 -0
  108. package/skills/stellar-scf-grants-advisor/examples/README.md +43 -0
  109. package/skills/stellar-scf-grants-advisor/examples/chat-summary-templates.md +158 -0
  110. package/skills/stellar-scf-grants-advisor/examples/corpus-comparable-rows.md +136 -0
  111. package/skills/stellar-scf-grants-advisor/examples/q10-team-rewrites.md +109 -0
  112. package/skills/stellar-scf-grants-advisor/examples/q2-description-rewrites.md +88 -0
  113. package/skills/stellar-scf-grants-advisor/examples/q6-integration-rewrites.md +107 -0
  114. package/skills/stellar-scf-grants-advisor/examples/tranche-structures.md +176 -0
  115. package/skills/stellar-scf-grants-advisor/reference/01-methodology.md +96 -0
  116. package/skills/stellar-scf-grants-advisor/reference/02-scoring-framework.md +199 -0
  117. package/skills/stellar-scf-grants-advisor/reference/03-rejection-patterns.md +241 -0
  118. package/skills/stellar-scf-grants-advisor/reference/04-winner-patterns.md +120 -0
  119. package/skills/stellar-scf-grants-advisor/reference/05-comeback-patterns.md +92 -0
  120. package/skills/stellar-scf-grants-advisor/reference/06-budget-benchmarks.md +125 -0
  121. package/skills/stellar-scf-grants-advisor/reference/07-integration-list.md +147 -0
  122. package/skills/stellar-scf-grants-advisor/reference/08-abstract-fields.md +258 -0
  123. package/skills/stellar-scf-grants-advisor/reference/09-build-fields.md +259 -0
  124. package/skills/stellar-scf-grants-advisor/reference/10-corpus-winners.md +135 -0
  125. package/skills/stellar-scf-grants-advisor/reference/11-corpus-rejects.md +267 -0
  126. package/skills/stellar-scf-grants-advisor/reference/12-client-communication.md +131 -0
  127. package/skills/stellar-scf-grants-advisor/reference/13-excel-output-spec.md +199 -0
  128. package/skills/stellar-scf-grants-advisor/reference/14-worked-examples.md +160 -0
  129. package/skills/stellar-scf-grants-advisor/templates/abstract-review-builder.py +253 -0
  130. package/skills/stellar-scf-grants-advisor/templates/build-review-builder.py +213 -0
  131. package/skills/video-direction/video-direction.skill.json +20 -0
  132. package/skills/video-style-vocabulary/video-style-vocabulary.skill.json +20 -0
  133. package/skills/video-toolbox/video-toolbox.skill.json +20 -0
  134. package/src/__fixtures__/lifecycle-presets.flat-before.json +205 -0
  135. package/src/agency-os.yaml +122 -0
  136. package/src/agent-os-skill-slugs.test.ts +65 -0
  137. package/src/apify-social-reader.test.ts +317 -0
  138. package/src/base.yaml +85 -39
  139. package/src/blockchain-ecosystem.yaml +1 -0
  140. package/src/brand-library.yaml +525 -14
  141. package/src/builder-dev-fold.template.test.ts +113 -0
  142. package/src/builder.yaml +779 -91
  143. package/src/business-model-catalog-description.test.ts +47 -0
  144. package/src/business-model-grp.template.test.ts +214 -0
  145. package/src/business-model.yaml +296 -49
  146. package/src/catalog-safety.test.ts +198 -0
  147. package/src/catalog.template-items.test.ts +75 -0
  148. package/src/catalog.ts +66 -2
  149. package/src/concept-guard.test.ts +28 -8
  150. package/src/concept-guard.ts +2 -2
  151. package/src/content-creation.template.test.ts +52 -0
  152. package/src/content-creation.yaml +192 -0
  153. package/src/content-os.edit-loop.template.test.ts +210 -0
  154. package/src/content-os.publish-due-posts.template.test.ts +261 -0
  155. package/src/content-os.template.test.ts +322 -0
  156. package/src/content-os.video-takes.template.test.ts +338 -0
  157. package/src/content-os.work-a-take.template.test.ts +125 -0
  158. package/src/content-os.yaml +1830 -39
  159. package/src/content-studio-retired.template.test.ts +82 -0
  160. package/src/corpus-flow-validity.test.ts +4 -5
  161. package/src/crm-absorbs-outreach.template.test.ts +117 -0
  162. package/src/crm-build-plan.template.test.ts +128 -0
  163. package/src/crm-lists.template.test.ts +96 -0
  164. package/src/crm-messages-cadence.template.test.ts +164 -0
  165. package/src/crm-one-send-door.template.test.ts +65 -0
  166. package/src/crm.yaml +1456 -181
  167. package/src/decisions-wave.template.test.ts +186 -0
  168. package/src/define.ts +130 -17
  169. package/src/design-to-implementation.template.test.ts +94 -0
  170. package/src/domain-template-type.test.ts +75 -0
  171. package/src/ecosystem.yaml +27 -66
  172. package/src/enterprise-os.yaml +10 -134
  173. package/src/facecam-edit.audio-studio.test.ts +188 -0
  174. package/src/fal-generate-image.test.ts +200 -0
  175. package/src/fal-media-lab-pod-files.test.ts +180 -0
  176. package/src/finance.yaml +254 -1
  177. package/src/foundation.yaml +78 -38
  178. package/src/frame-host-modules.d.mts +6 -0
  179. package/src/frame-host-modules.mjs +58 -0
  180. package/src/generate.mjs +9 -3
  181. package/src/github-merge.test.ts +210 -0
  182. package/src/grants.yaml +46 -17
  183. package/src/hr.yaml +39 -6
  184. package/src/index.ts +36 -1
  185. package/src/intent.test.ts +161 -0
  186. package/src/internal-runbook.yaml +19 -1
  187. package/src/jev.test.ts +356 -0
  188. package/src/legal.yaml +33 -1
  189. package/src/life-os.yaml +51 -240
  190. package/src/lifecycle-coverage.test.ts +124 -0
  191. package/src/lifecycle-declarations.test.ts +252 -0
  192. package/src/lifecycle-presets.test.ts +468 -0
  193. package/src/lifecycle-presets.ts +494 -0
  194. package/src/lifecycle-stuck.test.ts +46 -0
  195. package/src/lifecycle-waits.parity.test.ts +319 -0
  196. package/src/marketing.yaml +108 -4
  197. package/src/meetings-knowledge.yaml +18 -0
  198. package/src/networking.yaml +23 -2
  199. package/src/operations.yaml +304 -4
  200. package/src/pipeline-views.template.test.ts +88 -0
  201. package/src/playbook-goal-placeholders.test.ts +57 -0
  202. package/src/postiz-contract.test.ts +134 -0
  203. package/src/presentation-declarations.test.ts +174 -0
  204. package/src/process-contract.validate.test.ts +352 -0
  205. package/src/project-management.yaml +39 -740
  206. package/src/publish-body.d.mts +29 -0
  207. package/src/publish-body.mjs +74 -0
  208. package/src/publish-body.test.ts +74 -0
  209. package/src/publish-official-lib.test.ts +176 -0
  210. package/src/replicate-rvm.test.ts +504 -0
  211. package/src/research-base.yaml +119 -20
  212. package/src/research-decision.yaml +60 -3
  213. package/src/reserved-profile-slugs.test.ts +83 -0
  214. package/src/retired-goal-kinds.test.ts +58 -0
  215. package/src/role-reference-and-step-domain.test.ts +192 -0
  216. package/src/seed-obligation.test.ts +1 -6
  217. package/src/send-message-maps.test.ts +227 -0
  218. package/src/shared-role-ssot.test.ts +40 -2
  219. package/src/ship-a-change.template.test.ts +177 -0
  220. package/src/skills.test.ts +170 -0
  221. package/src/social.yaml +85 -27
  222. package/src/space-packages.freshness.test.ts +97 -0
  223. package/src/space-packages.generated.ts +40 -0
  224. package/src/space-packages.test.ts +125 -0
  225. package/src/space-packages.ts +73 -0
  226. package/src/start.test.ts +188 -0
  227. package/src/task-intents.test.ts +293 -0
  228. package/src/templates.ts +20851 -21496
  229. package/src/types.ts +443 -60
  230. package/src/unipile-publish-post.test.ts +162 -0
  231. package/src/validate-flow.drift.test.ts +2 -3
  232. package/src/validate-flow.ts +22 -2
  233. package/src/validate-onboarding.test.ts +59 -0
  234. package/src/validate.test.ts +71 -4
  235. package/src/validate.ts +1335 -7
  236. package/src/wire-core.ts +231 -0
  237. package/src/wire.test.ts +159 -0
  238. package/src/wire.ts +107 -0
  239. package/src/agent-fleet.yaml +0 -1645
  240. package/src/business-developer.template.test.ts +0 -351
  241. package/src/business-developer.yaml +0 -860
  242. package/src/content-studio.yaml +0 -361
  243. package/src/dev-dashboard.yaml +0 -990
  244. package/src/outreach-comms.yaml +0 -486
  245. package/src/the-arch.yaml +0 -201
@@ -0,0 +1,505 @@
1
+ {
2
+ "name": "GitHub pull requests and checks \u2192 dev-loop facts",
3
+ "description": "Reads the GitHub org webhook (one inbound source named GitHub) and records what happened as dev-loop observations: a pull request opened or reopened \u2192 dev.pr_opened, merged \u2192 dev.pr_merged, closed unmerged \u2192 dev.pr_closed; a check suite completed \u2192 ci.finished. The pod's own consumers (the merge sweeper, the Ship a change automations) take it from there.",
4
+ "triggerType": "webhook",
5
+ "status": "draft",
6
+ "triggerConfig": {
7
+ "webhookSource": {
8
+ "name": "GitHub"
9
+ }
10
+ },
11
+ "flowDefinition": {
12
+ "nodes": [
13
+ {
14
+ "id": "t",
15
+ "type": "trigger",
16
+ "position": {
17
+ "x": 0,
18
+ "y": 0
19
+ },
20
+ "data": {
21
+ "label": "GitHub posts an event",
22
+ "triggerType": "webhook",
23
+ "config": {
24
+ "webhookSource": {
25
+ "name": "GitHub"
26
+ }
27
+ }
28
+ }
29
+ },
30
+ {
31
+ "id": "route",
32
+ "type": "switch",
33
+ "position": {
34
+ "x": 0,
35
+ "y": 120
36
+ },
37
+ "data": {
38
+ "label": "Which GitHub event",
39
+ "expression": "{{trigger.payload.event}}",
40
+ "cases": [
41
+ {
42
+ "value": "pull_request",
43
+ "label": "A pull request"
44
+ },
45
+ {
46
+ "value": "check_suite",
47
+ "label": "A check suite"
48
+ }
49
+ ]
50
+ }
51
+ },
52
+ {
53
+ "id": "into-default",
54
+ "type": "condition",
55
+ "position": {
56
+ "x": -300,
57
+ "y": 240
58
+ },
59
+ "data": {
60
+ "label": "Its base is the default branch",
61
+ "expression": "trigger.payload.body.pull_request.base.ref == trigger.payload.body.repository.default_branch"
62
+ }
63
+ },
64
+ {
65
+ "id": "pr-action",
66
+ "type": "switch",
67
+ "position": {
68
+ "x": -300,
69
+ "y": 360
70
+ },
71
+ "data": {
72
+ "label": "What happened to it",
73
+ "expression": "{{trigger.payload.body.action}}:{{trigger.payload.body.pull_request.merged}}",
74
+ "cases": [
75
+ {
76
+ "value": "opened:false",
77
+ "label": "Opened"
78
+ },
79
+ {
80
+ "value": "reopened:false",
81
+ "label": "Reopened"
82
+ },
83
+ {
84
+ "value": "closed:true",
85
+ "label": "Merged"
86
+ },
87
+ {
88
+ "value": "closed:false",
89
+ "label": "Closed without merging"
90
+ }
91
+ ]
92
+ }
93
+ },
94
+ {
95
+ "id": "pr-opened",
96
+ "type": "output",
97
+ "position": {
98
+ "x": -600,
99
+ "y": 480
100
+ },
101
+ "data": {
102
+ "label": "Record dev.pr_opened",
103
+ "outputType": "record_observation",
104
+ "config": {
105
+ "type": "dev.pr_opened",
106
+ "subjectId": "{{trigger.payload.body.repository.full_name}}#{{trigger.payload.body.pull_request.number}}",
107
+ "subjectType": "pull_request",
108
+ "occurredAt": "{{trigger.payload.body.pull_request.created_at}}",
109
+ "data": {
110
+ "repo": "{{trigger.payload.body.repository.full_name}}",
111
+ "number": "{{trigger.payload.body.pull_request.number}}",
112
+ "url": "{{trigger.payload.body.pull_request.html_url}}",
113
+ "sha": "{{trigger.payload.body.pull_request.head.sha}}",
114
+ "branch": "{{trigger.payload.body.pull_request.head.ref}}",
115
+ "base": "{{trigger.payload.body.pull_request.base.ref}}",
116
+ "intoDefault": "{{steps.into-default.output.result}}",
117
+ "title": "{{trigger.payload.body.pull_request.title}}",
118
+ "body": "{{trigger.payload.body.pull_request.body}}",
119
+ "action": "{{trigger.payload.body.action}}",
120
+ "merged": "{{trigger.payload.body.pull_request.merged}}",
121
+ "headSha": "{{trigger.payload.body.pull_request.head.sha}}",
122
+ "author": "{{trigger.payload.body.pull_request.user.login}}",
123
+ "source": "github-webhook"
124
+ }
125
+ }
126
+ }
127
+ },
128
+ {
129
+ "id": "pr-reopened",
130
+ "type": "output",
131
+ "position": {
132
+ "x": -400,
133
+ "y": 480
134
+ },
135
+ "data": {
136
+ "label": "Record dev.pr_opened (reopened)",
137
+ "outputType": "record_observation",
138
+ "config": {
139
+ "type": "dev.pr_opened",
140
+ "subjectId": "{{trigger.payload.body.repository.full_name}}#{{trigger.payload.body.pull_request.number}}",
141
+ "subjectType": "pull_request",
142
+ "occurredAt": "{{trigger.payload.body.pull_request.updated_at}}",
143
+ "data": {
144
+ "repo": "{{trigger.payload.body.repository.full_name}}",
145
+ "number": "{{trigger.payload.body.pull_request.number}}",
146
+ "url": "{{trigger.payload.body.pull_request.html_url}}",
147
+ "sha": "{{trigger.payload.body.pull_request.head.sha}}",
148
+ "branch": "{{trigger.payload.body.pull_request.head.ref}}",
149
+ "base": "{{trigger.payload.body.pull_request.base.ref}}",
150
+ "intoDefault": "{{steps.into-default.output.result}}",
151
+ "title": "{{trigger.payload.body.pull_request.title}}",
152
+ "body": "{{trigger.payload.body.pull_request.body}}",
153
+ "action": "{{trigger.payload.body.action}}",
154
+ "merged": "{{trigger.payload.body.pull_request.merged}}",
155
+ "headSha": "{{trigger.payload.body.pull_request.head.sha}}",
156
+ "author": "{{trigger.payload.body.pull_request.user.login}}",
157
+ "source": "github-webhook"
158
+ }
159
+ }
160
+ }
161
+ },
162
+ {
163
+ "id": "pr-merged",
164
+ "type": "output",
165
+ "position": {
166
+ "x": -200,
167
+ "y": 480
168
+ },
169
+ "data": {
170
+ "label": "Record dev.pr_merged",
171
+ "outputType": "record_observation",
172
+ "config": {
173
+ "type": "dev.pr_merged",
174
+ "subjectId": "{{trigger.payload.body.repository.full_name}}#{{trigger.payload.body.pull_request.number}}",
175
+ "subjectType": "pull_request",
176
+ "occurredAt": "{{trigger.payload.body.pull_request.merged_at}}",
177
+ "data": {
178
+ "repo": "{{trigger.payload.body.repository.full_name}}",
179
+ "number": "{{trigger.payload.body.pull_request.number}}",
180
+ "url": "{{trigger.payload.body.pull_request.html_url}}",
181
+ "sha": "{{trigger.payload.body.pull_request.merge_commit_sha}}",
182
+ "branch": "{{trigger.payload.body.pull_request.head.ref}}",
183
+ "base": "{{trigger.payload.body.pull_request.base.ref}}",
184
+ "intoDefault": "{{steps.into-default.output.result}}",
185
+ "title": "{{trigger.payload.body.pull_request.title}}",
186
+ "body": "{{trigger.payload.body.pull_request.body}}",
187
+ "action": "{{trigger.payload.body.action}}",
188
+ "merged": "{{trigger.payload.body.pull_request.merged}}",
189
+ "headSha": "{{trigger.payload.body.pull_request.head.sha}}",
190
+ "author": "{{trigger.payload.body.pull_request.user.login}}",
191
+ "source": "github-webhook"
192
+ }
193
+ }
194
+ }
195
+ },
196
+ {
197
+ "id": "pr-closed",
198
+ "type": "output",
199
+ "position": {
200
+ "x": 0,
201
+ "y": 480
202
+ },
203
+ "data": {
204
+ "label": "Record dev.pr_closed",
205
+ "outputType": "record_observation",
206
+ "config": {
207
+ "type": "dev.pr_closed",
208
+ "subjectId": "{{trigger.payload.body.repository.full_name}}#{{trigger.payload.body.pull_request.number}}",
209
+ "subjectType": "pull_request",
210
+ "occurredAt": "{{trigger.payload.body.pull_request.closed_at}}",
211
+ "data": {
212
+ "repo": "{{trigger.payload.body.repository.full_name}}",
213
+ "number": "{{trigger.payload.body.pull_request.number}}",
214
+ "url": "{{trigger.payload.body.pull_request.html_url}}",
215
+ "sha": "{{trigger.payload.body.pull_request.head.sha}}",
216
+ "branch": "{{trigger.payload.body.pull_request.head.ref}}",
217
+ "base": "{{trigger.payload.body.pull_request.base.ref}}",
218
+ "intoDefault": "{{steps.into-default.output.result}}",
219
+ "title": "{{trigger.payload.body.pull_request.title}}",
220
+ "body": "{{trigger.payload.body.pull_request.body}}",
221
+ "action": "{{trigger.payload.body.action}}",
222
+ "merged": "{{trigger.payload.body.pull_request.merged}}",
223
+ "headSha": "{{trigger.payload.body.pull_request.head.sha}}",
224
+ "author": "{{trigger.payload.body.pull_request.user.login}}",
225
+ "source": "github-webhook"
226
+ }
227
+ }
228
+ }
229
+ },
230
+ {
231
+ "id": "cs-action",
232
+ "type": "switch",
233
+ "position": {
234
+ "x": 300,
235
+ "y": 240
236
+ },
237
+ "data": {
238
+ "label": "Has it completed",
239
+ "expression": "{{trigger.payload.body.action}}",
240
+ "cases": [
241
+ {
242
+ "value": "completed",
243
+ "label": "Completed"
244
+ }
245
+ ]
246
+ }
247
+ },
248
+ {
249
+ "id": "known-conclusion",
250
+ "type": "guard",
251
+ "position": {
252
+ "x": 300,
253
+ "y": 360
254
+ },
255
+ "data": {
256
+ "label": "A conclusion the dev loop knows",
257
+ "checks": [
258
+ {
259
+ "path": "trigger.payload.body.check_suite.conclusion",
260
+ "anyOf": [
261
+ {
262
+ "path": "trigger.payload.body.check_suite.conclusion",
263
+ "equals": "success"
264
+ },
265
+ {
266
+ "path": "trigger.payload.body.check_suite.conclusion",
267
+ "equals": "failure"
268
+ },
269
+ {
270
+ "path": "trigger.payload.body.check_suite.conclusion",
271
+ "equals": "cancelled"
272
+ },
273
+ {
274
+ "path": "trigger.payload.body.check_suite.conclusion",
275
+ "equals": "skipped"
276
+ },
277
+ {
278
+ "path": "trigger.payload.body.check_suite.conclusion",
279
+ "equals": "neutral"
280
+ },
281
+ {
282
+ "path": "trigger.payload.body.check_suite.conclusion",
283
+ "equals": "timed_out"
284
+ },
285
+ {
286
+ "path": "trigger.payload.body.check_suite.conclusion",
287
+ "equals": "startup_failure"
288
+ },
289
+ {
290
+ "path": "trigger.payload.body.check_suite.conclusion",
291
+ "equals": "action_required"
292
+ },
293
+ {
294
+ "path": "trigger.payload.body.check_suite.conclusion",
295
+ "equals": "stale"
296
+ }
297
+ ],
298
+ "message": "A check suite whose conclusion the dev-loop contract does not know (or none yet): not reported."
299
+ }
300
+ ]
301
+ }
302
+ },
303
+ {
304
+ "id": "is-startup-failure",
305
+ "type": "condition",
306
+ "position": {
307
+ "x": 300,
308
+ "y": 480
309
+ },
310
+ "data": {
311
+ "label": "Concluded startup_failure",
312
+ "expression": "trigger.payload.body.check_suite.conclusion == \"startup_failure\""
313
+ }
314
+ },
315
+ {
316
+ "id": "fold-1",
317
+ "type": "select",
318
+ "position": {
319
+ "x": 300,
320
+ "y": 600
321
+ },
322
+ "data": {
323
+ "label": "startup_failure reads as failure",
324
+ "when": "{{steps.is-startup-failure.output.result}}",
325
+ "ifTrue": "failure",
326
+ "ifFalse": "{{trigger.payload.body.check_suite.conclusion}}"
327
+ }
328
+ },
329
+ {
330
+ "id": "is-action-required",
331
+ "type": "condition",
332
+ "position": {
333
+ "x": 300,
334
+ "y": 720
335
+ },
336
+ "data": {
337
+ "label": "Concluded action_required",
338
+ "expression": "trigger.payload.body.check_suite.conclusion == \"action_required\""
339
+ }
340
+ },
341
+ {
342
+ "id": "fold-2",
343
+ "type": "select",
344
+ "position": {
345
+ "x": 300,
346
+ "y": 840
347
+ },
348
+ "data": {
349
+ "label": "action_required reads as neutral",
350
+ "when": "{{steps.is-action-required.output.result}}",
351
+ "ifTrue": "neutral",
352
+ "ifFalse": "{{steps.fold-1.output.value}}"
353
+ }
354
+ },
355
+ {
356
+ "id": "is-stale",
357
+ "type": "condition",
358
+ "position": {
359
+ "x": 300,
360
+ "y": 960
361
+ },
362
+ "data": {
363
+ "label": "Concluded stale",
364
+ "expression": "trigger.payload.body.check_suite.conclusion == \"stale\""
365
+ }
366
+ },
367
+ {
368
+ "id": "fold-3",
369
+ "type": "select",
370
+ "position": {
371
+ "x": 300,
372
+ "y": 1080
373
+ },
374
+ "data": {
375
+ "label": "stale reads as cancelled",
376
+ "when": "{{steps.is-stale.output.result}}",
377
+ "ifTrue": "cancelled",
378
+ "ifFalse": "{{steps.fold-2.output.value}}"
379
+ }
380
+ },
381
+ {
382
+ "id": "ci-finished",
383
+ "type": "output",
384
+ "position": {
385
+ "x": 300,
386
+ "y": 1200
387
+ },
388
+ "data": {
389
+ "label": "Record ci.finished",
390
+ "outputType": "record_observation",
391
+ "config": {
392
+ "type": "ci.finished",
393
+ "subjectId": "{{trigger.payload.body.repository.full_name}}@{{trigger.payload.body.check_suite.head_sha}}",
394
+ "subjectType": "ci_run",
395
+ "occurredAt": "{{trigger.payload.body.check_suite.updated_at}}",
396
+ "data": {
397
+ "status": "{{steps.fold-3.output.value}}",
398
+ "sha": "{{trigger.payload.body.check_suite.head_sha}}",
399
+ "repo": "{{trigger.payload.body.repository.full_name}}",
400
+ "pr": "{{trigger.payload.body.check_suite.pull_requests[0].number}}",
401
+ "workflow": "{{trigger.payload.body.check_suite.app.name}}",
402
+ "branch": "{{trigger.payload.body.check_suite.head_branch}}",
403
+ "conclusion": "{{trigger.payload.body.check_suite.conclusion}}",
404
+ "source": "github-webhook"
405
+ }
406
+ }
407
+ }
408
+ }
409
+ ],
410
+ "edges": [
411
+ {
412
+ "id": "t--route",
413
+ "source": "t",
414
+ "target": "route"
415
+ },
416
+ {
417
+ "id": "route--into-default",
418
+ "source": "route",
419
+ "target": "into-default",
420
+ "sourceHandle": "pull_request"
421
+ },
422
+ {
423
+ "id": "into-default--pr-action",
424
+ "source": "into-default",
425
+ "target": "pr-action"
426
+ },
427
+ {
428
+ "id": "pr-action--pr-opened",
429
+ "source": "pr-action",
430
+ "target": "pr-opened",
431
+ "sourceHandle": "opened:false"
432
+ },
433
+ {
434
+ "id": "pr-action--pr-reopened",
435
+ "source": "pr-action",
436
+ "target": "pr-reopened",
437
+ "sourceHandle": "reopened:false"
438
+ },
439
+ {
440
+ "id": "pr-action--pr-merged",
441
+ "source": "pr-action",
442
+ "target": "pr-merged",
443
+ "sourceHandle": "closed:true"
444
+ },
445
+ {
446
+ "id": "pr-action--pr-closed",
447
+ "source": "pr-action",
448
+ "target": "pr-closed",
449
+ "sourceHandle": "closed:false"
450
+ },
451
+ {
452
+ "id": "route--cs-action",
453
+ "source": "route",
454
+ "target": "cs-action",
455
+ "sourceHandle": "check_suite"
456
+ },
457
+ {
458
+ "id": "cs-action--known-conclusion",
459
+ "source": "cs-action",
460
+ "target": "known-conclusion",
461
+ "sourceHandle": "completed"
462
+ },
463
+ {
464
+ "id": "known-conclusion--is-startup-failure",
465
+ "source": "known-conclusion",
466
+ "target": "is-startup-failure"
467
+ },
468
+ {
469
+ "id": "is-startup-failure--fold-1",
470
+ "source": "is-startup-failure",
471
+ "target": "fold-1"
472
+ },
473
+ {
474
+ "id": "fold-1--is-action-required",
475
+ "source": "fold-1",
476
+ "target": "is-action-required"
477
+ },
478
+ {
479
+ "id": "is-action-required--fold-2",
480
+ "source": "is-action-required",
481
+ "target": "fold-2"
482
+ },
483
+ {
484
+ "id": "fold-2--is-stale",
485
+ "source": "fold-2",
486
+ "target": "is-stale"
487
+ },
488
+ {
489
+ "id": "is-stale--fold-3",
490
+ "source": "is-stale",
491
+ "target": "fold-3"
492
+ },
493
+ {
494
+ "id": "fold-3--ci-finished",
495
+ "source": "fold-3",
496
+ "target": "ci-finished"
497
+ }
498
+ ]
499
+ },
500
+ "metadata": {
501
+ "staged": "STAGED (no catalog header, so never published): it uses the record_observation output verb (Synap-core/backend#325) and the webhookSource binding (Synap-core/backend#327), neither merged yet, and the catalog flow vocabulary (src/validate-flow.ts, bound to backend main by validate-flow.drift.test.ts) does not know record_observation. Once both merge: add record_observation to src/validate-flow.ts and a github-pr-events.catalog.json header beside this file.",
502
+ "mapping": "Ported from Synap-core/backend scripts/pod-observation.mjs (#281): opened/reopened \u2192 dev.pr_opened, closed+merged \u2192 dev.pr_merged (sha = merge commit), closed \u2192 dev.pr_closed; intoDefault = base.ref == repository.default_branch; a check suite's conclusion folds startup_failure \u2192 failure, action_required \u2192 neutral, stale \u2192 cancelled, and any other conclusion is not reported (the guard). Optional fields that resolve to null are left out by the step (contract: absent, never null). The session is resolved by the pod from the PR body's Pod session line (record-observation's resolver), so no field carries it.",
503
+ "sender": "A person creates the inbound webhook source named GitHub in the install space (pod-admin, space Connections, Webhook sources): the install binds to it by name, in either order. GitHub org webhook: Payload URL = that source's URL, Content type application/json, Secret = the source's secret (shown once; Replace secret shows a new one), events: Pull requests + Check suites."
504
+ }
505
+ }
@@ -0,0 +1,86 @@
1
+ {
2
+ "name": "Mail feed → Discord (AI-triaged)",
3
+ "triggerType": "cron",
4
+ "status": "draft",
5
+ "triggerConfig": { "expression": "0 */2 * * *" },
6
+ "flowDefinition": {
7
+ "nodes": [
8
+ {
9
+ "id": "trigger",
10
+ "type": "trigger",
11
+ "position": { "x": 0, "y": 0 },
12
+ "data": {
13
+ "triggerType": "cron",
14
+ "label": "Every 2 hours",
15
+ "config": { "expression": "0 */2 * * *" }
16
+ }
17
+ },
18
+ {
19
+ "id": "fetch-mail",
20
+ "type": "capability",
21
+ "position": { "x": 0, "y": 120 },
22
+ "data": {
23
+ "label": "Search Gmail (source verb)",
24
+ "verbId": "gmail_search",
25
+ "inputMapping": { "query": "newer_than:2d", "maxResults": "25" },
26
+ "connectionSelector": { "connectionId": "" }
27
+ }
28
+ },
29
+ {
30
+ "id": "triage",
31
+ "type": "capability",
32
+ "position": { "x": 0, "y": 240 },
33
+ "data": {
34
+ "label": "AI triage (batch classifier verb)",
35
+ "verbId": "ai.triage",
36
+ "inputMapping": { "emails": "{{steps.fetch-mail.output.results}}" }
37
+ }
38
+ },
39
+ {
40
+ "id": "relevant-loop",
41
+ "type": "loop",
42
+ "position": { "x": 0, "y": 360 },
43
+ "data": {
44
+ "label": "For each relevant email",
45
+ "iteratorExpression": "steps.triage.output.results",
46
+ "itemVariable": "email"
47
+ }
48
+ },
49
+ {
50
+ "id": "post-to-feed",
51
+ "type": "output",
52
+ "position": { "x": 0, "y": 480 },
53
+ "data": {
54
+ "label": "Post to the Discord-bound feed channel",
55
+ "outputType": "channel_message",
56
+ "config": {
57
+ "channelId": "<discord-bound team feed channel id>",
58
+ "content": "**{{loop.item.subject}}** — _{{loop.item.category}}_\n{{loop.item.summary}}",
59
+ "channelType": "proactive",
60
+ "metadata": {
61
+ "proactiveType": "mail-feed",
62
+ "gmailId": "{{loop.item.id}}"
63
+ }
64
+ }
65
+ }
66
+ }
67
+ ],
68
+ "edges": [
69
+ { "id": "e1", "source": "trigger", "target": "fetch-mail" },
70
+ { "id": "e2", "source": "fetch-mail", "target": "triage" },
71
+ { "id": "e3", "source": "triage", "target": "relevant-loop" },
72
+ { "id": "e4", "source": "relevant-loop", "target": "post-to-feed" }
73
+ ]
74
+ },
75
+ "metadata": {
76
+ "source": "feed-template",
77
+ "purpose": "CANONICAL example of the North Star: a FEED is an AUTOMATION that composes capability verbs. Cron → gmail_search (source verb) → AI triage (classifier verb) → loop → post relevant items to a Discord-bound feed channel. Replaces the bespoke run-mail-feed.ts worker with pure config.",
78
+ "prerequisites": [
79
+ "Wave 1 (SHIPPED): the `capability` node dispatches gmail_search (declarative) + any verb through executeCapability.",
80
+ "verb `ai.triage`: a batch email classifier verb must be seeded (today this is the mail_triage IS route; roadmap folds it into a verb). Until then, swap the triage node for a `command` node (IS task) or point verbId at the seeded classifier.",
81
+ "a connected Google account (nango-google) + set connectionSelector.connectionId to pin the mailbox.",
82
+ "a Discord-bound `branchPurpose:'team'` feed channel — put its id in the post node (or use channelType:'proactive' for the user's feed).",
83
+ "PER-ITEM filtering/AI inside the loop needs automation Wave 2 (loop body currently allows `output` only — this template does BATCH triage OUTSIDE the loop and posts via an `output.channel_message` node INSIDE the loop, which IS loop-allowed today)."
84
+ ]
85
+ }
86
+ }