HIVE
Open Source · MIT License

Your AI team,
ready to work

HIVE is a Claude Code harness that gives your agents persistent memory, squad structure, and reusable skills — so every session starts with context instead of a blank slate.

HIVE is a folder structure and conventions layer that makes Claude Code behave like a team of specialists. No framework lock-in — just markdown files, Python scripts, and git.

Each squad has its own Claude persona, persistent memory (STATE.md), foundation docs, skills, and workers. When you open a squad folder, the right specialist loads automatically.

  • 11 pre-built squads (Commercial, Dev, Marketing, CS, Infra, Finance, Product, Operations, Quality, Intelligence, Orchestrator)
  • Persistent memory — L1/L2/L3 state per squad, survives sessions
  • 5 automation hooks — session branches, knowledge lookup, state sync
  • 50+ reusable skills — from issue management to multi-model AI reviews
  • Deterministic workers — cron scripts that update squad state without LLM calls
  • Multi-model via OpenRouter — second opinion, consensus, cost comparison
  • Zero cloud dependency — runs fully local, git is the only sync layer
  • Fork and adapt — rename personas, add squads, customize per company


Installation

Three steps. No package manager required.

  • 1

    Clone the repo

    Replace my-company with your company name. Fork if you want to track upstream changes.

    macOS / Linux
    Windows
    git clone https://github.com/felipeluissalgueiro/hive.git my-company
    cd my-company
    git clone https://github.com/felipeluissalgueiro/hive.git my-company
    cd my-company
  • 2

    Open in Claude Code

    Open the my-company/ folder in Claude Code (CLI, desktop, or IDE extension). Claude Code reads CLAUDE.md and loads the Stamper orchestrator automatically.

    macOS / Linux
    Windows
    # CLI
    claude
    
    # Or open my-company/ in Claude Code desktop app
    # CLI
    claude
    
    # Or open my-company/ in Claude Code desktop app
  • 3

    Run setup

    The setup skill (~5–10 min) asks about your company and configures each squad with relevant context.

    /hive-setup
    
    # What it does:
    # · Asks company name, industry, stage
    # · Asks your working style and preferences
    # · Lets you pick which squads to activate
    # · Fills foundation docs with your context
    # · Writes everything to the right files
After setup: every squad knows your company. Sessions start with relevant state instead of a blank slate. The more context you add, the better the output.

Quick Start

Open a squad and start working.

# Open a squad (loads persona + STATE + foundation)
/open-squad commercial

# Work with Victor (Head of Sales)...

# Close the squad (updates STATE, propagates L1 to orchestrator)
/close-squad commercial

# See what's happening across all squads
/status

# Search past incidents before a sensitive operation
python _core/lookup.py "deploy vercel"

Core workflow

CommandWhat it does
/hive-setupFirst-time company onboarding guided session
/open-squad <name>Load squad context + STATE + foundation docs
/close-squad <name>Update STATE + propagate L1 to orchestrator
/statusAggregate L1 from all active squads
/log-incidentRecord incident to hub + Obsidian
/log-sessionClose session with structured notes

Squads

11 pre-built specialist agents. Each squad has a persona, scope, memory, and skills.

When you open a squad folder, Claude Code loads both the root CLAUDE.md (Stamper) and the squad's CLAUDE.md (specialist). You get two personas in one session.

Commercial
Victor — Head of Sales
Leads, pipeline, proposals, CRM
CS
Leah — Head of CS
Onboarding, health scores, retention
Marketing
Maya — Head of Marketing
Content, campaigns, brand, ICP
Dev
Ethan — Lead Engineer
Code, PRs, reviews, architecture
Product
Nora — Head of Product
Roadmap, features, prioritization
Finance
Cole — CFO
P&L, invoices, forecasting
Infra
Diego — DevOps Lead
VPS, CI/CD, monitoring, security
Operations
Sam — Head of Ops
OKRs, processes, HR, culture
Quality
Quinn — Head of Quality
SOPs, audits, QA, compliance
Intelligence
Rex — Competitive Intel
Market, competitors, war games
Orchestrator
Stamper — Chief of Staff
Cross-squad coordination, decisions
Personas are generic — rename them in squads/<name>/CLAUDE.md to match your company culture. The persona name is only referenced inside the CLAUDE.md.

Memory System

Three-layer STATE.md — survives sessions, searchable, aggregatable.

Every squad maintains a memory/STATE.md with three layers. L1 is designed to be machine-readable for aggregation by /status.

# squads/commercial/memory/STATE.md

[L1]
Victor (Commercial) — 3 hot leads, 1 proposal pending review, pipeline $42k.
Last updated: 2026-06-02 14:30

[L2]
In progress:
- Proposal for Acme Corp — send by EOW
- Follow-up call with TechStartup scheduled Friday
- Updating ICP profile with Q2 learnings

[L3]
Backlog:
- Cold email sequence for segment B
- Competitor analysis for enterprise tier

Memory files per squad

FilePurpose
STATE.mdLive operational state — L1 (now), L2 (in progress), L3 (backlog)
decisions.mdArchitectural and operational decisions log, append-only
gotchas.mdKnown pitfalls, lessons learned, non-obvious edge cases
MEMORY.mdIndex of all saved memory files with one-line hooks

Knowledge lookup

Before sensitive operations (deploy, DNS change, integration), search past incidents and sessions:

# Search across incidents + sessions + memory
python _core/lookup.py "deploy vercel"

# Filter by source
python _core/lookup.py "ghl webhook" --source incidents
python _core/lookup.py "auth" --source sessions --since 2026-01-01

# JSON output for scripts
python _core/lookup.py "supabase" --json --top 5

Hooks

5 automation hooks handle session management, state sync, and safety checks.

HookTriggerWhat it does
PreToolUse — session branchFirst file write in sessionCreates session/YYYY-MM-DD-HHMM branch — no direct main commits
PostToolUse — state flagAfter squad file modifiedMarks STATE.md dirty — used by stop hook to decide what to commit
Stop — session mergeSession endsAuto-commits on session branch, merges to main, cleans branch
UserPromptSubmit — routingEvery user messageDetects squad keywords, loads context if not already loaded
UserPromptSubmit — knowledgeSensitive operation keywordsRuns lookup.py — surfaces past incidents before action
UserPromptSubmit — recoverySession startDetects unfinished previous session, recovers context
Hooks are Python scripts in .claude/hooks/. They are opt-in — disable any hook by removing its entry from .claude/settings.json. Never force-push to main; the stop hook depends on clean branch history.

Workers

Deterministic cron scripts that update squad state without AI in the loop.

Workers live in workers/ and run on a schedule via _core/harness.sh. They are pure Python — no LLM calls. They read data sources and write to STATE.md.

Design rules

  • Deterministic — same input, same output. No side effects.
  • Write only to STATE.md — never CLAUDE.md, skills, or foundation docs.
  • Idempotent — safe to run multiple times.
  • Fail loudly — log errors, don't swallow exceptions silently.
# _core/harness.sh — add workers here
run_worker "workers/daily-revenue.py" "09:00"
run_worker "workers/health-scores.py" "every:1h"
run_worker "workers/competitor-scan.py" "every:24h"

Example workers

WorkerSquadUpdates
daily-revenue.pyFinanceL1 with current MRR and variance vs. last month
health-scores.pyCSL1 with churned, at-risk, healthy counts
competitor-scan.pyIntelligenceL2 with new competitor mentions and price changes
pipeline-summary.pyCommercialL1 with pipeline value and hot lead count

Global Skills

50+ reusable commands available to all squads. Invoke with /skill-name.

Foundation

SkillWhat it does
/hive-setupGuided company onboarding — fills all squad context files
/open-squadLoad squad persona + STATE + foundation docs
/close-squadUpdate STATE + propagate L1 to orchestrator memory
/statusAggregate L1 from all active squads
/log-sessionStructured session notes — decisions, gotchas, next steps
/log-incidentRecord incident to hub with root cause and fix

Dev workflow

SkillWhat it does
/create-issueCreate Linear issue with full description and acceptance criteria
/plan-issueBreak issue into technical plan before executing
/start-issueCheckout branch + mark In Progress in Linear
/close-issueMerge + mark Done in Linear + deploy validation
/codex-reviewP1/P2/P3 code review via OpenAI Codex CLI
/debugStructured debugging with Pólya problem-solving method

View full skills catalog (50 skills) →


OpenRouter Skills

Multi-model AI skills via OpenRouter — second opinion, consensus, cost comparison, ICP simulation.

HIVE ships 7 skills that query multiple AI models via OpenRouter. Useful for reducing model bias, validating decisions, and finding the cheapest model for recurring tasks.

Setup

  1. Get an API key at openrouter.ai
  2. Set OPENROUTER_API_KEY=sk-or-... in your environment
  3. Run the install script: bash _core/mcp/install.sh
# macOS / Linux
export OPENROUTER_API_KEY=sk-or-your-key-here
bash _core/mcp/install.sh

# Windows (PowerShell)
$env:OPENROUTER_API_KEY = "sk-or-your-key-here"
bash _core/mcp/install.sh

Available skills

SkillWhat it doesUse when
/second-opinionQuery 1 model, get raw responseQuick second take from Kimi, GPT-5.5, Grok
/consensusN models in parallel, overlap/divergence synthesisAvoid single-model bias on important decisions
/cost-compareSame task across 3–6 models, real cost matrixBefore embedding a model in a recurring worker
/icp-check2–3 models simulate your ICP reading an assetValidate copy, emails, landing pages before publishing
/anti-bubbleNeutral model reads asset with NO company contextDetect jargon and assumptions insiders can't see
/dod-checkCheap model validates diff vs. acceptance criteriaRoutine PR validation before human review
/code-review-modelP1/P2/P3 code review via any modelSecond opinion on code reviews, security scan

Supported models (aliases)

AliasModelBest for
kimiKimi K2.6Coding, top open-weight
gpt5.5GPT-5.5Reasoning, flagship
grokGrok 4.202M context, low cost
gemini-proGemini (latest)Multimodal, long context
dsflashDeepSeek FlashNear-free, 1M context
qwenflashQwen FlashFast, cheap, 1M context

View full models map (30+ models) → · MCP setup guide →


Customization

HIVE is designed to be forked. Rename personas, add squads, extend skills.