Moved out of "src"

This commit is contained in:
Renn F
2025-12-10 17:37:24 +01:00
parent 7f5bc4b8b8
commit f0f6f77d68
89 changed files with 118 additions and 118 deletions
@@ -32,7 +32,7 @@ Implement Phase 1 of the RoboCo system per HOMELAB_TEAM_V0.md blueprint:
- `.env.example` - Environment template
- `alembic/` - Migration setup
### 2. Data Models (`src/roboco/models/`)
### 2. Data Models (`roboco/models/`)
| File | Models |
|------|--------|
| `base.py` | All enums (TaskStatus, AgentRole, Team, etc.) |
@@ -46,15 +46,15 @@ Implement Phase 1 of the RoboCo system per HOMELAB_TEAM_V0.md blueprint:
| `journal.py` | Journal, JournalEntry |
| `handoff.py` | DocumenterHandoff |
### 3. Database Layer (`src/roboco/db/`)
### 3. Database Layer (`roboco/db/`)
- `base.py` - Async SQLAlchemy engine, session factory
- `tables.py` - All ORM table definitions (10 tables)
### 4. Configuration (`src/roboco/config.py`)
### 4. Configuration (`roboco/config.py`)
- Environment-based settings via pydantic-settings
- Database, Redis, Qdrant, LLM provider configs
### 5. Messaging API (`src/roboco/api/`)
### 5. Messaging API (`roboco/api/`)
| Route | Endpoints |
|-------|-----------|
| `health.py` | `/health`, `/ready` |
@@ -63,19 +63,19 @@ Implement Phase 1 of the RoboCo system per HOMELAB_TEAM_V0.md blueprint:
| `messages.py` | Send, edit, delete messages |
| `notifications.py` | Send, list, acknowledge |
### 6. WebSocket (`src/roboco/api/websocket.py`)
### 6. WebSocket (`roboco/api/websocket.py`)
- `/ws/channels/{id}` - Channel stream
- `/ws/agents/{id}` - Agent output stream
- `/ws/sessions/{id}` - Session stream
- ConnectionManager for broadcasting
### 7. Agent Framework (`src/roboco/agents/`)
### 7. Agent Framework (`roboco/agents/`)
- `base.py` - Agent base class with lifecycle, LLM stubs
- `orchestrator.py` - Spawn/stop agents, health monitoring
## File Structure
```
src/roboco/
roboco/
├── __init__.py
├── config.py
├── models/
@@ -26,7 +26,7 @@ Implement Phase 2 of the RoboCo system per HOMELAB_TEAM_V0.md blueprint (Section
## What Was Built
### 1. Transcription Service (`src/roboco/services/transcription.py`)
### 1. Transcription Service (`roboco/services/transcription.py`)
| Component | Description |
|-----------|-------------|
| `StreamBuffer` | Accumulates chunks from agent, tracks timing, detects readiness |
@@ -39,7 +39,7 @@ Key features:
- Background task for periodic buffer checking
- Callback registration for ready segments
### 2. Extraction Service (`src/roboco/services/extraction.py`)
### 2. Extraction Service (`roboco/services/extraction.py`)
| Component | Description |
|-----------|-------------|
| Pattern matchers | Regex patterns for each MessageType |
@@ -56,7 +56,7 @@ Message types detected:
- **BLOCKER**: "Blocked:", "Waiting on...", "Error:"
- **TECHNICAL**: Code blocks, API explanations
### 3. Permission Service (`src/roboco/services/permissions.py`)
### 3. Permission Service (`roboco/services/permissions.py`)
| Component | Description |
|-----------|-------------|
| `PermissionLevel` | Hierarchy levels (CEO → Board → Main PM → Cell PM → Member) |
@@ -76,14 +76,14 @@ Auditor has silent read access to all channels.
### 4. API Integration
#### New Dependencies (`src/roboco/api/deps.py`)
#### New Dependencies (`roboco/api/deps.py`)
- `PermissionServiceDep` - Injects permission service
- `CurrentAgentContext` - Full agent context from headers
- `require_channel_read()` - Dependency factory for channel read checks
- `require_channel_write()` - Dependency factory for channel write checks
- `require_notification_permission()` - Dependency for notification checks
#### New Routes (`src/roboco/api/routes/stream.py`)
#### New Routes (`roboco/api/routes/stream.py`)
| Endpoint | Method | Description |
|----------|--------|-------------|
| `/api/v1/stream/chunk` | POST | Process a stream chunk |
@@ -93,14 +93,14 @@ Auditor has silent read access to all channels.
| `/api/v1/stream/permissions` | GET | Get agent's permission summary |
| `/api/v1/stream/permissions/channel/{name}` | GET | Check specific channel access |
#### App Integration (`src/roboco/api/app.py`)
#### App Integration (`roboco/api/app.py`)
- Services initialized in lifespan context
- `app.state.transcription` - Global transcription service
- `app.state.extraction` - Global extraction pipeline
## File Structure
```
src/roboco/services/
roboco/services/
├── __init__.py # Service exports
├── transcription.py # StreamBuffer, TranscriptionService
├── extraction.py # ExtractionService, ExtractionPipeline
@@ -38,7 +38,7 @@ Implement Phase 3 of the RoboCo system per HOMELAB_TEAM_V0.md blueprint (Section
- Replaced `qdrant-client>=1.7.0` with `piragi[postgres]>=0.1.0`
- Updated mypy overrides for piragi
### 2. Configuration (`src/roboco/config.py`)
### 2. Configuration (`roboco/config.py`)
| Setting | Default | Description |
|---------|---------|-------------|
| `rag_persist_dir` | `.piragi` | Directory for piragi index data |
@@ -52,7 +52,7 @@ Implement Phase 3 of the RoboCo system per HOMELAB_TEAM_V0.md blueprint (Section
| `rag_auto_update_interval` | 300 | Seconds between updates |
| `rag_store_url` | computed | PostgreSQL connection for piragi |
### 3. Optimal API Service (`src/roboco/services/optimal.py`)
### 3. Optimal API Service (`roboco/services/optimal.py`)
| Component | Description |
|-----------|-------------|
@@ -73,7 +73,7 @@ Key features:
- RAG queries with citations
- HyDE and hybrid search enabled by default
### 4. Journal API Service (`src/roboco/services/journal.py`)
### 4. Journal API Service (`roboco/services/journal.py`)
| Component | Description |
|-----------|-------------|
@@ -97,7 +97,7 @@ Key features:
### 5. API Routes
#### Optimal API (`src/roboco/api/routes/optimal.py`)
#### Optimal API (`roboco/api/routes/optimal.py`)
| Endpoint | Method | Description |
|----------|--------|-------------|
| `/api/v1/optimal/kb/index/code` | POST | Index code files |
@@ -110,7 +110,7 @@ Key features:
| `/api/v1/optimal/kb/{type}` | DELETE | Clear an index |
| `/api/v1/optimal/kb/refresh` | POST | Refresh index sources |
#### Journal API (`src/roboco/api/routes/journals.py`)
#### Journal API (`roboco/api/routes/journals.py`)
| Endpoint | Method | Description |
|----------|--------|-------------|
| `/api/v1/journals/me` | GET | Get my journal |
@@ -128,14 +128,14 @@ Key features:
| `/api/v1/journals/me/growth` | GET | Get growth metrics |
| `/api/v1/journals/me/search` | POST | Semantic search entries |
### 6. App Integration (`src/roboco/api/app.py`)
### 6. App Integration (`roboco/api/app.py`)
- OptimalService initialized in lifespan
- Stored in `app.state.optimal`
- Proper cleanup on shutdown
## File Structure
```
src/roboco/services/
roboco/services/
├── __init__.py # Updated with Phase 3 exports
├── transcription.py # Phase 2
├── extraction.py # Phase 2
@@ -143,7 +143,7 @@ src/roboco/services/
├── optimal.py # NEW - RAG/Knowledge Base
└── journal.py # NEW - Agent Journals
src/roboco/api/routes/
roboco/api/routes/
├── __init__.py # Updated with new routes
├── ... (Phase 1-2 routes)
├── optimal.py # NEW - Optimal API endpoints
@@ -28,7 +28,7 @@ Implement Phase 4 of the RoboCo system per HOMELAB_TEAM_V0.md blueprint (Section
## What Was Built
### 1. Developer Agent (`src/roboco/agents/developer.py`)
### 1. Developer Agent (`roboco/agents/developer.py`)
| Component | Description |
|-----------|-------------|
@@ -44,7 +44,7 @@ Key features:
- Handoff creation for documenter
- Factory functions for BE/FE/UX developers
### 2. QA Agent (`src/roboco/agents/qa.py`)
### 2. QA Agent (`roboco/agents/qa.py`)
| Component | Description |
|-----------|-------------|
@@ -60,7 +60,7 @@ Key features:
- Specific feedback for failures
- QA report generation
### 3. Documenter Agent (`src/roboco/agents/documenter.py`)
### 3. Documenter Agent (`roboco/agents/documenter.py`)
| Component | Description |
|-----------|-------------|
@@ -76,7 +76,7 @@ Key features:
- Self-review before publish
- Factory functions for all cells
### 4. PM Agents (`src/roboco/agents/pm.py`)
### 4. PM Agents (`roboco/agents/pm.py`)
| Component | Description |
|-----------|-------------|
@@ -93,7 +93,7 @@ Key features:
- Status reporting
- Cross-cell coordination (Main PM)
### 5. Board Agents (`src/roboco/agents/board.py`)
### 5. Board Agents (`roboco/agents/board.py`)
| Component | Description |
|-----------|-------------|
@@ -108,7 +108,7 @@ Auditor special powers:
- Direct line to CEO
- Can notify anyone (sparingly)
### 6. Factory and Deployment (`src/roboco/agents/factory.py`)
### 6. Factory and Deployment (`roboco/agents/factory.py`)
| Component | Description |
|-----------|-------------|
@@ -129,7 +129,7 @@ Utility functions:
## File Structure
```
src/roboco/agents/
roboco/agents/
├── __init__.py # Updated with all exports
├── base.py # Phase 1 - Base Agent class
├── orchestrator.py # Phase 1 - Agent orchestration
@@ -33,7 +33,7 @@ Implement Phase 5 of the RoboCo system per HOMELAB_TEAM_V0.md blueprint (Section
## What Was Built
### 1. Task Service (`src/roboco/services/task.py`)
### 1. Task Service (`roboco/services/task.py`)
| Component | Description |
|-----------|-------------|
@@ -43,7 +43,7 @@ Implement Phase 5 of the RoboCo system per HOMELAB_TEAM_V0.md blueprint (Section
| Queries | list_all, list_by_team, list_by_assignee, list_by_status, list_pending, list_blocked, list_awaiting_qa, list_awaiting_docs |
| Statistics | count_by_status, count_by_team, get_active_count |
### 2. Task API Routes (`src/roboco/api/routes/tasks.py`)
### 2. Task API Routes (`roboco/api/routes/tasks.py`)
| Endpoint | Description |
|----------|-------------|
@@ -57,7 +57,7 @@ Implement Phase 5 of the RoboCo system per HOMELAB_TEAM_V0.md blueprint (Section
| `POST /tasks/{id}/verify, /submit-qa, /pass-qa, /fail-qa, /complete, /cancel` | Review transitions |
| `POST /tasks/{id}/progress, /checkpoint, /commit` | Progress and artifacts |
### 3. Kanban Models (`src/roboco/models/kanban.py`)
### 3. Kanban Models (`roboco/models/kanban.py`)
| Component | Description |
|-----------|-------------|
@@ -68,7 +68,7 @@ Implement Phase 5 of the RoboCo system per HOMELAB_TEAM_V0.md blueprint (Section
| `KanbanBoard` | Complete board with columns or swimlanes |
| Column configs | DEV_COLUMNS, QA_COLUMNS, DOCUMENTER_COLUMNS, PM_COLUMNS, MAIN_PM_COLUMNS, BOARD_COLUMNS |
### 4. Kanban Service (`src/roboco/services/kanban.py`)
### 4. Kanban Service (`roboco/services/kanban.py`)
| Method | Description |
|--------|-------------|
@@ -81,7 +81,7 @@ Implement Phase 5 of the RoboCo system per HOMELAB_TEAM_V0.md blueprint (Section
| `get_board_kanban()` | Board-level roadmap |
| `get_board_stats(team)` | Board statistics |
### 5. Kanban API Routes (`src/roboco/api/routes/kanban.py`)
### 5. Kanban API Routes (`roboco/api/routes/kanban.py`)
| Endpoint | Description |
|----------|-------------|
@@ -93,7 +93,7 @@ Implement Phase 5 of the RoboCo system per HOMELAB_TEAM_V0.md blueprint (Section
| `GET /kanban/board` | Board-level roadmap |
| `GET /kanban/stats` | Board statistics |
### 6. Metrics Service (`src/roboco/services/metrics.py`)
### 6. Metrics Service (`roboco/services/metrics.py`)
| Component | Description |
|-----------|-------------|
@@ -108,7 +108,7 @@ Implement Phase 5 of the RoboCo system per HOMELAB_TEAM_V0.md blueprint (Section
| `get_communication_volume(hours)` | Message and notification counts |
| `get_health_status(team)` | ok/slow/critical status |
### 7. Dashboard API Routes (`src/roboco/api/routes/dashboard.py`)
### 7. Dashboard API Routes (`roboco/api/routes/dashboard.py`)
| Endpoint | Description |
|----------|-------------|
@@ -127,7 +127,7 @@ Implement Phase 5 of the RoboCo system per HOMELAB_TEAM_V0.md blueprint (Section
## File Structure
```
src/roboco/
roboco/
├── models/
│ └── kanban.py # NEW - Kanban board models
├── services/
@@ -26,7 +26,7 @@ Implement Phase 6 of the RoboCo system per HOMELAB_TEAM_V0.md blueprint (Section
## What Was Built
### 1. Custom Exceptions (`src/roboco/exceptions.py`)
### 1. Custom Exceptions (`roboco/exceptions.py`)
| Exception | Description |
|-----------|-------------|
@@ -60,7 +60,7 @@ All exceptions include:
- `details`: Additional context dict
- `to_dict()`: Convert to API response format
### 2. Middleware (`src/roboco/api/middleware.py`)
### 2. Middleware (`roboco/api/middleware.py`)
| Component | Description |
|-----------|-------------|
@@ -77,7 +77,7 @@ Features:
- Added to all error responses
- Request timing in X-Response-Time-Ms header
### 3. Logging Configuration (`src/roboco/logging.py`)
### 3. Logging Configuration (`roboco/logging.py`)
| Component | Description |
|-----------|-------------|
@@ -114,7 +114,7 @@ With:
- JSON columns for structured data
- Performance indexes for common queries
### 5. Updated Application (`src/roboco/api/app.py`)
### 5. Updated Application (`roboco/api/app.py`)
- Logging setup at import time
- Startup/shutdown logging
@@ -123,7 +123,7 @@ With:
## File Structure
```
src/roboco/
roboco/
├── __init__.py # Updated with core exports
├── exceptions.py # NEW - Custom exception hierarchy
├── logging.py # NEW - Structured logging config
@@ -32,7 +32,7 @@ Implement Phase 1 of the RoboCo system per HOMELAB_TEAM_V0.md blueprint:
- `.env.example` - Environment template
- `alembic/` - Migration setup
### 2. Data Models (`src/roboco/models/`)
### 2. Data Models (`roboco/models/`)
| File | Models |
|------|--------|
| `base.py` | All enums (TaskStatus, AgentRole, Team, etc.) |
@@ -46,15 +46,15 @@ Implement Phase 1 of the RoboCo system per HOMELAB_TEAM_V0.md blueprint:
| `journal.py` | Journal, JournalEntry |
| `handoff.py` | DocumenterHandoff |
### 3. Database Layer (`src/roboco/db/`)
### 3. Database Layer (`roboco/db/`)
- `base.py` - Async SQLAlchemy engine, session factory
- `tables.py` - All ORM table definitions (10 tables)
### 4. Configuration (`src/roboco/config.py`)
### 4. Configuration (`roboco/config.py`)
- Environment-based settings via pydantic-settings
- Database, Redis, Qdrant, LLM provider configs
### 5. Messaging API (`src/roboco/api/`)
### 5. Messaging API (`roboco/api/`)
| Route | Endpoints |
|-------|-----------|
| `health.py` | `/health`, `/ready` |
@@ -63,19 +63,19 @@ Implement Phase 1 of the RoboCo system per HOMELAB_TEAM_V0.md blueprint:
| `messages.py` | Send, edit, delete messages |
| `notifications.py` | Send, list, acknowledge |
### 6. WebSocket (`src/roboco/api/websocket.py`)
### 6. WebSocket (`roboco/api/websocket.py`)
- `/ws/channels/{id}` - Channel stream
- `/ws/agents/{id}` - Agent output stream
- `/ws/sessions/{id}` - Session stream
- ConnectionManager for broadcasting
### 7. Agent Framework (`src/roboco/agents/`)
### 7. Agent Framework (`roboco/agents/`)
- `base.py` - Agent base class with lifecycle, LLM stubs
- `orchestrator.py` - Spawn/stop agents, health monitoring
## File Structure
```
src/roboco/
roboco/
├── __init__.py
├── config.py
├── models/
@@ -26,7 +26,7 @@ Implement Phase 2 of the RoboCo system per HOMELAB_TEAM_V0.md blueprint (Section
## What Was Built
### 1. Transcription Service (`src/roboco/services/transcription.py`)
### 1. Transcription Service (`roboco/services/transcription.py`)
| Component | Description |
|-----------|-------------|
| `StreamBuffer` | Accumulates chunks from agent, tracks timing, detects readiness |
@@ -39,7 +39,7 @@ Key features:
- Background task for periodic buffer checking
- Callback registration for ready segments
### 2. Extraction Service (`src/roboco/services/extraction.py`)
### 2. Extraction Service (`roboco/services/extraction.py`)
| Component | Description |
|-----------|-------------|
| Pattern matchers | Regex patterns for each MessageType |
@@ -56,7 +56,7 @@ Message types detected:
- **BLOCKER**: "Blocked:", "Waiting on...", "Error:"
- **TECHNICAL**: Code blocks, API explanations
### 3. Permission Service (`src/roboco/services/permissions.py`)
### 3. Permission Service (`roboco/services/permissions.py`)
| Component | Description |
|-----------|-------------|
| `PermissionLevel` | Hierarchy levels (CEO → Board → Main PM → Cell PM → Member) |
@@ -76,14 +76,14 @@ Auditor has silent read access to all channels.
### 4. API Integration
#### New Dependencies (`src/roboco/api/deps.py`)
#### New Dependencies (`roboco/api/deps.py`)
- `PermissionServiceDep` - Injects permission service
- `CurrentAgentContext` - Full agent context from headers
- `require_channel_read()` - Dependency factory for channel read checks
- `require_channel_write()` - Dependency factory for channel write checks
- `require_notification_permission()` - Dependency for notification checks
#### New Routes (`src/roboco/api/routes/stream.py`)
#### New Routes (`roboco/api/routes/stream.py`)
| Endpoint | Method | Description |
|----------|--------|-------------|
| `/api/v1/stream/chunk` | POST | Process a stream chunk |
@@ -93,14 +93,14 @@ Auditor has silent read access to all channels.
| `/api/v1/stream/permissions` | GET | Get agent's permission summary |
| `/api/v1/stream/permissions/channel/{name}` | GET | Check specific channel access |
#### App Integration (`src/roboco/api/app.py`)
#### App Integration (`roboco/api/app.py`)
- Services initialized in lifespan context
- `app.state.transcription` - Global transcription service
- `app.state.extraction` - Global extraction pipeline
## File Structure
```
src/roboco/services/
roboco/services/
├── __init__.py # Service exports
├── transcription.py # StreamBuffer, TranscriptionService
├── extraction.py # ExtractionService, ExtractionPipeline
@@ -38,7 +38,7 @@ Implement Phase 3 of the RoboCo system per HOMELAB_TEAM_V0.md blueprint (Section
- Replaced `qdrant-client>=1.7.0` with `piragi[postgres]>=0.1.0`
- Updated mypy overrides for piragi
### 2. Configuration (`src/roboco/config.py`)
### 2. Configuration (`roboco/config.py`)
| Setting | Default | Description |
|---------|---------|-------------|
| `rag_persist_dir` | `.piragi` | Directory for piragi index data |
@@ -52,7 +52,7 @@ Implement Phase 3 of the RoboCo system per HOMELAB_TEAM_V0.md blueprint (Section
| `rag_auto_update_interval` | 300 | Seconds between updates |
| `rag_store_url` | computed | PostgreSQL connection for piragi |
### 3. Optimal API Service (`src/roboco/services/optimal.py`)
### 3. Optimal API Service (`roboco/services/optimal.py`)
| Component | Description |
|-----------|-------------|
@@ -73,7 +73,7 @@ Key features:
- RAG queries with citations
- HyDE and hybrid search enabled by default
### 4. Journal API Service (`src/roboco/services/journal.py`)
### 4. Journal API Service (`roboco/services/journal.py`)
| Component | Description |
|-----------|-------------|
@@ -97,7 +97,7 @@ Key features:
### 5. API Routes
#### Optimal API (`src/roboco/api/routes/optimal.py`)
#### Optimal API (`roboco/api/routes/optimal.py`)
| Endpoint | Method | Description |
|----------|--------|-------------|
| `/api/v1/optimal/kb/index/code` | POST | Index code files |
@@ -110,7 +110,7 @@ Key features:
| `/api/v1/optimal/kb/{type}` | DELETE | Clear an index |
| `/api/v1/optimal/kb/refresh` | POST | Refresh index sources |
#### Journal API (`src/roboco/api/routes/journals.py`)
#### Journal API (`roboco/api/routes/journals.py`)
| Endpoint | Method | Description |
|----------|--------|-------------|
| `/api/v1/journals/me` | GET | Get my journal |
@@ -128,14 +128,14 @@ Key features:
| `/api/v1/journals/me/growth` | GET | Get growth metrics |
| `/api/v1/journals/me/search` | POST | Semantic search entries |
### 6. App Integration (`src/roboco/api/app.py`)
### 6. App Integration (`roboco/api/app.py`)
- OptimalService initialized in lifespan
- Stored in `app.state.optimal`
- Proper cleanup on shutdown
## File Structure
```
src/roboco/services/
roboco/services/
├── __init__.py # Updated with Phase 3 exports
├── transcription.py # Phase 2
├── extraction.py # Phase 2
@@ -143,7 +143,7 @@ src/roboco/services/
├── optimal.py # NEW - RAG/Knowledge Base
└── journal.py # NEW - Agent Journals
src/roboco/api/routes/
roboco/api/routes/
├── __init__.py # Updated with new routes
├── ... (Phase 1-2 routes)
├── optimal.py # NEW - Optimal API endpoints
@@ -28,7 +28,7 @@ Implement Phase 4 of the RoboCo system per HOMELAB_TEAM_V0.md blueprint (Section
## What Was Built
### 1. Developer Agent (`src/roboco/agents/developer.py`)
### 1. Developer Agent (`roboco/agents/developer.py`)
| Component | Description |
|-----------|-------------|
@@ -44,7 +44,7 @@ Key features:
- Handoff creation for documenter
- Factory functions for BE/FE/UX developers
### 2. QA Agent (`src/roboco/agents/qa.py`)
### 2. QA Agent (`roboco/agents/qa.py`)
| Component | Description |
|-----------|-------------|
@@ -60,7 +60,7 @@ Key features:
- Specific feedback for failures
- QA report generation
### 3. Documenter Agent (`src/roboco/agents/documenter.py`)
### 3. Documenter Agent (`roboco/agents/documenter.py`)
| Component | Description |
|-----------|-------------|
@@ -76,7 +76,7 @@ Key features:
- Self-review before publish
- Factory functions for all cells
### 4. PM Agents (`src/roboco/agents/pm.py`)
### 4. PM Agents (`roboco/agents/pm.py`)
| Component | Description |
|-----------|-------------|
@@ -93,7 +93,7 @@ Key features:
- Status reporting
- Cross-cell coordination (Main PM)
### 5. Board Agents (`src/roboco/agents/board.py`)
### 5. Board Agents (`roboco/agents/board.py`)
| Component | Description |
|-----------|-------------|
@@ -108,7 +108,7 @@ Auditor special powers:
- Direct line to CEO
- Can notify anyone (sparingly)
### 6. Factory and Deployment (`src/roboco/agents/factory.py`)
### 6. Factory and Deployment (`roboco/agents/factory.py`)
| Component | Description |
|-----------|-------------|
@@ -129,7 +129,7 @@ Utility functions:
## File Structure
```
src/roboco/agents/
roboco/agents/
├── __init__.py # Updated with all exports
├── base.py # Phase 1 - Base Agent class
├── orchestrator.py # Phase 1 - Agent orchestration
@@ -33,7 +33,7 @@ Implement Phase 5 of the RoboCo system per HOMELAB_TEAM_V0.md blueprint (Section
## What Was Built
### 1. Task Service (`src/roboco/services/task.py`)
### 1. Task Service (`roboco/services/task.py`)
| Component | Description |
|-----------|-------------|
@@ -43,7 +43,7 @@ Implement Phase 5 of the RoboCo system per HOMELAB_TEAM_V0.md blueprint (Section
| Queries | list_all, list_by_team, list_by_assignee, list_by_status, list_pending, list_blocked, list_awaiting_qa, list_awaiting_docs |
| Statistics | count_by_status, count_by_team, get_active_count |
### 2. Task API Routes (`src/roboco/api/routes/tasks.py`)
### 2. Task API Routes (`roboco/api/routes/tasks.py`)
| Endpoint | Description |
|----------|-------------|
@@ -57,7 +57,7 @@ Implement Phase 5 of the RoboCo system per HOMELAB_TEAM_V0.md blueprint (Section
| `POST /tasks/{id}/verify, /submit-qa, /pass-qa, /fail-qa, /complete, /cancel` | Review transitions |
| `POST /tasks/{id}/progress, /checkpoint, /commit` | Progress and artifacts |
### 3. Kanban Models (`src/roboco/models/kanban.py`)
### 3. Kanban Models (`roboco/models/kanban.py`)
| Component | Description |
|-----------|-------------|
@@ -68,7 +68,7 @@ Implement Phase 5 of the RoboCo system per HOMELAB_TEAM_V0.md blueprint (Section
| `KanbanBoard` | Complete board with columns or swimlanes |
| Column configs | DEV_COLUMNS, QA_COLUMNS, DOCUMENTER_COLUMNS, PM_COLUMNS, MAIN_PM_COLUMNS, BOARD_COLUMNS |
### 4. Kanban Service (`src/roboco/services/kanban.py`)
### 4. Kanban Service (`roboco/services/kanban.py`)
| Method | Description |
|--------|-------------|
@@ -81,7 +81,7 @@ Implement Phase 5 of the RoboCo system per HOMELAB_TEAM_V0.md blueprint (Section
| `get_board_kanban()` | Board-level roadmap |
| `get_board_stats(team)` | Board statistics |
### 5. Kanban API Routes (`src/roboco/api/routes/kanban.py`)
### 5. Kanban API Routes (`roboco/api/routes/kanban.py`)
| Endpoint | Description |
|----------|-------------|
@@ -93,7 +93,7 @@ Implement Phase 5 of the RoboCo system per HOMELAB_TEAM_V0.md blueprint (Section
| `GET /kanban/board` | Board-level roadmap |
| `GET /kanban/stats` | Board statistics |
### 6. Metrics Service (`src/roboco/services/metrics.py`)
### 6. Metrics Service (`roboco/services/metrics.py`)
| Component | Description |
|-----------|-------------|
@@ -108,7 +108,7 @@ Implement Phase 5 of the RoboCo system per HOMELAB_TEAM_V0.md blueprint (Section
| `get_communication_volume(hours)` | Message and notification counts |
| `get_health_status(team)` | ok/slow/critical status |
### 7. Dashboard API Routes (`src/roboco/api/routes/dashboard.py`)
### 7. Dashboard API Routes (`roboco/api/routes/dashboard.py`)
| Endpoint | Description |
|----------|-------------|
@@ -127,7 +127,7 @@ Implement Phase 5 of the RoboCo system per HOMELAB_TEAM_V0.md blueprint (Section
## File Structure
```
src/roboco/
roboco/
├── models/
│ └── kanban.py # NEW - Kanban board models
├── services/
@@ -26,7 +26,7 @@ Implement Phase 6 of the RoboCo system per HOMELAB_TEAM_V0.md blueprint (Section
## What Was Built
### 1. Custom Exceptions (`src/roboco/exceptions.py`)
### 1. Custom Exceptions (`roboco/exceptions.py`)
| Exception | Description |
|-----------|-------------|
@@ -60,7 +60,7 @@ All exceptions include:
- `details`: Additional context dict
- `to_dict()`: Convert to API response format
### 2. Middleware (`src/roboco/api/middleware.py`)
### 2. Middleware (`roboco/api/middleware.py`)
| Component | Description |
|-----------|-------------|
@@ -77,7 +77,7 @@ Features:
- Added to all error responses
- Request timing in X-Response-Time-Ms header
### 3. Logging Configuration (`src/roboco/logging.py`)
### 3. Logging Configuration (`roboco/logging.py`)
| Component | Description |
|-----------|-------------|
@@ -114,7 +114,7 @@ With:
- JSON columns for structured data
- Performance indexes for common queries
### 5. Updated Application (`src/roboco/api/app.py`)
### 5. Updated Application (`roboco/api/app.py`)
- Logging setup at import time
- Startup/shutdown logging
@@ -123,7 +123,7 @@ With:
## File Structure
```
src/roboco/
roboco/
├── __init__.py # Updated with core exports
├── exceptions.py # NEW - Custom exception hierarchy
├── logging.py # NEW - Structured logging config
@@ -39,24 +39,24 @@
## Acceptance Criteria
### 1. MCP Server Integration
- [x] Claude Code can call Task API (claim, update status, complete) - `src/roboco/mcp/task_server.py`
- [x] Claude Code can call Message API (send/receive, channels) - `src/roboco/mcp/message_server.py`
- [x] Claude Code can call Notification API (PMs only) - `src/roboco/mcp/notify_server.py`
- [x] Claude Code can call Journal API (personal logs) - `src/roboco/mcp/journal_server.py`
- [x] Claude Code can call Task API (claim, update status, complete) - `roboco/mcp/task_server.py`
- [x] Claude Code can call Message API (send/receive, channels) - `roboco/mcp/message_server.py`
- [x] Claude Code can call Notification API (PMs only) - `roboco/mcp/notify_server.py`
- [x] Claude Code can call Journal API (personal logs) - `roboco/mcp/journal_server.py`
- [x] MCP config file that any agent can use - Dynamic generation in orchestrator
### 2. API Rule Enforcement
- [x] Channel access enforced (reject writes to wrong channels) - `src/roboco/enforcement/channel_access.py`
- [x] Notification permissions enforced (only PM/Board/Auditor can notify) - `src/roboco/enforcement/notification_perms.py`, `api/routes/notifications.py`
- [x] Notification routing enforced (Cell PM can only notify own cell) - `src/roboco/enforcement/notification_perms.py`
- [x] Task state transitions enforced (no skipping states) - `src/roboco/enforcement/task_lifecycle.py`
- [x] Task ownership enforced (only assigned agent can update) - `src/roboco/enforcement/task_ownership.py`
- [x] Channel access enforced (reject writes to wrong channels) - `roboco/enforcement/channel_access.py`
- [x] Notification permissions enforced (only PM/Board/Auditor can notify) - `roboco/enforcement/notification_perms.py`, `api/routes/notifications.py`
- [x] Notification routing enforced (Cell PM can only notify own cell) - `roboco/enforcement/notification_perms.py`
- [x] Task state transitions enforced (no skipping states) - `roboco/enforcement/task_lifecycle.py`
- [x] Task ownership enforced (only assigned agent can update) - `roboco/enforcement/task_ownership.py`
- [x] Message validation enforced (must have type, task_id when applicable) - `api/routes/messages.py` (Pydantic validation)
- [x] Session boundaries enforced (auto-close, create new) - `api/routes/messages.py:297-306`
- [x] Handoff requirements enforced (can't close without docs) - `services/task.py:complete()`
### 3. Agent Orchestrator
- [x] Can spawn a Claude Code instance with a specific blueprint - `src/roboco/runtime/orchestrator.py`
- [x] Can spawn a Claude Code instance with a specific blueprint - `roboco/runtime/orchestrator.py`
- [x] Can pass MCP config to instance - `AgentOrchestrator._generate_mcp_config()`
- [x] Can monitor instance health (responsive, errored, stuck) - `AgentOrchestrator._health_loop()`
- [x] Can resume sessions on failure - `AgentOrchestrator.resolve_wait()` + auto-restart
@@ -64,17 +64,17 @@
- [x] Provides status dashboard/API - `AgentOrchestrator.get_status_summary()`
### 4. Agent Bootstrap
- [x] 18 agent records created in database - `src/roboco/bootstrap.py`
- [x] 18 agent records created in database - `roboco/bootstrap.py`
- [x] All channels created with correct membership - `bootstrap.py:create_channels()`
- [x] Silent observer (Auditor) configured for all channels - `bootstrap.py:AUDITOR_SILENT_ACCESS`
- [x] PM notification permissions configured - Built into enforcement layer
- [x] Initial channel messages posted - `bootstrap.py:create_initial_messages()`
### 5. Workflow Triggers
- [x] Task status changes trigger appropriate notifications - `src/roboco/events/handlers.py:handle_task_status_change()`
- [x] Session boundaries trigger new session creation - `src/roboco/events/handlers.py:handle_session_boundary()`
- [x] Handoff creation triggers documenter notification - `src/roboco/events/handlers.py:handle_handoff_created()`
- [x] QA pass/fail triggers appropriate next step - `src/roboco/events/handlers.py:handle_qa_result()`
- [x] Task status changes trigger appropriate notifications - `roboco/events/handlers.py:handle_task_status_change()`
- [x] Session boundaries trigger new session creation - `roboco/events/handlers.py:handle_session_boundary()`
- [x] Handoff creation triggers documenter notification - `roboco/events/handlers.py:handle_handoff_created()`
- [x] QA pass/fail triggers appropriate next step - `roboco/events/handlers.py:handle_qa_result()`
### 6. End-to-End Validation
- [ ] Can spawn all 18 agents - Requires testing
@@ -1057,7 +1057,7 @@ The orchestrator manages Claude Code instances.
#### 3.1 Orchestrator Core
```python
# src/roboco/runtime/orchestrator.py
# roboco/runtime/orchestrator.py
class AgentOrchestrator:
"""
@@ -1272,7 +1272,7 @@ Create the initial state for the system.
#### 4.1 Bootstrap Script
```python
# src/roboco/runtime/bootstrap.py
# roboco/runtime/bootstrap.py
async def bootstrap_roboco() -> None:
"""
@@ -1547,7 +1547,7 @@ Events that automatically trigger the next step in the workflow.
#### 6.1 Event System
```python
# src/roboco/runtime/events.py
# roboco/runtime/events.py
class WorkflowEventHandler:
"""Handles workflow events and triggers appropriate actions."""
@@ -2194,7 +2194,7 @@ BOARD MEETING (Both PO + HoM):
### 10. File Structure
```
src/roboco/
roboco/
├── runtime/ # NEW - Agent Runtime
│ ├── __init__.py
│ ├── orchestrator.py # Claude Code instance management
@@ -2236,7 +2236,7 @@ Projects need to be tracked in the database to support multi-project workflows.
#### 11.1 Project Table
```python
# src/roboco/models/project.py
# roboco/models/project.py
class Project(Base):
"""A project/repository managed by RoboCo."""
@@ -2285,7 +2285,7 @@ class Project(Base):
#### 11.2 Task-Project Relationship
```python
# Update to src/roboco/models/task.py
# Update to roboco/models/task.py
class Task(Base):
# ... existing fields ...
@@ -2358,7 +2358,7 @@ def downgrade():
#### 11.4 Project API Endpoints
```python
# src/roboco/api/routes/projects.py
# roboco/api/routes/projects.py
router = APIRouter(prefix="/projects", tags=["Projects"])
@@ -2701,7 +2701,7 @@ MCP tools don't just validate - they **guide** the agent to the next step:
},
"context": {
"related_tasks": ["TASK-038 (Redis setup)"],
"related_code": ["src/roboco/api/routes/auth.py"],
"related_code": ["roboco/api/routes/auth.py"],
"previous_attempts": []
},
"next_step": "UNDERSTAND",
@@ -3470,7 +3470,7 @@ Phase 7 builds the Agent Runtime - the layer that brings RoboCo to life. We have
### Files Created
#### MCP Servers (`src/roboco/mcp/`)
#### MCP Servers (`roboco/mcp/`)
| File | Purpose | Tools |
|------|---------|-------|
| `__init__.py` | Module init | Exports all server factories |
@@ -3479,7 +3479,7 @@ Phase 7 builds the Agent Runtime - the layer that brings RoboCo to life. We have
| `notify_server.py` | Notifications via MCP | notify_list, notify_get, notify_ack, notify_send, escalate, request_approval |
| `journal_server.py` | Personal journaling via MCP | journal_entry, journal_reflect, journal_decision, journal_learning, journal_struggle, journal_search, journal_stats, journal_recent |
#### Enforcement Layer (`src/roboco/enforcement/`)
#### Enforcement Layer (`roboco/enforcement/`)
| File | Purpose | Key Functions |
|------|---------|---------------|
| `__init__.py` | Module init | Exports all validators |
@@ -3488,13 +3488,13 @@ Phase 7 builds the Agent Runtime - the layer that brings RoboCo to life. We have
| `task_lifecycle.py` | Task state machine | `validate_task_transition()`, `TaskLifecycleError`, `is_terminal_state()`, `is_waiting_state()` |
| `task_ownership.py` | Task ownership rules | `validate_task_ownership()`, `validate_task_claim()`, `can_review_task()` |
#### Runtime (`src/roboco/runtime/`)
#### Runtime (`roboco/runtime/`)
| File | Purpose | Key Classes |
|------|---------|-------------|
| `__init__.py` | Module init | Exports orchestrator |
| `orchestrator.py` | Agent lifecycle management | `AgentOrchestrator`, `AgentInstance`, `AgentState`, `WaitingRecord` |
#### Bootstrap (`src/roboco/`)
#### Bootstrap (`roboco/`)
| File | Purpose |
|------|---------|
| `bootstrap.py` | System initialization (DB, agents, channels, memberships) |
@@ -3516,19 +3516,19 @@ Phase 7 builds the Agent Runtime - the layer that brings RoboCo to life. We have
### Additional Files Created (Second Implementation Pass)
#### Event System (`src/roboco/events/`)
#### Event System (`roboco/events/`)
| File | Purpose | Key Components |
|------|---------|----------------|
| `__init__.py` | Module init | Exports EventBus, Event, EventType, handlers |
| `bus.py` | Redis pub/sub event bus | `EventBus`, `Event`, `EventType` enum |
| `handlers.py` | Workflow trigger handlers | `handle_task_status_change()`, `handle_session_boundary()`, `handle_handoff_created()`, `handle_qa_result()` |
#### API Routes (`src/roboco/api/routes/`)
#### API Routes (`roboco/api/routes/`)
| File | Purpose |
|------|---------|
| `orchestrator.py` | Agent orchestrator management API |
#### Services (`src/roboco/services/`)
#### Services (`roboco/services/`)
| File | Purpose |
|------|---------|
| `notification.py` | System-generated notification service |
+1 -1
View File
@@ -25,7 +25,7 @@ CEO (Renzo - Human)
```
roboco/
├── src/roboco/ # Main Python package
├── roboco/ # Main Python package
│ ├── models/ # Pydantic data models
│ ├── db/ # SQLAlchemy ORM & database
│ ├── api/ # FastAPI routes (coming soon)
+3 -3
View File
@@ -93,7 +93,7 @@ requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]
packages = ["src/roboco"]
packages = ["roboco"]
[tool.hatch.metadata]
allow-direct-references = true
@@ -179,7 +179,7 @@ markers = [
# Vulture Configuration
# =============================================================================
[tool.vulture]
paths = ["src/roboco", "tests", "vulture_whitelist.py"]
paths = ["roboco", "tests", "vulture_whitelist.py"]
exclude = ["**/conftest.py", ".venv"]
min_confidence = 100
ignore_decorators = [
@@ -244,4 +244,4 @@ ignore = []
[tool.deptry]
exclude = ["tests", ".venv", "vulture_whitelist.py"]
extend_exclude = ["conftest.py", "setup.py"]
known_first_party = ["src/roboco"]
known_first_party = ["roboco"]