Skip to main content

Workflow Introduction

CCW provides two workflow systems: Main Workflow and Issue Workflow, working together to cover the complete software development lifecycle.

Workflow Architecture Overview

Main Workflow vs Issue Workflow

AspectMain WorkflowIssue Workflow
PurposePrimary development cyclePost-development maintenance
TimingFeature development phaseAfter main workflow completes
ScopeComplete feature implementationTargeted fixes/enhancements
ParallelismDependency analysis + Agent parallelWorktree isolation (optional)
Branch ModelWork on current branchCan use isolated worktree

Why Main Workflow Doesn't Use Worktree Automatically?

Dependency analysis already solves parallelism:

  1. Planning phase (/workflow:plan) performs dependency analysis
  2. Automatically identifies task dependencies and critical paths
  3. Partitions into parallel groups (independent tasks) and serial chains (dependent tasks)
  4. Agents execute independent tasks in parallel without filesystem isolation

Why Issue Workflow Supports Worktree?

Issue Workflow serves as a supplementary mechanism with different scenarios:

  1. Main development complete, merged to main
  2. Issues discovered requiring fixes
  3. Need to fix without affecting current development
  4. Worktree isolation keeps main branch stable

15 Workflow Levels Explained

Level 1: Rapid Execution

Complexity: Low | Artifacts: None | State: Stateless

WorkflowDescription
lite-lite-liteUltra-lightweight direct execution with zero overhead

Best for: Quick fixes, simple features, config adjustments


Level 2: Lightweight Planning

Complexity: Low-Medium | Artifacts: Memory/Lightweight files | State: Session-scoped

WorkflowDescription
lite-planIn-memory planning for clear requirements
lite-fixIntelligent bug diagnosis and fix
multi-cli-planMulti-CLI collaborative analysis

Best for: Single-module features, bug fixes, technology selection


Level 2.5: Bridge Workflow

Complexity: Low-Medium | Purpose: Lightweight to Issue transition

WorkflowDescription
rapid-to-issueBridge from quick planning to issue workflow

Best for: Converting lightweight plans to issue tracking


Level 3: Standard Planning

Complexity: Medium-High | Artifacts: Persistent session files | State: Full session management

WorkflowDescription
planComplex feature development with 5 phases
tdd-planTest-driven development with Red-Green-Refactor
test-fix-genTest fix generation with progressive layers

Best for: Multi-module changes, refactoring, TDD development


With-File Workflows (Level 3-4)

Complexity: Medium-High | Artifacts: Documented exploration | Multi-CLI: Yes

WorkflowDescriptionLevel
brainstorm-with-fileMulti-perspective ideation4
debug-with-fileHypothesis-driven debugging3
analyze-with-fileCollaborative analysis3

Best for: Documented exploration with multi-CLI collaboration


Level 4: Brainstorming

Complexity: High | Artifacts: Multi-role analysis docs | Roles: 3-9

WorkflowDescription
brainstorm:auto-parallelMulti-role brainstorming with synthesis

Best for: New feature design, architecture refactoring, exploratory requirements


Level 5: Intelligent Orchestration

Complexity: All levels | Artifacts: Full state persistence | Automation: Complete

WorkflowDescription
ccw-coordinatorAuto-analyze & recommend command chains

Best for: Complex multi-step workflows, uncertain commands, end-to-end automation


Issue Workflow

Complexity: Variable | Artifacts: Issue records | Isolation: Worktree optional

PhaseCommands
Accumulationdiscover, discover-by-prompt, new
Resolutionplan --all-pending, queue, execute

Best for: Post-development issue fixes, maintaining main branch stability

Choosing the Right Workflow

Quick Selection Table

ScenarioRecommended WorkflowLevel
Quick fixes, config adjustmentslite-lite-lite1
Clear single-module featureslite-plan -> lite-execute2
Bug diagnosis and fixlite-fix2
Production emergencieslite-fix --hotfix2
Technology selection, solution comparisonmulti-cli-plan -> lite-execute2
Multi-module changes, refactoringplan -> verify -> execute3
Test-driven developmenttdd-plan -> execute -> tdd-verify3
Test failure fixestest-fix-gen -> test-cycle-execute3
New features, architecture designbrainstorm:auto-parallel -> plan -> execute4
Complex multi-step workflows, uncertain commandsccw-coordinator5
Post-development issue fixesIssue Workflow-

Decision Flowchart

Complexity Indicators

System auto-evaluates complexity based on keywords:

WeightKeywords
+2refactor, migrate, architect, system
+2multiple, across, all, entire
+1integrate, api, database
+1security, performance, scale
  • High complexity (>=4): Auto-select Level 3-4
  • Medium complexity (2-3): Auto-select Level 2
  • Low complexity (<2): Auto-select Level 1

Minimum Execution Units

Definition: A set of commands that must execute together as an atomic group to achieve a meaningful workflow milestone.

Unit NameCommandsPurpose
Quick Implementationlite-plan -> lite-executeLightweight plan and execution
Multi-CLI Planningmulti-cli-plan -> lite-executeMulti-perspective analysis and execution
Bug Fixlite-fix -> lite-executeBug diagnosis and fix execution
Verified Planningplan -> plan-verify -> executePlanning with verification and execution
TDD Planningtdd-plan -> executeTest-driven development planning and execution
Test Validationtest-fix-gen -> test-cycle-executeGenerate test tasks and execute test-fix cycle
Code Reviewreview-session-cycle -> review-cycle-fixComplete review cycle and apply fixes

Next Steps