Skip to content
Mo Abualruz edited this page Dec 9, 2025 · 2 revisions

Modes

Status: ✅ Complete

Phase: Phase 2 - Alpha Enhanced

Last Updated: December 4, 2025


Overview

The Modes feature provides different interaction modes for RiceCoder, allowing developers to choose the best mode for their current task. Each mode has distinct capabilities, constraints, and system prompts optimized for specific workflows. Modes include Code Mode for focused development, Ask Mode for question answering, Vibe Mode for rapid prototyping, and Think More for extended reasoning on complex tasks.

Key Features

  • Code Mode: Focused code generation and modification with full execution capabilities
  • Ask Mode: Question answering and explanations without file modifications
  • Vibe Mode: Free-form exploration and rapid prototyping without formal specifications
  • Think More Toggle: Extended reasoning for complex tasks with configurable depth
  • Mode Switching: Seamlessly switch between modes while preserving session context
  • Per-Task Configuration: Configure Think More settings on a per-task basis
  • Auto-Enable Logic: Automatically enable Think More for complex tasks
  • Context Preservation: All session context and conversation history persists across mode switches

Installation & Setup

Modes are built into RiceCoder and enabled by default. No additional installation is required.

Configuration

Configure modes in .ricecoder/config.yaml:

modes:
  # Default mode on startup
  default_mode: code
  
  # Code Mode settings
  code_mode:
    enabled: true
    temperature: 0.7
    max_tokens: 4096
    allow_file_operations: true
    allow_command_execution: true
    require_specs: false
  
  # Ask Mode settings
  ask_mode:
    enabled: true
    temperature: 0.5
    max_tokens: 2048
    allow_file_operations: false
    allow_command_execution: false
  
  # Vibe Mode settings
  vibe_mode:
    enabled: true
    temperature: 0.9
    max_tokens: 4096
    allow_file_operations: true
    allow_command_execution: false
    require_specs: false
  
  # Think More settings
  think_more:
    enabled: true
    default_depth: medium
    timeout_ms: 30000
    auto_enable: true
    auto_enable_threshold: complex

How to Use

Basic Usage: Selecting a Mode

Select a mode at startup:

# Start RiceCoder with default mode
ricecoder

# Start with specific mode
ricecoder --mode ask
ricecoder --mode vibe
ricecoder --mode code

Switch modes in the TUI:

# In the TUI, press Ctrl+M to open mode switcher
# Select a mode from the list
# Press Enter to switch
# Current mode is displayed in the status bar

View current mode:

# In the TUI, the current mode is shown in the status bar
# Shows mode name and active capabilities
# Shows Think More status if enabled

Code Mode: Focused Development

Code Mode is optimized for writing and modifying code with full execution capabilities.

Capabilities:

  • Generate code from specifications
  • Create and modify files
  • Run tests to verify correctness
  • Validate code quality against workspace standards
  • Provide summary of all changes

Usage:

# Select Code Mode
ricecoder --mode code

# In the TUI, press Ctrl+M and select "Code Mode"
# Describe what you want to build
# Code Mode generates code, creates files, runs tests
# Review the change summary

Example:

User: Create a Rust function that validates email addresses

Code Mode:
1. Generates email validation function
2. Creates src/validators/email.rs
3. Runs tests to verify correctness
4. Validates code quality
5. Provides summary:
   - Files created: 1
   - Tests run: 5
   - Tests passed: 5
   - Quality issues: 0

Ask Mode: Question Answering

Ask Mode is optimized for answering questions and providing explanations without modifying files.

Capabilities:

  • Answer questions clearly
  • Provide explanations and guidance
  • Include code examples in responses
  • Suggest approaches without executing them

Constraints:

  • Cannot modify files
  • Cannot execute commands
  • Cannot run tests
  • Cannot generate code directly

Usage:

# Select Ask Mode
ricecoder --mode ask

# In the TUI, press Ctrl+M and select "Ask Mode"
# Ask your question
# Ask Mode provides explanation with code examples
# No files are modified

Example:

User: How do I implement a trait in Rust?

Ask Mode:
To implement a trait in Rust, use the `impl` keyword:

```rust
trait MyTrait {
    fn my_method(&self) -> String;
}

struct MyStruct;

impl MyTrait for MyStruct {
    fn my_method(&self) -> String {
        "Hello, World!".to_string()
    }
}

This example shows:

  • Defining a trait with a method
  • Implementing the trait for a struct
  • Providing the method implementation

### Vibe Mode: Rapid Prototyping

Vibe Mode is optimized for rapid prototyping and exploration without formal specifications.

**Capabilities**:
- Generate code directly from natural language descriptions
- Create and modify files
- Support rapid iteration
- Convert to spec-driven format when ready

**Constraints**:
- Bypasses formal specification requirements
- Cannot execute commands
- Displays warnings about limitations

**Usage**:

```bash
# Select Vibe Mode
ricecoder --mode vibe

# In the TUI, press Ctrl+M and select "Vibe Mode"
# Describe what you want to build in natural language
# Vibe Mode generates code quickly
# Iterate rapidly without formal specs
# When ready, convert to spec-driven development

Example:

User: I want a simple todo app with add, list, and delete

Vibe Mode:
⚠️  Vibe Mode Warning: This mode bypasses formal specifications.
    Use for rapid prototyping only. Convert to spec-driven development
    for production code.

Generating todo app...
- Created src/main.rs with CLI interface
- Created src/todo.rs with Todo struct
- Created src/storage.rs with file persistence

Ready to iterate! Describe changes or press Ctrl+Shift+S to convert to specs.

Think More: Extended Reasoning

Think More enables extended reasoning for complex tasks, trading increased processing time for improved response quality.

Enable Think More:

# In the TUI, press Ctrl+T to toggle Think More
# Shows current Think More status
# Displays thinking depth (Light, Medium, Deep)

Configure Think More Depth:

# In the TUI, press Ctrl+Shift+T to configure Think More
# Select depth:
#   - Light: Quick analysis (5-10 seconds)
#   - Medium: Standard reasoning (15-30 seconds)
#   - Deep: Extended thinking (30-60 seconds)
# Press Enter to apply

Per-Task Configuration:

# In the TUI, before sending a message:
# Press Ctrl+T to toggle Think More for this task only
# Overrides global Think More setting
# Applies only to the current message

Auto-Enable:

# Think More auto-enables for complex tasks
# Complexity is detected based on:
#   - Task description length
#   - Keywords indicating complexity
#   - Estimated processing time
# Can be disabled in configuration

Example with Think More:

User: Design a distributed cache system for a microservices architecture

Think More: Enabled (Deep)
Thinking... (45 seconds)

[Thinking process displayed]
- Analyzing requirements
- Considering trade-offs
- Evaluating design patterns
- Planning implementation

Response:
A distributed cache system should consider:
1. Consistency model (eventual vs strong)
2. Replication strategy
3. Eviction policies
4. Network topology
...

Mode Switching with Context Preservation

Switch between modes while preserving all context:

# In Code Mode, working on a project
# Press Ctrl+M to switch to Ask Mode
# Ask a question about the code
# Press Ctrl+M to switch back to Code Mode
# All context, conversation history, and project state preserved

Example:

Session 1: Code Mode
- Generated user authentication module
- Created tests
- Conversation history: 5 messages

Switch to Ask Mode
- Ask: "How do I add password hashing?"
- Get explanation with code examples
- Conversation history: 6 messages

Switch back to Code Mode
- All previous context available
- Can continue implementing features
- Conversation history: 7 messages

Configuration

Mode Selection

Set the default mode:

modes:
  default_mode: code  # Options: code, ask, vibe

Code Mode Configuration

code_mode:
  enabled: true
  temperature: 0.7          # Creativity level (0.0-1.0)
  max_tokens: 4096          # Maximum response length
  allow_file_operations: true
  allow_command_execution: true
  require_specs: false

Ask Mode Configuration

ask_mode:
  enabled: true
  temperature: 0.5          # Lower temperature for consistency
  max_tokens: 2048
  allow_file_operations: false
  allow_command_execution: false

Vibe Mode Configuration

vibe_mode:
  enabled: true
  temperature: 0.9          # Higher temperature for creativity
  max_tokens: 4096
  allow_file_operations: true
  allow_command_execution: false
  require_specs: false

Think More Configuration

think_more:
  enabled: true
  default_depth: medium     # Options: light, medium, deep
  timeout_ms: 30000         # Maximum thinking time
  auto_enable: true
  auto_enable_threshold: complex  # Options: simple, moderate, complex

Examples

Example 1: Switching Modes for Different Tasks

# Start in Code Mode
ricecoder --mode code

# Task 1: Generate authentication module
# Use Code Mode to generate and test code

# Task 2: Ask about best practices
# Press Ctrl+M to switch to Ask Mode
# Ask: "What are security best practices for authentication?"
# Get detailed explanation

# Task 3: Rapid prototyping
# Press Ctrl+M to switch to Vibe Mode
# Describe: "Create a simple API endpoint"
# Vibe Mode generates code quickly

# Task 4: Back to focused development
# Press Ctrl+M to switch to Code Mode
# Continue with production code

Example 2: Using Think More for Complex Architecture

# In Code Mode
# Enable Think More: Press Ctrl+T

# Task: Design a microservices architecture
# Think More: Enabled (Deep)
# Thinking time: 45 seconds

# Response includes:
# - Detailed architecture diagram
# - Service boundaries
# - Communication patterns
# - Deployment strategy
# - Scalability considerations

Example 3: Rapid Prototyping with Vibe Mode

# Start in Vibe Mode
ricecoder --mode vibe

# Iteration 1: "Create a todo app"
# Vibe Mode generates basic structure

# Iteration 2: "Add database persistence"
# Vibe Mode adds database layer

# Iteration 3: "Add REST API"
# Vibe Mode adds API endpoints

# When ready for production:
# Press Ctrl+Shift+S to convert to spec-driven development
# Specs are generated from the prototype

Example 4: Ask Mode for Learning

# Start in Ask Mode
ricecoder --mode ask

# Question 1: "Explain async/await in Rust"
# Get detailed explanation with examples

# Question 2: "What's the difference between Box and Arc?"
# Get comparison with use cases

# Question 3: "How do I handle errors in Rust?"
# Get best practices and patterns

# All without modifying any files

Troubleshooting

Issue: Cannot switch modes

Solution: Ensure the mode is enabled in configuration:

modes:
  code_mode:
    enabled: true
  ask_mode:
    enabled: true
  vibe_mode:
    enabled: true

Issue: File operations blocked in Ask Mode

Solution: This is expected behavior. Ask Mode prevents file modifications. Switch to Code Mode or Vibe Mode to modify files:

# In the TUI, press Ctrl+M to switch to Code Mode
# Then perform file operations

Issue: Think More not activating

Solution: Check that Think More is enabled and auto-enable is configured:

think_more:
  enabled: true
  auto_enable: true
  auto_enable_threshold: complex

Or manually enable Think More:

# In the TUI, press Ctrl+T to toggle Think More

Issue: Mode switch losing context

Solution: This should not happen. If context is lost, check that session persistence is enabled:

sessions:
  auto_save_interval: 30

If the issue persists, export the session before switching:

# In the TUI, press Ctrl+E to export the session
# Then switch modes

Issue: Vibe Mode warnings too verbose

Solution: Configure warning level in .ricecoder/config.yaml:

vibe_mode:
  warning_level: minimal  # Options: minimal, standard, verbose

Performance

  • Mode Switching: < 50ms
  • Code Mode Execution: Depends on task complexity (typically 5-30 seconds)
  • Ask Mode Response: 2-10 seconds
  • Vibe Mode Generation: 3-15 seconds
  • Think More (Light): 5-10 seconds additional
  • Think More (Medium): 15-30 seconds additional
  • Think More (Deep): 30-60 seconds additional

Limitations

  • Only one mode active at a time (switch between modes)
  • Ask Mode cannot modify files or execute commands
  • Vibe Mode cannot execute commands
  • Think More processing must complete within configured timeout
  • Mode switching requires explicit user action (no automatic switching)
  • Think More availability depends on AI provider support

See Also


Last updated: December 4, 2025

Clone this wiki locally