Strategies — 10 AI Coding Strategies Auto-Selected by CCG
The engine picks a strategy based on task type and complexity. Simple tasks run fast with no overhead. Complex tasks get the full engine.
Strategy Overview
Section titled “Strategy Overview”| Strategy | When | External Models | Teams |
|---|---|---|---|
direct-fix | Simple bug, single file | No | No |
quick-implement | Small feature, clear scope | No | No |
guided-develop | Medium feature, needs planning | Single model | No |
full-collaborate | Complex feature, multi-module | Dual model parallel | Yes |
debug-investigate | Complex bug, unknown cause | Dual model diagnosis | No |
refactor-safely | Code restructuring | Dual model review | No |
deep-research | Technical research, comparison | Dual model exploration | No |
optimize-measure | Performance optimization | Optional | No |
review-audit | Code review | Dual model cross-review | No |
git-action | commit, rollback, branches | No | No |
Strategy Details
Section titled “Strategy Details”direct-fix
Section titled “direct-fix”Trigger: S complexity + bugfix type, single file change
The lightest strategy. Claude locates the problem and fixes it directly. No external models, no task directory. Suitable for typos, simple logic fixes, config adjustments.
Phases: Locate → Fix → Verify
quick-implement
Section titled “quick-implement”Trigger: S complexity + feature type, clear scope (1-2 files)
Small feature implementation without external model assistance. Claude codes directly without creating a persistent task. Suitable for adding a utility function, a simple API endpoint, etc.
Phases: Understand → Implement → Verify
guided-develop
Section titled “guided-develop”Trigger: M complexity, needs planning but not dual-model
Invokes a single external model for analysis assistance. Creates a task directory with HARD STOP checkpoints. Suitable for medium features involving 2-5 files.
Phases: Analyze → Plan → HARD STOP → Implement → Verify
full-collaborate
Section titled “full-collaborate”Trigger: L/XL complexity + cross-module feature
The most complete strategy. Dual model parallel analysis + Agent Teams parallel implementation + quality gates. Always creates a task directory with multiple HARD STOP checkpoints.
Phases:
- Context collection
- Dual-model parallel analysis (Codex + Gemini)
- Synthesize plan → HARD STOP
- Spawn Agent Teams Builders for parallel implementation
- Quality gates (verify-security / verify-quality)
- Dual-model cross-review
- Output report
debug-investigate
Section titled “debug-investigate”Trigger: bugfix type + M/L complexity, unknown cause
Dual models diagnose from different angles. Codex analyzes backend logic and data flow; Gemini analyzes frontend interaction and state. Suitable for complex cross-layer bugs.
Phases: Reproduce → Dual-model diagnosis → Root cause → Fix proposal → HARD STOP → Fix → Verify
refactor-safely
Section titled “refactor-safely”Trigger: refactor type
Dual models review before and after refactoring to ensure behavioral equivalence. One model reviews the pre-refactor behavior semantics, the other verifies the post-refactor code maintains consistency.
Phases: Impact analysis → Dual review (before) → Refactor → Dual review (after) → Verify
deep-research
Section titled “deep-research”Trigger: research type (technical investigation, comparison, architecture exploration)
Dual models explore in parallel on the same question from different angles. Claude synthesizes the final conclusions. Produces a research report, not code.
Phases: Define problem → Dual-model parallel exploration → Synthesize comparison → Output conclusions
optimize-measure
Section titled “optimize-measure”Trigger: Performance optimization tasks
Emphasizes measurability — must have baseline data before and after optimization. External model invocation is optional (for bottleneck analysis).
Phases: Baseline measurement → Bottleneck analysis → Optimization plan → HARD STOP → Implement → Re-measure → Comparison report
review-audit
Section titled “review-audit”Trigger: review type (code review request)
Dual-model cross-review. Codex and Gemini independently review the same code, finding their own issues. Claude merges and deduplicates for a unified review report.
Phases: Get diff → Dual-model independent review → Merge findings → Graded report (Critical / Warning / Info)
git-action
Section titled “git-action”Trigger: Git operations (commit, rollback, clean-branches, worktree)
Direct Git operation execution. No external models, no task directory. Pure utility strategy.
Phases: Analyze current git state → Execute operation → Confirm result
Strategy Selection Logic
Section titled “Strategy Selection Logic”After receiving a /ccg:go command, the engine follows this decision tree:
Receive task description │ ├── Is it a Git operation? → git-action │ ├── Intent classification │ ├── bugfix │ │ ├── S complexity → direct-fix │ │ └── M/L complexity → debug-investigate │ │ │ ├── feature │ │ ├── S complexity → quick-implement │ │ ├── M complexity → guided-develop │ │ └── L/XL complexity → full-collaborate │ │ │ ├── refactor → refactor-safely │ ├── research → deep-research │ ├── review → review-audit │ └── optimize → optimize-measure