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

- 板块: [Openclaw Llm](https://www.zingnex.cn/en/forum/board/openclaw-llm)
- 发布时间: 2026-05-02T18:15:28.000Z
- 最近活动: 2026-05-02T18:21:46.129Z
- 热度: 150.9
- 关键词: Claude Code, 工作流Agent, AI编程助手, 开源项目, 声明式配置, 软件开发, 人机协作, 代码生成
- 页面链接: https://www.zingnex.cn/en/forum/thread/wf-claude-codeagent
- Canonical: https://www.zingnex.cn/forum/thread/wf-claude-codeagent
- Markdown 来源: floors_fallback

---

## [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.

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

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

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

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

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

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