diff --git a/.env.example b/.env.example index 66fc94af..b5d3c31a 100644 --- a/.env.example +++ b/.env.example @@ -65,15 +65,13 @@ ROBOCO_REDIS_DB=0 # ROBOCO_REDIS_PASSWORD= # ============================================================================= -# Qdrant (Vector DB) - Optional -# ============================================================================= -ROBOCO_QDRANT_HOST=localhost -ROBOCO_QDRANT_PORT=6333 -# ROBOCO_QDRANT_API_KEY= - -# ============================================================================= -# OpenAI (optional, for embeddings) +# RAG / Local LLM (Ollama + pgvector via piragi) # ============================================================================= +# For docker compose use the container name (roboco-ollama); locally, localhost. +ROBOCO_OLLAMA_BASE_URL=http://localhost:11434 +ROBOCO_LOCAL_LLM_BASE_URL=http://localhost:11434/v1 +ROBOCO_LOCAL_LLM_MODEL=glm-5:cloud +ROBOCO_DEFAULT_EMBEDDING_MODEL=qwen3-embedding:0.6b # ============================================================================= # Security diff --git a/CLAUDE.md b/CLAUDE.md index e298e198..16a1b345 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -15,7 +15,7 @@ keep copyright assignment language intact. See `CONTRIBUTING.md`. ## Project Overview -**RoboCo** is an AI Agentic Company - a virtual organization of 18 AI agents + 1 human CEO, designed to operate as a complete software development workforce. The system implements a structured organizational hierarchy with formal communication protocols, task management, and quality controls. +**RoboCo** is an AI Agentic Company - a virtual organization of 19 AI agents + 1 human CEO, designed to operate as a complete software development workforce. The system implements a structured organizational hierarchy with formal communication protocols, task management, and quality controls. ### Core Architecture @@ -31,7 +31,7 @@ CEO (Renzo - Human) | +-- Backend Cell (5 agents: 2 Devs, 1 QA, 1 PM, 1 Documenter) +-- Frontend Cell (5 agents: 2 Devs, 1 QA, 1 PM, 1 Documenter) - +-- UX/UI Cell (4 agents: 1 Dev, 1 QA, 1 PM, 1 Documenter) + +-- UX/UI Cell (5 agents: 2 Devs, 1 QA, 1 PM, 1 Documenter) ``` ### Hardware Infrastructure @@ -182,7 +182,8 @@ Git authentication is managed **per-project** through encrypted GitHub PATs: ### Task States -The complete task lifecycle is defined in `roboco/enforcement/task_lifecycle.py`: +The complete task lifecycle is defined in `roboco/foundation/policy/lifecycle.py` +(`roboco/enforcement/task_lifecycle.py` is a backwards-compat shim over it): ``` backlog -> pending -> claimed -> in_progress -> [blocked|paused] -> verifying @@ -340,7 +341,7 @@ read-only into the agent container. | Role | Flow verbs | |---------------|--------------------------------------------------------------------------------------------------| -| developer | `give_me_work`, `i_will_work_on`, `submit_for_qa`, `i_am_done`, `i_am_blocked` | +| developer | `give_me_work`, `i_will_work_on`, `open_pr`, `i_am_done`, `i_am_blocked` | | qa | `claim_review`, `pass`, `fail` | | documenter | `claim_doc_task`, `i_documented` | | cell_pm | `triage`, `unblock`, `complete`, `escalate_up` | diff --git a/README.md b/README.md index c6278115..d7789ded 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # RoboCo -AI Agents Company - A virtual organization of 18 AI agents + 1 human CEO, designed to operate as a complete software development workforce. +AI Agents Company - A virtual organization of 19 AI agents + 1 human CEO, designed to operate as a complete software development workforce.

RoboCo control panel: the task tree for a feature, showing Board → Main PM → Backend / Frontend / UX/UI cells → developer subtasks, with live lifecycle statuses (completed, in progress, awaiting PM review, paused) and real GitHub PRs (#59–#62). @@ -18,20 +18,43 @@ AI Agents Company - A virtual organization of 18 AI agents + 1 human CEO, design RoboCo implements a structured organizational hierarchy with formal communication protocols, task management, and quality controls. The system enables a single human (CEO) to orchestrate complex multi-project development at scale. ``` -CEO (Renzo - Human) +CEO (You, the human) │ └── Board (3 agents) ├── Product Owner ├── Head of Marketing - └── Auditor (silent observer, reports to CEO) + └── Auditor (silent observer, reports to you) │ └── Main PM (coordinates all cells) │ ├── Backend Cell (5 agents: 2 Devs, 1 QA, 1 PM, 1 Documenter) ├── Frontend Cell (5 agents: 2 Devs, 1 QA, 1 PM, 1 Documenter) - └── UX/UI Cell (4 agents: 1 Dev, 1 QA, 1 PM, 1 Documenter) + └── UX/UI Cell (5 agents: 2 Devs, 1 QA, 1 PM, 1 Documenter) ``` +## How it works + +You hand a task to the company; it runs through a real +*build → review → document → merge* pipeline and comes back to you to approve. + +One full loop, put simply: + +1. **You give the Board a task — they review it.** The Product Owner and Head of + Marketing turn your ask into requirements and acceptance criteria. +2. **You approve — the Main PM starts the work.** A notification asks for your + *Approve & Start* decision; approve, and the Main PM breaks it into per-cell + subtasks. +3. **Each cell's PM delegates, supports, and triages** its developers (UX/UI, + Frontend, Backend). +4. **Developers build it, QA verifies and gates it, Documenters keep the books.** +5. **Cell PMs merge their PRs into the Main PM's branch.** +6. **The Main PM opens the final PR and notifies you "It's done!"** — you approve + and merge, or send it back for rework. *(Only you ever merge to `master`.)* + +**— Full circle —** + +**[See the full walkthrough, with screenshots →](docs/how-to.md)** + ## Project Structure ``` @@ -53,11 +76,10 @@ roboco/ │ ├── mcp/ # MCP server implementations │ └── config.py # Application configuration ├── agents/ -│ ├── blueprints/ # Agent system prompts (18 agents) -│ └── prompts/identities/ # Agent identity files +│ └── prompts/ # Agent system prompts (roles, teams, identities) ├── docs/ -│ ├── architecture/ # Architecture documentation -│ └── workflows/ # Workflow documentation +│ ├── how-to.md # Visual walkthrough of the workflow +│ └── rag/ # Agent knowledge base (indexed into RAG) ├── alembic/ # Database migrations ├── CLAUDE.md # Claude Code guidance └── docker-compose.yml # Local development stack @@ -79,7 +101,7 @@ uv run alembic upgrade head uv run python -m roboco.cli # Or just the API without orchestrator -uv run uvicorn roboco.api:app --reload --host 0.0.0.0 --port 8000 +uv run uvicorn roboco.api.app:app --reload --host 0.0.0.0 --port 8000 ``` ## Configuration @@ -137,18 +159,23 @@ cancelled blocked needs_revision awaiting_documentat ## API Endpoints +Domain routes are mounted under `/api`: + | Route Group | Description | |-------------|-------------| -| `/api/v1/tasks` | Task CRUD, lifecycle, claiming | -| `/api/v1/agents` | Agent management | -| `/api/v1/git` | Git operations (status, commit, push, PR) | -| `/api/v1/test` | Test/lint/format/build commands | -| `/api/v1/sessions` | Communication sessions | -| `/api/v1/messages` | Agent messages | -| `/api/v1/projects` | Project (repo) management | -| `/api/v1/work-sessions` | Git work session tracking | -| `/api/v1/optimal` | RAG/Knowledge base queries | -| `/api/v1/journals` | Agent journals/reflections | +| `/api/tasks` | Task CRUD, lifecycle, claiming | +| `/api/agents` | Agent management | +| `/api/git` | Git operations (status, commit, push, PR) | +| `/api/sessions` | Communication sessions | +| `/api/messages` | Agent messages | +| `/api/projects` | Project (repo) management | +| `/api/work-sessions` | Git work session tracking | +| `/api/optimal` | RAG/Knowledge base queries | +| `/api/journals` | Agent journals/reflections | +| `/api/orchestrator/status` | Orchestrator / dispatcher status | + +The agent **gateway** verbs are served separately under `/api/v1/flow/{role}/{verb}` +(intent verbs) and `/api/v1/do` (content tools) — see the [Agent Gateway](CLAUDE.md#agent-gateway). ## Development @@ -199,11 +226,10 @@ uv run mypy roboco/ - [x] Database ORM (SQLAlchemy async) - [x] Task lifecycle state machine - [x] Multi-agent workspace management -- [x] Agent blueprints (18 agents) +- [x] Agent prompts (19 agents) - [x] Messaging API - [x] Task API with full lifecycle - [x] Git operations API -- [x] Test/CI operations API - [x] RAG/Knowledge base (piragi + pgvector) - [x] Agent orchestrator - [x] CEO approval workflow diff --git a/agents/prompts/base.md b/agents/prompts/base.md index 8bb040b8..5e952064 100644 --- a/agents/prompts/base.md +++ b/agents/prompts/base.md @@ -1,6 +1,6 @@ # RoboCo Agent — Base -You are an agent in **RoboCo**, an AI company with 18 AI agents + 1 human CEO. Your role-specific prompt names your verbs and your responsibilities; this file holds the rules every role obeys. +You are an agent in **RoboCo**, an AI company with 19 AI agents + 1 human CEO. Your role-specific prompt names your verbs and your responsibilities; this file holds the rules every role obeys. ## Identity diff --git a/agents/prompts/teams/backend.md b/agents/prompts/teams/backend.md index 561d79bf..b0fd1196 100644 --- a/agents/prompts/teams/backend.md +++ b/agents/prompts/teams/backend.md @@ -14,7 +14,7 @@ - **Framework**: FastAPI - **Database**: PostgreSQL - **Cache/Queue**: Redis -- **Vector DB**: Qdrant +- **Vector Store**: PostgreSQL + pgvector (via piragi) - **Container**: Docker ## Your Teammates @@ -29,7 +29,7 @@ # Before any commit uv run ruff format . uv run ruff check . -uv run mypy src/ +uv run mypy roboco/ uv run pytest # Coverage target: 80% diff --git a/deployment.md b/deployment.md index 7647305f..c435b29f 100644 --- a/deployment.md +++ b/deployment.md @@ -112,7 +112,7 @@ docker compose run orchestrator --spawn main-pm fe-dev-1 fe-qa curl http://localhost:8000/health # Orchestrator status (shows running containers) -curl http://localhost:8000/api/v1/orchestrator/status | jq +curl http://localhost:8000/api/orchestrator/status | jq # List all RoboCo containers docker ps --filter "name=roboco" diff --git a/docs/ux_ui/README.md b/docs/ux_ui/README.md index 7fea9a11..0243b5d9 100644 --- a/docs/ux_ui/README.md +++ b/docs/ux_ui/README.md @@ -4,7 +4,7 @@ Documentation for the UX/UI Cell team. ## Access -- **READ**: UX/UI Cell (developer, QA, PM, documenter) +- **READ**: UX/UI Cell (2 developers, QA, PM, documenter) - **WRITE**: ux-doc only ## Contents