$ show Stanshy/AgentHub
AgentHub (also known as Maestro) is an Electron desktop application that orchestrates a virtual software development team of 46 AI agents powered by Claude Code CLI. The system enforces a 'Harness Engineering' methodology: Skills (standardized slash commands), Hooks (pre/post tool interceptors), Gates (quality checkpoints G0βG6), and FileWatchers (auto-sync markdown files to database). The GUI is intentionally limited to monitoring and three core operationsβmost workflow is driven by slash commands within Claude Code sessions. Architecture follows a three-layer pattern: Vue 3 + TypeScript renderer communicates via Electron IPC (contextBridge) to a main process with ~16 singleton services (session-manager, task-manager, gate-keeper, hook-manager, etc.). Persistence uses sql.js (SQLite in-memory) with a debounced disk save and 13 migrations. The source of truth is markdown files in `.knowledge/` and `.tasks/` directories, which are watched by chokidar and synced to the database. The app supports bilingual UI (zh-TW/en) and runs on Windows, macOS, and Linux. Key features include: sprint-based project management with task dependency tracking, interactive terminal sessions (xterm.js + node-pty), cost tracking per session, Git integration, a gate pipeline with review workflows, and a skill/hook management system with hash-based idempotent deployment. The codebase is well-structured with reusable components and services, though it shows some technical drift (alpha dependencies, brand name mismatch, Windows-specific paths) and high complexity from the extensive agent definitions and knowledge base.
The LLM identified 4 files worth highlighting for reuse:
Singleton event emitter with a safeSend wrapper that prevents crashes when the target renderer window is destroyed. This pattern decouples services from the renderer process, allowing clean state updates across the application. Easily extractable to any project needing intra-process event communication.
Parses structured metadata embedded in markdown tables (e.g., task metadata tables, dev-plan Section 10 records) into JSON objects. Fault-tolerant design returns null on parse failure and never throws, making it safe for production use. Demonstrates a lightweight 'markdown as database' pattern that can be adapted to any project using markdown files as a data source.
Manages system and user hooks with template rendering, hash-based overwrite protection (idempotent deployment), and JSONL log ingestion via fs.watch. The hook lifecycle (install, enable, disable, remove) is cleanly separated, and the template system uses `{{GENERATED_HASH}}` markers to detect manual modifications. Reusable in any application that needs a plugin/hook system with safe updates.
A Vue 3 virtual scrolling component that renders only visible items in a large list, drastically improving performance for datasets with hundreds of items. Implements efficient item recycling, dynamic height calculation, and smooth scrolling. Highly reusable as a standalone component in any Vue 3 project requiring list virtualization.