CodeFlow AI Runtime / AI OS
May 11, 2026 ยท View on GitHub
Draft v0.1 (Public-facing executive overview ยท Authored by ADMIN-01, 2026-05-09)
What is this? A 5-minute read for first-time visitors to understand CodeFlow's positioning, philosophy, architecture, and roadmap.
๐ Project Charter (ADMIN's two verbatim quotes, 5/9, locked)
- ADMIN 5/9 10:48 โ "This project folder is the CodeFlow project; we currently use Cursor's SDK and consume
fcop-mcp." (identity + tech stack)- ADMIN 5/9 10:51 โ "CodeFlow's true positioning is: a lightweight AI Runtime / AI OS for multi-agent software development." (true positioning)
Original verbatim Chinese quotes + interpretation table: see design doc ยง0.0.
Official positioning (consistent with the design doc):
CodeFlow AI Runtime A lightweight AI Operating Runtime for multi-agent software development. Mobile-first AI Runtime for governable multi-agent software development.
ไธญๆ็๏ผ
docs/codeflow-overview.md
This doc vs. the design doc โ when to read which
| Who you are / what you want | Read which |
|---|---|
| 5 minutes to grok what CodeFlow is | This file (overview) |
| Pitching to non-technical readers / decision makers / investors | This file (overview) |
| Going to implement / write code / plan sprints | Design doc (~1900 lines) |
| Looking for specific fields / schemas / APIs | Design doc ยง3 |
| Want to know what to do next week | Design doc ยง10 |
| Want to know why this design | Design doc ยง0.5 / ยง0.6 / ยง0.7 |
Sync rule when editing:
- Change "what we say externally, product positioning, narrative for non-technical readers" โ edit this file
- Change "implementation, field definitions, sprint plans, technical decisions" โ edit the design doc
- Concept appears in both โ the design doc is source of truth; this file is the simplified narrative
1. Positioning
What is CodeFlow?
CodeFlow is NOT:
- An AI chat tool
- A Cursor plugin
- An auto-codegen tool
CodeFlow's true positioning:
A lightweight AI Runtime / AI OS for multi-agent collaborative software development.
Core problem
Solving:
Multiple AI agents cannot collaborate stably over time.
Including:
- Agent drift
- State loss
- Lack of auditability
- Long-task chaos
- No governance mechanism
- No state recovery
2. Core Philosophy
2.1 AI must "externalize state"
Traditional agents:
State lives inside context.
Problems:
- Unstable
- Easily lost
- Not auditable
CodeFlow:
AI state โ file โ protocol โ governable
2.2 Protocol-driven
CodeFlow does NOT depend on:
- A single model
- A single IDE
- A single agent
Instead:
Constrain agent behavior via the FCoP protocol.
2.3 AI needs governance
What enterprises actually need is not:
A more autonomous AI.
But:
Auditable, recoverable, governable AI.
3. System Architecture
โโโโโโโโโโโโโโโโโโ
โ Mobile Console โ
โโโโโโโโโฌโโโโโโโโโ
โ
โโโโโโโโโโโโโโโโโโ
โ CodeFlow Runtimeโ
โโโโโโโโโฌโโโโโโโโโ
โโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโ
โ โ โ
โโโโโโโโโโโโโโ โโโโโโโโโโโโโโ โโโโโโโโโโโโโโ
โ Task Store โ โ Agent Core โ โ Review Sys โ
โโโโโโโโโโโโโโ โโโโโโโโโโโโโโ โโโโโโโโโโโโโโ
โ
โโโโโโโโโโโโโโโโโโ
โ Skill Runtime โ
โโโโโโโโโฌโโโโโโโโโ
โ
โโโโโโโโโโโโโโโโโโโโโโ
โ Cursor / Claude SDKโ
โโโโโโโโโโโโโโโโโโโโโโ
4. Core Modules
4.1 Runtime Core
Responsibilities:
- Manage Task lifecycle
- Manage Agent Sessions
- Schedule agents
- Control state transitions
- Recover from failures
Runtime state machine
INIT
โ
PLANNED
โ
EXECUTING
โ
REVIEWING
โ
APPROVED / REJECTED
โ
DONE
External state names โ internal protocol state names (implementation: design doc ยง3.3 Task Schema):
External (this doc) Internal (FCoP / Task Schema) INIT (Task file not yet created) PLANNED pendingEXECUTING dispatchedโin_progressREVIEWING reviewAPPROVED โ DONE doneREJECTED back to in_progress, loop โค N times(anomaly) blocked/cancelled
4.2 Task System
Single hard rule: every task MUST be filed. If it isn't written down, it didn't happen.
CodeFlow's Task format evolves in two stages:
Today (v0.1, fully FCoP-compatible)
Each Task is a single Markdown file, named by "sender โ recipient":
fcop/tasks/
โโโ TASK-20260509-001-PM-to-DEV.md โ Task body
โโโ REPORT-20260509-001-DEV-to-PM.md โ Execution report
โโโ REVIEW-20260509-001-QA-on-TASK-001.md โ Review verdict
This "filename = protocol" is the core of FCoP, and v0.1 must be 100% compatible with it. Details: design doc ยง3.3.
Future (v0.x+, Task-as-folder)
As tasks grow (one Task may produce plan / execution / result artifacts), it will evolve to a directory structure:
tasks/
โโโ TASK-001/
โโโ task.md # Goal + Constraints
โโโ plan.md # PM breakdown
โโโ execution.md # DEV implementation log
โโโ result.md # Final artifact index
โโโ review.md # Review verdict
โ ๏ธ v0.1 does NOT enforce directory format โ the evolution path stays backward-compatible: file-based and folder-based Tasks can coexist as long as YAML front-matter stays consistent.
Note: FCoP itself is still pre-1.0, so directory format may be promoted into the FCoP main spec in 1.1 / 2.0. Details: design doc ยง3.3.1.
task.md example
# Goal
Implement user login.
# Constraints
- Use JWT
- Do not modify the database schema
review.md example
# Review
## Security
โ
No dangerous operations.
## Architecture
โ ๏ธ Need to add token expiration mechanism.
4.3 Agent Runtime
CodeFlow does NOT pursue:
A super-agent that does everything.
Instead:
Specialized role agents.
Examples
- PM Agent
- DEV Agent
- REVIEW Agent
- TEST Agent
- ARCHITECT Agent
Agent Schema
{
"agent_id": "DEV-01",
"role": "developer",
"status": "running",
"task_id": "TASK-001"
}
4.4 Review Engine (core)
One of CodeFlow's core systems:
AI must be audited.
Phase 1
Rule-based audit:
Forbidden:
- DELETE
- DROP
- rm -rf
Phase 2
AI-based review:
- Does it match the task goal?
- Are there risks?
- Has the agent drifted?
4.5 Session Runtime
Future support:
- Cursor
- Claude Code
- Codex
- VSCode Agent
A Session is no longer:
A chat window.
But:
A long-running agent process.
5. Mobile (Mobile Governance)
One of CodeFlow's biggest differentiators:
The AI Runtime is governable from a phone.
The mobile end is NOT a chat box. It is:
An AI Team Console.
Mobile features
Task view
TASK-001
Status: Reviewing
Owner: DEV-01
Agent status
DEV-01: running
REVIEW-01: auditing
Admin approval
โ ๏ธ High-risk operation:
Allow execution?
Emergency Stop
๐ Stop all agents
6. Why FCoP
FCoP is NOT a prompt.
It is:
An AI Runtime Protocol.
What FCoP provides
- Task protocol
- State protocol
- Review protocol
- Agent protocol
- Collaboration protocol
Goal
Enable:
Stable cross-agent collaboration.
7. Roadmap
This is the public-facing high-level roadmap (5 milestones). The detailed sprint plan (v0.1 โ v1.0, ~26 weeks) is in design doc ยง10 Implementation Roadmap.
v0.1 โ Backend Kernel (~6 weeks)
Goal:
Local zero-UI run-through: PM โ DEV โ REVIEW โ DONE filed loop.
Includes:
- Task Runtime
- Review Engine (core)
- Session persistence
- Auto-recovery after process crash
Excluded: mobile / cloud / skill marketplace / enterprise permissions / any GUI.
v0.2 โ Mobile Governance (~4 weeks)
Goal:
AI runs 24/7; ADMIN can approve and emergency-stop from the couch.
Includes:
- Mobile Console (4 screens: Task Flow / Agent status / Audit / Approval)
- Human-in-the-loop (high-risk ops require mobile approval)
- ๐ Emergency Stop
Excluded: cloud nodes (deferred to v0.3+) / writing tasks from mobile / multi-device sync.
v0.3 / v0.5 โ Governance depth
| Version | Theme | Key capability |
|---|---|---|
| v0.3 | AI Patrol | PATROL agent monitors 5 anomaly classes (drift / hang / over-permission / unresponsive / protocol violation) |
| v0.5 | Review Board | REVIEW + SECURITY + AUDIT triangle consensus; single reviewer cannot approve high-risk tasks alone |
v1.0 โ Schema Freeze + first external users (~9-week window)
Goal:
Freeze the Runtime Protocol (5 schemas) so the ecosystem can grow on top.
Acceptance criteria (3 of 4): โฅ3 third-party implementations / 90 days no breaking change / โฅ1 essay summarizing protocol evolution / pass schema fuzz tests.
Long-term
Continue evolving toward:
AI Operating System โ see ยง8 Long-term Vision.
8. Long-term Vision
Future enterprise workflow:
Human
โ
CodeFlow Runtime
โ
Multiple AI Agents
โ
Business Systems / IDE / Cloud
Instead of:
Human โ ERP โ Manual Operation
Why the AI OS may be the "next-generation ERP"
ERP's essence is "let a group of humans collaborate stably around business processes." The AI OS's essence is "let a group of AI agents collaborate stably around business processes."
| Dimension | Traditional ERP | AI OS (CodeFlow's endgame) |
|---|---|---|
| Collaboration agents | Humans + processes + forms | AI agents + protocols + Task files |
| State medium | Database + ticket system | FCoP files + Runtime state |
| Governance | Approval flows / permission matrix | Review Engine + Human-in-the-loop |
| Human intervention | Most operations | High-risk decision points (mobile approval) |
| Observability | BI reports | Runtime event stream + audit log |
It's not that AI OS will "replace" ERP โ the realistic evolution is: AI OS dilutes the "humans-execute-process" portion of ERP, and ERP degrades into one of the business systems that AI agents call into.
Details: design doc ยง0.6.6 Endgame: AI OS may be the next-generation ERP.
9. Core Idea Summary
AI's problem has never been "not smart enough."
It is:
"Cannot collaborate and run stably over time."
CodeFlow's goal:
Provide AI teams with Runtime, Protocol, and Governance.
Want to dive deeper? Jump by role
| What you want to know | Jump to design doc |
|---|---|
| 1-screen exec summary | ยง0.0 Executive Summary |
| Why this design (AI OS prototype / 3-layer stack / moat) | ยง0.5 / ยง0.6 / ยง0.7 |
| What's in/out of scope for phase 1 | ยง0.8 First-phase scoping |
| How mobile governance works (4 screens / HITL / Emergency Stop) | ยง0.9 Mobile-first Governance |
| 5 Runtime Schemas (Agent/Task/Review/Session/Skill) | ยง3 Runtime Protocol |
| Sprint-level plan | ยง10 Implementation Roadmap |
| Want to run a demo | ยง0.8.3 Hello World acceptance script |
Doc tree
docs/
โโโ codeflow-overview.md โ Chinese
โโโ codeflow-overview.en.md โ English (you are here)
โโโ design/
โโโ codeflow-v2-on-fcop-sdk.md โ Full design doc (~1900 lines, ~60 min)
5-minute self-check (did you really get it?)
After reading this page, you should be able to answer the following 5 questions without looking. If any one stumps you, re-read the section it points to.
| # | Question | Section |
|---|---|---|
| 1 | What is CodeFlow NOT? Why insist "not a Cursor plugin"? | ยง1 |
| 2 | What does "AI state externalization" mean? What goes wrong without it? | ยง2.1 |
| 3 | Why is the Review Engine called a "core system"? What's the difference from generic agent frameworks without it? | ยง4.4 |
| 4 | Why is mobile not a chat box but an "AI Team Console"? | ยง5 |
| 5 | What is v0.1's single goal? Can you start v0.2 if v0.1 hasn't passed? | ยง7 v0.1 |
Bonus questions (if you can answer these, you're at the decision-maker level):
-
- Why is CodeFlow's true moat Agent Governability, not UI / prompt / model? โ Design doc ยง0.6.7
-
- Why is v2's core deliverable the 5 Schemas, not an "application"? โ Design doc ยง3 + ยง0.6.8 (Docker eve analogy)
Heads-up before you go:
After every major edit to this page, please re-check ยง0.0 Executive Summary in the design doc. These two files together form CodeFlow v2's "public face." Any change to core concepts (positioning / moat / roadmap cadence / mobile shape) requires updating both sides.