Roo Code — AI Coding Tool Guide

Cline fork with specialized modes for code, architecture, debugging, and testing. VS Code extension with mode-specific prompt patterns and configuration.

roo-codevscodecline-forkspecialized-modes

Roo Code

Roo Code is a fork of Cline that adds specialized modes — Code, Architect, Debug, and Test — each with its own optimized prompt patterns and behaviors. It runs as a VS Code extension with the same MCP and tooling infrastructure as Cline.

What Makes Roo Code Different

Roo Code's killer feature is mode specialization. Instead of one prompt style for everything, you get four tuned behaviors:

  • Code Mode — Optimized for writing production code. Follows style conventions, adds error handling, prefers tested patterns.
  • Architect Mode — Optimized for system design. Analyzes architecture, identifies patterns, proposes structural changes without implementation.
  • Debug Mode — Optimized for bug hunting. Traces error paths, checks edge cases, adds instrumentation before fixing.
  • Test Mode — Optimized for test generation. Focuses on edge cases, follows existing test patterns, generates comprehensive coverage.

Getting Started

Install from the VS Code Marketplace. Configure your API key in settings.

Prompt Patterns by Mode

Code Mode

Create a REST API endpoint for user profile updates:
1. Use the existing Express.js pattern from src/routes/users.ts
2. Add zod validation matching src/lib/validators.ts
3. Handle all error cases: missing fields, invalid email, duplicate username
4. Add auth middleware from src/middleware/auth.ts
5. Return consistent error format: { error: string, code: number }

Architect Mode

Architect mode: Design a migration from REST to GraphQL for the users module.
1. Map current REST endpoints → GraphQL queries/mutations
2. Identify resolvers needed and what existing services they wrap
3. Plan the schema: types, inputs, enums
4. Consider performance: N+1 risks, DataLoader strategy
5. List what stays the same (auth middleware, database layer)
Do NOT write implementation — architecture plan only.

Debug Mode

Debug mode: Users report 500 errors after updating profile images.
1. Check the image upload endpoint in src/routes/upload.ts
2. Trace the file processing pipeline: multer → sharp → S3
3. Check for: file size limits, unsupported formats, S3 permissions
4. Add instrumentation: log file size, format, processing time
5. Reproduce with a 20MB PNG — check what breaks
Report findings before making changes.

Test Mode

Test mode: Generate tests for src/services/billing.ts
1. Read the existing test patterns in src/__tests__/
2. Cover: normal subscription flow, payment failure, proration, cancellation
3. Mock external services (Stripe) using the existing mock helpers
4. Add edge cases: zero-amount invoice, past-due customer, expired card
5. Run tests after generation: npm test -- billing

Configuration

Roo Code uses the same extension settings as Cline. API keys, model selection, and MCP configuration are identical. Modes are selected from the extension UI or toggled via command palette (Roo Code: Switch Mode).

Mode Selection Strategy

TaskBest ModeWhy
Writing new featuresCodeFollows conventions, handles edge cases
Planning big refactorsArchitectAnalysis without implementation
Fixing production bugsDebugTraces paths, instruments before fixing
Writing test coverageTestEdge case focus, pattern following
Code reviewArchitect or DebugArchitectural concerns vs error paths