From Vibe Coding to Hive Coding β Plan first. Execute with trust. Context persists.
Untitled.video.-.Made.with.Clipchamp.mp4
Vibe coding is powerful but chaotic. Without structure:
| Pain Point | What Happens |
|---|---|
| Lost context | New session = start from scratch. "We discussed this yesterday" means nothing. |
| Subagents go wild | Parallel agents do their own thing. No coordination, duplicated work. |
| Scope creep | "Add dark mode" becomes "rewrite the entire theme system." |
| Messes to clean up | Agent changes 47 files. Half are broken. Good luck reverting. |
| No audit trail | "What happened?" Nobody knows. Logs scattered everywhere. |
| Agent hallucination | Agent invents solutions that don't fit your codebase. No grounding. |
| Problem | Hive Solution |
|---|---|
| Lost context | Context persists β Feature-scoped knowledge survives sessions |
| Subagents go wild | Batched parallelism β Coordinated execution with context flow |
| Scope creep | Plan approval gate β Human shapes, agent builds |
| Messes to clean up | Worktree isolation β Each task isolated, easy discard |
| No audit trail | Automatic tracking β Every task logged to .hive/ |
| Agent hallucination | Context files β Research and decisions ground agent work |
Hive doesn't change how you work. It makes what happens traceable, auditable, and grounded.
We studied what actually works in the AI coding community and built upon it:
| Source | What We Learned | Hive Implementation |
|---|---|---|
| Boris Cherny's 13 Tips | Feedback loops = 2-3x quality | Task-level verification with tests |
| Spec Kit | Specs are valuable | Specs emerge from dialogue, not upfront |
| Conductor | Context persistence matters | Feature-scoped .hive/context/ |
| Ralph Wiggum | Retry loops work for verification | TDD loops, not infinite retries |
| Oh My OpenCode | Agent delegation scales | OMO as Hive Queen, Hive as workflow |
| Antigravity | Plan gates build trust | Plan β Approve β Execute workflow |
"Give Claude a way to verify its work. When Claude has a feedback loop, it will 2-3x the quality of the final result." β Boris Cherny
See PHILOSOPHY.md for the full breakdown of what we learned from each tool.
-
Install the Agent Hive extension:
code --install-extension tctinh.vscode-hive
-
Create
.github/agents/Hive.agent.mdin your repository (copy from this repo or see the GitHub Copilot Guide) -
In Copilot Chat, invoke your agent:
I want to hive plan add user authentication
The extension provides Hive tools for plan-first development. The agent file teaches Copilot how to use them.
See the full GitHub Copilot Guide for creating and customizing your agent.
Add opencode-hive to your opencode.json:
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["opencode-hive"]
}OpenCode handles the rest β no manual npm install needed.
Run Agent Hive once to auto-generate a default configuration at ~/.config/opencode/agent_hive.json. Review it to ensure it matches your local setup.
{
"$schema": "https://raw.githubusercontent.com/tctinh/agent-hive/main/packages/opencode-hive/schema/agent_hive.schema.json",
"agentMode": "unified",
"disableSkills": [],
"disableMcps": [],
"agents": {
"hive-master": {
"model": "anthropic/claude-sonnet-4-20250514",
"temperature": 0.5
}
}
}| Option | Values | Description |
|---|---|---|
agentMode |
unified (default), dedicated |
unified: Single hive-master agent handles planning + orchestration. dedicated: Separate architect-planner and swarm-orchestrator agents. |
disableSkills |
string[] |
Globally disable specific skills (won't appear in hive_skill tool). |
disableMcps |
string[] |
Globally disable MCP servers. Options: websearch, context7, grep_app, ast_grep. |
Configure models for each agent role. Update these to models available on your system:
{
"agents": {
"hive-master": { "model": "anthropic/claude-sonnet-4-20250514", "temperature": 0.5 },
"scout-researcher": { "model": "anthropic/claude-sonnet-4-20250514", "temperature": 0.5 },
"forager-worker": { "model": "anthropic/claude-sonnet-4-20250514", "temperature": 0.3 },
"hygienic-reviewer": { "model": "anthropic/claude-sonnet-4-20250514", "temperature": 0.3 }
}
}All agents: hive-master, architect-planner, swarm-orchestrator, scout-researcher, forager-worker, hygienic-reviewer.
Skills provide specialized workflows that agents can load on-demand via hive_skill.
| Skill | Description |
|---|---|
brainstorming |
Explores user intent, requirements, and design before implementation |
writing-plans |
Creates detailed implementation plans with bite-sized tasks |
executing-plans |
Executes tasks in batches with review checkpoints |
dispatching-parallel-agents |
Dispatches multiple agents for concurrent independent work |
test-driven-development |
Enforces write-test-first, red-green-refactor cycle |
systematic-debugging |
Requires root cause investigation before proposing fixes |
verification-before-completion |
Requires running verification commands before claiming success |
parallel-exploration |
Fan-out research across multiple Scout agents |
code-reviewer |
Reviews code changes against plan for quality and alignment |
docker-mastery |
Docker container expertise β debugging, docker-compose, optimization |
agents-md-mastery |
AGENTS.md quality review β signal vs noise, when to prune |
Per-agent skills: Restrict which skills appear in hive_skill() tool:
{
"agents": {
"forager-worker": {
"skills": ["test-driven-development", "verification-before-completion"]
}
}
}Auto-load skills: Automatically inject skills into an agent's system prompt at session start:
{
"agents": {
"hive-master": { "autoLoadSkills": ["parallel-exploration"] },
"forager-worker": { "autoLoadSkills": ["test-driven-development", "verification-before-completion"] }
}
}Supported skill sources for autoLoadSkills:
- Hive builtin β Skills bundled with opencode-hive (always win if ID matches)
- Project OpenCode β
<project>/.opencode/skills/<id>/SKILL.md - Global OpenCode β
~/.config/opencode/skills/<id>/SKILL.md - Project Claude β
<project>/.claude/skills/<id>/SKILL.md - Global Claude β
~/.claude/skills/<id>/SKILL.md
Missing or invalid skills emit a warning and are skippedβstartup continues without failure.
How these interact:
skillscontrols what's available inhive_skill()β the agent can manually load theseautoLoadSkillsinjects skills unconditionally at session start β no manual loading needed- These are independent: a skill can be auto-loaded but not appear in
hive_skill(), or vice versa - Default
autoLoadSkillsare merged with user config (usedisableSkillsto remove defaults)
Auto-enabled by default. Disable with disableMcps:
| MCP | Tool | Description | Requirements |
|---|---|---|---|
websearch |
websearch_web_search_exa |
Web search via Exa AI | EXA_API_KEY env var |
context7 |
context7_query-docs |
Library documentation lookup | None |
grep_app |
grep_app_searchGitHub |
GitHub code search via grep.app | None |
ast_grep |
ast_grep_search |
AST-aware code search/replace | None (runs via npx) |
Set reasoning/effort levels per agent:
{
"agents": {
"hive-master": { "model": "anthropic/claude-sonnet-4-20250514", "variant": "high" },
"forager-worker": { "variant": "medium" }
}
}Variants must match keys in your OpenCode config at provider.<provider>.models.<model>.variants.
See packages/opencode-hive/README.md for advanced configuration options.
You: "Create a feature for user dashboard"
That's it. You're hiving.
Main Agent: "Build auth system"
β
βββ Subagent 1: Does... something?
βββ Subagent 2: Also does... something?
βββ Subagent 3: Conflicts with Subagent 1?
β
You: "What just happened?" π€·
Swarm Bee: Creates plan, you approve it
β
βββ Batch 1 (parallel):
β βββ Forager A (own worktree, tracked)
β βββ Forager B (own worktree, tracked)
β βββ Forager C (own worktree, tracked)
β β
β Context flows forward
β β
βββ Batch 2 (parallel):
β βββ Forager D (uses A+B+C results)
β βββ Forager E (uses A+B+C results)
β
Hive: Full audit of what each agent did
You: Clear visibility into everything β
The Hive Colony:
| Agent | Role |
|---|---|
| Hive (Hybrid) π | Plans + orchestrates (phase-aware, skills on-demand) |
| Architect (Planner) ποΈ | Discovers requirements, writes plans |
| Swarm (Orchestrator) π | Orchestrates execution, delegates to workers |
| Scout (Explorer/Researcher/Retrieval) π | Explores codebase + external docs/data |
| Forager (Worker/Coder) π― | Executes tasks in isolated worktrees |
| Hygienic (Consultant/Reviewer/Debugger) π§Ή | Reviews plan quality, OKAY/REJECT verdict |
You: "Let's add authentication to the app"
The agent creates a structured plan:
# User Authentication
## Overview
Add JWT-based authentication with login, signup, and protected routes.
## Tasks
### 1. Extract auth logic to service
Move scattered auth code to dedicated AuthService class.
### 2. Add token refresh mechanism
Implement refresh token rotation for security.
### 3. Update API routes
Convert all routes to use the new AuthService.Open VS Code. The Hive sidebar shows your plan. You can:
- Read through each task
- Add comments ("Use httpOnly cookies for tokens")
- Approve when ready
You: "Execute"
Each task runs in its own worktree. Parallel agents don't conflict. Everything is tracked.
When done, you have:
- Working code β Auth system implemented
- Clean git history β Each task merged cleanly
- Full audit trail β What was done, when, by which agent
.hive/features/user-auth/
βββ feature.json # Feature metadata
βββ plan.md # Your approved plan
βββ tasks.json # Task list with status
βββ contexts/ # Decisions and calibration
β βββ architecture.md
βββ tasks/
βββ 01-extract-auth-logic/
β βββ status.json # Task state
β βββ spec.md # Task context, prior/upcoming tasks
β βββ report.md # Summary, files changed, diff stats
βββ 02-add-token-refresh/
β βββ status.json
β βββ spec.md
β βββ report.md
βββ 03-update-api-routes/
βββ status.json
βββ spec.md
βββ report.md
That's hiving. Natural conversation β structured plan β approved execution β documented result.
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β 1. PLAN β
β Chat with your agent about what to build β
β Agent creates structured plan in .hive/ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β 2. REVIEW (in VS Code) β
β See the plan in sidebar β
β Add inline comments, refine, approve β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β 3. EXECUTE (parallel-friendly) β
β Tasks run in isolated worktrees β
β Batched parallelism with context flow β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β 4. SHIP β
β Clean merges, full history β
β Context persists for next time β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Visual management without leaving your editor:
- Sidebar β See all features and progress at a glance
- Inline Comments β Add review comments directly on plan.md
- Approve Button β One-click plan approval
- Real-time Updates β Watches
.hive/for changes - Launch Tasks β Open tasks in OpenCode from VS Code
- Expandable Tasks β Click to view spec.md and report.md for each task
βββββββββββββββββββββββββββββββββββββββ
β HIVE [+] β
βββββββββββββββββββββββββββββββββββββββ€
β βΌ user-auth [3/3] β
β
β ββ 01-extract-auth-logic β
β
β β ββ spec.md β
β β ββ report.md β
β ββ 02-add-token-refresh β
β
β ββ 03-update-api-routes β
β
β βΆ dark-mode [0/3] π β
β βΆ api-refactor [2/5] π β
βββββββββββββββββββββββββββββββββββββββ
Review plans, add comments, approve β all without leaving VS Code.
| Feature | Description |
|---|---|
| Feature Tree | Hierarchical view of all features, tasks, and their status |
| Plan Review | Open plan.md with syntax highlighting and inline commenting |
| Task Details | Expand any task to see spec.md (context) and report.md (results) |
| Status Icons | Visual indicators: β done, π in-progress, β³ pending, β failed |
| Context Files | Browse and edit context files stored per-feature |
| Session History | View feature history and status |
Important: The VS Code extension is a companion tool for OpenCode. It provides visualization and review capabilities but does not execute tasks on its own.
You need:
- OpenCode CLI β The AI coding assistant that runs the Hive workflow
- opencode-hive plugin β Installed in your OpenCode configuration
- vscode-hive extension β For visual management in VS Code
The extension watches your .hive/ directory and displays the current state. All planning and execution happens through OpenCode.
- Open your project in VS Code (must have
.hive/directory) - Click the Hive icon in the Activity Bar (left sidebar)
- Browse features β Expand to see tasks, context, sessions
- Review plans β Click on plan.md to open with inline commenting
- Add comments β Use VS Code's comment feature on plan.md lines
- Approve plans β Click the approve button when ready
- Monitor progress β Watch task status update in real-time as OpenCode executes
| Package | Platform | Description |
|---|---|---|
| opencode-hive | npm | OpenCode plugin β 6 specialized bee agents, 15 tools, 11 skills |
| vscode-hive | VS Code | Visual management β review, comment, approve |
Agent Selection: Use hive, architect, or swarm as your primary agent. Use @scout, @forager, or @hygienic to mention subagents directly.
Human shapes the what and why. Agent handles the how. The approval gate is where trust is earned.
Break work into isolated tasks. Subagents work in parallel without conflicts. Batches coordinate context flow.
Every decision, every change, every agent action β automatically captured in .hive/
Clean git history (worktree merges), full documentation (generated as you work), traceable decisions (who did what, when).
| Feature | Vibe Coding | Spec-First Tools | Agent Hive |
|---|---|---|---|
| Setup required | None | Heavy | Minimal |
| Documentation | None | Upfront | Emerges from work |
| Planning | Ad-hoc | Required first | Conversational |
| Tracking | None | Manual | Automatic |
| Audit trail | None | If maintained | Built-in |
| Multi-agent ready | Chaos | β | β Native |
| Subagent tracing | Painful | β | β Automatic |
| VS Code UI | β | β | β Full support |
Hive is built on 7 core principles:
- Context Persists β Calibration survives sessions. The "3 months later" problem solved.
- Plan β Approve β Execute β Dialogue until approved, then trust. Two phases with a clear gate.
- Human Shapes, Agent Builds β Human owns the why. Agent owns the how.
- Good Enough Wins β Capture what works for this context. Reject over-engineering.
- Batched Parallelism β Parallel tasks in batches. Sequential batches share context.
- Tests Define Done β For implementation tasks, tests provide the feedback loop.
- Iron Laws + Hard Gates β Non-negotiable constraints enforced by tools, not guidelines.
See PHILOSOPHY.md for the full framework.
Hive complements these excellent projects:
| Tool | What It Does | How Hive Relates |
|---|---|---|
| Oh My OpenCode | Agent-first delegation with specialized workers | Perfect combo: OMO as Hive Queen orchestrating Hive workers |
| Conductor | Context-driven track-based execution | Similar goals; Hive adds worktree isolation + batching |
| Spec Kit | Heavy upfront specification | Hive: specs emerge from planning, not before |
| Ralph Wiggum | Loop-until-done persistence | Different philosophy; Hive plans first, not retries first |
| Platform | Setup | Status |
|---|---|---|
| GitHub Copilot | Install extension + create agent file | Full support |
| OpenCode | Add opencode-hive plugin |
Full support |
| VS Code | Extension for visual management | Full support |
Designed to work seamlessly with:
- GitHub Copilot β Use keyword
hivein Copilot Chat - OpenCode β The AI coding CLI
- VS Code β Your editor for reviews
- Git β Worktrees for isolation
MIT with Commons Clause β Free for personal and non-commercial use. See LICENSE for details.
Stop vibing. Start hiving. π
Plan first. Execute with trust. Context persists.