@hailer/mcp 1.0.28 → 1.1.2
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/.session-checked +1 -0
- package/.claude/agents/agent-ada-skill-builder.md +10 -2
- package/.claude/agents/agent-alejandro-function-fields.md +104 -37
- package/.claude/agents/agent-bjorn-config-audit.md +41 -21
- package/.claude/agents/agent-builder-agent-creator.md +13 -3
- package/.claude/agents/agent-code-simplifier.md +53 -0
- package/.claude/agents/agent-dmitri-activity-crud.md +126 -11
- package/.claude/agents/agent-giuseppe-app-builder.md +212 -22
- package/.claude/agents/agent-gunther-mcp-tools.md +7 -36
- package/.claude/agents/agent-helga-workflow-config.md +75 -10
- package/.claude/agents/agent-igor-activity-mover-automation.md +125 -0
- package/.claude/agents/agent-ingrid-doc-templates.md +164 -36
- package/.claude/agents/agent-ivan-monolith.md +154 -0
- package/.claude/agents/agent-kenji-data-reader.md +15 -8
- package/.claude/agents/agent-lars-code-inspector.md +56 -8
- package/.claude/agents/agent-marco-mockup-builder.md +110 -0
- package/.claude/agents/agent-marcus-api-documenter.md +323 -0
- package/.claude/agents/agent-marketplace-publisher.md +232 -72
- package/.claude/agents/agent-marketplace-reviewer.md +255 -79
- package/.claude/agents/agent-permissions-handler.md +208 -0
- package/.claude/agents/agent-simple-writer.md +48 -0
- package/.claude/agents/agent-svetlana-code-review.md +127 -14
- package/.claude/agents/agent-tanya-test-runner.md +333 -0
- package/.claude/agents/agent-ui-designer.md +100 -0
- package/.claude/agents/agent-viktor-sql-insights.md +19 -6
- package/.claude/agents/agent-web-search.md +55 -0
- package/.claude/agents/agent-yevgeni-discussions.md +7 -1
- package/.claude/agents/agent-zara-zapier.md +159 -0
- package/.claude/commands/app-squad.md +135 -0
- package/.claude/commands/audit-squad.md +158 -0
- package/.claude/commands/autoplan.md +563 -0
- package/.claude/commands/cleanup-squad.md +98 -0
- package/.claude/commands/config-squad.md +106 -0
- package/.claude/commands/crud-squad.md +87 -0
- package/.claude/commands/data-squad.md +97 -0
- package/.claude/commands/debug-squad.md +303 -0
- package/.claude/commands/doc-squad.md +65 -0
- package/.claude/commands/handoff.md +137 -0
- package/.claude/commands/health.md +49 -0
- package/.claude/commands/help.md +2 -1
- package/.claude/commands/help:agents.md +96 -16
- package/.claude/commands/help:commands.md +55 -11
- package/.claude/commands/help:faq.md +16 -1
- package/.claude/commands/help:skills.md +93 -0
- package/.claude/commands/hotfix-squad.md +112 -0
- package/.claude/commands/integration-squad.md +82 -0
- package/.claude/commands/janitor-squad.md +167 -0
- package/.claude/commands/learn-auto.md +120 -0
- package/.claude/commands/learn.md +120 -0
- package/.claude/commands/mcp-list.md +27 -0
- package/.claude/commands/onboard-squad.md +140 -0
- package/.claude/commands/plan-workspace.md +732 -0
- package/.claude/commands/prd.md +131 -0
- package/.claude/commands/project-status.md +82 -0
- package/.claude/commands/publish.md +138 -0
- package/.claude/commands/recap.md +69 -0
- package/.claude/commands/restore.md +64 -0
- package/.claude/commands/review-squad.md +152 -0
- package/.claude/commands/save.md +24 -0
- package/.claude/commands/stats.md +19 -0
- package/.claude/commands/swarm.md +210 -0
- package/.claude/commands/tool-builder.md +3 -1
- package/.claude/commands/ws-pull.md +1 -1
- package/.claude/commands/yolo-off.md +17 -0
- package/.claude/commands/yolo.md +82 -0
- package/.claude/hooks/_shared-memory.cjs +305 -0
- package/.claude/hooks/_utils.cjs +134 -0
- package/.claude/hooks/agent-failure-detector.cjs +164 -79
- package/.claude/hooks/agent-usage-logger.cjs +204 -0
- package/.claude/hooks/app-edit-guard.cjs +20 -4
- package/.claude/hooks/auto-learn.cjs +316 -0
- package/.claude/hooks/bash-guard.cjs +282 -0
- package/.claude/hooks/builder-mode-manager.cjs +183 -54
- package/.claude/hooks/bulk-activity-guard.cjs +283 -0
- package/.claude/hooks/context-watchdog.cjs +292 -0
- package/.claude/hooks/delegation-reminder.cjs +478 -0
- package/.claude/hooks/design-system-lint.cjs +283 -0
- package/.claude/hooks/post-scaffold-hook.cjs +16 -3
- package/.claude/hooks/prompt-guard.cjs +366 -0
- package/.claude/hooks/publish-template-guard.cjs +16 -0
- package/.claude/hooks/session-start.cjs +35 -0
- package/.claude/hooks/shared-memory-writer.cjs +147 -0
- package/.claude/hooks/skill-injector.cjs +140 -0
- package/.claude/hooks/skill-usage-logger.cjs +258 -0
- package/.claude/hooks/src-edit-guard.cjs +16 -1
- package/.claude/hooks/sync-marketplace-agents.cjs +53 -8
- package/.claude/scripts/yolo-toggle.cjs +142 -0
- package/.claude/settings.json +141 -14
- package/.claude/skills/SDK-activity-patterns/SKILL.md +428 -0
- package/.claude/skills/SDK-document-templates/SKILL.md +1033 -0
- package/.claude/skills/SDK-function-fields/SKILL.md +542 -0
- package/.claude/skills/SDK-generate-skill/SKILL.md +92 -0
- package/.claude/skills/SDK-init-skill/SKILL.md +127 -0
- package/.claude/skills/SDK-insight-queries/SKILL.md +787 -0
- package/.claude/skills/SDK-ws-config-skill/SKILL.md +1139 -0
- package/.claude/skills/agent-structure/SKILL.md +98 -0
- package/.claude/skills/api-documentation-patterns/SKILL.md +474 -0
- package/.claude/skills/chrome-mcp-reference/SKILL.md +370 -0
- package/.claude/skills/delegation-routing/SKILL.md +202 -0
- package/.claude/skills/frontend-design/SKILL.md +254 -0
- package/.claude/skills/hailer-activity-mover/SKILL.md +213 -0
- package/.claude/skills/hailer-api-client/SKILL.md +518 -0
- package/.claude/skills/hailer-app-builder/SKILL.md +939 -11
- package/.claude/skills/hailer-apps-pictures/SKILL.md +269 -0
- package/.claude/skills/hailer-design-system/SKILL.md +235 -0
- package/.claude/skills/hailer-monolith-automations/SKILL.md +686 -0
- package/.claude/skills/hailer-permissions-system/SKILL.md +121 -0
- package/.claude/skills/hailer-project-protocol/SKILL.md +488 -0
- package/.claude/skills/hailer-rest-api/SKILL.md +61 -0
- package/.claude/skills/hailer-rest-api/hailer-activities.md +184 -0
- package/.claude/skills/hailer-rest-api/hailer-admin.md +473 -0
- package/.claude/skills/hailer-rest-api/hailer-calendar.md +256 -0
- package/.claude/skills/hailer-rest-api/hailer-feed.md +249 -0
- package/.claude/skills/hailer-rest-api/hailer-insights.md +195 -0
- package/.claude/skills/hailer-rest-api/hailer-messaging.md +276 -0
- package/.claude/skills/hailer-rest-api/hailer-workflows.md +283 -0
- package/.claude/skills/insight-join-patterns/SKILL.md +3 -0
- package/.claude/skills/integration-patterns/SKILL.md +421 -0
- package/.claude/skills/json-only-output/SKILL.md +52 -12
- package/.claude/skills/lsp-setup/SKILL.md +160 -0
- package/.claude/skills/mcp-direct-tools/SKILL.md +153 -0
- package/.claude/skills/optional-parameters/SKILL.md +32 -23
- package/.claude/skills/publish-hailer-app/SKILL.md +76 -12
- package/.claude/skills/testing-patterns/SKILL.md +630 -0
- package/.claude/skills/tool-builder/SKILL.md +250 -0
- package/.claude/skills/tool-parameter-usage/SKILL.md +59 -45
- package/.claude/skills/tool-response-verification/SKILL.md +82 -48
- package/.claude/skills/zapier-hailer-patterns/SKILL.md +581 -0
- package/.env.example +26 -7
- package/CLAUDE.md +290 -224
- package/dist/CLAUDE.md +370 -0
- package/dist/app.d.ts +1 -1
- package/dist/app.js +101 -101
- package/dist/bot/bot-config.d.ts +26 -0
- package/dist/bot/bot-config.js +135 -0
- package/dist/bot/bot-manager.d.ts +40 -0
- package/dist/bot/bot-manager.js +137 -0
- package/dist/bot/bot.d.ts +127 -0
- package/dist/bot/bot.js +1328 -0
- package/dist/bot/operation-logger.d.ts +28 -0
- package/dist/bot/operation-logger.js +132 -0
- package/dist/bot/services/conversation-manager.d.ts +60 -0
- package/dist/bot/services/conversation-manager.js +246 -0
- package/dist/bot/services/index.d.ts +9 -0
- package/dist/bot/services/index.js +18 -0
- package/dist/bot/services/message-classifier.d.ts +42 -0
- package/dist/bot/services/message-classifier.js +228 -0
- package/dist/bot/services/message-formatter.d.ts +88 -0
- package/dist/bot/services/message-formatter.js +411 -0
- package/dist/bot/services/session-logger.d.ts +162 -0
- package/dist/bot/services/session-logger.js +724 -0
- package/dist/bot/services/token-billing.d.ts +78 -0
- package/dist/bot/services/token-billing.js +233 -0
- package/dist/bot/services/types.d.ts +169 -0
- package/dist/bot/services/types.js +12 -0
- package/dist/bot/services/typing-indicator.d.ts +23 -0
- package/dist/bot/services/typing-indicator.js +60 -0
- package/dist/bot/services/workspace-schema-cache.d.ts +122 -0
- package/dist/bot/services/workspace-schema-cache.js +506 -0
- package/dist/bot/tool-executor.d.ts +28 -0
- package/dist/bot/tool-executor.js +48 -0
- package/dist/bot/workspace-overview.d.ts +12 -0
- package/dist/bot/workspace-overview.js +94 -0
- package/dist/cli.d.ts +1 -8
- package/dist/cli.js +1 -249
- package/dist/config.d.ts +96 -3
- package/dist/config.js +148 -37
- package/dist/core.d.ts +5 -0
- package/dist/core.js +61 -8
- package/dist/lib/discussion-lock.d.ts +42 -0
- package/dist/lib/discussion-lock.js +110 -0
- package/dist/lib/logger.d.ts +0 -1
- package/dist/lib/logger.js +39 -23
- package/dist/lib/request-logger.d.ts +77 -0
- package/dist/lib/request-logger.js +147 -0
- package/dist/mcp/UserContextCache.js +16 -13
- package/dist/mcp/hailer-clients.js +18 -17
- package/dist/mcp/signal-handler.js +29 -13
- package/dist/mcp/tool-registry.d.ts +4 -15
- package/dist/mcp/tool-registry.js +94 -32
- package/dist/mcp/tools/activity.js +28 -69
- package/dist/mcp/tools/app-core.js +9 -4
- package/dist/mcp/tools/app-marketplace.js +22 -12
- package/dist/mcp/tools/app-member.js +5 -2
- package/dist/mcp/tools/app-scaffold.js +32 -18
- package/dist/mcp/tools/bot-config/constants.d.ts +23 -0
- package/dist/mcp/tools/bot-config/constants.js +94 -0
- package/dist/mcp/tools/bot-config/core.d.ts +253 -0
- package/dist/mcp/tools/bot-config/core.js +2456 -0
- package/dist/mcp/tools/bot-config/index.d.ts +10 -0
- package/dist/mcp/tools/bot-config/index.js +59 -0
- package/dist/mcp/tools/bot-config/tools.d.ts +7 -0
- package/dist/mcp/tools/bot-config/tools.js +15 -0
- package/dist/mcp/tools/bot-config/types.d.ts +50 -0
- package/dist/mcp/tools/bot-config/types.js +6 -0
- package/dist/mcp/tools/discussion.js +107 -77
- package/dist/mcp/tools/document.d.ts +11 -0
- package/dist/mcp/tools/document.js +741 -0
- package/dist/mcp/tools/file.js +5 -2
- package/dist/mcp/tools/insight.js +36 -12
- package/dist/mcp/tools/investigate.d.ts +9 -0
- package/dist/mcp/tools/investigate.js +254 -0
- package/dist/mcp/tools/user.d.ts +2 -4
- package/dist/mcp/tools/user.js +9 -50
- package/dist/mcp/tools/workflow.d.ts +1 -0
- package/dist/mcp/tools/workflow.js +164 -52
- package/dist/mcp/utils/hailer-api-client.js +26 -17
- package/dist/mcp/webhook-handler.d.ts +64 -3
- package/dist/mcp/webhook-handler.js +219 -9
- package/dist/mcp-server.d.ts +4 -0
- package/dist/mcp-server.js +237 -25
- package/dist/plugins/bug-fixer/index.d.ts +2 -0
- package/dist/plugins/bug-fixer/index.js +18 -0
- package/dist/plugins/bug-fixer/tools.d.ts +45 -0
- package/dist/plugins/bug-fixer/tools.js +1096 -0
- package/package.json +10 -10
- package/scripts/test-hal-tools.ts +154 -0
- package/.claude/agents/agent-nora-name-functions.md +0 -123
- package/.claude/assistant-knowledge.md +0 -23
- package/.claude/commands/install-plugin.md +0 -261
- package/.claude/commands/list-plugins.md +0 -42
- package/.claude/commands/marketplace-setup.md +0 -33
- package/.claude/commands/publish-plugin.md +0 -55
- package/.claude/commands/uninstall-plugin.md +0 -87
- package/.claude/hooks/interactive-mode.cjs +0 -87
- package/.claude/hooks/mcp-server-guard.cjs +0 -108
- package/.claude/skills/marketplace-publishing.md +0 -155
- package/dist/bot/chat-bot.d.ts +0 -31
- package/dist/bot/chat-bot.js +0 -357
- package/dist/mcp/tools/metrics.d.ts +0 -13
- package/dist/mcp/tools/metrics.js +0 -546
- package/dist/stdio-server.d.ts +0 -14
- package/dist/stdio-server.js +0 -114
package/CLAUDE.md
CHANGED
|
@@ -2,105 +2,192 @@
|
|
|
2
2
|
|
|
3
3
|
MCP tools for Hailer workspaces: workflows, activities, insights, and apps.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
<critical-rules>
|
|
8
|
-
## LSP FIRST - MANDATORY FOR ALL TS/JS FILES
|
|
9
|
-
|
|
10
|
-
**BEFORE using Read, Grep, or any text search on TypeScript/JavaScript files, USE LSP:**
|
|
11
|
-
|
|
12
|
-
| Task | Use LSP | NOT |
|
|
13
|
-
|------|---------|-----|
|
|
14
|
-
| Find enums/classes/functions | `documentSymbol` | Read file |
|
|
15
|
-
| Find where something is defined | `goToDefinition` | grep |
|
|
16
|
-
| Find all usages | `findReferences` | grep |
|
|
17
|
-
| Get type info | `hover` | Read file |
|
|
5
|
+
<quick-start>
|
|
6
|
+
## Quick Start (New Project Setup)
|
|
18
7
|
|
|
19
|
-
```
|
|
20
|
-
|
|
8
|
+
```bash
|
|
9
|
+
npm init @hailer/sdk # Scaffold project with workspace/ config
|
|
10
|
+
npm run pull # Pull latest workflow schemas from Hailer
|
|
11
|
+
npm run generate # Generate TypeScript types
|
|
21
12
|
```
|
|
22
13
|
|
|
23
|
-
|
|
24
|
-
|
|
14
|
+
Then ask Claude Code to build features. It delegates to specialized agents automatically.
|
|
15
|
+
Run `/help` for an overview, or `/help:agents`, `/help:skills`, `/help:commands` for details.
|
|
16
|
+
</quick-start>
|
|
25
17
|
|
|
26
18
|
---
|
|
27
19
|
|
|
28
20
|
<identity>
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
You route tasks to specialized agents. You run commands they return. You summarize results for users.
|
|
21
|
+
You are the orchestrator. You delegate tasks to specialized agents, run commands from their responses, and summarize results for users.
|
|
32
22
|
|
|
33
|
-
|
|
23
|
+
Always delegate - agents have optimized tools and context for their domains.
|
|
34
24
|
</identity>
|
|
35
25
|
|
|
36
26
|
<orchestrator-rules>
|
|
37
|
-
DO DIRECTLY:
|
|
38
|
-
|
|
39
|
-
- Interpret agent JSON for users
|
|
40
|
-
- Route tasks to agents
|
|
27
|
+
DO DIRECTLY: Answer from context, summarize agent results, run push/sync commands
|
|
28
|
+
DELEGATE TO AGENTS: Everything else. No exceptions.
|
|
41
29
|
|
|
42
|
-
|
|
43
|
-
- File reads → agent-kenji-data-reader (haiku)
|
|
44
|
-
- Activity CRUD → agent-dmitri-activity-crud (haiku)
|
|
45
|
-
- Config questions → agent-bjorn-config-audit (haiku)
|
|
46
|
-
- Code navigation → agent-lars-code-inspector (haiku)
|
|
47
|
-
- Everything else → see <agents> table
|
|
30
|
+
**FEATURE REQUESTS:** Before implementing, ask "Want me to create a PRD first?" Only skip if user declines or already used `/prd`/`/autoplan`.
|
|
48
31
|
|
|
49
|
-
|
|
50
|
-
-
|
|
51
|
-
-
|
|
32
|
+
**NEVER USE BUILT-IN AGENTS:** Do not spawn Plan, Explore, general-purpose, or Bash subagents. These are Claude Code built-ins that lack specialized skills and tools. Instead:
|
|
33
|
+
- Give the executing agent a prompt that includes research + planning + execution
|
|
34
|
+
- Agents have the Skill tool — they can load patterns themselves
|
|
35
|
+
- E.g., instead of "Plan agent researches templates → Ingrid implements", just tell Ingrid: "Load SDK-document-templates skill, plan the template structure, then build it"
|
|
52
36
|
|
|
53
|
-
|
|
37
|
+
**ANTI-PATTERNS (never do these):**
|
|
38
|
+
- "Let me use Plan agent to research first..." → Include research in the agent's prompt
|
|
39
|
+
- "I'll use Explore to find the code..." → Use Glob/Grep directly, or include in agent prompt
|
|
40
|
+
- "I'll just quickly read this file..." → Delegate to the appropriate agent
|
|
41
|
+
- "Let me check this one field..." → Delegate to Kenji
|
|
42
|
+
- "I can create this simple activity..." → Delegate to Dmitri
|
|
43
|
+
- "This is a small change..." → Delegate to the appropriate agent
|
|
44
|
+
- "User gave detailed plan, so I'll skip PRD..." → Still ask about PRD
|
|
54
45
|
|
|
55
|
-
|
|
46
|
+
**CRITICAL ROUTING RULE — Kenji vs Giuseppe:**
|
|
47
|
+
- **Kenji** = Hailer workspace data ONLY (workspace/ files, MCP API queries, field IDs, schemas)
|
|
48
|
+
- **Giuseppe** = App source code (apps/, src/, .tsx/.ts files, API call bugs, UI fixes, debugging)
|
|
49
|
+
- NEVER send app source code tasks to Kenji. He reads workspace/ config, not app code.
|
|
50
|
+
- For app bugs/fixes: Giuseppe (complex) or Simple Writer (simple string/ID fixes)
|
|
51
|
+
|
|
52
|
+
**MULTI-AGENT WORK:** Prefer squads over manual agent chaining. If a task needs 2+ agents in sequence (e.g., Helga → Alejandro → Viktor), check if a squad already does it (`/help:commands`). For large-scale repetitive work across many items, use `/swarm` instead of looping agents yourself.
|
|
56
53
|
|
|
57
|
-
|
|
58
|
-
When something fails, NEVER work around it. Always:
|
|
59
|
-
1. Report the error to user
|
|
60
|
-
2. Identify the root cause
|
|
61
|
-
3. Fix the source file/config that's broken
|
|
62
|
-
4. Never wrap, bypass, or apply temporary fixes
|
|
54
|
+
Agents return JSON. You interpret it for the user.
|
|
63
55
|
</orchestrator-rules>
|
|
64
56
|
|
|
65
|
-
<
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
| LSP/code bugs | `agent-lars-code-inspector` | haiku |
|
|
73
|
-
| Workflows, fields, phases | `agent-helga-workflow-config` | sonnet |
|
|
74
|
-
| SQL insights | `agent-viktor-sql-insights` | sonnet |
|
|
75
|
-
| Function fields | `agent-alejandro-function-fields` | sonnet |
|
|
76
|
-
| MCP tools | `agent-gunther-mcp-tools` | sonnet |
|
|
77
|
-
| Hailer apps | `agent-giuseppe-app-builder` | sonnet |
|
|
78
|
-
| Code review | `agent-svetlana-code-review` | sonnet |
|
|
79
|
-
| New agents | `agent-builder-agent-creator` | sonnet |
|
|
80
|
-
| Skills, agent improvements | `agent-ada-skill-builder` | sonnet |
|
|
81
|
-
| Document templates | `agent-ingrid-doc-templates` | sonnet |
|
|
82
|
-
| Name functions | `agent-nora-name-functions` | sonnet |
|
|
83
|
-
| Publish plugins | `agent-marketplace-publisher` | sonnet |
|
|
84
|
-
| Review plugin PRs | `agent-marketplace-reviewer` | haiku |
|
|
85
|
-
</agents>
|
|
86
|
-
|
|
87
|
-
<delegation-protocol>
|
|
57
|
+
<delegation-blocks>
|
|
58
|
+
## When Hook Blocks You
|
|
59
|
+
|
|
60
|
+
Hooks enforce delegation by blocking certain direct tool calls. When blocked:
|
|
61
|
+
|
|
62
|
+
**1. Default: Delegate (recommended)**
|
|
63
|
+
The block message shows the suggested agent. Use it:
|
|
88
64
|
```
|
|
89
|
-
Task(subagent_type="agent-
|
|
65
|
+
Task(subagent_type="agent-kenji-data-reader", prompt='{"task":"..."}')
|
|
90
66
|
```
|
|
91
67
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
68
|
+
**2. Override: Ask user permission first**
|
|
69
|
+
If context suggests user wants direct action, ask:
|
|
70
|
+
```
|
|
71
|
+
AskUserQuestion:
|
|
72
|
+
question: "Hook wants me to delegate reading workspace/fields.ts to Kenji. Read directly instead?"
|
|
73
|
+
options:
|
|
74
|
+
- "Delegate to Kenji (recommended)"
|
|
75
|
+
- "Read directly this once"
|
|
95
76
|
```
|
|
96
77
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
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
|
|
100
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.
|
|
101
162
|
|
|
102
|
-
|
|
103
|
-
|
|
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>
|
|
104
191
|
|
|
105
192
|
<push-commands>
|
|
106
193
|
When agents return `"status": "ready_to_push"`:
|
|
@@ -114,47 +201,15 @@ Do NOT ask user to run them manually.
|
|
|
114
201
|
|
|
115
202
|
<needs-confirmation>
|
|
116
203
|
When agents return `"status": "needs_confirmation"`:
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
"result": {
|
|
121
|
-
"pending_command": "npm run fields-push",
|
|
122
|
-
"safe_command": "yes | npm run fields-push",
|
|
123
|
-
"reason": "May delete resources"
|
|
124
|
-
},
|
|
125
|
-
"summary": "Needs user confirmation"
|
|
126
|
-
}
|
|
127
|
-
```
|
|
128
|
-
|
|
129
|
-
YOU must:
|
|
130
|
-
1. Use AskUserQuestion to confirm with user
|
|
131
|
-
2. If confirmed: run the `safe_command` via Bash
|
|
132
|
-
3. If declined: report cancellation to user
|
|
204
|
+
1. AskUserQuestion to confirm
|
|
205
|
+
2. If yes: run the `safe_command` from result
|
|
206
|
+
3. If no: report cancellation
|
|
133
207
|
</needs-confirmation>
|
|
134
208
|
|
|
135
|
-
<agent-chaining>
|
|
136
|
-
When agents return `trigger_review` or similar chaining directives:
|
|
137
|
-
```json
|
|
138
|
-
{
|
|
139
|
-
"status": "success",
|
|
140
|
-
"result": { ... },
|
|
141
|
-
"trigger_review": {
|
|
142
|
-
"agent": "marketplace-reviewer:agent-marketplace-reviewer",
|
|
143
|
-
"input": { "task": "review", "branch": "publish/plugin-name-v1.0.0" }
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
```
|
|
147
|
-
|
|
148
|
-
YOU must:
|
|
149
|
-
1. Report the first agent's success to user
|
|
150
|
-
2. Immediately spawn the chained agent with the provided input
|
|
151
|
-
3. Report the chained agent's result to user
|
|
152
|
-
</agent-chaining>
|
|
153
|
-
|
|
154
209
|
---
|
|
155
210
|
|
|
156
211
|
<local-first>
|
|
157
|
-
|
|
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.
|
|
158
213
|
|
|
159
214
|
```
|
|
160
215
|
workspace/
|
|
@@ -170,135 +225,146 @@ API: Activity data, counts, discussion messages
|
|
|
170
225
|
REFRESH: `npm run pull`
|
|
171
226
|
</local-first>
|
|
172
227
|
|
|
173
|
-
<
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
228
|
+
<hooks>
|
|
229
|
+
## Hooks
|
|
230
|
+
|
|
231
|
+
26 CJS hooks in `.claude/hooks/` wired via `settings.json`. Each receives JSON on stdin, returns `{"decision": "allow"}` or `{"decision": "block", "message": "..."}` on stdout.
|
|
177
232
|
|
|
178
|
-
|
|
179
|
-
**LSP for TypeScript/JavaScript:** Requires plugin setup.
|
|
233
|
+
Key events: `SessionStart` (auto-loads context), `PreToolUse` (guards + delegation enforcement), `PostToolUse` (linting, logging, failure detection), `SubagentStart` (skill injection).
|
|
180
234
|
|
|
181
|
-
`
|
|
235
|
+
**If hooks break after `npm install`:** Check `.claude/settings.json` paths, test with `node .claude/hooks/<script>.cjs --help`, or run `/clear-defaults`.
|
|
236
|
+
|
|
237
|
+
PROTECTED (hooks confirm): npm run push, *-push, *-sync | SAFE: npm run pull, npm run generate
|
|
238
|
+
</hooks>
|
|
239
|
+
|
|
240
|
+
<app-development>
|
|
241
|
+
## App Development Rules
|
|
242
|
+
|
|
243
|
+
**Default: Local development.** Scaffold creates a dev app at `http://localhost:3000` automatically. Run `npm run dev` and test inside Hailer iframe.
|
|
244
|
+
|
|
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
|
|
182
250
|
```
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
claude -
|
|
251
|
+
After Giuseppe completes:
|
|
252
|
+
```bash
|
|
253
|
+
node .claude/hooks/app-edit-guard.cjs --agent-off
|
|
186
254
|
```
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
</lsp-setup>
|
|
255
|
+
The `/app-squad` command handles this automatically.
|
|
256
|
+
</app-development>
|
|
190
257
|
|
|
191
258
|
---
|
|
192
259
|
|
|
193
|
-
<
|
|
194
|
-
|
|
195
|
-
---
|
|
196
|
-
name: lowercase-name
|
|
197
|
-
description: What it does.\n\n<example>\nuser: "request"\nassistant: { "status": "success", "result": {}, "summary": "" }\n</example>
|
|
198
|
-
model: haiku|sonnet
|
|
199
|
-
tools: tool_1, tool_2
|
|
200
|
-
---
|
|
260
|
+
<session-protocol>
|
|
261
|
+
## Session Protocol
|
|
201
262
|
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
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
|
|
205
269
|
|
|
206
|
-
|
|
207
|
-
-
|
|
208
|
-
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
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** — Use `/yolo` for autonomous execution
|
|
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>
|
|
228
300
|
|
|
229
301
|
<customization>
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
WITHOUT AGENTS: Use MCP tools directly
|
|
302
|
+
**Creating agents:** Load `agent-structure` skill for template.
|
|
303
|
+
**Modify:** Edit `.claude/agents/*.md`
|
|
304
|
+
**Disable:** Move to `docs/agents/`
|
|
234
305
|
</customization>
|
|
235
306
|
|
|
236
|
-
<
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
3. Tell user: "Restart Claude Code to load the plugin. Run `claude -c` to keep your conversation context."
|
|
265
|
-
|
|
266
|
-
**What `/install-plugin` does:**
|
|
267
|
-
- Copies agents to `.claude/agents/`
|
|
268
|
-
- Copies skills to `.claude/skills/`
|
|
269
|
-
- Copies hooks to `.claude/hooks/`
|
|
270
|
-
- Auto-installs native LSP if plugin requires it
|
|
271
|
-
|
|
272
|
-
**IMPORTANT:** After installing OR uninstalling plugins, always tell the user:
|
|
273
|
-
> "Restart required for changes to take effect. Run `claude -c` to restart while keeping your conversation context."
|
|
274
|
-
</plugin-setup>
|
|
275
|
-
|
|
276
|
-
<plugin-contributing>
|
|
277
|
-
To contribute plugins to the marketplace:
|
|
278
|
-
|
|
279
|
-
1. Ensure marketplace is cloned: `/marketplace-setup`
|
|
280
|
-
2. Create plugin in `./hailer-marketplace/`:
|
|
281
|
-
```
|
|
282
|
-
my-plugin/
|
|
283
|
-
.claude-plugin/plugin.json
|
|
284
|
-
agents/agent-my-agent.md
|
|
285
|
-
skills/my-skill/ (optional)
|
|
286
|
-
hooks/my-hook.cjs (optional)
|
|
287
|
-
.lsp.json (optional, for LSP support)
|
|
288
|
-
```
|
|
289
|
-
3. Follow agent structure from `<agent-structure>` section
|
|
290
|
-
4. Publish via PR workflow: `/publish-plugin`
|
|
291
|
-
</plugin-contributing>
|
|
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
|
+
## Commands
|
|
317
|
+
|
|
318
|
+
**Syntax:** `/command <param>` (angle brackets = required). `/help:topic` (colon = subtopic).
|
|
319
|
+
|
|
320
|
+
**Essential:** `/save`, `/handoff`, `/prd`, `/autoplan`, `/yolo`, `/ws-pull`, `/learn`
|
|
321
|
+
|
|
322
|
+
**Squads** (multi-agent workflows):
|
|
323
|
+
|
|
324
|
+
| Squad | Agents | Use for |
|
|
325
|
+
|-------|--------|---------|
|
|
326
|
+
| `/app-squad` | Kenji → Designer → Giuseppe → Tanya | Build apps end-to-end |
|
|
327
|
+
| `/review-squad` | Svetlana + Lars + Tanya | Code review with auto-fix |
|
|
328
|
+
| `/config-squad` | Helga → Alejandro → Viktor | Workflow + fields + insights |
|
|
329
|
+
| `/hotfix-squad` | Tanya → Simple Writer → Svetlana | Quick bug fixes |
|
|
330
|
+
| `/debug-squad` | Kenji + Viktor + Svetlana + Tanya | Parallel investigation |
|
|
331
|
+
| `/swarm <desc>` | Auto-selected | Large-scale parallel work |
|
|
332
|
+
|
|
333
|
+
More squads + full command list: `/help:commands`
|
|
334
|
+
</commands>
|
|
292
335
|
|
|
293
336
|
<directory>
|
|
337
|
+
## Project Structure
|
|
338
|
+
|
|
294
339
|
```
|
|
295
|
-
workspace/
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
commands/ # Slash commands
|
|
301
|
-
settings.json # Permissions
|
|
302
|
-
hailer-marketplace/ # Local marketplace clone (run /marketplace-setup)
|
|
340
|
+
workspace/ # Hailer config - check FIRST for IDs
|
|
341
|
+
apps/ # Frontend apps
|
|
342
|
+
integrations/ # Backend services
|
|
343
|
+
.claude/ # Agents, hooks, skills, commands (project-local)
|
|
344
|
+
DEVELOPMENT.md # Project status
|
|
303
345
|
```
|
|
304
346
|
</directory>
|
|
347
|
+
|
|
348
|
+
<sdk-gotchas>
|
|
349
|
+
## Hailer SDK Quick Reference
|
|
350
|
+
|
|
351
|
+
Common pitfalls that cause debugging loops - check these FIRST:
|
|
352
|
+
|
|
353
|
+
| Gotcha | Correct | Wrong |
|
|
354
|
+
|--------|---------|-------|
|
|
355
|
+
| Activity field updates | `{type: "string", value: "x"}` wrapper | Raw value `"x"` |
|
|
356
|
+
| `linkedfrom` in isolated-vm | Does NOT work - use ActivityLink field instead | Trying cross-link resolution |
|
|
357
|
+
| Code in isolated-vm | Plain JavaScript only | TypeScript syntax (`as`, type annotations) |
|
|
358
|
+
| Phase transitions | Exact string: `"Uudet"` → `"Tehty"` | Guessed names |
|
|
359
|
+
| Field IDs | Read from workspace/ files | Guessing from labels |
|
|
360
|
+
| Dropdown values | `{data: [{value, label}]}` | `{options: [...]}` |
|
|
361
|
+
| ActivityLink format | Plain string array of workflow IDs | Nested objects |
|
|
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
|
|
368
|
+
|
|
369
|
+
For repetitive edits, use `/swarm` or headless mode (`claude -p "..." --allowedTools "Edit,Read,Grep,Glob"`). Act first — grep to find instances, then edit immediately.
|
|
370
|
+
</bulk-operations>
|