้กน็›ฎๆ–‡ไปถๅคน

ๆ–‡ไปถ
2026-07-13 13:32:32 +08:00

504 ่กŒ
22 KiB
Markdown

<h1 align="center">โš”๏ธ Edict ยท Multi-Agent Orchestration</h1>
<p align="center">
<strong>I modeled an AI multi-agent system after China's 1,300-year-old imperial governance.<br>Turns out, ancient bureaucracy understood separation of powers better than modern AI frameworks.</strong>
</p>
<p align="center">
<sub>12 AI agents (11 business roles + 1 compatibility role) form the Three Departments & Six Ministries: Crown Prince triages, Planning proposes, Review vetoes, Dispatch assigns, Ministries execute.<br>Built-in <b>institutional review gates</b> that CrewAI doesn't have. A <b>real-time dashboard</b> that AutoGen doesn't have.</sub>
</p>
<p align="center">
<a href="#-demo">๐ŸŽฌ Demo</a> ยท
<a href="#-quick-start">๐Ÿš€ Quick Start</a> ยท
<a href="#-architecture">๐Ÿ›๏ธ Architecture</a> ยท
<a href="#-features">๐Ÿ“‹ Features</a> ยท
<a href="README.md">ไธญๆ–‡</a> ยท
<a href="README_JA.md">ๆ—ฅๆœฌ่ชž</a> ยท
<a href="CONTRIBUTING.md">Contributing</a>
</p>
<p align="center">
<img src="https://img.shields.io/badge/OpenClaw-Required-blue?style=flat-square" alt="OpenClaw">
<img src="https://img.shields.io/badge/Python-3.9+-3776AB?style=flat-square&logo=python&logoColor=white" alt="Python">
<img src="https://img.shields.io/badge/Agents-12_Specialized-8B5CF6?style=flat-square" alt="Agents">
<img src="https://img.shields.io/badge/Dashboard-Real--time-F59E0B?style=flat-square" alt="Dashboard">
<img src="https://img.shields.io/badge/License-MIT-22C55E?style=flat-square" alt="License">
<img src="https://img.shields.io/badge/Zero_Deps-stdlib_only-EC4899?style=flat-square" alt="Zero Dependencies">
</p>
<p align="center">
<img src="https://img.shields.io/badge/WeChat-cft0808-07C160?style=for-the-badge&logo=wechat&logoColor=white" alt="WeChat">
</p>
---
## ๐ŸŽฌ Demo
<p align="center">
<video src="docs/Agent_video_Pippit_20260225121727.mp4" width="100%" autoplay muted loop playsinline controls>
Your browser does not support video playback. See the GIF below or <a href="docs/Agent_video_Pippit_20260225121727.mp4">download the video</a>.
</video>
<br>
<sub>๐ŸŽฅ Full demo: AI Multi-Agent collaboration with Three Departments & Six Ministries</sub>
</p>
<details>
<summary>๐Ÿ“ธ GIF Preview (loads faster)</summary>
<p align="center">
<img src="docs/demo.gif" alt="Edict Demo" width="100%">
<br>
<sub>Issue edict โ†’ Crown Prince triage โ†’ Planning โ†’ Review โ†’ Ministries execute โ†’ Report back (30s)</sub>
</p>
</details>
> ๐Ÿณ **No OpenClaw?** Run `docker run -p 7891:7891 cft0808/edict` to try the full dashboard with simulated data.
---
## ๐Ÿ’ก The Idea
Most multi-agent frameworks let AI agents talk freely, producing opaque results you can't audit or intervene in. **Edict** takes a radically different approach โ€” borrowing the governance system that ran China for 1,400 years:
```
You (Emperor) โ†’ Crown Prince (Triage) โ†’ Planning Dept โ†’ Review Dept โ†’ Dispatch Dept โ†’ 6 Ministries โ†’ Report Back
็š‡ไธŠ ๅคชๅญ ไธญไนฆ็œ ้—จไธ‹็œ ๅฐšไนฆ็œ ๅ…ญ้ƒจ ๅ›žๅฅ
```
This isn't a cute metaphor. It's **real separation of powers** for AI:
- **Crown Prince (ๅคชๅญ)** triages messages โ€” casual chat gets auto-replied, real commands become tasks
- **Planning (ไธญไนฆ็œ)** breaks your command into actionable sub-tasks
- **Review (้—จไธ‹็œ)** audits the plan โ€” can reject and force re-planning
- **Dispatch (ๅฐšไนฆ็œ)** assigns approved tasks to specialist ministries
- **7 Ministries** execute in parallel, each with distinct expertise
- **Data sanitization** auto-strips file paths, metadata, and junk from task titles
- Everything flows through a **real-time dashboard** you can monitor and intervene
---
## ๐Ÿค” Why Edict?
> **"Instead of one AI doing everything wrong, 9 specialized agents check each other's work."**
| | CrewAI | MetaGPT | AutoGen | **Edict** |
|---|:---:|:---:|:---:|:---:|
| **Built-in review/veto** | โŒ | โš ๏ธ | โš ๏ธ | **โœ… Dedicated reviewer** |
| **Real-time Kanban** | โŒ | โŒ | โŒ | **โœ… 10-panel dashboard** |
| **Task intervention** | โŒ | โŒ | โŒ | **โœ… Stop / Cancel / Resume** |
| **Full audit trail** | โš ๏ธ | โš ๏ธ | โŒ | **โœ… Memorial archive** |
| **Agent health monitoring** | โŒ | โŒ | โŒ | **โœ… Heartbeat detection** |
| **Hot-swap LLM models** | โŒ | โŒ | โŒ | **โœ… From the dashboard** |
| **Skill management** | โŒ | โŒ | โŒ | **โœ… View / Add skills** |
| **News aggregation** | โŒ | โŒ | โŒ | **โœ… Daily digest + webhook** |
| **Setup complexity** | Med | High | Med | **Low ยท One-click / Docker** |
> **Core differentiator: Institutional review + Full observability + Real-time intervention**
<details>
<summary><b>๐Ÿ” Why the "Review Department" is the killer feature (click to expand)</b></summary>
<br>
CrewAI and AutoGen agents work in a **"done, ship it"** mode โ€” no one checks output quality. It's like a company with no QA department where engineers push code straight to production.
Edict's **Review Department (้—จไธ‹็œ)** exists specifically for this:
- ๐Ÿ“‹ **Audit plan quality** โ€” Is the Planning Department's decomposition complete and sound?
- ๐Ÿšซ **Veto subpar output** โ€” Not a warning. A hard reject that forces re-planning.
- ๐Ÿ”„ **Mandatory rework loop** โ€” Nothing passes until it meets standards.
This isn't an optional plugin โ€” **it's part of the architecture**. Every command must pass through Review. No exceptions.
This is why Edict produces reliable results on complex tasks: there's a mandatory quality gate before anything reaches execution. Emperor Taizong figured this out 1,300 years ago โ€” **unchecked power inevitably produces errors**.
</details>
---
## โœจ Features
### ๐Ÿ›๏ธ Twelve-Department Agent Architecture
- **Crown Prince** (ๅคชๅญ) message triage โ€” auto-reply casual chat, create tasks for real commands
- **Three Departments** (Planning ยท Review ยท Dispatch) for governance
- **Seven Ministries** (Finance ยท Docs ยท Engineering ยท Compliance ยท Infrastructure ยท HR + Briefing) for execution
- Strict permission matrix โ€” who can message whom is enforced
- Each agent: own workspace, own skills, own LLM model
- **Data sanitization** โ€” auto-strips file paths, metadata, invalid prefixes from titles/remarks
### ๐Ÿ“‹ Command Center Dashboard (10 Panels)
| Panel | Description |
|-------|------------|
| ๐Ÿ“‹ **Edicts Kanban** | Task cards by state, filters, search, heartbeat badges, stop/cancel/resume |
| ๐Ÿ”ญ **Department Monitor** | Pipeline visualization, distribution charts, health cards |
| ๐Ÿ“œ **Memorial Archive** | Auto-generated archives with 5-phase timeline |
| ๐Ÿ“œ **Edict Templates** | 9 presets with parameter forms, cost estimates, one-click dispatch |
| ๐Ÿ‘ฅ **Officials Overview** | Token leaderboard, activity stats |
| ๐Ÿ“ฐ **Daily Briefing** | Auto-curated news, subscription management, Feishu push |
| โš™๏ธ **Model Config** | Per-agent LLM switching, automatic Gateway restart |
| ๐Ÿ› ๏ธ **Skills Config** | View installed skills, add new ones |
| ๐Ÿ’ฌ **Sessions** | Live session monitoring with channel labels |
| ๐ŸŽฌ **Court Ceremony** | Immersive daily opening animation with stats |
---
## ๐Ÿ–ผ๏ธ Screenshots
### Edicts Kanban
![Kanban](docs/screenshots/01-kanban-main.png)
<details>
<summary>๐Ÿ“ธ More screenshots</summary>
### Agent Monitor
![Monitor](docs/screenshots/02-monitor.png)
### Task Detail
![Detail](docs/screenshots/03-task-detail.png)
### Model Config
![Models](docs/screenshots/04-model-config.png)
### Skills
![Skills](docs/screenshots/05-skills-config.png)
### Officials
![Officials](docs/screenshots/06-official-overview.png)
### Sessions
![Sessions](docs/screenshots/07-sessions.png)
### Memorials Archive
![Memorials](docs/screenshots/08-memorials.png)
### Command Templates
![Templates](docs/screenshots/09-templates.png)
### Daily Briefing
![Briefing](docs/screenshots/10-morning-briefing.png)
### Court Ceremony
![Ceremony](docs/screenshots/11-ceremony.png)
</details>
---
## ๐Ÿš€ Quick Start
### Docker
```bash
docker run -p 7891:7891 cft0808/edict
```
Open http://localhost:7891
### Full Install
**Prerequisites:** [OpenClaw](https://openclaw.ai) ยท Python 3.9+ ยท macOS/Linux
```bash
git clone https://github.com/cft0808/edict.git
cd edict
chmod +x install.sh && ./install.sh
```
The installer automatically:
- Creates workspaces for all departments (`~/.openclaw/workspace-*`, including Crown Prince/HR/Briefing)
- Writes SOUL.md personality files for each department
- Registers agents + permission matrix in `openclaw.json`
- Initializes data directory + first sync
- Restarts Gateway
### Launch
```bash
# Option 1: One-click launch (recommended)
chmod +x start.sh && ./start.sh
# Option 2: Manual launch
bash scripts/run_loop.sh & # Data sync loop
python3 dashboard/server.py # Dashboard server
# Open browser
open http://127.0.0.1:7891
```
<details>
<summary><b>๐Ÿ–ฅ๏ธ Production deployment (systemd)</b></summary>
```bash
# Install systemd service
sudo cp edict.service /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable edict
sudo systemctl start edict
# Or use management script
bash edict.sh start # Start
bash edict.sh status # Check status
bash edict.sh restart # Restart
bash edict.sh stop # Stop
```
</details>
> ๐Ÿ“– See [Getting Started Guide](docs/getting-started.md) for detailed walkthrough.
---
## ๐Ÿ›๏ธ Architecture
```
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ ๐Ÿ‘‘ Emperor (You) โ”‚
โ”‚ Feishu ยท Telegram ยท Signal โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
โ”‚ Issue edict
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ ๐Ÿ‘‘ Crown Prince (ๅคชๅญ) โ”‚
โ”‚ Triage: chat โ†’ reply / cmd โ†’ task โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
โ”‚ Forward edict
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ ๐Ÿ“œ Planning Dept (ไธญไนฆ็œ) โ”‚
โ”‚ Receive โ†’ Plan โ†’ Decompose โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
โ”‚ Submit for review
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ ๐Ÿ” Review Dept (้—จไธ‹็œ) โ”‚
โ”‚ Audit โ†’ Approve / Reject ๐Ÿšซ โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
โ”‚ Approved โœ…
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ ๐Ÿ“ฎ Dispatch Dept (ๅฐšไนฆ็œ) โ”‚
โ”‚ Assign โ†’ Coordinate โ†’ Collect โ”‚
โ””โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”˜
โ”‚ โ”‚ โ”‚ โ”‚ โ”‚
โ”Œโ”€โ”€โ”€โ”€โ”€โ–ผโ” โ”Œโ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ” โ”Œโ–ผโ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ–ผโ”€โ” โ”Œโ–ผโ”€โ”€โ”€โ”€โ”€โ”
โ”‚๐Ÿ’ฐ Fin.โ”‚ โ”‚๐Ÿ“ Docsโ”‚ โ”‚โš”๏ธ Eng.โ”‚ โ”‚โš–๏ธ Lawโ”‚ โ”‚๐Ÿ”ง Opsโ”‚
โ”‚ ๆˆท้ƒจ โ”‚ โ”‚ ็คผ้ƒจ โ”‚ โ”‚ ๅ…ต้ƒจ โ”‚ โ”‚ ๅˆ‘้ƒจ โ”‚ โ”‚ ๅทฅ้ƒจ โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚๐Ÿ“‹ HR โ”‚
โ”‚ ๅ้ƒจ โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
```
### Agent Roles
| Dept | Agent ID | Role | Expertise |
|------|----------|------|-----------|
| ๐Ÿ‘‘ **Crown Prince** | `taizi` | Triage, summarize | Chat detection, intent extraction |
| ๐Ÿ“œ **Planning** | `zhongshu` | Receive, plan, decompose | Requirements, architecture |
| ๐Ÿ” **Review** | `menxia` | Audit, gatekeep, veto | Quality, risk, standards |
| ๐Ÿ“ฎ **Dispatch** | `shangshu` | Assign, coordinate, collect | Scheduling, tracking |
| ๐Ÿ’ฐ **Finance** | `hubu` | Data, resources, accounting | Data processing, reports |
| ๐Ÿ“ **Documentation** | `libu` | Docs, standards, reports | Tech writing, API docs |
| โš”๏ธ **Engineering** | `bingbu` | Code, algorithms, checks | Development, code review |
| โš–๏ธ **Compliance** | `xingbu` | Security, compliance, audit | Security scanning |
| ๐Ÿ”ง **Infrastructure** | `gongbu` | CI/CD, deploy, tooling | Docker, pipelines |
| ๐Ÿ“‹ **HR** | `libu_hr` | Agent management, training | Registration, permissions |
| ๐ŸŒ… **Briefing** | `zaochao` | Daily briefing, news | Scheduled reports, summaries |
### Permission Matrix
| From โ†“ \ To โ†’ | Prince | Planning | Review | Dispatch | Ministries |
|:---:|:---:|:---:|:---:|:---:|:---:|
| **Crown Prince** | โ€” | โœ… | | | |
| **Planning** | โœ… | โ€” | โœ… | โœ… | |
| **Review** | | โœ… | โ€” | โœ… | |
| **Dispatch** | | โœ… | โœ… | โ€” | โœ… all |
| **Ministries** | | | | โœ… | |
### State Machine
```
Emperor โ†’ Prince Triage โ†’ Planning โ†’ Review โ†’ Assigned โ†’ Executing โ†’ โœ… Done
โ†‘ โ”‚ โ”‚
โ””โ”€โ”€ Veto โ”€โ”€โ”˜ Blocked โ”€โ”€
```
---
## ๐Ÿ“ Project Structure
```
edict/
โ”œโ”€โ”€ agents/ # 12 agent personality templates (SOUL.md)
โ”‚ โ”œโ”€โ”€ taizi/ # Crown Prince (triage)
โ”‚ โ”œโ”€โ”€ zhongshu/ # Planning Dept
โ”‚ โ”œโ”€โ”€ menxia/ # Review Dept
โ”‚ โ”œโ”€โ”€ shangshu/ # Dispatch Dept
โ”‚ โ”œโ”€โ”€ hubu/ libu/ bingbu/ # Finance / Docs / Engineering
โ”‚ โ”œโ”€โ”€ xingbu/ gongbu/ # Compliance / Infrastructure
โ”‚ โ”œโ”€โ”€ libu_hr/ # HR Dept
โ”‚ โ””โ”€โ”€ zaochao/ # Morning Briefing
โ”œโ”€โ”€ dashboard/
โ”‚ โ”œโ”€โ”€ dashboard.html # Dashboard (single file, zero deps, works out of the box)
โ”‚ โ”œโ”€โ”€ dist/ # Pre-built React frontend (included in Docker image)
โ”‚ โ”œโ”€โ”€ auth.py # Dashboard login authentication
โ”‚ โ”œโ”€โ”€ court_discuss.py # Court discussion (multi-agent LLM debate engine)
โ”‚ โ””โ”€โ”€ server.py # API server (stdlib, zero deps)
โ”œโ”€โ”€ edict/backend/ # Async backend services (SQLAlchemy + Redis)
โ”‚ โ”œโ”€โ”€ app/models/
โ”‚ โ”‚ โ”œโ”€โ”€ task.py # Task model + state machine
โ”‚ โ”‚ โ”œโ”€โ”€ audit.py # Audit log model
โ”‚ โ”‚ โ””โ”€โ”€ outbox.py # Outbox message model
โ”‚ โ”œโ”€โ”€ app/services/
โ”‚ โ”‚ โ”œโ”€โ”€ event_bus.py # Redis Streams EventBus
โ”‚ โ”‚ โ””โ”€โ”€ task_service.py # Task service layer
โ”‚ โ””โ”€โ”€ app/workers/
โ”‚ โ”œโ”€โ”€ dispatch_worker.py # Parallel dispatch + retry + resource lock
โ”‚ โ”œโ”€โ”€ orchestrator_worker.py # DAG orchestrator
โ”‚ โ””โ”€โ”€ outbox_relay.py # Transactional Outbox Relay
โ”œโ”€โ”€ agents/
โ”‚ โ”œโ”€โ”€ <agent_id>/SOUL.md # Agent personality templates
โ”‚ โ”œโ”€โ”€ GLOBAL.md # Global agent config
โ”‚ โ””โ”€โ”€ groups/ # Agent groups (sansheng / liubu)
โ”œโ”€โ”€ scripts/ # Data sync & automation scripts
โ”‚ โ”œโ”€โ”€ kanban_update.py # Kanban CLI with data sanitization + state machine
โ”‚ โ”œโ”€โ”€ agentrec_advisor.py # Agent model recommendation (merit + cost optimization)
โ”‚ โ”œโ”€โ”€ linucb_router.py # LinUCB smart routing
โ”‚ โ”œโ”€โ”€ refresh_watcher.py # Data change watcher
โ”‚ โ””โ”€โ”€ ... # fetch_morning_news, sync, etc.
โ”œโ”€โ”€ tests/
โ”‚ โ”œโ”€โ”€ test_e2e_kanban.py # Kanban sanitization tests (17 assertions)
โ”‚ โ””โ”€โ”€ test_state_machine_consistency.py # State machine consistency tests
โ”œโ”€โ”€ data/ # Runtime data (gitignored)
โ”œโ”€โ”€ docs/ # Documentation + screenshots
โ”œโ”€โ”€ install.sh # One-click installer
โ”œโ”€โ”€ start.sh # One-click launch (Dashboard + data sync)
โ”œโ”€โ”€ edict.service # systemd service config (production deploy)
โ”œโ”€โ”€ edict.sh # Service management (start/stop/restart/status)
โ””โ”€โ”€ LICENSE # MIT
```
---
## ๐Ÿ”ง Technical Highlights
| | |
|---|---|
| **React 18 Frontend** | TypeScript + Vite + Zustand, 13 components |
| **stdlib Backend** | `server.py` on `http.server`, zero dependencies |
| **EventBus** | Redis Streams pub/sub for decoupled service communication |
| **Outbox Relay** | Transactional outbox pattern for reliable event delivery (at-least-once) |
| **State Machine Audit** | Strict lifecycle transitions + full audit logging (`audit.py`) |
| **Parallel Dispatch** | Dispatch Worker with parallel execution, exponential backoff retry, resource locking |
| **DAG Orchestrator** | Task decomposition and dependency resolution via DAG |
| **Agent Thinking Visible** | Real-time display of agent thinking, tool calls, results |
| **One-click Install / Launch** | `install.sh` auto-configures, `start.sh` launches all services |
| **systemd Production Deploy** | `edict.service` for daemon process, auto-restart on boot |
| **15s Auto-sync** | Live data refresh with countdown |
| **Dashboard Auth** | `auth.py` provides login authentication |
| **Daily Ceremony** | Immersive opening animation |
---
## ๐Ÿ—บ๏ธ Roadmap
> Full roadmap with contribution opportunities: [ROADMAP.md](ROADMAP.md)
### Phase 1 โ€” Core Architecture โœ…
- [x] Twelve-department agent architecture + permissions
- [x] Crown Prince triage layer (chat vs task auto-routing)
- [x] Real-time dashboard (10 panels)
- [x] Task stop / cancel / resume
- [x] Memorial archive (5-phase timeline)
- [x] Edict template library (9 presets)
- [x] Court ceremony animation
- [x] Daily news + Feishu webhook push
- [x] Hot-swap LLM models + skill management
- [x] Officials overview + token stats
- [x] Session monitoring
- [x] Edict data sanitization (title/remark cleaning, dirty data rejection)
- [x] Duplicate task overwrite protection
- [x] E2E kanban tests (17 assertions)
### Phase 2 โ€” Institutional Depth ๐Ÿšง
- [ ] Imperial approval mode (human-in-the-loop)
- [x] Merit/demerit ledger (agent scoring + model recommendation + cost optimization)
- [x] EventBus (Redis Streams decoupled communication)
- [x] Outbox Relay (transactional event delivery)
- [x] State machine audit (strict lifecycle + audit logging)
- [x] Parallel dispatch engine (exponential backoff retry + resource lock)
- [x] DAG orchestrator (task decomposition + dependency resolution)
- [x] Dashboard authentication (login auth)
- [x] One-click launch / systemd production deploy
- [ ] Express courier (inter-agent message visualization)
- [ ] Imperial Archives (knowledge base + citation)
### Phase 3 โ€” Ecosystem
- [ ] Docker Compose + demo image
- [ ] Notion / Linear adapters
- [ ] Annual review (yearly performance reports)
- [ ] Mobile responsive + PWA
- [ ] ClawHub marketplace listing
---
## ๐Ÿค Contributing
All contributions welcome! See [CONTRIBUTING.md](CONTRIBUTING.md)
- ๐ŸŽจ **UI** โ€” themes, responsiveness, animations
- ๐Ÿค– **New agents** โ€” specialized roles
- ๐Ÿ“ฆ **Skills** โ€” ministry-specific packages
- ๐Ÿ”— **Integrations** โ€” Notion ยท Jira ยท Linear ยท GitHub Issues
- ๐ŸŒ **i18n** โ€” Japanese ยท Korean ยท Spanish
- ๐Ÿ“ฑ **Mobile** โ€” responsive, PWA
---
## ๏ฟฝ Examples
The `examples/` directory contains real end-to-end use cases:
| Example | Command | Departments |
|---------|---------|-------------|
| [Competitive Analysis](examples/competitive-analysis.md) | "Analyze CrewAI vs AutoGen vs LangGraph" | Planningโ†’Reviewโ†’Finance+Engineering+Docs |
| [Code Review](examples/code-review.md) | "Review this FastAPI code for security issues" | Planningโ†’Reviewโ†’Engineering+Compliance |
| [Weekly Report](examples/weekly-report.md) | "Generate this week's engineering team report" | Planningโ†’Reviewโ†’Finance+Docs |
Each case includes: Full command โ†’ Planning proposal โ†’ Review feedback โ†’ Ministry outputs โ†’ Final report.
---
## ๐Ÿ“„ License
[MIT](LICENSE) ยท Built by the [OpenClaw](https://openclaw.ai) community
---
## ๐Ÿ“ฎ WeChat ยท Behind the Scenes
> *In ancient China, the โ€œDวbร oโ€ (imperial gazette) delivered edicts across the empire. Today we have a WeChat account.*
<p align="center">
<img src="docs/assets/wechat-qrcode.jpg" width="200" alt="WeChat QR ยท cft0808">
<br>
<b>Scan to follow ยท cft0808</b>
</p>
What youโ€™ll find:
- ๐Ÿ›๏ธ Architecture deep-dives โ€” how 12 agents achieve separation of powers
- ๐Ÿ”ฅ War stories โ€” when agents fight, burn tokens, or go on strike
- ๐Ÿ’ก Token-saving tricks โ€” run the full pipeline at 1/10 the cost
- ๐ŸŽญ Behind the SOUL.md โ€” how to write prompts that make AI agents stay in character
---
## โญ Star History
[![Star History Chart](https://api.star-history.com/svg?repos=cft0808/edict&type=Date)](https://star-history.com/#cft0808/edict&Date)
---
<p align="center">
<strong>โš”๏ธ Governing AI with the wisdom of ancient empires</strong><br>
<sub>ไปฅๅคๅˆถๅพกๆ–ฐๆŠ€๏ผŒไปฅๆ™บๆ…ง้ฉพ้ฉญ AI</sub><br><br>
<a href="#-wechat--behind-the-scenes"><img src="https://img.shields.io/badge/WeChat_cft0808-Follow_for_updates-07C160?style=for-the-badge&logo=wechat&logoColor=white" alt="WeChat"></a>
</p>