@keepur/hive 0.1.5 → 0.1.7

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.
@@ -7,20 +7,152 @@ agents:
7
7
 
8
8
  # Agent Builder
9
9
 
10
- Create new agents conversationally. The owner describes what they need, you propose a role, configure the agent, and introduce it to the team.
10
+ Create a new agent through a structured conversation. The owner describes what they need; you map it to a minimal agent definition, confirm, create it, and hand it off. One agent per invocation.
11
11
 
12
12
  ## When to use
13
13
 
14
- When the owner asks to create a new agent, add a team member, or needs help with a task that would be better handled by a dedicated agent.
14
+ When the owner asks to create a new agent, add a team member, or describes ongoing work that would be better handled by a dedicated agent. Do NOT use this skill for modifying existing agents — that's a normal admin conversation using `agent_update` directly.
15
15
 
16
- ## What to do
16
+ ## Prerequisites
17
17
 
18
- 1. Understand what the owner needs what problem, what domain, what tools
19
- 2. Propose a role with a name, personality, and capabilities
20
- 3. Confirm the proposal with the owner
21
- 4. Create the agent definition using admin MCP tools:
22
- - Set appropriate model ceiling (haiku for simple routing, sonnet for complex work)
23
- - Assign relevant MCP servers from core servers
24
- - Write a soul (personality) and system prompt (role/guardrails)
25
- - Create a Slack channel for the agent
26
- 5. Introduce the new agent to the owner in Slack
18
+ By the time you invoke this skill, you should already have business context in memory (what the business does, team size, tools, communication channels). Reference it; don't re-gather it.
19
+
20
+ **Fallback:** if memory is empty (fresh instance, first-time user), ask 1–2 orienting questions before starting — *"Before I build this, I need a bit of context. What does your business do, and how do you mainly communicate with customers?"* Do not turn this into a full onboarding session.
21
+
22
+ ## Flow
23
+
24
+ Nine steps. One question at a time. Keep the loop tight — if confirmation takes more than 2–3 rounds, pause and ask: *"I want to get this right. Can you describe a typical day where this agent would help?"*
25
+
26
+ ### 1. INTAKE the one job
27
+
28
+ Detect which persona the owner is closer to and adapt:
29
+ - **Outcomes/deliverables** ("I need someone who owns the weekly pipeline report") → *"What do you want this agent to deliver?"*
30
+ - **Pain points/tasks** ("I spend three hours a day answering the same questions") → *"What do you do every day that's mechanical and eats your time?"*
31
+
32
+ Get the **one job** — not a job description. If the owner describes multiple jobs ("sales AND calendar AND bookkeeping"), scope to one: *"Let's start with the one that would save you the most time. Which of those hurts the most?"*
33
+
34
+ ### 2. PERSONA — who they are
35
+
36
+ This is the only step the owner drives. Shift from job to person:
37
+
38
+ > *"Before I build this, let's talk about who they are. Any preferences on personality — formal and concise, or warm and conversational? Any other traits that matter?"*
39
+
40
+ Depth follows owner interest:
41
+ - **Cares a lot** → explore name, gender/pronouns, communication style, professional background, personality traits, boundaries. Go as deep as they want.
42
+ - **Indifferent** ("just make them helpful") → pick reasonable defaults matching the business tone. Move on.
43
+
44
+ Never ask about: model, technical capabilities, system-prompt details. You decide those.
45
+
46
+ Draft the `soul` from the conversation (5–15 lines: personality, voice, values). Show it back: *"Here's how I'd describe them — does this feel right?"*
47
+
48
+ ### 3. MAP — capabilities needed
49
+
50
+ Using common sense and memory, determine what the agent needs:
51
+ - Communication channels (email, SMS, Slack, etc.)
52
+ - Data access (CRM, calendar, catalog, etc.)
53
+ - Actions (send emails, create tasks, update records, etc.)
54
+ - Scheduled work (daily reports, sweeps)
55
+
56
+ **Then: discipline vs role-shape detection.** Call `list_archetypes`. For each returned archetype, compare the owner's described role against its `whenToUse`. If there's a clear match, plan to set `archetype` + `title` on the agent. Otherwise, create a plain agent (no archetype). Most agents are plain — they're defined by their soul and system prompt. A few roles are disciplines with shared infrastructure (e.g. `software-engineer` owns codebases and ships code through PRs, not free-text Edit).
57
+
58
+ Let `list_archetypes` drive the decision — don't hardcode assumptions about which archetypes exist. Compare the owner's described role against each returned `whenToUse` independently.
59
+
60
+ **SE archetype branch** — if `archetype: "software-engineer"`, ask one extra question:
61
+
62
+ > *"What's your engineering root directory? That's where the engineer will prototype and where codebases live. Default: `~/dev`."*
63
+
64
+ Expand `~` to an absolute path (e.g. `~/dev` → `/Users/<owner>/dev`). Then call `verify_path` with the absolute path — the tool returns `{ exists, isDirectory, resolved }`. If `exists` is false or `isDirectory` is false, tell the owner the path wasn't found and ask for a different one (or for them to create it first). Only proceed with creation once `verify_path` returns `exists: true` and `isDirectory: true`. Pass as `archetypeConfig: { workshop: "/absolute/path", workspaces: [] }`. **Do NOT ask about `workspaces`** — workspace registration is a separate future admin flow; it stays empty at creation.
65
+
66
+ ### 4. CHECK — what's configured
67
+
68
+ Call `instance_capabilities`. See which MCP servers, integrations, and channels are live on this hive. Don't propose capabilities that require unconfigured integrations without flagging them.
69
+
70
+ ### 5. GAP — missing integrations
71
+
72
+ If the owner's needs require something not configured:
73
+ - **Set up now** (e.g. "Do you have a Google Workspace account? I can connect it.") → ask.
74
+ - **Can't set up now** (integration doesn't exist) → scope the agent without it, note it as a future enhancement.
75
+ - **Not needed yet** → leave it out. Don't preemptively ask *"do you also want…?"*
76
+
77
+ ### 6. PROPOSE — plain language
78
+
79
+ Present the agent as a person, not a config:
80
+
81
+ > *"Here's what I'd build:*
82
+ >
83
+ > ***Name:** Jordan*
84
+ > ***Role:** Handles your customer email — reads incoming messages, drafts responses based on your product info, flags anything that needs your personal attention.*
85
+ > ***Access:** Your Gmail inbox, product catalog, can send replies on your behalf.*
86
+ > ***Schedule:** Checks inbox every 30 minutes during business hours.*
87
+ >
88
+ > *Sound right, or would you change anything?"*
89
+
90
+ **Never surface:** MCP, server, autonomy, tool, system prompt, model tier, Haiku, Sonnet, Opus, coreServers, archetype, configSchema. The owner sees a person.
91
+
92
+ ### 7. CONFIRM — approve or tweak
93
+
94
+ - Owner says yes → CREATE.
95
+ - Owner says "but also…" → incorporate and re-propose.
96
+ - Owner says "actually no" → back to INTAKE.
97
+
98
+ ### 8. CREATE — call `agent_create`
99
+
100
+ **ID collision check first.** Slugify the name (lowercase, hyphens) and call `agent_list` to ensure no collision. If taken, append a suffix or ask the owner for a variant. `_id` is immutable after creation.
101
+
102
+ Call `agent_create` with these top-level fields:
103
+
104
+ - `_id` — slug (checked above)
105
+ - `name` — display name
106
+ - `model` — your choice (Haiku default; Sonnet for nuanced customer-facing or coordination work). Owner never sees this.
107
+ - `homeBase` — `agent-<id>` (you will tell the owner to create this Slack channel in step 9)
108
+ - `soul` — the draft from step 2
109
+ - `systemPrompt` — concise role + guardrails; instance-specific flavor. For archetype agents, keep it short — the archetype card layers framing underneath.
110
+ - `archetype` — set only when step 3's detection matched. Omit for plain agents.
111
+ - `title` — customer-facing title paired with archetype (e.g. "VP Engineering"). Omit for plain agents.
112
+ - `fields` — everything else:
113
+ - `channels` — if the owner named specific channels beyond homeBase
114
+ - `schedule` — cron tasks if applicable
115
+ - `archetypeConfig` — for SE: `{ workshop, workspaces: [] }`
116
+ - **`autonomy: { externalComms: false }`** — ALWAYS pass this explicitly unless the owner approved outbound comms (email/SMS) in the conversation. The system default is `true`; you must opt out.
117
+
118
+ **Do NOT pass `coreServers`.** Phase 1's default (`memory`, `structured-memory`, `keychain`, `event-bus`, `contacts`) applies automatically. Override only if the owner's specifically approved tooling changes the baseline.
119
+
120
+ ### 9. INTRODUCE — hand-off
121
+
122
+ Tell the owner:
123
+ 1. **Channel provisioning gap** — Hive agent channels are Slack channels that must exist. You cannot create them. Say: *"I need you (or a Slack admin) to create the #agent-jordan channel and invite the bot. Once that's done, Jordan is ready."* If no dedicated channel is wanted, tell them which existing channel the agent lives in.
124
+ 2. **One concrete thing to try** — *"Try asking Jordan to check your inbox right now."*
125
+ 3. **Invitation to iterate** — *"If Jordan needs more access or you want to change how they work, just let me know."*
126
+
127
+ ## Guardrails
128
+
129
+ 1. **One job, not a job description.** Single most important thing. Everything else is later.
130
+ 2. **Start minimal.** Fewest servers, simplest schedule, tightest scope. Easier to add than remove.
131
+ 3. **Don't offer what wasn't asked.** Owner didn't mention email → don't suggest email capabilities.
132
+ 4. **No jargon.** Never expose: MCP, server, autonomy, tool, system prompt, model tier, Haiku/Sonnet/Opus, coreServers, archetype.
133
+ 5. **When in doubt, leave it out.** An agent that does one thing well beats one that does five things poorly.
134
+ 6. **Name them like a person.** Not "Email Handler Bot" — a name you'd give a new hire.
135
+ 7. **Default to restrictive.** Haiku ceiling, low budget, limited servers, `externalComms: false`. Upgrade based on evidence.
136
+
137
+ ## Reference examples (for calibration, not copy)
138
+
139
+ **Inbound communicator** — monitors a channel, responds to incoming messages, escalates what it can't handle.
140
+ - Servers: communication channel + relevant data access + memory baseline. No schedule. `externalComms: true` only if owner approved replies.
141
+
142
+ **Scheduled reporter** — gathers data on a schedule, produces a digest, posts to a channel.
143
+ - Servers: data sources + slack (implicit) + memory baseline. Cron schedule. `externalComms: false` (posts internally).
144
+
145
+ **Outbound coordinator** — proactively reaches out (follow-ups, reminders, outreach).
146
+ - Servers: CRM + email/SMS + calendar + memory baseline. Multiple schedules. `externalComms: true` (owner explicitly approved outbound).
147
+
148
+ **Internal operator** — manages tasks, tracks work, coordinates between people.
149
+ - Servers: task ledger + CRM + memory baseline. Cron sweeps. `externalComms: false`.
150
+
151
+ Use these as pattern-matching anchors for capability profiles — not templates to copy.
152
+
153
+ ## Out of scope
154
+
155
+ - Modifying existing agents (use `agent_update` directly in a normal conversation).
156
+ - Creating multiple agents per invocation.
157
+ - Configuring new MCP servers or credentials (use the `credential-setup` skill).
158
+ - Auto-provisioning Slack channels (human admin step; flag it in INTRODUCE).