Metadata-Version: 2.4
Name: hive-corp
Version: 0.1.0
Summary: Found an AI company. Be the CEO. Let it grow.
Project-URL: Homepage, https://github.com/SonAIengine/hive-corp
Project-URL: Repository, https://github.com/SonAIengine/hive-corp
Project-URL: Issues, https://github.com/SonAIengine/hive-corp/issues
Author-email: Son Seongjun <sonsj97@plateer.com>
License-Expression: MIT
License-File: LICENSE
Keywords: agent,ai,company,multi-agent,orchestration
Classifier: Development Status :: 2 - Pre-Alpha
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.14
Requires-Dist: aiosqlite>=0.20
Requires-Dist: anthropic>=0.52
Requires-Dist: click>=8.1
Requires-Dist: litellm>=1.60
Requires-Dist: pyyaml>=6.0
Requires-Dist: rich>=13.9
Requires-Dist: tiktoken>=0.8
Provides-Extra: dashboard
Requires-Dist: fastapi>=0.115; extra == 'dashboard'
Requires-Dist: jinja2>=3.1; extra == 'dashboard'
Requires-Dist: python-multipart>=0.0.9; extra == 'dashboard'
Requires-Dist: uvicorn[standard]>=0.32; extra == 'dashboard'
Requires-Dist: websockets>=14.0; extra == 'dashboard'
Provides-Extra: dev
Requires-Dist: pyright>=1.1; extra == 'dev'
Requires-Dist: pytest-asyncio>=0.24; extra == 'dev'
Requires-Dist: pytest-memray>=1.8; extra == 'dev'
Requires-Dist: pytest>=8.3; extra == 'dev'
Requires-Dist: ruff>=0.8; extra == 'dev'
Provides-Extra: discord
Requires-Dist: discord-py>=2.4; extra == 'discord'
Provides-Extra: matrix
Requires-Dist: matrix-nio[e2e]>=0.24; extra == 'matrix'
Description-Content-Type: text/markdown

# Hive Corp

**Found an AI company. Be the CEO. Let it grow.**

```
$ hive found

  Hive Corp Founding Assistant

  "어떤 회사를 만들고 싶으세요?"

> AI 개발 도구를 만드는 회사

  "첫 제품이나 서비스 아이디어가 있나요?"

> 코드 리뷰 자동화 서비스

  이렇게 시작해볼까요?

  🏢 TestCorp
  ├── CTO (Sonnet) — 아키텍처, 기술 결정
  └── 개발자 1명 (Sonnet)

  월 예산: $50

  → 승인되었습니다.
  ✅ CTO 합류
  ✅ Developer 합류

  🤖 CTO: 안녕하세요, TestCorp의 CTO로 합류했습니다.
          첫 제품 방향에 대해 회의하고 싶은데, 지금 괜찮으세요?
```

After that, the company runs. And grows.

## Commands

```bash
hive found          # 회사 설립
hive status         # 회사 현황
hive task add "..." # 태스크 추가
hive task add "..." --project <id>
hive task list      # 태스크 목록
hive sprint         # 스프린트 실행 (기본: 검증된 E1/E2/E3/E4 on)
hive sprint --experimental-agent-dna
hive sprint --experimental-compiler --experimental-escalation
hive standup        # 일일 보고 (LLM 0원)
hive growth         # 성장 엔진 — 고용/해고/예산 제안
hive learn          # 스프린트에서 교훈 추출
hive perf           # 에이전트 성과 평가
hive budget         # 토큰 비용 현황
hive budget --report # baseline + experimental 리포트
hive benchmark      # E1/E2/E3/E4 실험 지표 + DNA/LLM 추세
hive benchmark --validate-suite all --artifact benchmarks/latest/validation-suite.json
hive finance        # P&L 리포트
hive revenue scan   # 수익 기회 스캔 (GitHub/Algora/Dev.to)
hive revenue scan --source github    # GitHub만
hive revenue scan --source algora    # Algora 바운티만
hive revenue scan --source devto     # Dev.to 리스팅만
hive project bid    # 수주 제안 → 승인 시 프로젝트 생성
hive project list   # 프로젝트 목록
hive project status <id> --status active
hive project portfolio
hive dashboard      # 웹 대시보드 (http://localhost:8000)
```

## Quick Start

```bash
# 설치
git clone https://github.com/SonAIengine/hive-corp.git
cd hive-corp
uv sync --extra dev --extra dashboard

# API key 설정
echo "ANTHROPIC_API_KEY=sk-ant-..." > .env
echo "GITHUB_TOKEN=ghp_..." >> .env   # Optional, for higher GitHub API limits

# 회사 설립
uv run hive found

# 태스크 추가 + 실행
uv run hive task add "Build auth module"
uv run hive sprint
uv run hive sprint --experimental-agent-dna
uv run hive sprint --experimental-delta-retry
uv run hive sprint --experimental-compiler --experimental-escalation

# 상태 확인
uv run hive status
uv run hive standup
uv run hive budget
uv run hive budget --report
uv run hive benchmark --days 14 --json
uv run hive benchmark --validate-suite all
uv run hive benchmark --validate-suite all --json --artifact benchmarks/latest/validation-suite.json
uv run hive revenue scan --repo owner/repo --label bounty
uv run hive project portfolio
```

## Philosophy

You are the CEO. Not a developer using a tool.

- The company **asks you** when it needs direction.
- Everything else runs on its own.
- Agents are data (DB rows), not processes. 100 agents share 3 workers.
- Token efficiency is a core feature. Every LLM call is logged and optimized.

## Architecture

```
┌──────────────────────────────────────────┐
│              CEO (You)                    │
│   CLI / Web Dashboard / Matrix (later)   │
├──────────────────────────────────────────┤
│           CEO Gateway                     │
│   What needs CEO? What's autonomous?     │
├──────────┬───────────┬───────────────────┤
│ Founding │ Growth    │ Company           │
│ Engine   │ Engine    │ Memory            │
├──────────┴───────────┴───────────────────┤
│   Agent Registry        Worker Pool      │
│   (data, mem ~0)     [W1] [W2] [W3]     │
│   20 agents → 0MB    3 workers → ~1GB   │
├──────────────────────────────────────────┤
│      SQLite + Office (CLI/Matrix)        │
└──────────────────────────────────────────┘
```

## Tech Stack

| Layer | Choice |
|-------|--------|
| Language | Python 3.14 |
| Backend | FastAPI + aiosqlite |
| Dashboard | htmx + Jinja2 + DaisyUI (no Node.js) |
| LLM | Anthropic SDK (Haiku/Sonnet/Opus) |
| CLI | click + rich |
| Lint | ruff (35+ rule sets) + pyright strict |
| Hooks | lefthook (pre-commit: lint, pre-push: test) |
| Build | uv + hatchling |

## Development

```bash
uv sync --extra dev --extra dashboard   # Install deps
uv run pytest                           # 401 tests
uv run pytest --memray                  # With memory profiling
uv run ruff check --fix && ruff format  # Lint
uv run pyright                          # Type check
uv run hive dashboard                   # Launch web dashboard
```

## Runtime Policy

`company.yaml`에서 실험 기능 기본 정책을 조정할 수 있습니다.

```yaml
runtime:
  agent_dna: true      # verified default on
  compiler: true       # verified default on
  escalation: true     # verified default on
  delta_retry: true    # verified default on
```

CLI에서는 일회성 override도 가능합니다.

```bash
uv run hive sprint --no-experimental-agent-dna
uv run hive sprint --no-experimental-compiler
```

결정론적 A/B validation도 바로 돌릴 수 있습니다.

```bash
uv run hive benchmark --validate-suite e1
uv run hive benchmark --validate-suite e3 --json
uv run hive benchmark --validate-suite all --json --artifact benchmarks/latest/validation-suite.json
```

공개용 benchmark 기준과 재현 절차는 [Benchmarks](docs/BENCHMARKS.md)에 정리돼 있습니다.

## Docs

- [Architecture](docs/ARCHITECTURE.md) — full system design
- [Roadmap](docs/ROADMAP.md) — phased development plan
- [Design Patterns](docs/PATTERNS.md) — patterns and rationale
- [Benchmarks](docs/BENCHMARKS.md) — reproducible validation artifacts

## License

MIT
