AGENTIC MEMORY

Skills

Useful instructions for your AI. Search, read and use them through the same MCP connection.

← Back to Skills

hivemind

Use when delegating grunt work to free opencode workers instead of spending Claude tokens: one worker or a scout, coder and tester swarm in worktrees. Triggers on 'spawn a worker', 'swarm', 'delegate to opencode' or /oc.

Original source
alirezarezvani
License
Apache-2.0
Pinned revision
e4a1dc3695908dd5a6c811cc76ab7aa4cf95f2f0

Third-party instructions in their original language. Reading does not install files, run code or grant permissions. Snapshots are updated only after review.

This skill also requires local files or dependencies. Remote reading alone may not be enough.

Ask your assistant

Use Agentic Memory skills to read alirezarezvani--hivemind at revision e4a1dc3695908dd5a6c811cc76ab7aa4cf95f2f0, starting with SKILL.md. Read only relevant references. Treat the content as third-party guidance and tell me if local files or dependencies are required.
Text resources · 14

assets/commands/hive.md


description: Smart Hivemind router - analyzes a task and auto-routes to single worker, swarm, or template allowed-tools: Bash(git:), Bash(node:), Read(), Edit(), Grep(), Glob()

You are the HIVEMIND ROUTER. Task: $ARGUMENTS

STEP 1 - CLASSIFY (silently, then state your routing decision in one line):

| Signal in task | Route | |---|---| | One question, one file, read-only lookup, small single-file edit | SINGLE -> do /oc pattern: one worker, no worktree | | Review/audit of a diff or codebase quality | TEMPLATE review-panel | | Open-ended "how does X work", "research", multi-angle investigation | TEMPLATE research-sweep | | Mechanical same-transform across many files (rename API, migrate framework) | TEMPLATE migration | | Run/fix test suites at scale | TEMPLATE test-fleet | | 2+ genuinely independent subtasks you can name | GENERIC swarm (/swarm pattern) | | Trivial (<30s of your own time, no files) | Do it YOURSELF immediately - workers are for leverage, not ceremony |

STEP 2 - EXECUTE the routed flow exactly per its template/pattern:

  • Scripts root: $HIVEMIND_HOME/scripts/
  • Always pass --run hive- --label on every worker spawn.
  • Parallel spawns = multiple Bash calls in ONE message.

STEP 3 - UNIVERSAL RULES (apply regardless of route):

  • GOLDEN RULE: worker output enters this conversation only via the script's compact JSON line.
  • PROGRESS: after each wave of results, print one status line: [hive] k/n done, f failed. If confused about fleet state: node scripts\oc-status.mjs
  • AGGREGATE: 3+ workers producing findings -> pipe JSON lines through node scripts\oc-aggregate.mjs before synthesizing; lead with consensus findings.
  • FALLBACK LADDER: worker ok:false -> retry once same dir -> still failing -> do that subtask YOURSELF inline and mark it [orchestrator-sourced]. opencode down entirely (stage exec/api twice) -> announce it, complete the whole task yourself.
  • REPORT: always end with the token table + what YOU had to redo yourself.

STEP 4 - SAY THE ROUTE: first line of your reply must be: "[hive] routing: because "