Many fixes to Mentor, Query RAG, etc

This commit is contained in:
Renn F
2026-01-03 23:10:31 +01:00
parent 1d173a5203
commit c68644a1e2
36 changed files with 1329 additions and 455 deletions
+81
View File
@@ -0,0 +1,81 @@
# Agent UUIDs Reference
**ALWAYS use SLUGS when assigning tasks.** The system resolves slugs to UUIDs automatically.
```python
# CORRECT - Use slug
roboco_task_create(assigned_to="be-dev-1", ...)
# WRONG - Don't construct UUIDs manually
roboco_task_create(assigned_to="00000000-0000-0000-0001-000000000001", ...)
```
## UUID Scheme (Reference Only)
```
00000000-0000-0000-{CELL}-00000000000{N}
```
| Cell Code | Team |
|-----------|------|
| `0000` | CEO |
| `0001` | Backend |
| `0002` | Frontend |
| `0003` | UX/UI |
| `0004` | Board/Management |
**NO OTHER CELL CODES EXIST.** Do not construct UUIDs with codes like `0005`, `0006`, etc.
## Backend Cell (0001)
| Slug | UUID |
|------|------|
| `be-dev-1` | `00000000-0000-0000-0001-000000000001` |
| `be-dev-2` | `00000000-0000-0000-0001-000000000002` |
| `be-qa` | `00000000-0000-0000-0001-000000000003` |
| `be-pm` | `00000000-0000-0000-0001-000000000004` |
| `be-doc` | `00000000-0000-0000-0001-000000000005` |
## Frontend Cell (0002)
| Slug | UUID |
|------|------|
| `fe-dev-1` | `00000000-0000-0000-0002-000000000001` |
| `fe-dev-2` | `00000000-0000-0000-0002-000000000002` |
| `fe-qa` | `00000000-0000-0000-0002-000000000003` |
| `fe-pm` | `00000000-0000-0000-0002-000000000004` |
| `fe-doc` | `00000000-0000-0000-0002-000000000005` |
## UX/UI Cell (0003)
| Slug | UUID |
|------|------|
| `ux-dev-1` | `00000000-0000-0000-0003-000000000001` |
| `ux-dev-2` | `00000000-0000-0000-0003-000000000002` |
| `ux-qa` | `00000000-0000-0000-0003-000000000003` |
| `ux-pm` | `00000000-0000-0000-0003-000000000004` |
| `ux-doc` | `00000000-0000-0000-0003-000000000005` |
## Board/Management (0004)
| Slug | UUID |
|------|------|
| `main-pm` | `00000000-0000-0000-0004-000000000001` |
| `product-owner` | `00000000-0000-0000-0004-000000000002` |
| `head-marketing` | `00000000-0000-0000-0004-000000000003` |
| `auditor` | `00000000-0000-0000-0004-000000000004` |
## CEO (0000)
| Slug | UUID |
|------|------|
| `ceo` | `00000000-0000-0000-0000-000000000001` |
## Usage
Most tools accept either slug or UUID:
```python
roboco_task_claim(task_id) # task_id is UUID
roboco_journal_read_team("be-dev-1") # slug works
roboco_journal_read_team("00000000-0000-0000-0001-000000000001") # UUID works
```
@@ -0,0 +1,71 @@
# Channel Reference
All available channels with their slugs and access rules.
## Cell Channels
| Slug | Name | Members |
|------|------|---------|
| `backend-cell` | Backend Cell | be-dev-1, be-dev-2, be-qa, be-pm, be-doc |
| `frontend-cell` | Frontend Cell | fe-dev-1, fe-dev-2, fe-qa, fe-pm, fe-doc |
| `uxui-cell` | UX/UI Cell | ux-dev-1, ux-dev-2, ux-qa, ux-pm, ux-doc |
## Cross-Cell Channels
| Slug | Name | Members |
|------|------|---------|
| `dev-all` | All Developers | All 6 developers |
| `qa-all` | All QA | be-qa, fe-qa, ux-qa |
| `pm-all` | All PMs | be-pm, fe-pm, ux-pm, main-pm |
| `doc-all` | All Documenters | be-doc, fe-doc, ux-doc |
## Management Channels
| Slug | Name | Members |
|------|------|---------|
| `main-pm-board` | Main PM & Board | main-pm, product-owner, head-marketing, auditor |
| `board-private` | Board Private | product-owner, head-marketing, auditor, ceo |
## Special Channels
| Slug | Name | Read | Write |
|------|------|------|-------|
| `announcements` | Announcements | Everyone | PM/Board only |
| `all-hands` | All Hands | Everyone | Everyone |
## Auditor Silent Access
Auditor has silent read access to:
- `backend-cell`
- `frontend-cell`
- `uxui-cell`
- `dev-all`
- `qa-all`
- `pm-all`
- `doc-all`
Auditor does NOT appear in member lists but CAN read.
## Privileged Access
These roles bypass normal membership checks:
- **CEO**: Full access everywhere
- **Auditor**: Silent read everywhere
- **Main PM**: Read access to all cell channels
## Using Channels
```python
# Send message to your cell
roboco_message_send({
channel: "backend-cell",
content: "Starting work on task",
task_id: task_id
})
# Read channel history
roboco_channel_history("backend-cell", limit=50)
# List available channels
roboco_channel_list()
```
+85
View File
@@ -0,0 +1,85 @@
# Configuration Reference
Environment variables for RoboCo (prefix: `ROBOCO_`).
## API Server
| Variable | Default | Description |
|----------|---------|-------------|
| `ROBOCO_HOST` | `127.0.0.1` | API host (0.0.0.0 for containers) |
| `ROBOCO_PORT` | `8000` | API port |
| `ROBOCO_DEBUG` | `false` | Debug mode |
| `ROBOCO_ENVIRONMENT` | `development` | development/staging/production |
## Database
| Variable | Default | Description |
|----------|---------|-------------|
| `ROBOCO_DATABASE_HOST` | `localhost` | PostgreSQL host |
| `ROBOCO_DATABASE_PORT` | `5432` | PostgreSQL port |
| `ROBOCO_DATABASE_USER` | `roboco` | Database user |
| `ROBOCO_DATABASE_PASSWORD` | `roboco` | Database password |
| `ROBOCO_DATABASE_NAME` | `roboco` | Database name |
## Redis
| Variable | Default | Description |
|----------|---------|-------------|
| `ROBOCO_REDIS_HOST` | `localhost` | Redis host |
| `ROBOCO_REDIS_PORT` | `6379` | Redis port |
| `ROBOCO_REDIS_DB` | `0` | Redis database |
## Workspaces
| Variable | Default | Description |
|----------|---------|-------------|
| `ROBOCO_WORKSPACES_ROOT` | `/data/workspaces` | Root for agent workspaces |
| `ROBOCO_WORKSPACE_AUTO_CLONE` | `true` | Auto-clone on first access |
| `ROBOCO_WORKSPACE_CLONE_TIMEOUT` | `300` | Clone timeout (seconds) |
## RAG/Embeddings
| Variable | Default | Description |
|----------|---------|-------------|
| `ROBOCO_DEFAULT_EMBEDDING_MODEL` | `embeddinggemma:300m` | Embedding model |
| `ROBOCO_EMBEDDING_DIMENSIONS` | `768` | Embedding dimensions |
| `ROBOCO_RAG_CHUNK_STRATEGY` | `fixed` | fixed/semantic/hierarchical/contextual |
| `ROBOCO_RAG_CHUNK_SIZE` | `512` | Base chunk size |
| `ROBOCO_RAG_CHUNK_SIZE_DOCS` | `1536` | Chunk size for docs |
| `ROBOCO_RAG_CHUNK_SIZE_JOURNALS` | `1024` | Chunk size for journals |
| `ROBOCO_RAG_CHUNK_OVERLAP` | `128` | Chunk overlap |
| `ROBOCO_RAG_USE_HYDE` | `true` | Use HyDE for queries |
| `ROBOCO_RAG_USE_HYBRID_SEARCH` | `true` | BM25 + vector search |
| `ROBOCO_RAG_USE_CROSS_ENCODER` | `true` | Neural reranking |
| `ROBOCO_RAG_AUTO_UPDATE_ENABLED` | `true` | Auto-update indexes |
| `ROBOCO_RAG_AUTO_UPDATE_INTERVAL` | `300` | Update interval (seconds) |
## LLM
| Variable | Default | Description |
|----------|---------|-------------|
| `ROBOCO_LOCAL_LLM_MODEL` | `glm-4.6:cloud` | Local LLM for RAG |
| `ROBOCO_LOCAL_LLM_BASE_URL` | `http://roboco-ollama:11434/v1` | OpenAI-compat API |
| `ROBOCO_OLLAMA_BASE_URL` | `http://roboco-ollama:11434` | Native Ollama API |
## Security
| Variable | Default | Description |
|----------|---------|-------------|
| `ROBOCO_SECRET_KEY` | (required) | JWT signing key (32+ chars) |
| `ROBOCO_ACCESS_TOKEN_EXPIRE_MINUTES` | `1440` | Token expiry (24 hours) |
## Logging
| Variable | Default | Description |
|----------|---------|-------------|
| `ROBOCO_LOG_LEVEL` | `INFO` | DEBUG/INFO/WARNING/ERROR/CRITICAL |
| `ROBOCO_LOG_FORMAT` | `json` | json or console |
## Sessions
| Variable | Default | Description |
|----------|---------|-------------|
| `ROBOCO_SESSION_DEFAULT_TIMEOUT_SECONDS` | `300` | Session timeout |
| `ROBOCO_SESSION_MAX_MESSAGE_COUNT` | `100` | Max messages per session |
| `ROBOCO_MESSAGE_MAX_LENGTH` | `10000` | Max message length |
+73
View File
@@ -0,0 +1,73 @@
# Escalation Chain Reference
Complete escalation mapping for all agents.
## Chain Overview
```
Cell Members → Cell PM → Main PM → Product Owner → CEO
```
## Full Mapping
| Agent | Escalates To |
|-------|--------------|
| `be-dev-1` | `be-pm` |
| `be-dev-2` | `be-pm` |
| `be-qa` | `be-pm` |
| `be-doc` | `be-pm` |
| `fe-dev-1` | `fe-pm` |
| `fe-dev-2` | `fe-pm` |
| `fe-qa` | `fe-pm` |
| `fe-doc` | `fe-pm` |
| `ux-dev-1` | `ux-pm` |
| `ux-dev-2` | `ux-pm` |
| `ux-qa` | `ux-pm` |
| `ux-doc` | `ux-pm` |
| `be-pm` | `main-pm` |
| `fe-pm` | `main-pm` |
| `ux-pm` | `main-pm` |
| `main-pm` | `product-owner` |
| `product-owner` | `ceo` |
| `head-marketing` | `ceo` |
| `auditor` | `ceo` |
## Cell PM for Team
| Team | Cell PM |
|------|---------|
| `backend` | `be-pm` |
| `frontend` | `fe-pm` |
| `ux_ui` | `ux-pm` |
## Escalation Tool
```python
roboco_task_escalate(
task_id="uuid-here",
reason="Need clarification on requirements"
)
```
Auto-routes to your escalation target. You CANNOT choose a different target.
## CEO Escalation (PM Only)
```python
roboco_task_escalate_to_ceo(
task_id="uuid-here",
notes="Major feature ready for approval"
)
```
Requirements:
- Task in `awaiting_pm_review`
- PR exists (for git tasks)
- Only PMs can call this
## Cannot Skip Levels
System enforces chain:
- Developer CANNOT escalate directly to Main PM
- Cell PM CANNOT escalate directly to CEO
- Each level must acknowledge and decide
+88
View File
@@ -0,0 +1,88 @@
# Permissions Reference
What each role can do in the system.
## Permission Levels
| Level | Roles |
|-------|-------|
| CEO | ceo, system |
| BOARD | product_owner, head_marketing |
| AUDITOR | auditor |
| MAIN_PM | main_pm |
| CELL_PM | cell_pm |
| CELL_MEMBER | developer, qa, documenter |
## Task Permissions
| Action | CEO | Board | Auditor | Main PM | Cell PM | Dev | QA | Doc |
|--------|-----|-------|---------|---------|---------|-----|----|----|
| View All | Yes | Yes | Yes | Yes | - | - | - | - |
| View Own | - | - | - | - | Yes | Yes | Yes | Yes |
| Create | Yes | Yes | Yes | Yes | Yes | - | - | - |
| Assign | Yes | Yes | Yes | Yes | Yes | - | - | - |
| Cancel | - | Yes | - | Yes | Yes | - | - | - |
| Close | Yes | Yes | Yes | Yes | Yes | Yes | - | Yes |
| Claim | - | - | - | Yes | Yes | Yes | Yes | Yes |
| Pass QA | - | - | - | - | - | - | Yes | - |
| Fail QA | - | - | - | - | - | - | Yes | - |
| Docs Complete | - | - | - | - | - | - | - | Yes |
Note: CEO and Auditor CANNOT cancel (by design - observe/approve only).
## Index Permissions
| Action | CEO | Board | Auditor | Main PM | Cell PM | Dev | QA | Doc |
|--------|-----|-------|---------|---------|---------|-----|----|----|
| Index Code | Yes | - | - | Yes | Yes | Yes | - | - |
| Index Docs | Yes | Yes | - | Yes | Yes | Yes | - | Yes |
| Search/Query | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes |
| View Stats | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes |
| Clear Index | Yes | - | - | Yes | - | - | - | - |
| Refresh Index | Yes | - | - | Yes | - | - | - | - |
Note: Board (Product Owner, Head Marketing) can only index docs, not code.
## Notification Permissions
| Role | Can Send | Scope |
|------|----------|-------|
| ceo | Yes | All |
| product_owner | Yes | Management chain |
| head_marketing | Yes | Management chain |
| auditor | Yes | All |
| main_pm | Yes | All |
| cell_pm | Yes | Own cell |
| developer | No | - |
| qa | No | - |
| documenter | No | - |
## PM-Capable Roles
These roles can create/assign tasks:
- `ceo`
- `product_owner`
- `head_marketing`
- `main_pm`
- `cell_pm`
## Cancellation Roles
These roles can cancel tasks:
- `product_owner`
- `head_marketing`
- `main_pm`
- `cell_pm`
Note: CEO and Auditor CANNOT cancel (observe/approve only).
## View Scope
| Role | Can View |
|------|----------|
| CEO | All tasks |
| Board | All tasks |
| Auditor | All tasks (silent) |
| Main PM | All tasks |
| Cell PM | Own cell + cross-cell |
| Cell Member | Own cell |