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
| Aspect | Main Workflow | Issue Workflow |
|---|---|---|
| Purpose | Primary development cycle | Post-development maintenance |
| Timing | Feature development phase | After main workflow completes |
| Scope | Complete feature implementation | Targeted fixes/enhancements |
| Parallelism | Dependency analysis + Agent parallel | Worktree isolation (optional) |
| Branch Model | Work on current branch | Can use isolated worktree |
Why Main Workflow Doesn't Use Worktree Automatically?
Dependency analysis already solves parallelism:
- Planning phase (
/workflow:plan) performs dependency analysis - Automatically identifies task dependencies and critical paths
- Partitions into parallel groups (independent tasks) and serial chains (dependent tasks)
- Agents execute independent tasks in parallel without filesystem isolation
Why Issue Workflow Supports Worktree?
Issue Workflow serves as a supplementary mechanism with different scenarios:
- Main development complete, merged to
main - Issues discovered requiring fixes
- Need to fix without affecting current development
- Worktree isolation keeps main branch stable
15 Workflow Levels Explained
Level 1: Rapid Execution
Complexity: Low | Artifacts: None | State: Stateless
| Workflow | Description |
|---|---|
lite-lite-lite | Ultra-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
| Workflow | Description |
|---|---|
lite-plan | In-memory planning for clear requirements |
lite-fix | Intelligent bug diagnosis and fix |
multi-cli-plan | Multi-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
| Workflow | Description |
|---|---|
rapid-to-issue | Bridge 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
| Workflow | Description |
|---|---|
plan | Complex feature development with 5 phases |
tdd-plan | Test-driven development with Red-Green-Refactor |
test-fix-gen | Test 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
| Workflow | Description | Level |
|---|---|---|
brainstorm-with-file | Multi-perspective ideation | 4 |
debug-with-file | Hypothesis-driven debugging | 3 |
analyze-with-file | Collaborative analysis | 3 |
Best for: Documented exploration with multi-CLI collaboration
Level 4: Brainstorming
Complexity: High | Artifacts: Multi-role analysis docs | Roles: 3-9
| Workflow | Description |
|---|---|
brainstorm:auto-parallel | Multi-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
| Workflow | Description |
|---|---|
ccw-coordinator | Auto-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
| Phase | Commands |
|---|---|
| Accumulation | discover, discover-by-prompt, new |
| Resolution | plan --all-pending, queue, execute |
Best for: Post-development issue fixes, maintaining main branch stability
Choosing the Right Workflow
Quick Selection Table
| Scenario | Recommended Workflow | Level |
|---|---|---|
| Quick fixes, config adjustments | lite-lite-lite | 1 |
| Clear single-module features | lite-plan -> lite-execute | 2 |
| Bug diagnosis and fix | lite-fix | 2 |
| Production emergencies | lite-fix --hotfix | 2 |
| Technology selection, solution comparison | multi-cli-plan -> lite-execute | 2 |
| Multi-module changes, refactoring | plan -> verify -> execute | 3 |
| Test-driven development | tdd-plan -> execute -> tdd-verify | 3 |
| Test failure fixes | test-fix-gen -> test-cycle-execute | 3 |
| New features, architecture design | brainstorm:auto-parallel -> plan -> execute | 4 |
| Complex multi-step workflows, uncertain commands | ccw-coordinator | 5 |
| Post-development issue fixes | Issue Workflow | - |
Decision Flowchart
Complexity Indicators
System auto-evaluates complexity based on keywords:
| Weight | Keywords |
|---|---|
| +2 | refactor, migrate, architect, system |
| +2 | multiple, across, all, entire |
| +1 | integrate, api, database |
| +1 | security, 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 Name | Commands | Purpose |
|---|---|---|
| Quick Implementation | lite-plan -> lite-execute | Lightweight plan and execution |
| Multi-CLI Planning | multi-cli-plan -> lite-execute | Multi-perspective analysis and execution |
| Bug Fix | lite-fix -> lite-execute | Bug diagnosis and fix execution |
| Verified Planning | plan -> plan-verify -> execute | Planning with verification and execution |
| TDD Planning | tdd-plan -> execute | Test-driven development planning and execution |
| Test Validation | test-fix-gen -> test-cycle-execute | Generate test tasks and execute test-fix cycle |
| Code Review | review-session-cycle -> review-cycle-fix | Complete review cycle and apply fixes |
Next Steps
- Level 1: Ultra-Lightweight Workflows - Learn about rapid execution
- Level 2: Rapid Workflows - Lightweight planning and bug fixes
- Level 3: Standard Workflows - Complete planning and TDD
- Level 4: Brainstorm Workflows - Multi-role exploration
- Level 5: Intelligent Workflows - Automated orchestration
- FAQ - Common questions and answers