@hailer/mcp 1.1.16 → 1.1.17-beta.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 (313) hide show
  1. package/.claude/CLAUDE.md +117 -320
  2. package/.claude/commands/app-squad.md +86 -90
  3. package/.claude/commands/audit-squad.md +19 -19
  4. package/.claude/commands/autoplan.md +3 -3
  5. package/.claude/commands/cleanup-squad.md +16 -16
  6. package/.claude/commands/config-squad.md +30 -30
  7. package/.claude/commands/crud-squad.md +23 -23
  8. package/.claude/commands/data-squad.md +21 -21
  9. package/.claude/commands/debug-squad.md +44 -44
  10. package/.claude/commands/doc-squad.md +16 -16
  11. package/.claude/commands/help:agents.md +130 -99
  12. package/.claude/commands/help:commands.md +15 -15
  13. package/.claude/commands/help:faq.md +17 -17
  14. package/.claude/commands/help:plugins.md +1 -1
  15. package/.claude/commands/help:skills.md +18 -24
  16. package/.claude/commands/hotfix-squad.md +22 -22
  17. package/.claude/commands/integration-squad.md +22 -22
  18. package/.claude/commands/janitor-squad.md +31 -31
  19. package/.claude/commands/learn-auto.md +5 -5
  20. package/.claude/commands/learn.md +12 -20
  21. package/.claude/commands/onboard-squad.md +39 -49
  22. package/.claude/commands/plan-workspace.md +2 -2
  23. package/.claude/commands/publish.md +32 -37
  24. package/.claude/commands/review-squad.md +27 -27
  25. package/.claude/commands/stats.md +26 -12
  26. package/.claude/commands/swarm.md +25 -25
  27. package/.claude/skills/chrome-mcp-reference/SKILL.md +5 -0
  28. package/.claude/skills/hailer-api-client/SKILL.md +55 -16
  29. package/.claude/skills/hailer-app-builder/SKILL.md +4 -270
  30. package/.claude/skills/hailer-apps-pictures/SKILL.md +3 -3
  31. package/.claude/skills/hailer-design-system/SKILL.md +96 -4
  32. package/.claude/skills/hailer-monolith-automations/SKILL.md +138 -116
  33. package/.claude/skills/hailer-permissions-system/SKILL.md +6 -9
  34. package/.claude/skills/hailer-project-protocol/SKILL.md +20 -110
  35. package/.claude/skills/integration-patterns/SKILL.md +6 -6
  36. package/.claude/skills/lsp-setup/SKILL.md +8 -9
  37. package/.claude/skills/sdk-activity-patterns/SKILL.md +238 -0
  38. package/.claude/skills/{SDK-document-templates → sdk-document-templates}/SKILL.md +13 -340
  39. package/.claude/skills/{SDK-function-fields → sdk-function-fields}/SKILL.md +8 -40
  40. package/.claude/skills/{SDK-insight-queries → sdk-insight-queries}/SKILL.md +114 -392
  41. package/.claude/skills/{SDK-ws-config-skill → sdk-ws-config-skill}/SKILL.md +79 -310
  42. package/.claude/skills/zapier-hailer-patterns/SKILL.md +84 -361
  43. package/.opencode/package-lock.json +117 -0
  44. package/CLAUDE.md +5 -358
  45. package/dist/app.d.ts.map +1 -1
  46. package/dist/app.js +10 -127
  47. package/dist/app.js.map +1 -1
  48. package/dist/bot/bot-manager.d.ts +3 -14
  49. package/dist/bot/bot-manager.d.ts.map +1 -1
  50. package/dist/bot/bot-manager.js +13 -4
  51. package/dist/bot/bot-manager.js.map +1 -1
  52. package/dist/bot/bot.d.ts +23 -102
  53. package/dist/bot/bot.d.ts.map +1 -1
  54. package/dist/bot/bot.js +356 -1212
  55. package/dist/bot/bot.js.map +1 -1
  56. package/dist/bot/services/bot-permissions.d.ts +50 -0
  57. package/dist/bot/services/bot-permissions.d.ts.map +1 -0
  58. package/dist/bot/services/bot-permissions.js +198 -0
  59. package/dist/bot/services/bot-permissions.js.map +1 -0
  60. package/dist/bot/services/index.d.ts +4 -2
  61. package/dist/bot/services/index.d.ts.map +1 -1
  62. package/dist/bot/services/index.js +10 -5
  63. package/dist/bot/services/index.js.map +1 -1
  64. package/dist/bot/services/message-classifier.d.ts +1 -1
  65. package/dist/bot/services/message-classifier.d.ts.map +1 -1
  66. package/dist/bot/services/message-classifier.js.map +1 -1
  67. package/dist/bot/services/signal-router.d.ts +32 -0
  68. package/dist/bot/services/signal-router.d.ts.map +1 -0
  69. package/dist/bot/services/signal-router.js +132 -0
  70. package/dist/bot/services/signal-router.js.map +1 -0
  71. package/dist/bot/services/system-prompt.d.ts +12 -0
  72. package/dist/bot/services/system-prompt.d.ts.map +1 -0
  73. package/dist/bot/services/system-prompt.js +93 -0
  74. package/dist/bot/services/system-prompt.js.map +1 -0
  75. package/dist/bot/services/types.d.ts +7 -34
  76. package/dist/bot/services/types.d.ts.map +1 -1
  77. package/dist/bot/services/types.js +0 -3
  78. package/dist/bot/services/types.js.map +1 -1
  79. package/dist/bot/services/workspace-refresh.d.ts +47 -0
  80. package/dist/bot/services/workspace-refresh.d.ts.map +1 -0
  81. package/dist/bot/services/workspace-refresh.js +154 -0
  82. package/dist/bot/services/workspace-refresh.js.map +1 -0
  83. package/dist/bot-config/constants.d.ts +0 -36
  84. package/dist/bot-config/constants.d.ts.map +1 -1
  85. package/dist/bot-config/constants.js +1 -76
  86. package/dist/bot-config/constants.js.map +1 -1
  87. package/dist/bot-config/context.d.ts +2 -42
  88. package/dist/bot-config/context.d.ts.map +1 -1
  89. package/dist/bot-config/context.js +13 -134
  90. package/dist/bot-config/context.js.map +1 -1
  91. package/dist/bot-config/index.d.ts +6 -15
  92. package/dist/bot-config/index.d.ts.map +1 -1
  93. package/dist/bot-config/index.js +5 -80
  94. package/dist/bot-config/index.js.map +1 -1
  95. package/dist/bot-config/loader.d.ts +16 -4
  96. package/dist/bot-config/loader.d.ts.map +1 -1
  97. package/dist/bot-config/loader.js +187 -96
  98. package/dist/bot-config/loader.js.map +1 -1
  99. package/dist/bot-config/persistence.d.ts +1 -52
  100. package/dist/bot-config/persistence.d.ts.map +1 -1
  101. package/dist/bot-config/persistence.js +3 -213
  102. package/dist/bot-config/persistence.js.map +1 -1
  103. package/dist/bot-config/state.d.ts +0 -41
  104. package/dist/bot-config/state.d.ts.map +1 -1
  105. package/dist/bot-config/state.js +0 -151
  106. package/dist/bot-config/state.js.map +1 -1
  107. package/dist/bot-config/tools.d.ts +1 -1
  108. package/dist/bot-config/tools.js +27 -27
  109. package/dist/bot-config/tools.js.map +1 -1
  110. package/dist/bot-config/types.d.ts +39 -32
  111. package/dist/bot-config/types.d.ts.map +1 -1
  112. package/dist/bot-config/types.js +0 -3
  113. package/dist/bot-config/types.js.map +1 -1
  114. package/dist/bot-config/webhooks.d.ts +0 -4
  115. package/dist/bot-config/webhooks.d.ts.map +1 -1
  116. package/dist/bot-config/webhooks.js +0 -13
  117. package/dist/bot-config/webhooks.js.map +1 -1
  118. package/dist/commands/seed-config.js +16 -31
  119. package/dist/commands/seed-config.js.map +1 -1
  120. package/dist/config.d.ts +0 -9
  121. package/dist/config.d.ts.map +1 -1
  122. package/dist/config.js +0 -15
  123. package/dist/config.js.map +1 -1
  124. package/dist/mcp/hailer-clients.js +2 -2
  125. package/dist/mcp/hailer-clients.js.map +1 -1
  126. package/dist/mcp/tool-registry.d.ts +10 -115
  127. package/dist/mcp/tool-registry.d.ts.map +1 -1
  128. package/dist/mcp/tool-registry.js +39 -363
  129. package/dist/mcp/tool-registry.js.map +1 -1
  130. package/dist/mcp/tools/activity.d.ts +3 -0
  131. package/dist/mcp/tools/activity.d.ts.map +1 -1
  132. package/dist/mcp/tools/activity.js +8 -1
  133. package/dist/mcp/tools/activity.js.map +1 -1
  134. package/dist/mcp/tools/app-core.d.ts +3 -0
  135. package/dist/mcp/tools/app-core.d.ts.map +1 -1
  136. package/dist/mcp/tools/app-core.js +9 -2
  137. package/dist/mcp/tools/app-core.js.map +1 -1
  138. package/dist/mcp/tools/app-marketplace.d.ts +3 -0
  139. package/dist/mcp/tools/app-marketplace.d.ts.map +1 -1
  140. package/dist/mcp/tools/app-marketplace.js +13 -1
  141. package/dist/mcp/tools/app-marketplace.js.map +1 -1
  142. package/dist/mcp/tools/app-member.d.ts +3 -0
  143. package/dist/mcp/tools/app-member.d.ts.map +1 -1
  144. package/dist/mcp/tools/app-member.js +6 -1
  145. package/dist/mcp/tools/app-member.js.map +1 -1
  146. package/dist/mcp/tools/app-scaffold.d.ts +3 -0
  147. package/dist/mcp/tools/app-scaffold.d.ts.map +1 -1
  148. package/dist/mcp/tools/app-scaffold.js +15 -11
  149. package/dist/mcp/tools/app-scaffold.js.map +1 -1
  150. package/dist/mcp/tools/company.d.ts +3 -0
  151. package/dist/mcp/tools/company.d.ts.map +1 -1
  152. package/dist/mcp/tools/company.js +5 -1
  153. package/dist/mcp/tools/company.js.map +1 -1
  154. package/dist/mcp/tools/discussion.d.ts +3 -0
  155. package/dist/mcp/tools/discussion.d.ts.map +1 -1
  156. package/dist/mcp/tools/discussion.js +13 -2
  157. package/dist/mcp/tools/discussion.js.map +1 -1
  158. package/dist/mcp/tools/file.d.ts +3 -0
  159. package/dist/mcp/tools/file.d.ts.map +1 -1
  160. package/dist/mcp/tools/file.js +6 -1
  161. package/dist/mcp/tools/file.js.map +1 -1
  162. package/dist/mcp/tools/index.d.ts +7 -0
  163. package/dist/mcp/tools/index.d.ts.map +1 -0
  164. package/dist/mcp/tools/index.js +34 -0
  165. package/dist/mcp/tools/index.js.map +1 -0
  166. package/dist/mcp/tools/insight.d.ts +3 -0
  167. package/dist/mcp/tools/insight.d.ts.map +1 -1
  168. package/dist/mcp/tools/insight.js +18 -8
  169. package/dist/mcp/tools/insight.js.map +1 -1
  170. package/dist/mcp/tools/user.d.ts +3 -0
  171. package/dist/mcp/tools/user.d.ts.map +1 -1
  172. package/dist/mcp/tools/user.js +6 -1
  173. package/dist/mcp/tools/user.js.map +1 -1
  174. package/dist/mcp/tools/workflow-permissions.d.ts +3 -0
  175. package/dist/mcp/tools/workflow-permissions.d.ts.map +1 -1
  176. package/dist/mcp/tools/workflow-permissions.js +8 -1
  177. package/dist/mcp/tools/workflow-permissions.js.map +1 -1
  178. package/dist/mcp/tools/workflow.d.ts +3 -0
  179. package/dist/mcp/tools/workflow.d.ts.map +1 -1
  180. package/dist/mcp/tools/workflow.js +29 -28
  181. package/dist/mcp/tools/workflow.js.map +1 -1
  182. package/dist/mcp/utils/index.d.ts +4 -11
  183. package/dist/mcp/utils/index.d.ts.map +1 -1
  184. package/dist/mcp/utils/index.js +5 -36
  185. package/dist/mcp/utils/index.js.map +1 -1
  186. package/dist/mcp/utils/role-utils.d.ts +0 -32
  187. package/dist/mcp/utils/role-utils.d.ts.map +1 -1
  188. package/dist/mcp/utils/role-utils.js +0 -73
  189. package/dist/mcp/utils/role-utils.js.map +1 -1
  190. package/dist/mcp/utils/tool-helpers.d.ts +0 -25
  191. package/dist/mcp/utils/tool-helpers.d.ts.map +1 -1
  192. package/dist/mcp/utils/tool-helpers.js +0 -34
  193. package/dist/mcp/utils/tool-helpers.js.map +1 -1
  194. package/dist/mcp/webhook-handler.d.ts +4 -34
  195. package/dist/mcp/webhook-handler.d.ts.map +1 -1
  196. package/dist/mcp/webhook-handler.js +57 -74
  197. package/dist/mcp/webhook-handler.js.map +1 -1
  198. package/dist/mcp-server.d.ts.map +1 -1
  199. package/dist/mcp-server.js +3 -78
  200. package/dist/mcp-server.js.map +1 -1
  201. package/package.json +1 -2
  202. package/.claude/agents/agent-ada-skill-builder.md +0 -94
  203. package/.claude/agents/agent-alejandro-function-fields.md +0 -342
  204. package/.claude/agents/agent-bjorn-config-audit.md +0 -103
  205. package/.claude/agents/agent-builder-agent-creator.md +0 -130
  206. package/.claude/agents/agent-code-simplifier.md +0 -53
  207. package/.claude/agents/agent-dmitri-activity-crud.md +0 -159
  208. package/.claude/agents/agent-giuseppe-app-builder.md +0 -208
  209. package/.claude/agents/agent-gunther-mcp-tools.md +0 -39
  210. package/.claude/agents/agent-helga-workflow-config.md +0 -204
  211. package/.claude/agents/agent-igor-activity-mover-automation.md +0 -125
  212. package/.claude/agents/agent-ingrid-doc-templates.md +0 -261
  213. package/.claude/agents/agent-ivan-monolith.md +0 -154
  214. package/.claude/agents/agent-kenji-data-reader.md +0 -86
  215. package/.claude/agents/agent-lars-code-inspector.md +0 -102
  216. package/.claude/agents/agent-marco-mockup-builder.md +0 -110
  217. package/.claude/agents/agent-marcus-api-documenter.md +0 -323
  218. package/.claude/agents/agent-marketplace-publisher.md +0 -280
  219. package/.claude/agents/agent-marketplace-reviewer.md +0 -309
  220. package/.claude/agents/agent-permissions-handler.md +0 -208
  221. package/.claude/agents/agent-simple-writer.md +0 -48
  222. package/.claude/agents/agent-svetlana-code-review.md +0 -171
  223. package/.claude/agents/agent-tanya-test-runner.md +0 -333
  224. package/.claude/agents/agent-ui-designer.md +0 -100
  225. package/.claude/agents/agent-viktor-sql-insights.md +0 -212
  226. package/.claude/agents/agent-web-search.md +0 -55
  227. package/.claude/agents/agent-yevgeni-discussions.md +0 -45
  228. package/.claude/agents/agent-zara-zapier.md +0 -159
  229. package/.claude/skills/SDK-activity-patterns/SKILL.md +0 -428
  230. package/.claude/skills/SDK-generate-skill/SKILL.md +0 -92
  231. package/.claude/skills/SDK-init-skill/SKILL.md +0 -127
  232. package/.claude/skills/agent-structure/SKILL.md +0 -98
  233. package/.claude/skills/delegation-routing/SKILL.md +0 -202
  234. package/.claude/skills/frontend-design/SKILL.md +0 -254
  235. package/.claude/skills/hailer-activity-mover/SKILL.md +0 -213
  236. package/.claude/skills/hailer-rest-api/SKILL.md +0 -61
  237. package/.claude/skills/hailer-rest-api/hailer-activities.md +0 -184
  238. package/.claude/skills/hailer-rest-api/hailer-admin.md +0 -473
  239. package/.claude/skills/hailer-rest-api/hailer-calendar.md +0 -256
  240. package/.claude/skills/hailer-rest-api/hailer-feed.md +0 -249
  241. package/.claude/skills/hailer-rest-api/hailer-insights.md +0 -195
  242. package/.claude/skills/hailer-rest-api/hailer-messaging.md +0 -276
  243. package/.claude/skills/hailer-rest-api/hailer-workflows.md +0 -283
  244. package/.claude/skills/insight-join-patterns/SKILL.md +0 -174
  245. package/.claude/skills/json-only-output/SKILL.md +0 -72
  246. package/.claude/skills/mcp-direct-tools/SKILL.md +0 -153
  247. package/.claude/skills/optional-parameters/SKILL.md +0 -72
  248. package/.claude/skills/tool-parameter-usage/SKILL.md +0 -126
  249. package/.claude/skills/tool-response-verification/SKILL.md +0 -92
  250. package/.opencode/agent/agent-ada-skill-builder.md +0 -35
  251. package/.opencode/agent/agent-alejandro-function-fields.md +0 -39
  252. package/.opencode/agent/agent-bjorn-config-audit.md +0 -36
  253. package/.opencode/agent/agent-builder-agent-creator.md +0 -39
  254. package/.opencode/agent/agent-code-simplifier.md +0 -31
  255. package/.opencode/agent/agent-dmitri-activity-crud.md +0 -40
  256. package/.opencode/agent/agent-giuseppe-app-builder.md +0 -37
  257. package/.opencode/agent/agent-gunther-mcp-tools.md +0 -39
  258. package/.opencode/agent/agent-helga-workflow-config.md +0 -204
  259. package/.opencode/agent/agent-igor-activity-mover-automation.md +0 -46
  260. package/.opencode/agent/agent-ingrid-doc-templates.md +0 -39
  261. package/.opencode/agent/agent-ivan-monolith.md +0 -46
  262. package/.opencode/agent/agent-kenji-data-reader.md +0 -53
  263. package/.opencode/agent/agent-lars-code-inspector.md +0 -28
  264. package/.opencode/agent/agent-marco-mockup-builder.md +0 -42
  265. package/.opencode/agent/agent-marcus-api-documenter.md +0 -53
  266. package/.opencode/agent/agent-marketplace-publisher.md +0 -44
  267. package/.opencode/agent/agent-marketplace-reviewer.md +0 -42
  268. package/.opencode/agent/agent-permissions-handler.md +0 -50
  269. package/.opencode/agent/agent-simple-writer.md +0 -45
  270. package/.opencode/agent/agent-svetlana-code-review.md +0 -39
  271. package/.opencode/agent/agent-tanya-test-runner.md +0 -57
  272. package/.opencode/agent/agent-ui-designer.md +0 -56
  273. package/.opencode/agent/agent-viktor-sql-insights.md +0 -34
  274. package/.opencode/agent/agent-web-search.md +0 -42
  275. package/.opencode/agent/agent-yevgeni-discussions.md +0 -37
  276. package/.opencode/agent/agent-zara-zapier.md +0 -53
  277. package/.opencode/commands/app-squad.md +0 -135
  278. package/.opencode/commands/audit-squad.md +0 -158
  279. package/.opencode/commands/autoplan.md +0 -563
  280. package/.opencode/commands/cleanup-squad.md +0 -98
  281. package/.opencode/commands/config-squad.md +0 -106
  282. package/.opencode/commands/crud-squad.md +0 -87
  283. package/.opencode/commands/data-squad.md +0 -97
  284. package/.opencode/commands/debug-squad.md +0 -303
  285. package/.opencode/commands/doc-squad.md +0 -65
  286. package/.opencode/commands/handoff.md +0 -137
  287. package/.opencode/commands/health.md +0 -49
  288. package/.opencode/commands/help-agents.md +0 -151
  289. package/.opencode/commands/help-commands.md +0 -32
  290. package/.opencode/commands/help-faq.md +0 -29
  291. package/.opencode/commands/help-plugins.md +0 -28
  292. package/.opencode/commands/help-skills.md +0 -7
  293. package/.opencode/commands/help-tools.md +0 -40
  294. package/.opencode/commands/help.md +0 -28
  295. package/.opencode/commands/hotfix-squad.md +0 -112
  296. package/.opencode/commands/integration-squad.md +0 -82
  297. package/.opencode/commands/janitor-squad.md +0 -167
  298. package/.opencode/commands/learn-auto.md +0 -120
  299. package/.opencode/commands/learn.md +0 -120
  300. package/.opencode/commands/mcp-list.md +0 -27
  301. package/.opencode/commands/onboard-squad.md +0 -140
  302. package/.opencode/commands/plan-workspace.md +0 -732
  303. package/.opencode/commands/prd.md +0 -131
  304. package/.opencode/commands/project-status.md +0 -82
  305. package/.opencode/commands/publish.md +0 -138
  306. package/.opencode/commands/recap.md +0 -69
  307. package/.opencode/commands/restore.md +0 -64
  308. package/.opencode/commands/review-squad.md +0 -152
  309. package/.opencode/commands/save.md +0 -24
  310. package/.opencode/commands/stats.md +0 -19
  311. package/.opencode/commands/swarm.md +0 -210
  312. package/.opencode/commands/tool-builder.md +0 -39
  313. package/.opencode/commands/ws-pull.md +0 -44
@@ -1,8 +1,8 @@
1
1
  ---
2
2
  name: hailer-monolith-automations
3
- description: Understanding and building automations in the Hailer project-monolith
4
- version: 1.2.0
5
- triggers: monolith, automation, scheduled task, webhook automation, invoicing, data sync
3
+ description: Understanding and building automations in the Hailer project-monolith, including activity mover phase cascade bots
4
+ version: 1.4.0
5
+ triggers: monolith, automation, scheduled task, webhook automation, invoicing, data sync, activity mover, phase cascade, linked activities
6
6
  ---
7
7
 
8
8
  # Hailer Monolith Automations
@@ -175,27 +175,6 @@ Sync data between Hailer and external systems.
175
175
 
176
176
  ## Common Patterns
177
177
 
178
- ### Config from AWS Secrets Manager
179
-
180
- ```typescript
181
- import { fetchConfig } from './fetch-secrets';
182
-
183
- // Config name matches AWS secret: "monolith-{name}"
184
- const config = await fetchConfig('monolith-my-automation');
185
-
186
- // Config structure example
187
- interface AutomationConfig {
188
- credentials: {
189
- email: string;
190
- password: string;
191
- };
192
- triggerProcessId: string;
193
- targetProcessId: string;
194
- fieldMappings: Record<string, string>;
195
- // ... custom config
196
- }
197
- ```
198
-
199
178
  ### Hailer Client Connection
200
179
 
201
180
  ```typescript
@@ -215,26 +194,6 @@ const client = await Client.create({
215
194
  client.disconnect();
216
195
  ```
217
196
 
218
- ### Activity Operations
219
-
220
- ```typescript
221
- // List activities
222
- const { activities } = await client.request('v3.activity.list', [
223
- { processId: workflowId, phaseId: phaseId },
224
- { limit: 1000, filters: { status: { equalTo: 'Active' } }, returnFlat: true }
225
- ]);
226
-
227
- // Create activities
228
- const created = await client.request('v3.activity.createMany', [
229
- { processId: workflowId, phaseId: phaseId, name: 'New Activity', fields: { fieldId: value } }
230
- ]);
231
-
232
- // Update activities
233
- const updated = await client.request('v3.activity.updateMany', [
234
- { _id: activityId, fields: { fieldId: newValue }, phaseId: newPhaseId }
235
- ]);
236
- ```
237
-
238
197
  ### Structured Logging
239
198
 
240
199
  ```typescript
@@ -281,29 +240,6 @@ router.post('/my-automation', jsonParser, async (req, res) => {
281
240
 
282
241
  ---
283
242
 
284
- ## File Structure
285
-
286
- ```
287
- project-monolith/
288
- ├── src/
289
- │ ├── run.ts # Express server, all endpoints
290
- │ ├── schedules.ts # All scheduled jobs
291
- │ ├── fetch-secrets.ts # AWS Secrets Manager
292
- │ ├── logger.ts # Winston logger
293
- │ ├── types.ts # Common types
294
- │ ├── utils/
295
- │ │ └── hailer-utils.ts # Helper functions
296
- │ └── automations/
297
- │ ├── generic-handle-activities.ts # Reusable CRUD
298
- │ ├── netvisor/ # Netvisor integrations
299
- │ ├── procountor/ # Procountor integrations
300
- │ ├── hailer/ # Hailer-internal automations
301
- │ └── {customer}/ # Customer-specific automations
302
- └── package.json
303
- ```
304
-
305
- ---
306
-
307
243
  ## When to Use Monolith vs Other Options
308
244
 
309
245
  | Scenario | Solution |
@@ -311,7 +247,7 @@ project-monolith/
311
247
  | Simple webhook trigger → Hailer CRUD | **Monolith** |
312
248
  | Scheduled data sync | **Monolith** |
313
249
  | Accounting integration (Netvisor, Procountor) | **Monolith** (existing code) |
314
- | Real-time activity sync | **activity-mover** |
250
+ | Phase cascade (move linked activities) | **Monolith activity-mover** (see Activity Mover Service section) |
315
251
  | SCIM user provisioning | **microsoft-entra** |
316
252
  | Kafka event processing | **digione-integration** |
317
253
  | Complex stateful integration | **Dedicated microservice** |
@@ -448,38 +384,6 @@ In Hailer admin:
448
384
 
449
385
  ---
450
386
 
451
- ## Existing Automation Categories
452
-
453
- ### Invoicing Automations
454
- - `hailer-invoicing-subscription-v2` - Scheduled subscription billing
455
- - `hailer-invoicing-billable-work` - Bill tracked time/expenses
456
- - `hailer-invoicing-project-won` - Invoice on project completion
457
- - `3pl-invoicing-v2` - 3PL storage billing
458
- - `kspt-invoicing-v2-webhook` - KSPT rental invoicing
459
-
460
- ### Data Sync Automations
461
- - `netvisor-integration` - Netvisor ↔ Hailer sync
462
- - `procountor-integration-main` - Procountor invoicing
463
- - `severa-integration` - Severa project sync
464
- - `fin-forelia-*` - Forelia logistics/forestry
465
-
466
- ### Activity Management
467
- - `generic-handle-activities` - Reusable create/update
468
- - `activity-archiver` - Archive old activities
469
- - `porvoo-archive` - City-specific archiving
470
-
471
- ### Notifications & Alarms
472
- - `porvoo-alarms` - Status checks and alerts
473
- - `porvoo-notifications` - Send notification messages
474
- - `3pl-saldo-alarms` - Inventory level alerts
475
-
476
- ### HR/Employee Automations
477
- - `siskon-siivous-intu-*` - INTU HR sync
478
- - `pohjaset-employee-task-automation` - Onboarding tasks
479
- - `siskon-siivous-synttarionnittelut` - Birthday greetings
480
-
481
- ---
482
-
483
387
  ## Built-in Automation Reference
484
388
 
485
389
  These are reusable, config-driven automations already in the monolith.
@@ -597,22 +501,6 @@ Webhook-based endpoints for bulk creating/updating activities via function field
597
501
  }
598
502
  ```
599
503
 
600
- **Field Payload Format:**
601
-
602
- For `/create-activities`:
603
- ```json
604
- [
605
- { "name": "New Activity", "fields": { "amount": 100 } }
606
- ]
607
- ```
608
-
609
- For `/update-activities`:
610
- ```json
611
- [
612
- { "_id": "activity-id", "fields": { "status": "completed" } }
613
- ]
614
- ```
615
-
616
504
  **CRITICAL: Double-Wrapped Array for Updates**
617
505
 
618
506
  The monolith generic handler spreads parsed JSON as arguments to `client.request()`. Function fields must output **double-wrapped array** `[[{_id, phaseId}, ...]]` so the first argument to `updateMany` is the array of updates.
@@ -672,6 +560,140 @@ return JSON.stringify([
672
560
 
673
561
  ---
674
562
 
563
+ ## Activity Mover Service
564
+
565
+ Configure automated phase cascade bots. When an activity moves to a trigger phase, the bot automatically moves linked activities to target phases.
566
+
567
+ **Example:** Invoice → "Invoiced" automatically moves Invoice Rows → "Archived"
568
+
569
+ **AWS Secret:** `activity-mover-{project}`
570
+
571
+ ---
572
+
573
+ ### Config Schema
574
+
575
+ ```typescript
576
+ interface Config {
577
+ project: string; // Hailer project identifier
578
+ email: string; // Integration user email
579
+ password: string; // Integration user password
580
+ logDiscussionId: string; // Discussion ID (not activity ID)
581
+ triggers: Trigger[];
582
+ }
583
+
584
+ interface Trigger {
585
+ processId: string; // Workflow that triggers automation
586
+ phaseId: string; // Phase that fires the trigger
587
+ metaDataId: string; // "Seen/Not seen" field ID
588
+ linkedProcesses: Process[];
589
+ }
590
+
591
+ interface Process {
592
+ processId: string; // Target workflow ID
593
+ fromPhaseIds: string[]; // Only move activities in these phases
594
+ toPhaseId: string; // Move to this phase
595
+ }
596
+ ```
597
+
598
+ One config supports multiple triggers and one trigger can cascade to multiple target workflows:
599
+
600
+ ```json
601
+ {
602
+ "project": "project-name",
603
+ "email": "activity-mover+project@hailer.com",
604
+ "password": "USER_PROVIDES_PASSWORD",
605
+ "logDiscussionId": "discussion-id",
606
+ "triggers": [
607
+ {
608
+ "processId": "trigger-workflow-id",
609
+ "phaseId": "trigger-phase-id",
610
+ "metaDataId": "seen-field-id",
611
+ "linkedProcesses": [
612
+ {
613
+ "processId": "target-workflow-id",
614
+ "fromPhaseIds": ["phase-1", "phase-2"],
615
+ "toPhaseId": "destination-phase"
616
+ }
617
+ ]
618
+ }
619
+ ]
620
+ }
621
+ ```
622
+
623
+ ---
624
+
625
+ ### Setup Steps
626
+
627
+ **Prerequisites:**
628
+ - Link field must exist connecting trigger → target workflows
629
+ - Integration user exists with edit permissions on all workflows
630
+ - Activity mover service running for the project
631
+
632
+ **Step 1: Gather IDs**
633
+
634
+ Get workflow, phase, and field IDs from `workspace/`.
635
+
636
+ **Step 2: Create MetaData Field**
637
+
638
+ Add a hidden "Activity Mover Status" field to the trigger workflow:
639
+
640
+ ```json
641
+ {
642
+ "id": "activityMoverStatus",
643
+ "label": "Activity Mover Status",
644
+ "type": "text",
645
+ "hidden": true,
646
+ "defaultValue": "Not seen"
647
+ }
648
+ ```
649
+
650
+ Push the workspace config after adding the field.
651
+
652
+ **Step 3: Create Logging Activity**
653
+
654
+ Create an activity in a suitable workflow for bot logging. Note the **discussion ID** from the response (not the activity ID) — this is `logDiscussionId`.
655
+
656
+ **Step 4: Generate Config JSON**
657
+
658
+ Output the complete config (schema above) for the user to deploy.
659
+
660
+ **Step 5: User Deploys**
661
+
662
+ User manually:
663
+ 1. Fills in the integration user password
664
+ 2. Uploads to AWS Secrets Manager as `activity-mover-{project}`
665
+
666
+ ---
667
+
668
+ ### Agent Output Format
669
+
670
+ ```json
671
+ {
672
+ "status": "success",
673
+ "result": {
674
+ "fields_created": ["activityMoverStatus"],
675
+ "logging_activity": "activity-id",
676
+ "logging_discussion": "discussion-id",
677
+ "config": { "...": "..." }
678
+ },
679
+ "summary": "Config ready - deploy to AWS",
680
+ "user_action": "Upload config to AWS Secrets Manager as activity-mover-{project}"
681
+ }
682
+ ```
683
+
684
+ ---
685
+
686
+ ### Troubleshooting
687
+
688
+ | Issue | Cause | Fix |
689
+ |-------|-------|-----|
690
+ | Activities not moving | Wrong phase IDs | Verify IDs from workspace/ |
691
+ | "Not seen" not updating | Wrong metaDataId | Check field ID |
692
+ | No log messages | Wrong discussionId | Use discussion ID, not activity ID |
693
+ | Permission denied | Integration user lacks access | Add to workflow permissions |
694
+
695
+ ---
696
+
675
697
  ## Reference
676
698
 
677
699
  **Location:** `~/hailer-integration/packages/project-monolith/`
@@ -13,9 +13,9 @@ Managing access to Hailer **apps** for users and teams.
13
13
  **This skill covers APP permissions only.**
14
14
 
15
15
  For other permission types, see:
16
- - **Workflow permissions** (who can access a workflow) → SDK-ws-config-skill, main.ts `members[]`
17
- - **Phase permissions** (field visibility, transitions) → SDK-ws-config-skill, phases.ts
18
- - **Team management** (create/edit teams) → SDK-ws-config-skill, teams.ts
16
+ - **Workflow permissions** (who can access a workflow) → sdk-ws-config-skill, main.ts `members[]`
17
+ - **Phase permissions** (field visibility, transitions) → sdk-ws-config-skill, phases.ts
18
+ - **Team management** (create/edit teams) → sdk-ws-config-skill, teams.ts
19
19
 
20
20
  App permissions = who can see/use an app in Hailer UI.
21
21
  Workflow permissions = who can see/edit activities in a workflow.
@@ -60,8 +60,7 @@ mcp__hailer__list_apps({})
60
60
  ```
61
61
  mcp__hailer__add_app_member({
62
62
  appId: "64a1b2c3d4e5f6a7b8c9d0e1",
63
- memberId: "user_64a1b2c3d4e5f6a7b8c9d0e2",
64
- memberType: "user"
63
+ member: "user_64a1b2c3d4e5f6a7b8c9d0e2"
65
64
  })
66
65
  ```
67
66
 
@@ -77,8 +76,7 @@ import { TeamIds } from './workspace/enums';
77
76
  ```
78
77
  mcp__hailer__add_app_member({
79
78
  appId: "64a1b2c3d4e5f6a7b8c9d0e1",
80
- memberId: TeamIds.sales_team,
81
- memberType: "team"
79
+ member: `team_${TeamIds.sales_team}`
82
80
  })
83
81
  ```
84
82
 
@@ -87,8 +85,7 @@ mcp__hailer__add_app_member({
87
85
  ```
88
86
  mcp__hailer__remove_app_member({
89
87
  appId: "64a1b2c3d4e5f6a7b8c9d0e1",
90
- memberId: "user_64a1b2c3d4e5f6a7b8c9d0e2",
91
- memberType: "user"
88
+ member: "user_64a1b2c3d4e5f6a7b8c9d0e2"
92
89
  })
93
90
  ```
94
91
 
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: hailer-project-protocol
3
3
  description: Complete Hailer project management workflow schemas, field definitions, and protocols for SDK projects
4
- version: 1.0.1
4
+ version: 1.1.0
5
5
  ---
6
6
 
7
7
  # Hailer Project Management Protocol
@@ -57,13 +57,9 @@ Every Hailer workspace uses project management workflows. Claude installs and ma
57
57
  | Technical Constraints | Long text | PRD: Performance, security, compatibility |
58
58
  | Out of Scope | Long text | PRD: What this feature does NOT include |
59
59
 
60
- ### Field Explanations
61
60
  - **Project**: Features use this to link UP to their parent Project
62
61
  - **Child Features**: Automatically shows Features that link to this Project
63
62
  - **Dev Tasks**: Automatically shows Tasks/Bugs that link to this Feature
64
- - **Documentation**: How it works, usage instructions, user-facing docs
65
- - **Technical Notes**: Architecture decisions, implementation details
66
- - **User Stories/Acceptance Criteria/Technical Constraints/Out of Scope**: PRD fields for requirements
67
63
 
68
64
  ---
69
65
 
@@ -94,43 +90,10 @@ Every Hailer workspace uses project management workflows. Claude installs and ma
94
90
  | Files Modified | Text | - |
95
91
  | Commits | Text | - |
96
92
 
97
- ### Field Explanations
98
93
  - **Feature**: Links UP to parent Feature in Project Planning
99
94
  - **Blocked By**: Links to other Dev Tasks that block this one
100
95
  - **Blocks**: Automatically shows Dev Tasks that this task blocks
101
96
  - **Related Items**: Links to related Tasks/Bugs (e.g., Bug → Task that caused it)
102
- - **Related From**: Automatically shows items that link to this one
103
-
104
- ---
105
-
106
- ## Link Relationship Summary
107
-
108
- ```
109
- Project Planning Dev Tasks
110
- ┌─────────────────────┐ ┌─────────────────────┐
111
- │ Project │ │ Task/Bug/Tech Debt │
112
- │ │ │ │
113
- │ Child Features ◄────┼── Project ───────┼── (not used) │
114
- │ (linked from) │ │ │
115
- └─────────────────────┘ │ │
116
- ▲ │ │
117
- │ │ │
118
- ┌────────┴────────────┐ │ │
119
- │ Feature / PRD │ │ │
120
- │ │ │ │
121
- │ Project ────────────┼─► Project │ │
122
- │ (activity link) │ │ │
123
- │ │ │ │
124
- │ Dev Tasks ◄─────────┼──────────────────┼── Feature │
125
- │ (linked from) │ │ (activity link) │
126
- └─────────────────────┘ │ │
127
- │ Blocked By ─────────┼─► Dev Tasks
128
- │ (activity link) │
129
- │ │
130
- │ Blocks ◄────────────┼── Blocked By
131
- │ (linked from) │ (from other)
132
- └─────────────────────┘
133
- ```
134
97
 
135
98
  ---
136
99
 
@@ -153,24 +116,22 @@ Notify user: "Setting up project management workflows for this workspace..."
153
116
  #### Create Project Planning Workflow
154
117
 
155
118
  ```typescript
156
- // Using Hailer MCP or SDK
157
119
  {
158
120
  name: "Project Planning",
159
121
  phases: ["Planning", "In Progress", "On Hold", "Completed"],
160
122
  fields: [
161
123
  { name: "Title", type: "text" },
162
- { name: "Description", type: "longtext" },
163
- { name: "Type", type: "predefined_single", options: ["Project", "Feature", "Session Handoff", "PRD"] },
164
- { name: "Project", type: "activity_link", linkedWorkflow: "Project Planning" },
165
- { name: "Goal", type: "longtext" },
166
- { name: "Documentation", type: "longtext" },
167
- { name: "Technical Notes", type: "longtext" },
168
- { name: "Blockers", type: "longtext" },
169
- // PRD fields
170
- { name: "User Stories", type: "longtext" },
171
- { name: "Acceptance Criteria", type: "longtext" },
172
- { name: "Technical Constraints", type: "longtext" },
173
- { name: "Out of Scope", type: "longtext" }
124
+ { name: "Description", type: "textarea" },
125
+ { name: "Type", type: "textpredefinedoptions", options: ["Project", "Feature", "Session Handoff", "PRD"] },
126
+ { name: "Project", type: "activitylink", linkedWorkflow: "Project Planning" },
127
+ { name: "Goal", type: "textarea" },
128
+ { name: "Documentation", type: "textarea" },
129
+ { name: "Technical Notes", type: "textarea" },
130
+ { name: "Blockers", type: "textarea" },
131
+ { name: "User Stories", type: "textarea" },
132
+ { name: "Acceptance Criteria", type: "textarea" },
133
+ { name: "Technical Constraints", type: "textarea" },
134
+ { name: "Out of Scope", type: "textarea" }
174
135
  ]
175
136
  }
176
137
  ```
@@ -183,12 +144,12 @@ Notify user: "Setting up project management workflows for this workspace..."
183
144
  phases: ["Backlog", "Todo", "In Progress", "Review", "Done"],
184
145
  fields: [
185
146
  { name: "Title", type: "text" },
186
- { name: "Description", type: "longtext" },
187
- { name: "Type", type: "predefined_single", options: ["Task", "Bug", "Tech Debt"] },
188
- { name: "Priority", type: "predefined_single", options: ["HIGH", "MEDIUM", "LOW"] },
189
- { name: "Feature", type: "activity_link", linkedWorkflow: "Project Planning" },
190
- { name: "Blocked By", type: "activity_link", linkedWorkflow: "Dev Tasks" },
191
- { name: "Related Items", type: "activity_link", linkedWorkflow: "Dev Tasks" },
147
+ { name: "Description", type: "textarea" },
148
+ { name: "Type", type: "textpredefinedoptions", options: ["Task", "Bug", "Tech Debt"] },
149
+ { name: "Priority", type: "textpredefinedoptions", options: ["HIGH", "MEDIUM", "LOW"] },
150
+ { name: "Feature", type: "activitylink", linkedWorkflow: "Project Planning" },
151
+ { name: "Blocked By", type: "activitylink", linkedWorkflow: "Dev Tasks" },
152
+ { name: "Related Items", type: "activitylink", linkedWorkflow: "Dev Tasks" },
192
153
  { name: "Files Modified", type: "text" },
193
154
  { name: "Commits", type: "text" }
194
155
  ]
@@ -330,7 +291,7 @@ Also create/update `SESSION-HANDOFF.md` in project root:
330
291
  ### New Feature
331
292
  | Field | Value |
332
293
  |-------|-------|
333
- | Title | Feature name (use prefixes: `Sales Orders → Automations`) |
294
+ | Title | Feature name (use arrow prefix for related features: `Sales Orders → Automations`) |
334
295
  | Type | `Feature` |
335
296
  | Project | Link to parent Project |
336
297
  | Phase | `Planning` or `In Progress` |
@@ -339,7 +300,7 @@ Also create/update `SESSION-HANDOFF.md` in project root:
339
300
  | Documentation | How it works (fill when complete) |
340
301
  | Technical Notes | Architecture decisions |
341
302
 
342
- ### New PRD (Product Requirements Document)
303
+ ### New PRD
343
304
  | Field | Value |
344
305
  |-------|-------|
345
306
  | Title | `PRD: [Feature Name]` |
@@ -435,54 +396,3 @@ When user requests sync (`/project-status`):
435
396
  ## Session Notes
436
397
  [Local notes not synced to Hailer]
437
398
  ```
438
-
439
- ---
440
-
441
- ## Naming Conventions
442
-
443
- ### Features
444
- Use arrow prefix for related features:
445
- - `Sales Orders` (main workflow)
446
- - `Sales Orders → Automations`
447
- - `Sales Orders → ERP Integration`
448
-
449
- ### Tasks
450
- Specific and actionable:
451
- - `Add customer reference field to orders`
452
- - `Work on orders`
453
-
454
- ### Bugs
455
- Include context:
456
- - `Order total wrong when discount applied`
457
- - `Calculation bug`
458
-
459
- ### PRDs
460
- Always prefix with "PRD:":
461
- - `PRD: User Authentication`
462
- - `PRD: Sales Order Automations`
463
-
464
- ---
465
-
466
- ## Hailer Project Structure
467
-
468
- ```
469
- workspace/ # Local config (check FIRST)
470
- apps/ # Frontend apps (if monorepo)
471
- integrations/ # Backend services (if monorepo)
472
- .claude/
473
- agents/ # Agent definitions
474
- hooks/ # Safety hooks
475
- skills/ # On-demand documentation
476
- commands/ # Slash commands
477
- settings.json # Permissions
478
- CLAUDE.md # Project instructions
479
- DEVELOPMENT.md # Project state (synced with Hailer)
480
- SESSION-HANDOFF.md # Previous session context
481
- ```
482
-
483
- ### Key Principles
484
- - **Local-first**: Check `workspace/` before making API calls
485
- - **Skills before actions**: Load relevant skill before SDK/MCP commands
486
- - **Hooks protect you**: Push commands require confirmation via hooks
487
- - **Check scripts**: Run `npm run` to see available commands
488
- - **Session continuity**: Read SESSION-HANDOFF.md when resuming work
@@ -49,8 +49,8 @@ interface Trigger {
49
49
 
50
50
  interface LinkedProcess {
51
51
  processId: string; // Target workflow ID
52
- sourcePhases: string[]; // Move FROM these phases
53
- targetPhase: string; // Move TO this phase
52
+ fromPhaseIds: string[]; // Move FROM these phases
53
+ toPhaseId: string; // Move TO this phase
54
54
  }
55
55
  ```
56
56
 
@@ -70,8 +70,8 @@ interface LinkedProcess {
70
70
  "linkedProcesses": [
71
71
  {
72
72
  "processId": "67dc1b7d3d2c9f6cf9a54690",
73
- "sourcePhases": ["67dc1b7d3d2c9f6cf9a54691", "67dc1b7d3d2c9f6cf9a54692"],
74
- "targetPhase": "67dc1b7d3d2c9f6cf9a54695"
73
+ "fromPhaseIds": ["67dc1b7d3d2c9f6cf9a54691", "67dc1b7d3d2c9f6cf9a54692"],
74
+ "toPhaseId": "67dc1b7d3d2c9f6cf9a54695"
75
75
  }
76
76
  ]
77
77
  }
@@ -121,13 +121,13 @@ async function processTrigger(activityId: string, trigger: Trigger) {
121
121
  for (const process of trigger.linkedProcesses) {
122
122
  const toMove = linked.filter(a =>
123
123
  a.processId === process.processId &&
124
- process.sourcePhases.includes(a.phaseId)
124
+ process.fromPhaseIds.includes(a.phaseId)
125
125
  );
126
126
 
127
127
  if (toMove.length > 0) {
128
128
  await client.request('v3.activity.updateMany', [
129
129
  toMove.map(a => a._id),
130
- { phaseId: process.targetPhase }
130
+ { phaseId: process.toPhaseId }
131
131
  ]);
132
132
  }
133
133
  }
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: lsp-setup
3
- description: How to set up LSP (Language Server Protocol) for Claude Code - enables code intelligence for Lars and other agents
3
+ description: How to set up LSP (Language Server Protocol) for Claude Code - enables code intelligence for sub-agents doing code inspection
4
4
  version: 1.0.0
5
5
  triggers:
6
6
  - LSP not available
@@ -15,7 +15,7 @@ LSP (Language Server Protocol) enables code intelligence features like go-to-def
15
15
 
16
16
  ## Why LSP?
17
17
 
18
- Without LSP, agents like Lars must guess about code usage via grep/file reads. With LSP:
18
+ Without LSP, sub-agents must guess about code usage via grep/file reads. With LSP:
19
19
  - **Accurate dead code detection** - knows if exports are used elsewhere
20
20
  - **Type error detection** - without running compiler
21
21
  - **Find all references** - across entire codebase
@@ -78,7 +78,7 @@ claude -c
78
78
 
79
79
  ### Step 5: Test
80
80
 
81
- Ask Lars to find unused code in a TypeScript file:
81
+ Ask a sub-agent to find unused code in a TypeScript file:
82
82
  ```
83
83
  Find unused code in src/App.tsx
84
84
  ```
@@ -109,13 +109,12 @@ The `typescript-lsp` plugin supports:
109
109
  | `outgoingCalls` | What this function calls |
110
110
  | `prepareCallHierarchy` | Get call hierarchy at position |
111
111
 
112
- ## Agents That Use LSP
112
+ ## Sub-Agents That Use LSP
113
113
 
114
- | Agent | How They Use LSP |
115
- |-------|------------------|
116
- | **Lars** | Primary user - dead code, unused imports, type errors |
117
- | **Svetlana** | Type checking during code review (optional) |
118
- | **Giuseppe** | Verify code compiles before build (optional) |
114
+ LSP is most useful for sub-agents doing code inspection:
115
+ - Dead code detection, unused imports, type errors
116
+ - Type checking during code review
117
+ - Verifying code compiles before build
119
118
 
120
119
  ## Troubleshooting
121
120