vibe_discover
Find developers building similar projects using suggest, search, or active commands.
Instructions
Find people building similar things. Commands: suggest, search, active.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| command | No | Discovery command to run | |
| query | No | Search query (for search command) |
Implementation Reference
- tools/discover.js:23-40 (schema)Input schema definition for vibe_discover. Defines the 'command' enum (suggest, search, active) and optional 'query' string for the search command.
const definition = { name: 'vibe_discover', description: 'Find people building similar things. Commands: suggest, search, active.', inputSchema: { type: 'object', properties: { command: { type: 'string', enum: ['suggest', 'search', 'active'], description: 'Discovery command to run' }, query: { type: 'string', description: 'Search query (for search command)' } } } }; - tools/discover.js:42-119 (handler)Main handler function for vibe_discover. Implements three commands: 'suggest'/'active' (shows online/recently active users), 'search' (filters users by query matching handle or one_liner/note), and default (help text listing commands). Returns formatted markdown display.
async function handler(args) { const initCheck = requireInit(); if (initCheck) return initCheck; const myHandle = config.getHandle(); const command = args.command || 'suggest'; let display = ''; try { // Get active users + recently active for richer discovery const users = await store.getActiveUsers({ includeRecent: true }); const recentUsers = users._recent || []; const others = users.filter(u => u.handle !== myHandle); const recentOthers = recentUsers.filter(u => u.handle !== myHandle); switch (command) { case 'suggest': case 'active': { if (others.length === 0 && recentOthers.length === 0) { display = `## Discover _No one's been active recently. Be the first!_`; } else { if (others.length > 0) { display = `## Online Now\n\n`; for (const u of others) { display += `**@${u.handle}**\n`; display += `${u.note || u.one_liner || 'Building something'}\n`; display += `_${formatTimeAgo(u.lastSeen)}_\n\n`; } } if (recentOthers.length > 0) { display += others.length > 0 ? `---\n\n## Recently Active\n\n` : `## Recently Active\n\n`; for (const u of recentOthers.slice(0, 8)) { display += `○ **@${u.handle}** — ${u.one_liner || 'Building something'}\n`; display += ` _${formatTimeAgo(u.lastSeen)}_\n\n`; } } display += `Say "message @handle" to connect · "follow @handle" to add them`; } break; } case 'search': { if (!args.query) { return { display: 'Provide a search query: discover search "ai"' }; } const q = args.query.toLowerCase(); const matches = others.filter(u => (u.note || u.one_liner || '').toLowerCase().includes(q) || u.handle.toLowerCase().includes(q) ); if (matches.length === 0) { display = `No one building "${args.query}" right now.`; } else { display = `## Building: "${args.query}"\n\n`; for (const u of matches) { display += `**@${u.handle}** — ${u.note || u.one_liner || 'Active'}\n`; } } break; } default: display = `## Discover Commands **\`discover suggest\`** — See who's building right now **\`discover search <query>\`** — Find people by what they're working on **\`discover active\`** — Same as suggest`; } } catch (error) { display = `Discovery error: ${error.message}`; } return { display }; } - tools/discover.js:1-121 (registration)Exports the {definition, handler} module. Required by index.js line 173 as require('./tools/discover') and mapped to vibe_discover in the tools registry.
/** * vibe discover — Find your people * * Smart matchmaking based on: * - What you're building (similar projects) * - What you've shipped (complementary skills) * - When you're active (timezone overlap) * - Shared interests (tags) * * Commands: * - discover suggest — Get personalized recommendations * - discover search <query> — Find people building specific things * - discover interests — Browse people by interest tags * - discover active — Show who's building similar things right now * - discover skills — Skills marketplace (absorbed from skills-exchange) * - discover partner — Find workshop partner (absorbed from workshop-buddy) */ const config = require('../config'); const store = require('../store'); const { formatTimeAgo, requireInit } = require('./_shared'); const definition = { name: 'vibe_discover', description: 'Find people building similar things. Commands: suggest, search, active.', inputSchema: { type: 'object', properties: { command: { type: 'string', enum: ['suggest', 'search', 'active'], description: 'Discovery command to run' }, query: { type: 'string', description: 'Search query (for search command)' } } } }; async function handler(args) { const initCheck = requireInit(); if (initCheck) return initCheck; const myHandle = config.getHandle(); const command = args.command || 'suggest'; let display = ''; try { // Get active users + recently active for richer discovery const users = await store.getActiveUsers({ includeRecent: true }); const recentUsers = users._recent || []; const others = users.filter(u => u.handle !== myHandle); const recentOthers = recentUsers.filter(u => u.handle !== myHandle); switch (command) { case 'suggest': case 'active': { if (others.length === 0 && recentOthers.length === 0) { display = `## Discover _No one's been active recently. Be the first!_`; } else { if (others.length > 0) { display = `## Online Now\n\n`; for (const u of others) { display += `**@${u.handle}**\n`; display += `${u.note || u.one_liner || 'Building something'}\n`; display += `_${formatTimeAgo(u.lastSeen)}_\n\n`; } } if (recentOthers.length > 0) { display += others.length > 0 ? `---\n\n## Recently Active\n\n` : `## Recently Active\n\n`; for (const u of recentOthers.slice(0, 8)) { display += `○ **@${u.handle}** — ${u.one_liner || 'Building something'}\n`; display += ` _${formatTimeAgo(u.lastSeen)}_\n\n`; } } display += `Say "message @handle" to connect · "follow @handle" to add them`; } break; } case 'search': { if (!args.query) { return { display: 'Provide a search query: discover search "ai"' }; } const q = args.query.toLowerCase(); const matches = others.filter(u => (u.note || u.one_liner || '').toLowerCase().includes(q) || u.handle.toLowerCase().includes(q) ); if (matches.length === 0) { display = `No one building "${args.query}" right now.`; } else { display = `## Building: "${args.query}"\n\n`; for (const u of matches) { display += `**@${u.handle}** — ${u.note || u.one_liner || 'Active'}\n`; } } break; } default: display = `## Discover Commands **\`discover suggest\`** — See who's building right now **\`discover search <query>\`** — Find people by what they're working on **\`discover active\`** — Same as suggest`; } } catch (error) { display = `Discovery error: ${error.message}`; } return { display }; } module.exports = { definition, handler }; - index.js:36-36 (registration)Tool annotation registration: vibe_discover marked as readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: true in TOOL_ANNOTATIONS.
vibe_discover: { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: true }, - index.js:60-60 (helper)Prompt inference for logging: 'discover' command maps to 'discover ${args.command || "suggest"}' in inferPromptFromArgs.
case 'discover': return `discover ${args.command || 'suggest'}`;