Skip to main content

/ccw

Main CCW workflow coordinator - the unified entry point for intelligent command orchestration based on task complexity analysis.

Overview

The /ccw command is the primary CCW workflow coordinator that automatically analyzes task requirements, evaluates complexity, and selects the appropriate workflow level and execution path.

Core Concept: Minimum Execution Units - commands grouped into logical units for complete workflow milestones.

Features

  • Auto Complexity Analysis - Evaluates task based on keywords and context
  • Workflow Selection - Automatically selects optimal workflow level (1-5)
  • Unit-Based Orchestration - Groups commands into Minimum Execution Units
  • State Persistence - Tracks execution state in .workflow/.ccw-coordinator/
  • Intelligent Routing - Direct execution vs CLI-based execution

Usage

# Let CCW analyze and select workflow
/ccw "Implement user authentication"

# Explicit workflow selection
/ccw --workflow rapid "Add logout endpoint"

# Skip tests
/ccw --skip-tests "Quick config fix"

# Auto-confirm (skip confirmation prompts)
/ccw --yes "Simple bug fix"

Command Options

OptionDescriptionDefault
[task description]Task to execute (required)-
--workflow <name>Explicit workflow selectionAuto-detected
--skip-testsSkip test validation unitfalse
--yesAuto-confirm executionfalse

Workflow Levels

The coordinator automatically selects from 5 workflow levels:

Level 1: Rapid Execution

Complexity: Low | Artifacts: None | State: Stateless

WorkflowDescription
lite-lite-liteUltra-lightweight direct execution

Use for: Quick fixes, simple features, config adjustments

Level 2: Lightweight Planning

Complexity: Low-Medium | Artifacts: Memory/Lightweight files

WorkflowDescription
rapidlite-plan → lite-execute (+ optional test units)

Use for: Single-module features, bug fixes

Level 3: Standard Planning

Complexity: Medium-High | Artifacts: Persistent session files

WorkflowDescription
coupledplan → plan-verify → execute (+ optional test units)
tddtdd-plan → execute → tdd-verify

Use for: Multi-module changes, refactoring, TDD

Level 4: Brainstorming

Complexity: High | Artifacts: Multi-role analysis docs

WorkflowDescription
brainstormbrainstorm:auto-parallel → plan → execute

Use for: New feature design, architecture refactoring

Level 5: Intelligent Orchestration

Complexity: All levels | Artifacts: Full state persistence

WorkflowDescription
fullccw-coordinator (auto-analyze & recommend)

Use for: Complex multi-step workflows, uncertain commands

Execution Flow

User Input: "task description"

Phase 1: Complexity Analysis
├─ Extract keywords
├─ Calculate complexity score
└─ Detect constraints

Phase 2: Workflow Selection
├─ Map complexity to level
├─ Select workflow
└─ Build command chain

Phase 3: User Confirmation
├─ Display selected workflow
└─ Show command chain

Phase 4: Execute Command Chain
├─ Setup TODO tracking
├─ Execute commands sequentially
└─ Track state

Output completion summary

Complexity Evaluation

Auto-evaluates complexity based on keywords:

WeightKeywords
+2refactor, migrate, architect, system
+2multiple, across, all, entire
+1integrate, api, database
+1security, performance, scale

Thresholds:

  • High complexity (>=4): Level 3-4
  • Medium complexity (2-3): Level 2
  • Low complexity (<2): Level 1

Minimum Execution Units

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

Command Chain Examples

Rapid Workflow (Level 2)

# Quick implementation
Unit: quick-impl
Commands:
1. /workflow:lite-plan "Add logout endpoint"
2. /workflow:lite-execute --in-memory

(Optional) Unit: test-validation
Commands:
3. /workflow:test-fix-gen
4. /workflow:test-cycle-execute

Coupled Workflow (Level 3)

# Verified planning
Unit: verified-planning-execution
Commands:
1. /workflow:plan "Implement OAuth2"
2. /workflow:plan-verify
3. /workflow:execute

(Optional) Unit: test-validation
Commands:
4. /workflow:test-fix-gen
5. /workflow:test-cycle-execute

Examples

Auto Workflow Selection

# CCW analyzes and selects appropriate workflow
/ccw "Add user profile page"

# Output:
# Analyzing task...
# Complexity: Low (score: 1)
# Selected: Level 2 - Rapid Workflow
# Commands: lite-plan → lite-execute
# Confirm? (y/n): y

Explicit Workflow

# Force specific workflow
/ccw --workflow tdd "Implement authentication with TDD"

# Uses TDD workflow regardless of complexity

Skip Tests

# Quick fix without tests
/ccw --skip-tests "Fix typo in config"

# Omits test-validation unit
  • /ccw-plan - Planning coordinator
  • /ccw-test - Test workflow coordinator
  • /ccw-coordinator - Generic command orchestration
  • /ccw-debug - Debug workflow coordinator

Notes

  • Auto-analysis evaluates task complexity based on keywords
  • Workflow levels map complexity to appropriate execution paths
  • Minimum Execution Units ensure complete workflow milestones
  • State persistence in .workflow/.ccw-coordinator/{session}/
  • TODO tracking with CCW prefix for visibility
  • CLI execution runs in background with hook callbacks