an open-source alternative to the dots, bots and muses of the world, run an office of claude code/codex like agents on your laptop, sandboxes or anywhere, uses your existing subscriptions
HTML agent-harnessagent-orchestrationagentsai-agentsautonomous-agentsclaude-codecodexcoding-agentsdesktop-appdeveloper-toolselectrongemini-cliharnessharness-engineeringlocal-firstmemorymulti-agentopencodeorchestrationtypescript
feat(slack): professionalize outbound messages + additive system-prompt reply guidance
Chaitanya Giri75111da0aa2e
diff --git a/src/main/hive.ts b/src/main/hive.tsindex b91d8211..07f2820e 100644--- a/src/main/hive.ts+++ b/src/main/hive.ts@@ -555,6 +555,9 @@ export class HiveManager {? 'You are Michael\'s PREP ASSISTANT. You will be handed short, possibly vague instructions (each begins with "ENRICH TASK:"). For each one: (1) figure out which project it concerns and cd into the most relevant repo — you start in Michael\'s home directory; (2) gather concrete context READ-ONLY (exact file paths, current state, relevant code, conventions, active branch, gotchas) — NEVER modify, create, or delete files; (3) rewrite the instruction into ONE clear, self-contained prompt that Michael can execute autonomously, preserving the user\'s original intent without inventing scope. Then deliver it: write ONE message JSON into your outbox with "to":"god", "act":"request", a short subject, and the finished prompt as the body. Do NOT perform the task yourself — your only output is the improved prompt sent to Michael.': 'For anything ambiguous, cross-cutting, or needing sign-off, address a message to "god".';const guardrailsLine = 'Guardrails: a circuit breaker watches the floor — a "Circuit breaker: steer/constrain" message means you are looping or overspending, so STOP repeating, summarize what you tried, and follow it. Be token-frugal (a floor-wide or per-agent token budget can pause you). The shared plan has two parts: board.md (freeform; god is the sole scribe) and tasks.json (structured kanban — todo/doing/blocked/done).';+ const slackLine = meta.isGod+ ? 'SLACK REPLIES: When composing a Slack reply (or writing the `result` field of a Slack-origin kanban card), you MUST: (1) directly address what the user asked — never a bare "done"; (2) include the relevant specifics, outcome, and details; (3) format for Slack mrkdwn — open with a short *bold* headline, use bullet points for multiple items, wrap code/paths in `backtick` blocks, keep it concise (no walls of text). When finishing a Slack-origin task, always write a complete, user-facing, well-formatted `result` on the kanban card — the system posts it verbatim to Slack as the done reply.'+ : '';return [`You are "${meta.name}" (${meta.id}), an autonomous agent in a collaborating hive of Claude agents.`,`Your private workspace is ${dir}. The shared hive is ${root}. Full protocol: ${root}/PROTOCOL.md.`,@@ -567,6 +570,7 @@ export class HiveManager {guardrailsLine,memoryLine,godLine,+ slackLine,`Env vars available to you: AGENT_ID, AGENT_NAME, HIVE_ROOT, AGENT_DIR.`].filter(Boolean).join('\n');}diff --git a/src/main/index.ts b/src/main/index.tsindex 7022ee1b..0e3deb0e 100644--- a/src/main/index.ts+++ b/src/main/index.ts@@ -710,8 +710,8 @@ const TERMINAL_SLACK_ERRORS = new Set<string>([* result/description (falling back to the title), trimmed Slack-friendly. */function slackDoneSummary(task: HiveTask): string {const body = (task.result ?? task.description ?? '').trim();- const head = `:white_check_mark: *Done:* ${task.title}`;- const text = body ? `${head}\n${body}` : head;+ const head = `:white_check_mark: *${task.title}*`;+ const text = body ? `${head}\n\n${body}` : head;return text.length > 2800 ? `${text.slice(0, 2799)}…` : text;}diff --git a/src/renderer/src/hooks/useHive.ts b/src/renderer/src/hooks/useHive.tsindex 4656bc68..3c807c1a 100644--- a/src/renderer/src/hooks/useHive.ts+++ b/src/renderer/src/hooks/useHive.ts@@ -578,7 +578,7 @@ export function useHive(config: HarnessConfig | null): void {void window.cth.slackReply({channel: msg.channel,thread_ts: msg.thread_ts,- text: 'Your request is queued Munder Difflin office employees will start working shortly.'+ text: ':hourglass_flowing_sand: *Received.* Your request has been queued — the team is on it and will reply here when done.'});});}, [config?.onboardingComplete]);