How cft0808/edict works
Edict is an AI multi-agent task coordination platform with an observable, operator-controlled dashboard. Its documented workflow takes an edict through Taizi triage, Zhongshu planning, Menxia review (including rejection and rework), Shangshu dispatch, departmental execution, and a final report. The repository includes both a legacy dashboard server and a newer event-driven backend; the frontend API explicitly targets the dashboard server, so they are shown as distinct runtime paths rather than assumed to be one integrated stack. The backend excerpts establish task, event, and worker responsibilities; several dashboard capabilities are README-documented but their implementations were not sampled.
Main entry points: App.tsx Dashboard App · task_service.py Task Service · event_bus.py Event Bus · api.ts Frontend API Client
Components 34
Task Workflow
- Taizi Triage
- Zhongshu Planning
- Menxia Review
- Shangshu Dispatch
- Department Agents
Event Backend
- Task API
edict/backend/app/api/tasks.py - Task Service
edict/backend/app/services/task_service.py - Task State Model
edict/backend/app/models/task.py - Database Layer
edict/backend/app/db.py - Outbox Relay
edict/backend/app/workers/outbox_relay.py - Event Bus
edict/backend/app/services/event_bus.py - Orchestrator
edict/backend/app/workers/orchestrator_worker.py - Dispatch Worker
edict/backend/app/workers/dispatch_worker.py - Redis Streams
Operations Dashboard
- Dashboard API
dashboard/server.py - Frontend API Client
edict/frontend/src/api.ts - Dashboard Store
edict/frontend/src/store.ts - Dashboard App
edict/frontend/src/App.tsx - Edict Kanban
edict/frontend/src/components/EdictBoard.tsx - Task Detail
edict/frontend/src/components/TaskModal.tsx - Agent Monitor
edict/frontend/src/components/MonitorPanel.tsx - Memorial Archive
edict/frontend/src/components/MemorialPanel.tsx - Court Discussion
edict/frontend/src/components/CourtDiscussion.tsx - Discussion Service
dashboard/court_discuss.py - News Briefing
edict/frontend/src/components/MorningPanel.tsx - Model Settings
edict/frontend/src/components/ModelConfig.tsx - Skills Manager
edict/frontend/src/components/SkillsConfig.tsx - Session Monitor
edict/frontend/src/components/SessionsPanel.tsx - Officials Overview
edict/frontend/src/components/OfficialPanel.tsx - Edict Templates
edict/frontend/src/components/TemplatePanel.tsx - Court Ceremony
edict/frontend/src/components/CourtCeremony.tsx
Agent Integrations
- Messaging Channels
edict/backend/app/channels - OpenClaw Gateway
Other components
- Operator
Connections 36
- Operator → Messaging Channels: issues edict
- Messaging Channels → Taizi Triage: delivers request
- Taizi Triage → Zhongshu Planning: routes edict
- Zhongshu Planning → Menxia Review: submits plan
- Menxia Review → Shangshu Dispatch: approves plan
- Menxia Review → Zhongshu Planning: returns for rework
- Shangshu Dispatch → Department Agents: dispatches tasks
- Department Agents → Operator: reports result
- Operator → Task API: submits task
- Task API → Task Service: calls service
edict/backend/app/api/tasks.py - Task Service → Task State Model: reads and updates
edict/backend/app/services/task_service.py - Task Service → Database Layer: commits task
edict/backend/app/services/task_service.py - Task Service → Outbox Relay: writes events
edict/backend/app/services/task_service.py - Outbox Relay → Event Bus: relays events
- Event Bus → Redis Streams: publishes streams
edict/backend/app/services/event_bus.py - Orchestrator → Event Bus: consumes and publishes
edict/backend/app/workers/orchestrator_worker.py - Orchestrator → Dispatch Worker: requests dispatch
edict/backend/app/workers/orchestrator_worker.py - Dispatch Worker → OpenClaw Gateway: dispatches agent work
- Operator → Dashboard App: uses dashboard
- Dashboard App → Dashboard Store: starts polling
edict/frontend/src/App.tsx - Dashboard App → Edict Kanban: renders panel
edict/frontend/src/App.tsx - Dashboard App → Task Detail: renders modal
edict/frontend/src/App.tsx - Dashboard App → Agent Monitor: renders panel
edict/frontend/src/App.tsx - Dashboard App → Memorial Archive: renders panel
edict/frontend/src/App.tsx - Dashboard App → Court Discussion: renders panel
edict/frontend/src/App.tsx - Dashboard App → News Briefing: renders panel
edict/frontend/src/App.tsx - Dashboard App → Model Settings: renders panel
edict/frontend/src/App.tsx - Dashboard App → Skills Manager: renders panel
edict/frontend/src/App.tsx - Dashboard App → Session Monitor: renders panel
edict/frontend/src/App.tsx - Dashboard App → Officials Overview: renders panel
edict/frontend/src/App.tsx - Dashboard App → Edict Templates: renders panel
edict/frontend/src/App.tsx - Dashboard App → Court Ceremony: renders overlay
edict/frontend/src/App.tsx - Dashboard Store → Frontend API Client: loads dashboard data
edict/frontend/src/store.ts - Frontend API Client → Dashboard API: requests endpoints
edict/frontend/src/api.ts - Dashboard API → Discussion Service: invokes discussion
dashboard/server.py - Court Discussion → Frontend API Client: requests discussion data
edict/frontend/src/components/CourtDiscussion.tsx