Major Features:
• Plan Mode - Read-only exploration mode inspired by Claude Code
• Runtime mode switching with Shift+Tab (Claude Code style)
• Persistent mode indicator at bottom of TUI
• Config support with environment variable override
• 21 comprehensive tests (100% passing)
Plan Mode:
• Restricts agent to 10 read-only tools (read, search, git status/diff/log)
• Prevents accidental file modifications during exploration
• Perfect for understanding codebases before making changes
• Toggle with Shift+Tab anytime during chat
Implementation:
• ExecutionMode enum (NORMAL, PLAN) with helper methods
• Tool registry filtering by risk level (SAFE tools only in Plan Mode)
• Agent integration with set_execution_mode() for runtime switching
• CLI flag: --plan to start in Plan Mode
• Config setting: default_execution_mode in settings.json
• Environment variable: CDD_EXECUTION_MODE=plan
UX Improvements:
• Custom markdown renderer with left-aligned headings (no underlines)
• Mode indicator always visible at bottom: "⏸ PLAN MODE (Read-Only)"
• Purple/gold color for Plan Mode, dimmed for Normal Mode
• Smooth toggling with Shift+Tab (no conflicts)
Testing:
• 21 unit and integration tests covering:
- ExecutionMode enum functionality
- Tool registry filtering
- Agent mode switching
- Config priority handling
- End-to-end integration
Breaking Changes: None
Backward Compatible: Yes
🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>