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)

  1. 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)
  2. 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 wantRead which
5 minutes to grok what CodeFlow isThis file (overview)
Pitching to non-technical readers / decision makers / investorsThis file (overview)
Going to implement / write code / plan sprintsDesign doc (~1900 lines)
Looking for specific fields / schemas / APIsDesign doc ยง3
Want to know what to do next weekDesign doc ยง10
Want to know why this designDesign 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)
PLANNEDpending
EXECUTINGdispatched โ†’ in_progress
REVIEWINGreview
APPROVED โ†’ DONEdone
REJECTEDback 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.

Design doc ยง10.2

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.

Design doc ยง10.3

v0.3 / v0.5 โ€” Governance depth

VersionThemeKey capability
v0.3AI PatrolPATROL agent monitors 5 anomaly classes (drift / hang / over-permission / unresponsive / protocol violation)
v0.5Review BoardREVIEW + SECURITY + AUDIT triangle consensus; single reviewer cannot approve high-risk tasks alone

Design doc ยง10.4 / ยง10.5

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.

Design doc ยง10.6

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."

DimensionTraditional ERPAI OS (CodeFlow's endgame)
Collaboration agentsHumans + processes + formsAI agents + protocols + Task files
State mediumDatabase + ticket systemFCoP files + Runtime state
GovernanceApproval flows / permission matrixReview Engine + Human-in-the-loop
Human interventionMost operationsHigh-risk decision points (mobile approval)
ObservabilityBI reportsRuntime 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 knowJump 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.

#QuestionSection
1What is CodeFlow NOT? Why insist "not a Cursor plugin"?ยง1
2What does "AI state externalization" mean? What goes wrong without it?ยง2.1
3Why is the Review Engine called a "core system"? What's the difference from generic agent frameworks without it?ยง4.4
4Why is mobile not a chat box but an "AI Team Console"?ยง5
5What 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):

    1. Why is CodeFlow's true moat Agent Governability, not UI / prompt / model? โ†’ Design doc ยง0.6.7
    1. 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.