Plan Mode gives you a safe, read-only environment to explore your codebase, map out solutions, and collaborate with AI before making any changes. Think of it as your sandbox for understanding and strategy.
Learn how to choose the right mode
Focus analysis on the user authentication module only, ignore the admin features
Analyze @Files and its direct imports for security issues
This feature needs to handle Black Friday traffic (10x normal load). Plan accordingly.
We're on AWS with strict security requirements. Plan a file upload system that meets SOC2 compliance.
What could go wrong with this database migration? Plan rollback procedures.
Show me 3 different approaches to implementing caching in this API, with pros and cons for each.
Plan
in the mode selector below the chat input box.
Tool | Available | Description |
---|---|---|
File/directory reading | ✅ | Browse and read any file or folder in your workspace |
Grep/glob search | ✅ | Search for patterns across files and directories |
Repository structure analysis | ✅ | Understand codebase organization and dependencies |
Git history/diffs | ✅ | Review commits, branches, and changes |
Web content fetching | ✅ | Access external documentation and resources |
External API access | ✅ | Read-only calls to external services |
MCP tools | ✅ | Model Context Protocol integrations |
Database schema examination | ✅ | Analyze database structure (read-only) |
File creation/editing | ❌ | Creating or modifying files |
Terminal command execution | ❌ | Running shell commands |
System modifications | ❌ | Changing system settings or configurations |
Package installation | ❌ | Installing dependencies or packages |
Git commits/pushes | ❌ | Making changes to version control |
Database modifications | ❌ | Altering database data or structure |
Context Type | Usage | Best For |
---|---|---|
Highlighted Code | cmd/ctrl + L (VS Code) or cmd/ctrl + J (JetBrains) | Component-specific analysis |
Active File | opt/alt + enter when sending request | Current file context |
@Files | @Files package.json tsconfig.json | Specific file analysis |
@Folder | @Folder src/auth | Directory-wide planning |
@Codebase | @Codebase | Comprehensive system analysis |
@Docs | @Docs React Router | Standards-compliant planning |
@Terminal | @Terminal | Debugging with output |
@Git Diff | @Git Diff | Change impact analysis |
Advanced Context Examples
Component Analysis
Analyze this component for performance bottlenecks and plan optimization strategies.
Configuration Review
@Files docker-compose.yml Dockerfile - Review our containerization setup and suggest improvements for production deployment.
API Design Review
@Folder src/api - Evaluate our REST API design patterns and identify opportunities for better consistency.
Cross-Platform Migration
@Codebase - Plan a strategy to migrate this web app to also support mobile using React Native.
Understanding Systems
Help me understand how state management works in this Redux app. Map out the data flow from actions to components.
Microservices Communication:
Analyze how our microservices communicate and identify potential bottlenecks in service-to-service calls.
Database Schema Review:
Examine the database schema and relationships to understand how user data is structured and accessed.
Legacy Code Investigation
Map out this legacy codebase architecture. What are the main components and how do they communicate?
Technical Debt Assessment:
Analyze this codebase for technical debt hotspots and maintenance pain points.
Modernization Planning:
Assess this legacy system and recommend modernization opportunities that provide the highest impact with lowest risk.
Migrations & Upgrades
Plan a migration from on-premise servers to AWS, considering our current Node.js application architecture.
Package Manager Migration:
Create a plan to migrate from npm to pnpm, analyzing dependencies and potential breaking changes.
Monorepo Conversion:
Plan how to convert our multiple repositories into a single monorepo using Nx or Lerna.
Refactoring & Integration
Plan a refactor to extract shared authentication logic into a reusable service across these microservices.
Payment Integration:
We need to add Stripe payments to this e-commerce app. Plan the integration considering our current architecture.
API Migration:
@Codebase - Plan a migration from REST to GraphQL across our entire API.
Performance Problems
Users report slow page loads on the dashboard. Investigate performance bottlenecks in the @Files and related components.
API Optimization:
Plan a performance optimization strategy for this Node.js API, focusing on database queries and caching.
Bundle Analysis:
Analyze this React app for performance bottlenecks. What are the most expensive operations?
Bug Investigation
Users occasionally see stale data in the UI. Investigate potential race conditions in our async data fetching.
Production Incidents:
@Git Diff We're seeing 500 errors in production. Analyze recent changes and identify what might be causing the issue.
Deployment Issues:
Our staging environment works fine, but production deployments fail. Analyze environment differences.
Scalability & Performance
Analyze this @codebase architecture and identify potential bottlenecks for handling 10x more traffic.
CDN Implementation:
Plan a CDN strategy for our global user base, considering asset optimization and edge caching.
Caching Strategy:
Show me 3 different approaches to implementing caching in this API, with pros and cons for each.
Security & Compliance
Audit this API for security vulnerabilities, focusing on authentication, authorization, and data validation.
Threat Modeling:
Model potential security threats for this user registration flow and plan mitigation strategies.
Compliance Planning:
Plan GDPR compliance implementation for this user data handling system.