Zing Forum

Reading

wf: A Declarative Workflow Agent Designed for Claude Code, Enabling Phased Code Collaboration

wf is a declarative workflow agent built on tm, which manages Claude Code's workflow via a predefined phase-gating mechanism, providing a more structured collaboration model for AI-assisted programming.

Claude Code工作流AgentAI编程助手开源项目声明式配置软件开发人机协作代码生成
Published 2026-05-03 02:15Recent activity 2026-05-03 02:21Estimated read 7 min
wf: A Declarative Workflow Agent Designed for Claude Code, Enabling Phased Code Collaboration
1

Section 01

[Introduction] wf: A Declarative Workflow Agent for Claude Code, A New Structured AI Programming Collaboration Solution

wf is a declarative workflow agent built on tm. It manages Claude Code's workflow using a predefined phase-gating mechanism, breaking down AI-assisted programming into clear phases (each with goals and acceptance criteria). This provides a more structured human-AI collaboration model for AI-assisted programming and solves the problem of AI workflow management in complex tasks.

2

Section 02

Project Background and Design Philosophy

As AI programming assistants like Claude Code become more capable, developers face the problem of how to effectively manage their workflows. The wf project addresses this need with an "opinionated" design, drawing on the phase-gating model of traditional software development to break AI-assisted programming into clear phases—only after the current phase is completed can the next phase begin. The project is built on tm (task manager) and is an enhanced extension of existing task management capabilities.

3

Section 03

Core Concepts and Technical Architecture

Core Concepts: Declarative phase gating: Developers define multi-phase processes (e.g., understanding, design, implementation, verification, review), each with entry conditions and exit criteria to prevent AI from coding without sufficient understanding or implementing before the plan is finalized.

Technical Architecture: Layered design: The tm layer handles basic task management (creation, status tracking, scheduling); the wf layer implements phase-gating logic, converting declarative configurations into tm task sequences; the Claude Code integration layer calls APIs to execute programming tasks and monitors outputs to determine phase completion.

4

Section 04

Typical Workflow Example (Adding User Authentication Functionality)

Taking the addition of user authentication functionality as an example, the workflow defined by wf includes:

  1. Requirement Clarification: Claude Code analyzes the existing codebase, outputs integration points and conflict reports, and the developer confirms the requirements;
  2. Technical Selection: Claude Code researches solutions like JWT/Session/OAuth and makes recommendations, then the developer selects one;
  3. Interface Design: Claude Code designs interfaces and data structures, generates documentation, and the developer confirms;
  4. Implementation and Testing: Claude Code writes code and tests, then fixes failed items;
  5. Code Review: Claude Code generates a change summary, and the developer reviews and merges.

Each phase must be verified before proceeding to the next, and rollback is supported.

5

Section 05

Comparison with Existing Tools and Applicable Scenarios

Comparison:

  • Compared to using Claude Code directly: Adds structured constraints to avoid AI's jumpy work style;
  • Compared to IDE integrations like Cursor: More focused on process management and more flexible in deployment;
  • Compared to Devin: Emphasizes human-AI collaboration and retains manual review nodes;
  • Compared to CI/CD: Intervenes in the development phase, managing the AI-assisted process rather than the delivery workflow.

Applicable Scenarios: Complex feature development, legacy code maintenance, team collaboration standardization, learning and training, high-risk changes.

6

Section 06

Technical Highlights and Limitations

Technical Highlights: Configuration-driven phase definition, flexible condition judgment (AI output markers/file changes, etc.), state persistence (resume from interruption), deep integration with Claude Code, extensible hook system (execute custom logic before/after phases).

Limitations: Learning curve (need to adapt to declarative thinking), flexibility constraints (enforces specific patterns), phase design relies on manual work, currently mainly bound to Claude Code.

7

Section 07

Future Directions and Summary

Future Directions: Intelligent phase recommendation (AI analyzes tasks to automatically recommend phases), multi-agent collaboration, visual editor, template market, integration with project management tools (sync status to Jira/Linear).

Summary: wf promotes the evolution of AI-assisted programming toward structured approaches, providing developers with an effective means to manage AI workflows. It helps individuals build rigorous habits and teams standardize collaboration, offering an exploration direction for the field of AI collaboration management.