Sovereign Workforce OS
Command Center · Hub v6
DOC 12 · AI WORKFORCE TECHNICAL ARCHITECTURE v1.0

5-Layer Runtime

Spec teknis untuk mempekerjakan, membatasi, mengaudit, mengevaluasi AI workers di edge Cloudflare. 5 komponen berkomunikasi via API + Queues, bukan 1 super-agent monolitik.

DATA FLOW · CANON-ENFORCED
E IntentB QueueA Resolve RoleC ExecuteD Audit (WORM)E Notify ↑
LAYER A·🟡 F2 build

Role Registry

Daftar "karyawan AI" dengan JD, boundary, budget, tools, escalation. Setiap role = 1 row di tabel `ai_roles`.

Effort
5 hari
REPO OWNER · STORAGE
Lane-eco-budget-control-system
D1 (ai_roles table)
CANON PROTECTS
#1 Human Intent#8 Tenant Isolation#16 AI-Role Payload
API CONTRACT
GET /api/v1/rolesGET /api/v1/roles/:idPOST /api/v1/roles (founder-only)PATCH /api/v1/roles/:idPOST /api/v1/roles/:id/pausePOST /api/v1/roles/:id/resume
LAYER B·🟡 F2 build

Work Queue

Ticket system: siapa kerja apa, SLA, priority, approval required, status tracking, evidence link.

Effort
4 hari
REPO OWNER · STORAGE
Lane-eco-budget-control-system + webapp
D1 (work_tickets) + KV (active_tickets cache)
CANON PROTECTS
#12 Human Confirmation Gate#13 Dokumen=Proof
API CONTRACT
GET /api/v1/tickets (status filter)POST /api/v1/ticketsPATCH /api/v1/tickets/:idPOST /api/v1/tickets/:id/approvePOST /api/v1/tickets/:id/reject
LAYER C·🟠 F3 build (LangGraph adoption)

Execution Graph

Agent runtime — LangGraph backbone + OpenAI Agents SDK routing + smolagents workers. Durable long-running eksekusi dengan HITL.

Effort
14 hari
REPO OWNER · STORAGE
Sovereign-ecosystem (Tower) + Cloudflare Workers + Durable Objects
Durable Object state + R2 checkpoints
CANON PROTECTS
#4 Live State dari DB#17 Every Action to Ledger#18 Framework Commodity
API CONTRACT
POST /api/v1/exec/start/:ticket_idGET /api/v1/exec/:run_id/statusPOST /api/v1/exec/:run_id/resume (after approval)
LAYER D·✅ LIVE (schema) · 🟡 WORM trigger F2

Governance Ledger

Audit immutable — WORM trigger (DELETE/UPDATE critical blocked), hash chain SHA256, JWT approval signature, R2 evidence. SOVEREIGN CORE.

Effort
7 hari
REPO OWNER · STORAGE
Sovereign-os-platform
D1 (governance_events WORM) + R2 (evidence + daily backup)
CANON PROTECTS
#3 Canon Earned#5 Status Jujur#8 Tenant Isolation#17 Every Action to Ledger
API CONTRACT
POST /api/v1/events (append-only)GET /api/v1/events (tenant-scoped, filter by type/actor/time)GET /api/v1/events/:id/evidence (R2 signed URL)GET /api/v1/events/chain-verify (hash chain integrity)
LAYER E·✅ LIVE v6 · 🟡 approval flow F2

Founder Console

UI mobile-first untuk founder: AI workers list, pending approvals, Copilot brief, revenue scorecard, 1-tap approve/reject.

Effort
3 hari
REPO OWNER · STORAGE
webapp (Hub)
localStorage (v6) → D1 (ADR-006 F2+)
CANON PROTECTS
#1 Human Intent Layer 1#12 Human Confirmation Gate
API CONTRACT
GET /api/v1/console/summaryGET /api/v1/console/pending-approvalPOST /api/v1/console/approve/:ticket_idPOST /api/v1/console/reject/:ticket_idGET /api/v1/console/copilot-briefGET /api/v1/console/ledger/recent

Canon Law #17 · Every Agent Action Logs to Ledger

Setiap tool call AI-role WAJIB write ke governance_events dengan hash chain SHA256, approval_signature JWT, evidence URL R2. Bypass ledger = Canon violation auto-rollback.

Canon Law #18 · Framework is Commodity, Canon is Moat

Fase 3+ stack: LangGraph (backbone) + OpenAI Agents SDK (routing) + smolagents (workers). Framework boleh swap kapan saja via ADR. Canon Laws + Governance Ledger TIDAK boleh berubah.