{"id":50835346,"url":"https://github.com/azex-ai/hive","last_synced_at":"2026-06-14T03:04:28.511Z","repository":{"id":360925751,"uuid":"1185729126","full_name":"azex-ai/hive","owner":"azex-ai","description":"AI Agent Control Plane — orchestrate coding agents (Claude Code, Codex) with automated quality gates, repair loops, and workspace management","archived":false,"fork":false,"pushed_at":"2026-05-28T11:57:56.000Z","size":385,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-28T13:25:56.213Z","etag":null,"topics":["ai-agents","claude-code","codex","developer-tools","multi-agent","nextjs","orchestration","pipeline","quality-gates","task-orchestration","typescript"],"latest_commit_sha":null,"homepage":"https://github.com/azex-ai/hive","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/azex-ai.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-03-18T22:15:28.000Z","updated_at":"2026-05-28T11:58:18.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/azex-ai/hive","commit_stats":null,"previous_names":["azex-ai/hive"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/azex-ai/hive","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/azex-ai%2Fhive","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/azex-ai%2Fhive/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/azex-ai%2Fhive/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/azex-ai%2Fhive/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/azex-ai","download_url":"https://codeload.github.com/azex-ai/hive/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/azex-ai%2Fhive/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34307686,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-14T02:00:07.365Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai-agents","claude-code","codex","developer-tools","multi-agent","nextjs","orchestration","pipeline","quality-gates","task-orchestration","typescript"],"created_at":"2026-06-14T03:04:27.451Z","updated_at":"2026-06-14T03:04:28.501Z","avatar_url":"https://github.com/azex-ai.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Hive\n\n**AI Agent Control Plane** — Orchestrate coding agents in parallel with automated quality gates.\n\nHive turns AI coding assistants (Claude Code, Codex) from single-conversation tools into a managed production pipeline. Describe what you want, and Hive breaks it down, dispatches agents, runs quality checks at every stage, and auto-repairs failures — like an assembly line for code.\n\n## The Problem\n\nAI coding agents are powerful but hard to manage at scale:\n\n- **No orchestration** — You can only talk to one agent at a time\n- **No quality gates** — Generated code goes straight to review with no automated checks\n- **No repair loop** — When something fails, you manually re-prompt\n- **No context persistence** — Switch projects and lose all context\n\n## How Hive Works\n\n```\nYou: \"Implement user authentication\"\n                │\n                ▼\n┌─ Supervisor (Opus) ─────────────────────────┐\n│  Parse intent → Design spec → Decompose     │\n│  into independent subtasks                   │\n└──────────────┬──────────────────────────────┘\n               │\n    ┌──────────┼──────────┐\n    ▼          ▼          ▼\n Agent A    Agent B    Agent C     ← Parallel execution in git worktrees\n (Claude)   (Codex)   (Claude)\n    │          │          │\n    ▼          ▼          ▼\n┌─ Quality Gates (automatic) ─────────────────┐\n│  lint → build → test → review → integrate    │\n│                                              │\n│  Gate fails? → New agent repairs → Re-check  │\n│  3 rounds failed? → Escalate to human        │\n└──────────────────────────────────────────────┘\n                │\n                ▼\n            ✅ Done\n```\n\n### Key Concepts\n\n- **Assembly Line** — Tasks flow through stages automatically. Human intervention is the exception, not the norm.\n- **Quality Gates** — Each stage (lint, build, test, review, integrate) runs independently and produces command-level evidence. No trusting agent self-reports.\n- **Repair by Fresh Eyes** — When a gate fails, a *new* agent fixes it (avoids attention blindness). Like space capsule docking — fix independently, then re-integrate.\n- **Workspace Blueprints** — Each project gets a `.hive/blueprint.json` with project type, structure, dependencies, and progress checkpoints.\n- **Model Routing** — Deep reasoning (Opus) for architecture and review. Fast models for execution. Benchmark-driven dynamic routing over time.\n\n## Quick Start\n\n```bash\ngit clone https://github.com/azex-ai/hive.git\ncd hive\nnpm install\nnpm run dev\n```\n\nOpen http://localhost:58080, select a workspace, and start describing tasks.\n\n### Requirements\n\n- Node.js 20+\n- [Claude Code CLI](https://docs.anthropic.com/en/docs/claude-code) (`claude` command available)\n- Optional: [Codex CLI](https://github.com/openai/codex) for multi-agent\n\n## Architecture\n\n```\nsrc/\n├── app/                    Next.js 16 App Router\n│   ├── api/                REST API\n│   │   ├── tasks/          Task lifecycle (CRUD, run, approve, reject, pipeline)\n│   │   ├── chat/           Supervisor chat (streaming + status)\n│   │   ├── workspace/      Workspace init, browse, blueprint\n│   │   ├── benchmarks/     Model performance tracking\n│   │   └── events/         SSE real-time event stream\n│   ├── tasks/[id]/         Task detail page (pipeline view, diff, terminal)\n│   └── setup/              Workspace selector with directory browser\n├── components/             React components (shadcn/ui, dark mode)\n│   ├── pipeline-view.tsx   Real-time pipeline stage visualization\n│   ├── chat-input.tsx      Streaming chat with supervisor\n│   └── ...\n└── lib/\n    ├── pipeline/           Pipeline automation engine\n    │   ├── orchestrator.ts ★ Core: runs tasks through quality gates\n    │   ├── gates.ts        Quality gate implementations (lint/build/test)\n    │   └── model-router.ts Benchmark-driven model selection\n    ├── runtime/            Pluggable agent runtimes\n    │   ├── types.ts        AgentRuntime interface\n    │   ├── claude.ts       Claude Code SDK implementation\n    │   └── codex.ts        Codex CLI implementation\n    ├── blueprint.ts        Workspace scanning + checkpoint system\n    ├── scheduler.ts        Task DB + lifecycle (SQLite)\n    ├── executor.ts         Orchestrator: worktree → runtime → pipeline\n    ├── supervisor.ts       Chat supervisor (streaming, session pool)\n    └── worktree.ts         Git worktree isolation\n```\n\n## Tech Stack\n\n| Layer | Technology |\n|-------|-----------|\n| Framework | Next.js 16 (App Router, Turbopack) |\n| UI | shadcn/ui + Tailwind CSS v4 + Geist fonts |\n| Database | SQLite (better-sqlite3, zero config) |\n| Agent Runtime | Claude Code SDK, Codex CLI (pluggable) |\n| Real-time | Server-Sent Events (SSE) |\n| Isolation | Git worktrees (one branch per task) |\n\n## Pipeline Stages\n\nEvery task automatically flows through:\n\n| Stage | What it does | Model |\n|-------|-------------|-------|\n| **code** | Agent implements the task in isolated worktree | sonnet |\n| **lint** | Auto-detects project type (Node/Go), runs linter | machine |\n| **build** | Runs build command | machine |\n| **test** | Runs test suite | machine |\n| **review** | Spec ↔ output consistency check | opus |\n| **integrate** | Merge verification (build + test on merged code) | machine |\n\nGates detect project type automatically — Node.js (`npm run lint/build/test`), Go (`go vet/build/test`), or skip if not applicable.\n\n## Workspace Management\n\n```\n/setup → Browse directories → Select project\n         ↓\n     Blueprint scan:\n     - Project type (Node/Go/mixed/unknown)\n     - Config files, dependencies, scripts\n     - Git state (branch, commit, dirty files)\n     - Progress checkpoint\n         ↓\n     Tasks scoped to workspace\n     Chat history isolated per workspace\n     Supervisor context includes blueprint\n```\n\n## Configuration\n\nCreate `hive.yaml` in the project root (optional — defaults are sensible):\n\n```yaml\nrepo: .\nagents:\n  claude:\n    command: claude\n    max_concurrent: 3\n  codex:\n    command: codex\n    max_concurrent: 2\n\nsupervisor:\n  agent: claude\n  model: opus\n\npipeline:\n  max_repair_rounds: 3\n  self_review_probability: 0.2\n  gates: [lint, build, test, review, integrate]\n  model_routing:\n    default:\n      design: opus\n      code: sonnet\n      review: opus\n      repair: sonnet\n```\n\n## Design Philosophy\n\n\u003e Code is a byproduct of probabilistic generators. Constraints and tests are the real assets.\n\nBased on three theoretical anchors:\n- **Control Theory** (Wiener) — Tests are control signals, not just verification\n- **Bounded Rationality** (Simon) — Don't expect perfect output; iterate fast with feedback\n- **Stigmergy** — Agents coordinate through shared environment (git, DB), not direct messaging\n\nInspired by Toyota Production System: WIP limits, station-level QA, andon cords, takt time.\n\nFull design document: [`docs/DESIGN.md`](docs/DESIGN.md)\n\n## Status\n\nEarly development. The core pipeline works end-to-end:\n\n- [x] Task creation via chat or API\n- [x] Auto-dispatch to available agents\n- [x] Git worktree isolation per task\n- [x] Automated quality gates (lint → build → test → review → integrate)\n- [x] Repair loop with fresh agents\n- [x] Pipeline visualization (real-time)\n- [x] Workspace management + blueprint scanning\n- [x] Token-level streaming in chat\n- [x] Model benchmarking infrastructure\n- [ ] Design spec generation (Layer 1 decompose)\n- [ ] Cross-review rounds\n- [ ] Benchmark-driven model routing (data collection phase)\n- [ ] Task dependency visualization\n- [ ] Workspace config persistence to YAML\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fazex-ai%2Fhive","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fazex-ai%2Fhive","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fazex-ai%2Fhive/lists"}