Knowledge

Why AI Frameworks Need Native Workflow: From Unpredictable Planning to Deterministic Delivery

Why AI Frameworks Need Native Workflow: From Unpredictable Planning to Deterministic Delivery

Cover image

Why do Claude Code, Codex, and Qoder write increasingly impressive code but consistently stumble at release pipelines, CI automation, and other multi-step engineering tasks? Skipped steps, wrong order, unreproducible results, no fault tolerance — you might think the model isn’t smart enough. In reality, every mainstream AI framework is missing a core architectural piece: explicit Workflow.

This article starts from the current industry state, systematically examines the uncertainty defects of autonomous LLM planning, analyzes the deep reasons why major vendors haven’t opened up Workflow capabilities, explains why frameworks must introduce Workflow as a native extension capability, and proposes a pluggable Workflow technical solution that is fully compatible with existing frameworks.

1. Industry Status: The Capability Boundary of Current AI Frameworks

Mainstream AI agent clients all provide unified extension mechanisms. Without modifying the core SDK, developers can comprehensively customize agent behavior and capabilities:

All of the above extensions perfectly address what agents CAN do, but they cannot address in what order and by what rules agents MUST execute.

Currently, the execution order of all multi-stage tasks is generated entirely dynamically by LLM real-time reasoning. At the framework level, there is no declarative, fixed, auditable pipeline definition.

2. Core Pain Point: Uncertainty Defects of LLM Dynamic Planning

The biggest problem with pure autonomous agent scheduling is that execution results are uncontrollable and unstable — which is completely unacceptable for production-grade engineering tasks such as version releases, CI automation, document deployment, and standardized coding.

2.1 Five Common Instability Problems in LLM Autonomous Planning

In short: LLM reasoning is flexible enough but extremely unstable; purely autonomous agents cannot support production-grade stable task delivery.

2.2 Why Major Vendors Haven’t Opened Workflow

All AI clients have implicit built-in workflows (for example, the code editing flow: read → analyze → modify → test → commit), but no vendor has opened them up as user-customizable, pluggable native top-level extension capabilities. The core reasons fall into two categories: commercial positioning and architecture costs:

3. Why Workflow Must Be Introduced as a Native Core Concept

Workflow is not meant to replace agent reasoning; rather, it is a critical capability completion for the existing framework system. It needs to be at the same level as prompts, skills, MCP, and tools, becoming a native framework extension capability.

3.1 Completing the Framework’s Missing “Execution Specification Layer”

Existing extensions define agent capability boundaries and available resources, while Workflow defines mandatory execution specifications that cannot be overridden by LLM reasoning — solidifying step order, prerequisite dependencies, parameter passing, validation rules, retry policies, branch logic, and other core pipeline rules.

3.2 Achieving Deterministic Task Delivery

For standardized repetitive tasks such as version iteration, batch processing, and CI pipelines, Workflow guarantees completely consistent step order and validation rules on every execution, fundamentally solving the core problems of LLM reasoning drift and step omission.

3.3 Building a Hybrid Paradigm of “Deterministic Constraints + Flexible Reasoning”

The optimal agent execution mode is neither fully autonomous planning nor hard-coded rigidity, but a hybrid mode of rigid Workflow constraints + flexible agent reasoning:

3.4 Completing the AI Framework’s Full Extension System

A complete, closed-loop AI framework extension system should contain six peer-level primitives, forming a complete capability loop of “role definition → resource access → atomic capability → ecosystem extension → execution specification → intelligent adaptation”:

  1. Agent/Sub-agent Prompts (role and behavior definition)
  2. MCP (external resource access standard)
  3. Skills (atomic executable capabilities)
  4. Tools (third-party ecosystem extensions)
  5. Workflow (pipeline execution specification)
  6. Agent real-time reasoning (dynamic scenario adaptation)

4. Technical Solution: Pluggable Workflow Extension Mechanism

We propose a native Workflow extension solution that is fully compatible with existing AI frameworks, reusing existing extension loading logic with zero intrusion into framework core code.

4.1 Core Design Principles

The figure below shows a real engineering architecture project where the workflows/ directory coexists at the same level as the skills/ directory — workflow definition files use exactly the same organizational approach as skill definition files, loaded uniformly when the framework starts:

Workflow directory structure example: coexisting alongside Skills

4.2 Core Workflow Definition Content

Every Workflow file is a structured Markdown document that orchestrates task pipelines in a human-readable format, containing seven core elements:

① Metadata Header

Workflow name, hierarchy level (main workflow / Agent sub-workflow), related workflow links (previous/next/related sub-processes), responsible Agent, Skill inventory used, input prerequisites and output artifact descriptions.

② Stage Definition Table

A table listing for each stage: stage ID, bound Skill, responsible Agent, stage purpose/artifacts, downstream consumers. Each stage corresponds to one atomic Skill invocation — Workflow only declares “what to do, who does it, in what order.” The Skill’s SKILL.md is the single source of truth for “how to do it,” avoiding information duplication.

③ Dependency DAG Diagram

ASCII flow diagrams visually show execution order and parallelism between stages, marking which stages must run serially, which can run in parallel, and why this order is required. Complex scenarios support batch task dispatch (Pass 1 / Pass 2), enabling layered scheduling of “upstream design tasks” and “downstream implementation tasks.”

④ Quality Gates

Explicit validation checkpoints between stages: pre-condition checks (environment, dependencies, artifacts readiness), post-execution artifact verification (docs/code/packages compliance), blocking downstream stages on failure. Cross-pipeline quality guardian Agents continuously audit stage outputs, automatically intercepting anomalies or triggering retries.

⑤ Artifact Flow Contract

Defines exactly what documents/code/artifacts each stage produces (e.g., requirement.md, solution.md, install packages), and which downstream stages consume them. This ensures Agents know “what inputs I need, who consumes my outputs.”

⑥ Execution Modes & Loop Mechanisms

Multiple execution modes supported: one-shot execution (e.g., initial release), scheduled self-driven loops (e.g., 1st/15th incremental releases), intelligent skipping (auto-skip deployment when no code changes), feedback loops (production issues → daily triage → fixes → batch release).

⑦ Task-Granularity Dependencies & Blocking

In multi-Agent collaboration scenarios, tasks can set Depends On relationships at feature granularity — tasks can be created early but remain blocked, automatically unlocking once prerequisites complete, enabling fine-grained parallel progression (e.g., Feature A’s E2E tests can start as soon as its code is complete, without waiting for the entire application to be developed).

4.3 Hybrid Execution Runtime Flow

  1. Framework bootstrap: Uniformly loads registered workflows (workflows/), skills (skills/), prompts, and MCP resources; each Agent directory maintains its own sub-workflows independently
  2. Task matching & batch dispatch: Based on user task type, matches the corresponding workflow blueprint, dispatches tasks in batches per dependency relationships (e.g., Pass 1 dispatches design stages, Pass 2 dispatches implementation stages), injects into agent context
  3. Baseline lock: The agent treats the workflow as the sole official execution baseline, executing bound Skills sequentially per the Stage Table, prohibited from skipping any mandatory steps or quality gates
  4. Flexible execution: Within each stage, the agent relies on LLM reasoning to complete dynamic parameter resolution, exception handling, and optional branch optimization — Workflow governs “what must be done and in what order,” Skill governs “how exactly to do it”
  5. Gate validation: The framework validates pre-conditions and post-artifacts stage-by-stage according to quality gate rules; cross-stage guardian Agents continuously audit outputs, intercepting or retrying on anomalies
  6. Blocking & unlocking: Tasks with Depends On dependencies remain blocked until prerequisites complete, then automatically unlock, supporting fine-grained parallelism
  7. Loops & closed cycles: One-shot workflows terminate after completion; looping workflows (e.g., incremental releases, daily issue triage) automatically create the next scheduled task after completing a round, forming continuously running automation closed loops

5. Industry Value and Vendor Recommendations

Current mainstream AI agent clients are generally trapped in the dilemma of “intelligence and stability are mutually exclusive.” The absence of explicit Workflow capability means agents can only adapt to lightweight ad-hoc tasks and cannot carry enterprise-grade standardized engineering delivery scenarios.

We recommend that all AI framework vendors (mainstream clients such as Claude Code, Qoder, CodeBuddy) formally incorporate Workflow into the framework’s native extension capabilities:

6. Conclusion

Skills, MCP, and prompts solve the problem of what agents CAN do, while Workflow solves the core problem of how agents do things stably, standardly, and reproducibly.

Pure LLM dynamic planning cannot achieve production-grade stable delivery. Only by introducing pluggable, declarative Workflow native extension capabilities and adopting the hybrid mode of workflow specification constraints + agent intelligent adaptation can we balance the flexibility of AI agents with the stability of engineering implementation, truly achieving trustworthy, reproducible, and auditable industrial-grade AI task delivery.

Workflow is the final core piece of the modern AI framework architecture puzzle. The industry urgently needs to standardize and formalize this capability.


Reflection

Most things in the world already exist naturally; what we do is never creation but rather summarization and standardization. Mathematical theorems objectively existed long before humans discovered them; the same is true for software design patterns — developers were already subconsciously applying them in daily coding before they were subsequently summarized and abstracted into unified specifications.

By the same extension to the AI field, long before AI Skill was formally defined as a framework concept, we had already achieved skill-like invocation logic by carefully decomposing Prompts and loading different capability fragments on demand. The birth of Workflow is similar — developers in the industry had already been implicitly defining and practicing various task pipelines in their implementations long before it was named.

From mathematical laws and software design patterns to AI Skills and AI Workflows, the essence is always the same: distilling scattered implicit practices and fragmented experiences into explicit, standardized, reusable universal specifications — ultimately making AI agent task delivery more efficient, stable, and universal.

📖 阅读中文版本

← Back to all articles