Zing Forum

Reading

next-task: A 12-Stage Multi-Agent Workflow - Full Automation Practice from Task Discovery to Production Deployment

Explore how agent-sh/next-task achieves full automation from GitHub Issues to production deployment via 12-stage orchestration, including multi-agent parallel review, quality gates, and state persistence mechanisms

multi-agentworkflow orchestrationautonomous deploymentcode reviewgit worktreeAI agents
Published 2026-04-11 11:14Recent activity 2026-04-11 11:18Estimated read 7 min
next-task: A 12-Stage Multi-Agent Workflow - Full Automation Practice from Task Discovery to Production Deployment
1

Section 01

[Introduction] next-task: Core Analysis of the 12-Stage Multi-Agent Full Automation Workflow

The agent-sh/next-task project implements a fully automated pipeline from task discovery to production deployment through 12-stage multi-agent orchestration. Its core design philosophy is "three human-machine collaborations, the rest done automatically": users only participate in three stages—demand selection, task confirmation, and plan approval—while the remaining stages are handled by autonomous collaboration among agents. Key features include multi-agent parallel review, quality gate mechanisms, state persistence and fault tolerance capabilities, and an extensible plugin ecosystem.

2

Section 02

Project Background and Design Philosophy

In traditional development workflows, developers need to switch frequently between multiple tools, and manual operations are time-consuming and prone to missing steps. The design philosophy of next-task is "three human-machine collaborations, the rest done automatically": users only participate in three links—strategy selection, task confirmation, and plan approval. This solution is suitable for teams that process standardized tasks in batches, developers who want to reduce repetitive work, and projects pursuing continuous delivery automation, ensuring process consistency through coding best practices.

3

Section 03

Detailed Explanation of the 12-Stage Workflow Architecture

next-task divides the delivery process into 12 stages, with the first 6 stages involving user interaction and the last 6 stages being fully autonomous:

  1. Strategy Selection: Specify task sources and priority rules;
  2. Task Discovery: Extract task information for users to select;
  3. Workspace Isolation: Create an independent Git workspace to avoid conflicts;
  4. Requirement Exploration: Analyze codebase structure and dependencies;
  5. Plan Formulation: Generate a detailed implementation plan;
  6. User Approval: Review and confirm the plan;
  7. Code Implementation: Write code that complies with specifications according to the plan;
  8. Pre-Quality Gate: Clean up low-quality code + verify test coverage;
  9. Multi-Agent Parallel Review: Iterative review by core + professional agents;
  10. Delivery Verification: Verify build, test, and document integrity;
  11. Document Synchronization: Automatically update relevant documents;
  12. Release: Create a PR and trigger CI merging.
4

Section 04

Key Mechanisms and Technical Details

State Persistence and Fault Tolerance: Save state via tasks.json (active task registry) and flow.json (workflow progress), supporting breakpoint recovery and providing --resume/--status/--abort commands. Plugin Ecosystem: Modular design; core functions are implemented via plugins (e.g., deslop for code cleaning, ship for PR handling), allowing custom extensions. Technical Implementation: Based on the agentsys runtime, relying on Git 2.20+, GitHub/GitLab CLI, Node.js 18+; agents use different Claude models (Opus for plan formulation, Sonnet for review); parallel review uses a concurrency strategy to shorten cycles.

5

Section 05

Applicable Scenarios and Limitations

Applicable Scenarios: Maintenance projects that handle standardized tasks in batches, teams with clear coding standards, developers who want to reduce repetitive work, and projects pursuing continuous delivery automation. Limitations: It is difficult to replace human judgment for highly creative/architectural tasks; complex design decisions, cross-system coordination, UI/UX design, etc., still require human participation. Its value lies in automating standardized work, allowing developers to focus on creative parts.

6

Section 06

Conclusion: A New Paradigm for AI-Assisted Development

next-task represents a new paradigm for AI-assisted software development, not just simple code completion but full task lifecycle management. Through 12-stage orchestration and multi-agent collaboration, it achieves full automation from requirements to deployment while retaining manual review at key decision points. This "three collaborations + automatic completion" model balances quality and risk, and such automated workflows will become standard infrastructure for development teams in the future.