Add Employee Factory documentation and update ENGINEER.md with VP3/VP4 completion

This commit is contained in:
2026-07-02 06:16:24 +00:00
parent 804fc33e9c
commit 5c8c75395c
2 changed files with 116 additions and 0 deletions
+87
View File
@@ -0,0 +1,87 @@
# APEX OS Employee Factory
## Overview
The Employee Factory is a standardized system for creating new AI employees (Letta agents) with consistent configuration, constitution compliance, and API access.
## Components
### 1. Master Template
- **Location:** `/opt/apex/templates/employee-template.json`
- **Version:** 1.0
- **Features:**
- APEX Constitution (5 Laws) auto-injected
- Standard API access (LiteLLM, Gitea, Status API, PostgreSQL)
- Shared memory hooks (mem0.shared_knowledge)
- Lifecycle enforcement (PLAN > BUILD > DEPLOY > REFLECT)
### 2. Spawn Script
- **Location:** `/opt/apex/tools/spawn_employee.sh`
- **Usage:** `spawn_employee.sh <RoleName> <SpecializedTask>`
- **Example:** `spawn_employee.sh "Marketing Agent" "Create social media content"`
**Process:**
1. Loads master template
2. Determines next employee ID
3. Creates dedicated Gitea repository
4. Generates customized system prompt
5. Creates Letta agent with APEX Constitution
6. Logs hiring event to database
### 3. APEX Constitution (Auto-Injected)
Every employee inherits these 5 immutable laws:
1. All decisions must be logged in `apex.engineer_decisions` before execution.
2. Query `apex.reflections` and `mem0.shared_knowledge` before starting unfamiliar tasks.
3. All deployments must pass through Docker (no direct system installs).
4. Create backups before modifying ANY infrastructure configuration.
5. Follow the Engineering Lifecycle: PLAN > BUILD > DEPLOY > REFLECT (no shortcuts).
## Current Employees
### Employee 1: Engineer
- **Agent ID:** agent-4e3c3862-d0ba-47c6-8f2e-74249e1cfe4a
- **Role:** Principal Engineer
- **Repository:** engineer/apex-os-docs
- **Specialization:** Infrastructure, deployment, AI employee creation
### Employee 3: Documentation Agent
- **Agent ID:** agent-f8706c2d-51b5-4678-abc7-2864d9845e6a
- **Role:** Documentation Auditor
- **Repository:** engineer/documentation-agent-workspace
- **Specialization:** Audit and improve Markdown documentation
## For CEO: How to Hire a New Employee
1. SSH into the VPS:
```bash
ssh root@62.72.3.145 -i <path-to-engineer-ssh-key>
```
2. Run the spawn script:
```bash
/opt/apex/tools/spawn_employee.sh "Role Name" "Specialized Task Description"
```
3. Interact with the new employee via Letta API:
```bash
curl -X POST http://localhost:8283/v1/agents/<AGENT_ID>/messages/ \
-H "Content-Type: application/json" \
-d '{"messages": [{"role": "user", "content": "Your task here"}]}'
```
## Monitoring
### Grafana Dashboard
- **URL:** http://grafana.apex.unstuck-path.com
- **Dashboard:** "APEX OS - Executive Overview"
- **Dashboard UID:** a5jdct
### Dashboard Panels:
1. **System Health** - Real-time status of 6 critical services
2. **Active Projects Pipeline** - Current projects and statuses
3. **Deployment Success Rate** - 24-hour deployment metrics
4. **Engineer Brain Activity** - Latest reflections and decisions
5. **Auto-Recovery Events** - System self-healing activity
6. **Lifecycle Executions** - Total engineering cycles completed
7. **Knowledge Entries** - Company brain size
8. **Constitution Violations** - Compliance tracking
9. **Active Employees** - Current team size
+29
View File
@@ -74,3 +74,32 @@ All projects are tracked in the `apex` database:
- **Date:** 2026-07-02 - **Date:** 2026-07-02
- **Phase:** 5 (Engineer Agent Creation) - **Phase:** 5 (Engineer Agent Creation)
- **Status:** Operational ✅ - **Status:** Operational ✅
---
## Phase 5.5: Management Layer (VP3 and VP4) - Complete
### VP3: Company Dashboard
The APEX OS platform now has a real-time executive dashboard in Grafana showing:
- System health and critical service status
- Active projects and deployment pipeline
- Engineering brain activity (reflections and decisions)
- Auto-recovery system events
- Constitution violation tracking
**Access:** http://grafana.apex.unstuck-path.com (admin credentials in phase1_credentials.md)
**Dashboard UID:** a5jdct
### VP4: Employee Factory
A standardized system for creating new AI employees:
- **Master Template:** `/opt/apex/templates/employee-template.json` (APEX Constitution auto-injected)
- **Spawn Script:** `/opt/apex/tools/spawn_employee.sh`
- **Usage:** `spawn_employee.sh "Role Name" "Specialized Task"`
**Test Employee Created:**
- **Employee 3:** Documentation Agent
- **Agent ID:** agent-f8706c2d-51b5-4678-abc7-2864d9845e6a
- **Repository:** engineer/documentation-agent-workspace
- **Status:** Operational
See `EMPLOYEE_FACTORY.md` for complete documentation.