Skip to content

feat: Claude Code Hive plugin — native orchestration, 8 gate tools, 3 agents#84

Merged
tctinh merged 3 commits into
mainfrom
feat/claude-code-hive-plugin
Apr 22, 2026
Merged

feat: Claude Code Hive plugin — native orchestration, 8 gate tools, 3 agents#84
tctinh merged 3 commits into
mainfrom
feat/claude-code-hive-plugin

Conversation

@tctinh

@tctinh tctinh commented Apr 13, 2026

Copy link
Copy Markdown
Owner

Summary

This branch rebases the Claude Code Hive work onto current main and tightens it around the current Hive / GitHub Copilot workflow instead of the earlier overengineered draft.

The main outcome is a publishable Claude Code delivery path:

  • claude-code-hive ships the Claude-facing plugin assets
  • hive-mcp ships the MCP runtime those assets launch
  • the release pipeline now builds, validates, and publishes both packages alongside the existing packages

What Changed

Claude Code packaging

  • Added packages/claude-code-hive as an npm package for the Claude plugin assets
  • Shipped plugin.json, agents, commands, hooks, instructions, generated skills, and package-local launcher scripts
  • Switched the plugin manifest to launch ./scripts/launch-hive-mcp.mjs instead of depending on a repo-local sibling path
  • Added workspace/runtime preparation and asset verification scripts so local development and packed installs behave the same way

MCP runtime

  • Added packages/hive-mcp as a publishable MCP server package
  • Wired the server to accept an explicit project root and initialize services against that root
  • Normalized the exposed Hive tool surface to the current canonical names such as hive_feature_create, hive_plan_write, and hive_feature_complete
  • Added focused tests for service-root handling and tool-name coverage

Shared runtime cleanup

  • Moved shared worker-prompt and prompt-budgeting utilities into hive-core
  • Updated package dependencies to use release versions where the packaged consumers need them
  • Fixed Bun-path handling in release artifact tests so packaging checks work in Node-driven environments too

CI / release / recovery

  • Extended CI to build and test hive-mcp and claude-code-hive
  • Expanded the release workflow to handle separate publish/recovery toggles for:
    • opencode-hive
    • hive-mcp
    • claude-code-hive
    • VS Code Marketplace
    • GitHub Release
  • Enforced publish ordering so hive-mcp publishes before claude-code-hive
  • Generalized npm publish-access preflight checks across all publishable npm packages
  • Updated release contract tests to cover packed assets and install order

Docs

  • Added Claude Code install guidance to the root README
  • Added packages/claude-code-hive/README.md
  • Updated docs/RELEASING.md to document multi-package publish and recovery behavior

Representative Files

  • packages/claude-code-hive/plugin.json
  • packages/claude-code-hive/scripts/launch-hive-mcp.mjs
  • packages/claude-code-hive/scripts/prepare-workspace-hive-mcp.mjs
  • packages/claude-code-hive/scripts/verify-plugin-assets.mjs
  • packages/hive-mcp/src/index.ts
  • packages/hive-mcp/src/server.ts
  • packages/hive-mcp/src/services.ts
  • .github/workflows/ci.yml
  • .github/workflows/release.yml
  • release-artifacts.test.mjs
  • release-workflow.test.mjs

Validation

Ran successfully before push:

  • node --test release-artifacts.test.mjs
  • node --test release-workflow.test.mjs
  • bun run build
  • npm -ws --if-present run test
  • git diff --check

Claude-native implementation of Agent Hive as a Claude Code plugin.
Same philosophy (P1-P7), different implementation — uses Claude Code's
native primitives wherever possible.

Key design decisions:
- 3 agents (Hive/Opus, Forager/Sonnet, Hygienic/Opus) down from 7
- 8 MCP tools for gate enforcement only (down from 18)
- Forager has ONE MCP tool (hive_worktree_commit) as hard gate (P7)
- Workers use isolation:worktree, maxTurns:30 as circuit breaker
- Native Agent() dispatch, TodoWrite tracking, AskUserQuestion
- Tool allowlist = DAG fence (no Agent, no merge, no plan tools)

Packages added:
- packages/claude-code-hive/ — plugin (agents, skills, commands, hooks)
- packages/hive-mcp/ — thin MCP server wrapping hive-core services

Shared utils moved to hive-core:
- worker-prompt.ts — worker prompt builder
- prompt-budgeting.ts — deterministic prompt budgeting

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@tctinh tctinh force-pushed the feat/claude-code-hive-plugin branch from 4b572c8 to c8fb2c4 Compare April 21, 2026 15:13
@tctinh tctinh merged commit a80d93d into main Apr 22, 2026
1 check passed
@tctinh

tctinh commented Apr 22, 2026

Copy link
Copy Markdown
Owner Author

Merged and tagged v1.4.6, but the tagged Release workflow partially failed.

Observed state:

  • PR merged on main at a80d93d
  • tag v1.4.6 pushed successfully
  • publish-opencode-hive succeeded
  • publish-vscode succeeded
  • publish-hive-mcp failed
  • publish-claude-code-hive was skipped because hive-mcp failed first
  • GitHub Release creation was skipped for the same reason

Authenticated Actions log for publish-hive-mcp shows the concrete failure:

This is not a repo build/package artifact failure. Local release checks were green, and local dry-run publish for hive-mcp succeeds. The blocker is the npm credential used by the workflow for hive-mcp publish.

Recovery path after fixing the npm credential or package publish permission:

  • rerun Release with workflow_dispatch
  • release_mode = recover
  • recovery_tag = v1.4.6
  • recover_hive_mcp = true
  • recover_claude_code_hive = true
  • recover_github_release = true
  • leave recover_opencode_hive and recover_vscode disabled because those targets already succeeded

If the npm credential cannot be granted publish rights for hive-mcp under v1.4.6, cut a new patch release instead of retrying the same tag blindly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant