@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.
- package/.claude/CLAUDE.md +117 -320
- package/.claude/commands/app-squad.md +86 -90
- package/.claude/commands/audit-squad.md +19 -19
- package/.claude/commands/autoplan.md +3 -3
- package/.claude/commands/cleanup-squad.md +16 -16
- package/.claude/commands/config-squad.md +30 -30
- package/.claude/commands/crud-squad.md +23 -23
- package/.claude/commands/data-squad.md +21 -21
- package/.claude/commands/debug-squad.md +44 -44
- package/.claude/commands/doc-squad.md +16 -16
- package/.claude/commands/help:agents.md +130 -99
- package/.claude/commands/help:commands.md +15 -15
- package/.claude/commands/help:faq.md +17 -17
- package/.claude/commands/help:plugins.md +1 -1
- package/.claude/commands/help:skills.md +18 -24
- package/.claude/commands/hotfix-squad.md +22 -22
- package/.claude/commands/integration-squad.md +22 -22
- package/.claude/commands/janitor-squad.md +31 -31
- package/.claude/commands/learn-auto.md +5 -5
- package/.claude/commands/learn.md +12 -20
- package/.claude/commands/onboard-squad.md +39 -49
- package/.claude/commands/plan-workspace.md +2 -2
- package/.claude/commands/publish.md +32 -37
- package/.claude/commands/review-squad.md +27 -27
- package/.claude/commands/stats.md +26 -12
- package/.claude/commands/swarm.md +25 -25
- package/.claude/skills/chrome-mcp-reference/SKILL.md +5 -0
- package/.claude/skills/hailer-api-client/SKILL.md +55 -16
- package/.claude/skills/hailer-app-builder/SKILL.md +4 -270
- package/.claude/skills/hailer-apps-pictures/SKILL.md +3 -3
- package/.claude/skills/hailer-design-system/SKILL.md +96 -4
- package/.claude/skills/hailer-monolith-automations/SKILL.md +138 -116
- package/.claude/skills/hailer-permissions-system/SKILL.md +6 -9
- package/.claude/skills/hailer-project-protocol/SKILL.md +20 -110
- package/.claude/skills/integration-patterns/SKILL.md +6 -6
- package/.claude/skills/lsp-setup/SKILL.md +8 -9
- package/.claude/skills/sdk-activity-patterns/SKILL.md +238 -0
- package/.claude/skills/{SDK-document-templates → sdk-document-templates}/SKILL.md +13 -340
- package/.claude/skills/{SDK-function-fields → sdk-function-fields}/SKILL.md +8 -40
- package/.claude/skills/{SDK-insight-queries → sdk-insight-queries}/SKILL.md +114 -392
- package/.claude/skills/{SDK-ws-config-skill → sdk-ws-config-skill}/SKILL.md +79 -310
- package/.claude/skills/zapier-hailer-patterns/SKILL.md +84 -361
- package/.opencode/package-lock.json +117 -0
- package/CLAUDE.md +5 -358
- package/dist/app.d.ts.map +1 -1
- package/dist/app.js +10 -127
- package/dist/app.js.map +1 -1
- package/dist/bot/bot-manager.d.ts +3 -14
- package/dist/bot/bot-manager.d.ts.map +1 -1
- package/dist/bot/bot-manager.js +13 -4
- package/dist/bot/bot-manager.js.map +1 -1
- package/dist/bot/bot.d.ts +23 -102
- package/dist/bot/bot.d.ts.map +1 -1
- package/dist/bot/bot.js +356 -1212
- package/dist/bot/bot.js.map +1 -1
- package/dist/bot/services/bot-permissions.d.ts +50 -0
- package/dist/bot/services/bot-permissions.d.ts.map +1 -0
- package/dist/bot/services/bot-permissions.js +198 -0
- package/dist/bot/services/bot-permissions.js.map +1 -0
- package/dist/bot/services/index.d.ts +4 -2
- package/dist/bot/services/index.d.ts.map +1 -1
- package/dist/bot/services/index.js +10 -5
- package/dist/bot/services/index.js.map +1 -1
- package/dist/bot/services/message-classifier.d.ts +1 -1
- package/dist/bot/services/message-classifier.d.ts.map +1 -1
- package/dist/bot/services/message-classifier.js.map +1 -1
- package/dist/bot/services/signal-router.d.ts +32 -0
- package/dist/bot/services/signal-router.d.ts.map +1 -0
- package/dist/bot/services/signal-router.js +132 -0
- package/dist/bot/services/signal-router.js.map +1 -0
- package/dist/bot/services/system-prompt.d.ts +12 -0
- package/dist/bot/services/system-prompt.d.ts.map +1 -0
- package/dist/bot/services/system-prompt.js +93 -0
- package/dist/bot/services/system-prompt.js.map +1 -0
- package/dist/bot/services/types.d.ts +7 -34
- package/dist/bot/services/types.d.ts.map +1 -1
- package/dist/bot/services/types.js +0 -3
- package/dist/bot/services/types.js.map +1 -1
- package/dist/bot/services/workspace-refresh.d.ts +47 -0
- package/dist/bot/services/workspace-refresh.d.ts.map +1 -0
- package/dist/bot/services/workspace-refresh.js +154 -0
- package/dist/bot/services/workspace-refresh.js.map +1 -0
- package/dist/bot-config/constants.d.ts +0 -36
- package/dist/bot-config/constants.d.ts.map +1 -1
- package/dist/bot-config/constants.js +1 -76
- package/dist/bot-config/constants.js.map +1 -1
- package/dist/bot-config/context.d.ts +2 -42
- package/dist/bot-config/context.d.ts.map +1 -1
- package/dist/bot-config/context.js +13 -134
- package/dist/bot-config/context.js.map +1 -1
- package/dist/bot-config/index.d.ts +6 -15
- package/dist/bot-config/index.d.ts.map +1 -1
- package/dist/bot-config/index.js +5 -80
- package/dist/bot-config/index.js.map +1 -1
- package/dist/bot-config/loader.d.ts +16 -4
- package/dist/bot-config/loader.d.ts.map +1 -1
- package/dist/bot-config/loader.js +187 -96
- package/dist/bot-config/loader.js.map +1 -1
- package/dist/bot-config/persistence.d.ts +1 -52
- package/dist/bot-config/persistence.d.ts.map +1 -1
- package/dist/bot-config/persistence.js +3 -213
- package/dist/bot-config/persistence.js.map +1 -1
- package/dist/bot-config/state.d.ts +0 -41
- package/dist/bot-config/state.d.ts.map +1 -1
- package/dist/bot-config/state.js +0 -151
- package/dist/bot-config/state.js.map +1 -1
- package/dist/bot-config/tools.d.ts +1 -1
- package/dist/bot-config/tools.js +27 -27
- package/dist/bot-config/tools.js.map +1 -1
- package/dist/bot-config/types.d.ts +39 -32
- package/dist/bot-config/types.d.ts.map +1 -1
- package/dist/bot-config/types.js +0 -3
- package/dist/bot-config/types.js.map +1 -1
- package/dist/bot-config/webhooks.d.ts +0 -4
- package/dist/bot-config/webhooks.d.ts.map +1 -1
- package/dist/bot-config/webhooks.js +0 -13
- package/dist/bot-config/webhooks.js.map +1 -1
- package/dist/commands/seed-config.js +16 -31
- package/dist/commands/seed-config.js.map +1 -1
- package/dist/config.d.ts +0 -9
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +0 -15
- package/dist/config.js.map +1 -1
- package/dist/mcp/hailer-clients.js +2 -2
- package/dist/mcp/hailer-clients.js.map +1 -1
- package/dist/mcp/tool-registry.d.ts +10 -115
- package/dist/mcp/tool-registry.d.ts.map +1 -1
- package/dist/mcp/tool-registry.js +39 -363
- package/dist/mcp/tool-registry.js.map +1 -1
- package/dist/mcp/tools/activity.d.ts +3 -0
- package/dist/mcp/tools/activity.d.ts.map +1 -1
- package/dist/mcp/tools/activity.js +8 -1
- package/dist/mcp/tools/activity.js.map +1 -1
- package/dist/mcp/tools/app-core.d.ts +3 -0
- package/dist/mcp/tools/app-core.d.ts.map +1 -1
- package/dist/mcp/tools/app-core.js +9 -2
- package/dist/mcp/tools/app-core.js.map +1 -1
- package/dist/mcp/tools/app-marketplace.d.ts +3 -0
- package/dist/mcp/tools/app-marketplace.d.ts.map +1 -1
- package/dist/mcp/tools/app-marketplace.js +13 -1
- package/dist/mcp/tools/app-marketplace.js.map +1 -1
- package/dist/mcp/tools/app-member.d.ts +3 -0
- package/dist/mcp/tools/app-member.d.ts.map +1 -1
- package/dist/mcp/tools/app-member.js +6 -1
- package/dist/mcp/tools/app-member.js.map +1 -1
- package/dist/mcp/tools/app-scaffold.d.ts +3 -0
- package/dist/mcp/tools/app-scaffold.d.ts.map +1 -1
- package/dist/mcp/tools/app-scaffold.js +15 -11
- package/dist/mcp/tools/app-scaffold.js.map +1 -1
- package/dist/mcp/tools/company.d.ts +3 -0
- package/dist/mcp/tools/company.d.ts.map +1 -1
- package/dist/mcp/tools/company.js +5 -1
- package/dist/mcp/tools/company.js.map +1 -1
- package/dist/mcp/tools/discussion.d.ts +3 -0
- package/dist/mcp/tools/discussion.d.ts.map +1 -1
- package/dist/mcp/tools/discussion.js +13 -2
- package/dist/mcp/tools/discussion.js.map +1 -1
- package/dist/mcp/tools/file.d.ts +3 -0
- package/dist/mcp/tools/file.d.ts.map +1 -1
- package/dist/mcp/tools/file.js +6 -1
- package/dist/mcp/tools/file.js.map +1 -1
- package/dist/mcp/tools/index.d.ts +7 -0
- package/dist/mcp/tools/index.d.ts.map +1 -0
- package/dist/mcp/tools/index.js +34 -0
- package/dist/mcp/tools/index.js.map +1 -0
- package/dist/mcp/tools/insight.d.ts +3 -0
- package/dist/mcp/tools/insight.d.ts.map +1 -1
- package/dist/mcp/tools/insight.js +18 -8
- package/dist/mcp/tools/insight.js.map +1 -1
- package/dist/mcp/tools/user.d.ts +3 -0
- package/dist/mcp/tools/user.d.ts.map +1 -1
- package/dist/mcp/tools/user.js +6 -1
- package/dist/mcp/tools/user.js.map +1 -1
- package/dist/mcp/tools/workflow-permissions.d.ts +3 -0
- package/dist/mcp/tools/workflow-permissions.d.ts.map +1 -1
- package/dist/mcp/tools/workflow-permissions.js +8 -1
- package/dist/mcp/tools/workflow-permissions.js.map +1 -1
- package/dist/mcp/tools/workflow.d.ts +3 -0
- package/dist/mcp/tools/workflow.d.ts.map +1 -1
- package/dist/mcp/tools/workflow.js +29 -28
- package/dist/mcp/tools/workflow.js.map +1 -1
- package/dist/mcp/utils/index.d.ts +4 -11
- package/dist/mcp/utils/index.d.ts.map +1 -1
- package/dist/mcp/utils/index.js +5 -36
- package/dist/mcp/utils/index.js.map +1 -1
- package/dist/mcp/utils/role-utils.d.ts +0 -32
- package/dist/mcp/utils/role-utils.d.ts.map +1 -1
- package/dist/mcp/utils/role-utils.js +0 -73
- package/dist/mcp/utils/role-utils.js.map +1 -1
- package/dist/mcp/utils/tool-helpers.d.ts +0 -25
- package/dist/mcp/utils/tool-helpers.d.ts.map +1 -1
- package/dist/mcp/utils/tool-helpers.js +0 -34
- package/dist/mcp/utils/tool-helpers.js.map +1 -1
- package/dist/mcp/webhook-handler.d.ts +4 -34
- package/dist/mcp/webhook-handler.d.ts.map +1 -1
- package/dist/mcp/webhook-handler.js +57 -74
- package/dist/mcp/webhook-handler.js.map +1 -1
- package/dist/mcp-server.d.ts.map +1 -1
- package/dist/mcp-server.js +3 -78
- package/dist/mcp-server.js.map +1 -1
- package/package.json +1 -2
- package/.claude/agents/agent-ada-skill-builder.md +0 -94
- package/.claude/agents/agent-alejandro-function-fields.md +0 -342
- package/.claude/agents/agent-bjorn-config-audit.md +0 -103
- package/.claude/agents/agent-builder-agent-creator.md +0 -130
- package/.claude/agents/agent-code-simplifier.md +0 -53
- package/.claude/agents/agent-dmitri-activity-crud.md +0 -159
- package/.claude/agents/agent-giuseppe-app-builder.md +0 -208
- package/.claude/agents/agent-gunther-mcp-tools.md +0 -39
- package/.claude/agents/agent-helga-workflow-config.md +0 -204
- package/.claude/agents/agent-igor-activity-mover-automation.md +0 -125
- package/.claude/agents/agent-ingrid-doc-templates.md +0 -261
- package/.claude/agents/agent-ivan-monolith.md +0 -154
- package/.claude/agents/agent-kenji-data-reader.md +0 -86
- package/.claude/agents/agent-lars-code-inspector.md +0 -102
- package/.claude/agents/agent-marco-mockup-builder.md +0 -110
- package/.claude/agents/agent-marcus-api-documenter.md +0 -323
- package/.claude/agents/agent-marketplace-publisher.md +0 -280
- package/.claude/agents/agent-marketplace-reviewer.md +0 -309
- package/.claude/agents/agent-permissions-handler.md +0 -208
- package/.claude/agents/agent-simple-writer.md +0 -48
- package/.claude/agents/agent-svetlana-code-review.md +0 -171
- package/.claude/agents/agent-tanya-test-runner.md +0 -333
- package/.claude/agents/agent-ui-designer.md +0 -100
- package/.claude/agents/agent-viktor-sql-insights.md +0 -212
- package/.claude/agents/agent-web-search.md +0 -55
- package/.claude/agents/agent-yevgeni-discussions.md +0 -45
- package/.claude/agents/agent-zara-zapier.md +0 -159
- package/.claude/skills/SDK-activity-patterns/SKILL.md +0 -428
- package/.claude/skills/SDK-generate-skill/SKILL.md +0 -92
- package/.claude/skills/SDK-init-skill/SKILL.md +0 -127
- package/.claude/skills/agent-structure/SKILL.md +0 -98
- package/.claude/skills/delegation-routing/SKILL.md +0 -202
- package/.claude/skills/frontend-design/SKILL.md +0 -254
- package/.claude/skills/hailer-activity-mover/SKILL.md +0 -213
- package/.claude/skills/hailer-rest-api/SKILL.md +0 -61
- package/.claude/skills/hailer-rest-api/hailer-activities.md +0 -184
- package/.claude/skills/hailer-rest-api/hailer-admin.md +0 -473
- package/.claude/skills/hailer-rest-api/hailer-calendar.md +0 -256
- package/.claude/skills/hailer-rest-api/hailer-feed.md +0 -249
- package/.claude/skills/hailer-rest-api/hailer-insights.md +0 -195
- package/.claude/skills/hailer-rest-api/hailer-messaging.md +0 -276
- package/.claude/skills/hailer-rest-api/hailer-workflows.md +0 -283
- package/.claude/skills/insight-join-patterns/SKILL.md +0 -174
- package/.claude/skills/json-only-output/SKILL.md +0 -72
- package/.claude/skills/mcp-direct-tools/SKILL.md +0 -153
- package/.claude/skills/optional-parameters/SKILL.md +0 -72
- package/.claude/skills/tool-parameter-usage/SKILL.md +0 -126
- package/.claude/skills/tool-response-verification/SKILL.md +0 -92
- package/.opencode/agent/agent-ada-skill-builder.md +0 -35
- package/.opencode/agent/agent-alejandro-function-fields.md +0 -39
- package/.opencode/agent/agent-bjorn-config-audit.md +0 -36
- package/.opencode/agent/agent-builder-agent-creator.md +0 -39
- package/.opencode/agent/agent-code-simplifier.md +0 -31
- package/.opencode/agent/agent-dmitri-activity-crud.md +0 -40
- package/.opencode/agent/agent-giuseppe-app-builder.md +0 -37
- package/.opencode/agent/agent-gunther-mcp-tools.md +0 -39
- package/.opencode/agent/agent-helga-workflow-config.md +0 -204
- package/.opencode/agent/agent-igor-activity-mover-automation.md +0 -46
- package/.opencode/agent/agent-ingrid-doc-templates.md +0 -39
- package/.opencode/agent/agent-ivan-monolith.md +0 -46
- package/.opencode/agent/agent-kenji-data-reader.md +0 -53
- package/.opencode/agent/agent-lars-code-inspector.md +0 -28
- package/.opencode/agent/agent-marco-mockup-builder.md +0 -42
- package/.opencode/agent/agent-marcus-api-documenter.md +0 -53
- package/.opencode/agent/agent-marketplace-publisher.md +0 -44
- package/.opencode/agent/agent-marketplace-reviewer.md +0 -42
- package/.opencode/agent/agent-permissions-handler.md +0 -50
- package/.opencode/agent/agent-simple-writer.md +0 -45
- package/.opencode/agent/agent-svetlana-code-review.md +0 -39
- package/.opencode/agent/agent-tanya-test-runner.md +0 -57
- package/.opencode/agent/agent-ui-designer.md +0 -56
- package/.opencode/agent/agent-viktor-sql-insights.md +0 -34
- package/.opencode/agent/agent-web-search.md +0 -42
- package/.opencode/agent/agent-yevgeni-discussions.md +0 -37
- package/.opencode/agent/agent-zara-zapier.md +0 -53
- package/.opencode/commands/app-squad.md +0 -135
- package/.opencode/commands/audit-squad.md +0 -158
- package/.opencode/commands/autoplan.md +0 -563
- package/.opencode/commands/cleanup-squad.md +0 -98
- package/.opencode/commands/config-squad.md +0 -106
- package/.opencode/commands/crud-squad.md +0 -87
- package/.opencode/commands/data-squad.md +0 -97
- package/.opencode/commands/debug-squad.md +0 -303
- package/.opencode/commands/doc-squad.md +0 -65
- package/.opencode/commands/handoff.md +0 -137
- package/.opencode/commands/health.md +0 -49
- package/.opencode/commands/help-agents.md +0 -151
- package/.opencode/commands/help-commands.md +0 -32
- package/.opencode/commands/help-faq.md +0 -29
- package/.opencode/commands/help-plugins.md +0 -28
- package/.opencode/commands/help-skills.md +0 -7
- package/.opencode/commands/help-tools.md +0 -40
- package/.opencode/commands/help.md +0 -28
- package/.opencode/commands/hotfix-squad.md +0 -112
- package/.opencode/commands/integration-squad.md +0 -82
- package/.opencode/commands/janitor-squad.md +0 -167
- package/.opencode/commands/learn-auto.md +0 -120
- package/.opencode/commands/learn.md +0 -120
- package/.opencode/commands/mcp-list.md +0 -27
- package/.opencode/commands/onboard-squad.md +0 -140
- package/.opencode/commands/plan-workspace.md +0 -732
- package/.opencode/commands/prd.md +0 -131
- package/.opencode/commands/project-status.md +0 -82
- package/.opencode/commands/publish.md +0 -138
- package/.opencode/commands/recap.md +0 -69
- package/.opencode/commands/restore.md +0 -64
- package/.opencode/commands/review-squad.md +0 -152
- package/.opencode/commands/save.md +0 -24
- package/.opencode/commands/stats.md +0 -19
- package/.opencode/commands/swarm.md +0 -210
- package/.opencode/commands/tool-builder.md +0 -39
- package/.opencode/commands/ws-pull.md +0 -44
package/.claude/CLAUDE.md
CHANGED
|
@@ -1,9 +1,22 @@
|
|
|
1
|
-
# Hailer
|
|
1
|
+
# Hailer MCP Server
|
|
2
|
+
|
|
3
|
+
## Rules (MUST follow)
|
|
4
|
+
|
|
5
|
+
1. **Workspace reads → spawn haiku sub-agent.** Never read `workspace/` files in main context. They fill context and can't be freed.
|
|
6
|
+
2. **Skill loads → sub-agent only.** Never load skills (Skill tool) in main context. Tell the sub-agent which skills to load.
|
|
7
|
+
3. **Workspace edits → spawn sonnet sub-agent.** Fields, functions, phases — always in a sub-agent with skill names + IDs front-loaded.
|
|
8
|
+
4. **MCP tools are fine in main context.** Tool results are small. Use them for discovery (IDs, schemas, data).
|
|
9
|
+
5. **Load skills before editing.** `sdk-function-fields` + `sdk-ws-config-skill` for function fields. Skills have critical steps (omit `_id` for new fields, push → pull → phases).
|
|
10
|
+
6. **New fields: omit `_id`.** The server assigns it. Push → pull → add to phases → push phases.
|
|
11
|
+
7. **Function fields: `fields-push:force`** not `fields-push`. Non-force skips `functionVariables` diffs.
|
|
12
|
+
8. **After pull: verify enum imports.** Identical hex suffixes across workflows can resolve to wrong enum. Fix manually.
|
|
13
|
+
9. **Pattern:** MCP discovery (main) → spawn sub-agent with IDs + skill names + task → sub-agent does all file work → returns summary.
|
|
14
|
+
|
|
15
|
+
---
|
|
2
16
|
|
|
3
17
|
MCP tools for Hailer workspaces: workflows, activities, insights, and apps.
|
|
4
18
|
|
|
5
|
-
|
|
6
|
-
## Quick Start (New Project Setup)
|
|
19
|
+
## Quick Start
|
|
7
20
|
|
|
8
21
|
```bash
|
|
9
22
|
npm init @hailer/sdk # Scaffold project with workspace/ config
|
|
@@ -11,205 +24,65 @@ npm run pull # Pull latest workflow schemas from Hailer
|
|
|
11
24
|
npm run generate # Generate TypeScript types
|
|
12
25
|
```
|
|
13
26
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
**
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
-
|
|
40
|
-
-
|
|
41
|
-
-
|
|
42
|
-
-
|
|
43
|
-
-
|
|
44
|
-
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
-
|
|
50
|
-
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
options:
|
|
74
|
-
- "Delegate to Kenji (recommended)"
|
|
75
|
-
- "Read directly this once"
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
**3. If user approves direct action:**
|
|
79
|
-
1. Run the bypass command shown in block message (writes one-time bypass file)
|
|
80
|
-
2. Retry the original tool call
|
|
81
|
-
3. Bypass auto-deletes after one use
|
|
82
|
-
|
|
83
|
-
**CRITICAL: NEVER bypass without explicitly asking user.**
|
|
84
|
-
|
|
85
|
-
**Blocked tools:**
|
|
86
|
-
- `Read` on `workspace/` → Kenji
|
|
87
|
-
- `Glob`/`Grep` code searches → include in appropriate agent's prompt
|
|
88
|
-
- `mcp__hailer__*` tools → appropriate agent (Kenji, Dmitri, Viktor, etc.)
|
|
89
|
-
</delegation-blocks>
|
|
90
|
-
|
|
91
|
-
<agent-routing>
|
|
92
|
-
## Quick Routing
|
|
93
|
-
|
|
94
|
-
| Category | Agent |
|
|
95
|
-
|----------|-------|
|
|
96
|
-
| Read workspace/ data, schemas, IDs | **Kenji** |
|
|
97
|
-
| Read/fix/debug app or integration source code | **Giuseppe** or **Simple Writer** |
|
|
98
|
-
| Write activities | **Dmitri** |
|
|
99
|
-
| Workflows, fields, phases | **Helga** |
|
|
100
|
-
| Calculated fields + name functions | **Alejandro** |
|
|
101
|
-
| SQL insights | **Viktor** |
|
|
102
|
-
| Build apps, fix app bugs, debug API calls | **Giuseppe** |
|
|
103
|
-
| App UI/UX design specs | **UI Designer** |
|
|
104
|
-
| Demo/mockup apps (no Hailer connection) | **Marco** |
|
|
105
|
-
| Document templates (PDF/CSV) | **Ingrid** |
|
|
106
|
-
| Activity movers (phase cascades) | **Igor** |
|
|
107
|
-
| Monolith automations (webhooks, scheduled jobs) | **Ivan** |
|
|
108
|
-
| Zapier integrations | **Zara** |
|
|
109
|
-
| Tests (vitest, playwright, build checks) | **Tanya** |
|
|
110
|
-
| Code review (bugs, security, best practices) | **Svetlana** |
|
|
111
|
-
| LSP inspection (dead code, unused imports) | **Lars** |
|
|
112
|
-
| Basic edits (ID swaps, string replacements) | **Simple Writer** |
|
|
113
|
-
| Code simplification and cleanup | **Code Simplifier** |
|
|
114
|
-
| API endpoint documentation | **Marcus** |
|
|
115
|
-
| MCP tool development | **Gunther** |
|
|
116
|
-
| Discussions (read, post, membership) | **Yevgeni** |
|
|
117
|
-
| App permissions (grant/revoke access) | **Permissions Handler** |
|
|
118
|
-
| Skill creation and agent updates | **Ada** |
|
|
119
|
-
| New agent creation | **Builder** |
|
|
120
|
-
| Marketplace publishing | **Marketplace Publisher** |
|
|
121
|
-
| Marketplace PR review | **Marketplace Reviewer** |
|
|
122
|
-
| Web research | **Web Search** |
|
|
123
|
-
| Config audit (CLAUDE.md, hooks, agents) | **Bjorn** |
|
|
124
|
-
|
|
125
|
-
Ambiguous routing? Load `delegation-routing` skill or run `/help:agents`.
|
|
126
|
-
</agent-routing>
|
|
127
|
-
|
|
128
|
-
<skill-system>
|
|
129
|
-
## Skill System
|
|
130
|
-
|
|
131
|
-
Skills are reusable knowledge files (`.claude/skills/<name>/SKILL.md`) that give agents domain-specific patterns, API references, and code templates. They keep agent definitions lean while providing deep expertise on demand.
|
|
132
|
-
|
|
133
|
-
**Two types of skill loading:**
|
|
134
|
-
|
|
135
|
-
**1. Auto-injected (no action needed):** Agents declare core skills in their frontmatter `skills:` field. The `SubagentStart` hook (`skill-injector.cjs`) reads the list, loads each `SKILL.md` from `.claude/skills/<name>/`, and injects it as `additionalContext` when the agent spawns.
|
|
136
|
-
|
|
137
|
-
**2. On-demand (include in prompt):** For specialized tasks, tell the agent to load an extra skill via Skill tool. Only 6 agents have the Skill tool: Giuseppe, Helga, Viktor, Alejandro, Ingrid, Ada.
|
|
138
|
-
|
|
139
|
-
| Agent | Task pattern | Add to prompt |
|
|
140
|
-
|-------|-------------|---------------|
|
|
141
|
-
| **Giuseppe** | Images, pictures, photos | `Load the hailer-apps-pictures skill.` |
|
|
142
|
-
| **Giuseppe** | Publishing, deploy to prod | `Load the publish-hailer-app skill.` |
|
|
143
|
-
| **Giuseppe** | REST API, direct HTTP calls | `Load the hailer-rest-api skill.` |
|
|
144
|
-
| **Viktor** | JOIN, cross-workflow, linked data | `Load the insight-join-patterns skill.` |
|
|
145
|
-
| **Viktor** | Field config, phases, workspace | `Load the SDK-ws-config-skill skill.` |
|
|
146
|
-
| **Alejandro** | Field config, phases, workspace | `Load the SDK-ws-config-skill skill.` |
|
|
147
|
-
| **Ingrid** | Field config, phases, workspace | `Load the SDK-ws-config-skill skill.` |
|
|
148
|
-
|
|
149
|
-
**Adding core skills to an agent:**
|
|
150
|
-
```yaml
|
|
151
|
-
# In .claude/agents/agent-name.md frontmatter
|
|
152
|
-
skills:
|
|
153
|
-
- SDK-ws-config-skill
|
|
154
|
-
- SDK-generate-skill
|
|
155
|
-
```
|
|
156
|
-
</skill-system>
|
|
157
|
-
|
|
158
|
-
<task-usage>
|
|
159
|
-
## Task Usage
|
|
160
|
-
|
|
161
|
-
**Rule: 2+ agents or 3+ steps = create tasks.** Mark in_progress before starting, completed when done.
|
|
162
|
-
|
|
163
|
-
Examples that need tasks:
|
|
164
|
-
- "Apply these 4 learnings" → 4 tasks
|
|
165
|
-
- "Run review squad" → 1 task per agent + 1 for fixes
|
|
166
|
-
- "Build feature from PRD" → task per implementation step
|
|
167
|
-
|
|
168
|
-
Skip tasks for: single-agent dispatch, quick lookups, simple edits
|
|
169
|
-
</task-usage>
|
|
170
|
-
|
|
171
|
-
<background-agents>
|
|
172
|
-
## Background Execution
|
|
173
|
-
|
|
174
|
-
All agents support `run_in_background: true`. Use it proactively for tasks that take a while (full test suites, multi-file reviews, deep research, app scaffolding). Tell the user "Running X in background" and keep working. Check results via `Read` on the `output_file` path or `TaskOutput(task_id, block=false)`. Multiple agents can run in background simultaneously.
|
|
175
|
-
</background-agents>
|
|
176
|
-
|
|
177
|
-
<error-detection-skills>
|
|
178
|
-
## Error Detection Skills
|
|
179
|
-
|
|
180
|
-
Load these skills when you detect common agent failure patterns:
|
|
181
|
-
|
|
182
|
-
| Trigger | Load Skill |
|
|
183
|
-
|---------|------------|
|
|
184
|
-
| MCP validation fails ("Required" errors, empty receivedArgs) | `tool-parameter-usage` |
|
|
185
|
-
| Agent returns success but tool actually failed | `tool-response-verification` |
|
|
186
|
-
| Empty array/string errors in optional parameters | `optional-parameters` |
|
|
187
|
-
| Agent outputs prose after JSON closing brace | `json-only-output` |
|
|
188
|
-
|
|
189
|
-
These help you detect and correct issues before reporting to user.
|
|
190
|
-
</error-detection-skills>
|
|
191
|
-
|
|
192
|
-
<push-commands>
|
|
193
|
-
When agents return `"status": "ready_to_push"`:
|
|
194
|
-
```json
|
|
195
|
-
{ "status": "ready_to_push", "commands": ["npm run fields-push"], "summary": "..." }
|
|
196
|
-
```
|
|
197
|
-
|
|
198
|
-
YOU run these commands via Bash tool. This triggers safety hooks.
|
|
199
|
-
Do NOT ask user to run them manually.
|
|
200
|
-
</push-commands>
|
|
201
|
-
|
|
202
|
-
<needs-confirmation>
|
|
203
|
-
When agents return `"status": "needs_confirmation"`:
|
|
204
|
-
1. AskUserQuestion to confirm
|
|
205
|
-
2. If yes: run the `safe_command` from result
|
|
206
|
-
3. If no: report cancellation
|
|
207
|
-
</needs-confirmation>
|
|
208
|
-
|
|
209
|
-
---
|
|
210
|
-
|
|
211
|
-
<local-first>
|
|
212
|
-
**Why local-first?** Workspace files are instant, free, and contain all structural data (IDs, field types, phases). API calls are slow, rate-limited, and only needed for live activity data. Always check workspace/ BEFORE API calls.
|
|
27
|
+
## How to Work
|
|
28
|
+
|
|
29
|
+
Do simple things directly. For complex tasks, spawn parallel sub-agents.
|
|
30
|
+
|
|
31
|
+
**Model usage — conserve Opus for orchestration only:**
|
|
32
|
+
- **You (Opus):** Orchestrate, synthesize results, make decisions. Do NOT write large code blocks yourself.
|
|
33
|
+
- **Sub-agents (Sonnet):** Write code, build features, complex edits. Use `model: "sonnet"`.
|
|
34
|
+
- **Sub-agents (Haiku):** Read files, search code, data lookups, reviews. Use `model: "haiku"`.
|
|
35
|
+
- **Rule:** If a task takes more than ~20 lines of code, delegate to a sonnet sub-agent.
|
|
36
|
+
|
|
37
|
+
**Speed rules:**
|
|
38
|
+
- Do data discovery yourself (MCP calls are instant)
|
|
39
|
+
- Spawn all agents in one message
|
|
40
|
+
- Front-load context — agents should write code, not discover things
|
|
41
|
+
- Background long tasks with `run_in_background: true`
|
|
42
|
+
|
|
43
|
+
**Feature requests:** Ask "Want me to create a PRD first?" before implementing.
|
|
44
|
+
|
|
45
|
+
## Skills
|
|
46
|
+
|
|
47
|
+
Skills are in `.claude/skills/<name>/SKILL.md`. Load via the Skill tool.
|
|
48
|
+
|
|
49
|
+
### Workspace & Config
|
|
50
|
+
| Skill | Use when |
|
|
51
|
+
|-------|----------|
|
|
52
|
+
| `sdk-ws-config-skill` | Workflows, fields, phases, teams, groups, new project setup |
|
|
53
|
+
| `sdk-function-fields` | Calculated fields, nameFunction |
|
|
54
|
+
| `sdk-activity-patterns` | Creating/updating activities |
|
|
55
|
+
| `sdk-insight-queries` | SQL-like insight queries, cross-workflow JOINs |
|
|
56
|
+
| `sdk-document-templates` | PDF/CSV document templates |
|
|
57
|
+
| `hailer-permissions-system` | Workflow permissions |
|
|
58
|
+
|
|
59
|
+
### App Development
|
|
60
|
+
| Skill | Use when |
|
|
61
|
+
|-------|----------|
|
|
62
|
+
| `hailer-app-builder` | Building Hailer apps (React/Chakra) |
|
|
63
|
+
| `hailer-design-system` | Theme, colors, icons, layout, spacing, responsive design |
|
|
64
|
+
| `hailer-apps-pictures` | Images/photos in apps |
|
|
65
|
+
| `publish-hailer-app` | Publishing to production |
|
|
66
|
+
|
|
67
|
+
### Integrations
|
|
68
|
+
| Skill | Use when |
|
|
69
|
+
|-------|----------|
|
|
70
|
+
| `hailer-monolith-automations` | Webhook handlers, scheduled jobs, phase cascade bots |
|
|
71
|
+
| `zapier-hailer-patterns` | Zapier integrations |
|
|
72
|
+
| `integration-patterns` | General integration patterns |
|
|
73
|
+
| `hailer-api-client` | HailerApiClient for backend |
|
|
74
|
+
|
|
75
|
+
### Code Quality
|
|
76
|
+
| Skill | Use when |
|
|
77
|
+
|-------|----------|
|
|
78
|
+
| `testing-patterns` | Vitest/playwright tests |
|
|
79
|
+
| `api-documentation-patterns` | API endpoint docs |
|
|
80
|
+
| `lsp-setup` | LSP code inspection |
|
|
81
|
+
| `tool-builder` | Building new MCP tools |
|
|
82
|
+
|
|
83
|
+
## Local-First Data
|
|
84
|
+
|
|
85
|
+
Check workspace/ BEFORE making API calls.
|
|
213
86
|
|
|
214
87
|
```
|
|
215
88
|
workspace/
|
|
@@ -221,150 +94,74 @@ workspace/
|
|
|
221
94
|
|
|
222
95
|
LOCAL: Workflow/field/phase IDs, field types, labels, options
|
|
223
96
|
API: Activity data, counts, discussion messages
|
|
224
|
-
|
|
225
97
|
REFRESH: `npm run pull`
|
|
226
|
-
</local-first>
|
|
227
98
|
|
|
228
|
-
<hooks>
|
|
229
99
|
## Hooks
|
|
230
100
|
|
|
231
|
-
|
|
101
|
+
4 safety hooks in `.claude/hooks/`:
|
|
232
102
|
|
|
233
|
-
|
|
103
|
+
- `session-start.cjs` — loads SESSION-HANDOFF.md on start
|
|
104
|
+
- `bash-guard.cjs` — confirms destructive shell commands
|
|
105
|
+
- `bulk-activity-guard.cjs` — confirms bulk activity writes
|
|
106
|
+
- `publish-template-guard.cjs` — confirms template publishes
|
|
107
|
+
- `context-watchdog.cjs` — monitors context usage
|
|
234
108
|
|
|
235
|
-
|
|
109
|
+
## App Development
|
|
236
110
|
|
|
237
|
-
|
|
238
|
-
</hooks>
|
|
111
|
+
**Scaffold:** Always use `scaffold_hailer_app` MCP tool. Never copy an existing app.
|
|
239
112
|
|
|
240
|
-
|
|
241
|
-
## App Development Rules
|
|
113
|
+
**Local dev:** Scaffold creates app at `http://localhost:3000`. Run `npm run dev`.
|
|
242
114
|
|
|
243
|
-
**
|
|
115
|
+
**Publishing:** Only when user asks. Load `publish-hailer-app` skill.
|
|
244
116
|
|
|
245
|
-
**Publishing: Only when user explicitly asks.** Tell Giuseppe to load the `publish-hailer-app` skill. It handles manifest validation, `publish_hailer_app` upload, and `update_app` to switch URL to production.
|
|
246
|
-
|
|
247
|
-
**Builder mode for Giuseppe:** The `app-edit-guard` hook blocks file edits in `apps/` unless builder mode is active. Before spawning Giuseppe directly, run:
|
|
248
|
-
```bash
|
|
249
|
-
node .claude/hooks/app-edit-guard.cjs --agent-on
|
|
250
|
-
```
|
|
251
|
-
After Giuseppe completes:
|
|
252
|
-
```bash
|
|
253
|
-
node .claude/hooks/app-edit-guard.cjs --agent-off
|
|
254
|
-
```
|
|
255
|
-
The `/app-squad` command handles this automatically.
|
|
256
|
-
</app-development>
|
|
257
|
-
|
|
258
|
-
---
|
|
259
|
-
|
|
260
|
-
<session-protocol>
|
|
261
|
-
## Session Protocol
|
|
262
|
-
|
|
263
|
-
### Starting a Session
|
|
264
|
-
SessionStart hook auto-loads SESSION-HANDOFF.md + DEVELOPMENT.md into context.
|
|
265
|
-
1. Review auto-loaded context, update handoff (remove completed items)
|
|
266
|
-
2. If handoff has "Pending Tasks" → recreate with `TaskCreate`
|
|
267
|
-
3. If no DEVELOPMENT.md → offer to create one
|
|
268
|
-
4. Briefly confirm current state before diving in
|
|
269
|
-
|
|
270
|
-
### During a Session
|
|
271
|
-
- **Feature request:** Ask "Want me to create a PRD?" even if user provides detailed plan. Only skip if user explicitly declines or already used `/prd`/`/autoplan`.
|
|
272
|
-
- **Tasks:** 2+ agents or 3+ steps = create tasks. Mark in_progress before starting, completed when done. If it won't be done this session, put it in DEVELOPMENT.md backlog.
|
|
273
|
-
- **Learnings:** Use `/learn <cat> <desc>` to capture gotchas and patterns.
|
|
274
|
-
|
|
275
|
-
### Ending a Session
|
|
276
|
-
- **Completion:** Update DEVELOPMENT.md + PRD status. Offer code-simplifier after features.
|
|
277
|
-
- **Context full:** Update handoff, tell user to run `/handoff`.
|
|
278
|
-
- **When to update DEVELOPMENT.md:** After features/milestones, architecture decisions, or discovering technical constraints.
|
|
279
|
-
|
|
280
|
-
### Planning Workflow
|
|
281
|
-
1. **Big picture → DEVELOPMENT.md** — Purpose, stack, roadmap linking to PRDs
|
|
282
|
-
2. **Feature details → PRDs** (`docs/prd-*.md`) — One per feature, links back to roadmap
|
|
283
|
-
3. **Implementation → Pick a PRD and build**
|
|
284
|
-
|
|
285
|
-
**Quick start:** `/autoplan "description"` creates DEVELOPMENT.md + PRDs automatically.
|
|
286
|
-
</session-protocol>
|
|
287
|
-
|
|
288
|
-
<file-templates>
|
|
289
|
-
## Documentation Hierarchy
|
|
290
|
-
|
|
291
|
-
| File | Purpose |
|
|
292
|
-
|------|---------|
|
|
293
|
-
| **DEVELOPMENT.md** | Project status, backlog, tech stack, roadmap |
|
|
294
|
-
| **docs/prd-*.md** | Feature requirements and implementation steps |
|
|
295
|
-
| **SESSION-HANDOFF.md** | Current work, next steps, key context |
|
|
296
|
-
|
|
297
|
-
**DEVELOPMENT.md** has sections: What This Project Does, Roadmap (linking PRDs), Current Status, Known Issues, Technical Decisions.
|
|
298
|
-
**SESSION-HANDOFF.md** has sections: Current Work, Next Steps, Context.
|
|
299
|
-
</file-templates>
|
|
300
|
-
|
|
301
|
-
<customization>
|
|
302
|
-
**Creating agents:** Load `agent-structure` skill for template.
|
|
303
|
-
**Modify:** Edit `.claude/agents/*.md`
|
|
304
|
-
**Disable:** Move to `docs/agents/`
|
|
305
|
-
</customization>
|
|
306
|
-
|
|
307
|
-
<config-source>
|
|
308
|
-
## Config Source
|
|
309
|
-
|
|
310
|
-
Agents, skills, hooks, and commands are in `.claude/` (project-local).
|
|
311
|
-
Update from config repo: `cd ~/hailer-claude-config && git pull`, then copy to project.
|
|
312
|
-
Learnings: `~/hailer-claude-config/inbox/`
|
|
313
|
-
</config-source>
|
|
314
|
-
|
|
315
|
-
<commands>
|
|
316
117
|
## Commands
|
|
317
118
|
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
**Essential:** `/save`, `/handoff`, `/prd`, `/autoplan`, `/ws-pull`, `/learn`
|
|
119
|
+
`/command <param>` (angle brackets = required). `/help:topic` (colon = subtopic).
|
|
321
120
|
|
|
322
|
-
**
|
|
121
|
+
**Essential:** `/save`, `/handoff`, `/prd`, `/autoplan`, `/ws-pull`
|
|
323
122
|
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
| `/
|
|
328
|
-
| `/
|
|
329
|
-
| `/
|
|
330
|
-
| `/
|
|
331
|
-
| `/
|
|
123
|
+
**Squads:**
|
|
124
|
+
| Squad | Use for |
|
|
125
|
+
|-------|---------|
|
|
126
|
+
| `/app-squad` | Build apps end-to-end |
|
|
127
|
+
| `/review-squad` | Code review + tests |
|
|
128
|
+
| `/config-squad` | Workflow + fields + insights |
|
|
129
|
+
| `/hotfix-squad` | Quick bug fixes |
|
|
130
|
+
| `/debug-squad` | Investigation |
|
|
131
|
+
| `/swarm <desc>` | Large-scale parallel work |
|
|
332
132
|
|
|
333
|
-
More squads + full command list: `/help:commands`
|
|
334
|
-
</commands>
|
|
335
|
-
|
|
336
|
-
<directory>
|
|
337
133
|
## Project Structure
|
|
338
134
|
|
|
339
135
|
```
|
|
136
|
+
src/ # MCP server source
|
|
340
137
|
workspace/ # Hailer config - check FIRST for IDs
|
|
341
138
|
apps/ # Frontend apps
|
|
342
139
|
integrations/ # Backend services
|
|
343
|
-
.claude/ #
|
|
344
|
-
DEVELOPMENT.md # Project status
|
|
140
|
+
.claude/ # Skills, hooks, commands
|
|
345
141
|
```
|
|
346
|
-
</directory>
|
|
347
142
|
|
|
348
|
-
|
|
349
|
-
|
|
143
|
+
## When to Use SDK Files vs MCP Tools
|
|
144
|
+
|
|
145
|
+
| Task | Use | NOT |
|
|
146
|
+
|------|-----|-----|
|
|
147
|
+
| Create/modify fields, phases, workflows | Edit `workspace/` files → `npm run push` | MCP `update_workflow_field` |
|
|
148
|
+
| Create function fields | Edit `fields.ts` + `functions/` → `vitest` → `npm run fields-push` | MCP tools |
|
|
149
|
+
| Read/write activity data | MCP tools (`list_activities`, `create_activity`, etc.) | Editing files |
|
|
150
|
+
| Query/report on data | MCP `preview_insight`, `create_insight` | — |
|
|
151
|
+
| Test existing function field code | MCP `test_function_field` (with `functionVariables`) | — |
|
|
350
152
|
|
|
351
|
-
|
|
153
|
+
**Function field workflow:** See Rules #5-8 at top of file.
|
|
154
|
+
|
|
155
|
+
## Hailer SDK Gotchas
|
|
352
156
|
|
|
353
157
|
| Gotcha | Correct | Wrong |
|
|
354
158
|
|--------|---------|-------|
|
|
355
|
-
| Activity field updates | `{type: "string", value: "x"}`
|
|
356
|
-
| `linkedfrom`
|
|
357
|
-
| Code in isolated-vm | Plain JavaScript only | TypeScript syntax
|
|
358
|
-
| Phase transitions | Exact string
|
|
359
|
-
| Field IDs | Read from workspace/
|
|
159
|
+
| Activity field updates | `{type: "string", value: "x"}` | Raw value `"x"` |
|
|
160
|
+
| `linkedfrom` field type | Does NOT work in isolated-vm | Use `<` backlink dependency in functionVariables instead |
|
|
161
|
+
| Code in isolated-vm | Plain JavaScript only | TypeScript syntax |
|
|
162
|
+
| Phase transitions | Exact string match | Guessed names |
|
|
163
|
+
| Field IDs | Read from workspace/ | Guessing from labels |
|
|
360
164
|
| Dropdown values | `{data: [{value, label}]}` | `{options: [...]}` |
|
|
361
|
-
| ActivityLink format | Plain string array
|
|
362
|
-
|
|
363
|
-
**Rule:** When touching Hailer fields, ALWAYS read workspace/ first via Kenji. Never guess IDs or formats.
|
|
364
|
-
</sdk-gotchas>
|
|
365
|
-
|
|
366
|
-
<bulk-operations>
|
|
367
|
-
## Bulk Tasks
|
|
165
|
+
| ActivityLink format | Plain string array | Nested objects |
|
|
368
166
|
|
|
369
|
-
|
|
370
|
-
</bulk-operations>
|
|
167
|
+
**Rule:** Always read workspace/ first. Never guess IDs or formats.
|