Files
nexus/wiki/concepts/Plan-Mode.md
2026-04-28 00:02:50 +08:00

43 lines
1.4 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
title: "Plan Mode"
type: concept
tags: [opencode, ai, workflow, safe-coding]
sources: [如何在ubuntu上安装opencode并配置vibe-kanban]
last_updated: 2026-04-27
---
## Overview
**Plan Mode** 是 OpenCode 的计划模式,通过 Tab 键切换进入。此模式下 OpenCode 禁用写入能力,只生成实现方案,不直接修改代码文件。
## How It Works
1. 在 OpenCode TUI 中按 **Tab** 键切换到 Plan Mode屏幕右下角会显示指示器
2. 描述你想要实现的功能需求
3. OpenCode 分析项目上下文后生成详细的实现计划
4. 人对计划提出反馈或补充更多细节
5. 确认计划后,再次按 **Tab** 键切换回 Build Mode 执行
## Why Use Plan Mode
- **安全可控**:在写入代码前审核 AI 的实现方案
- **迭代优化**:可多次调整计划直到满意
- **减少浪费**:避免 AI 因理解偏差导致的返工
- **上下文参考**:支持拖拽图片、设计稿等作为参考素材
## Relationship to Build Mode
Plan Mode 和 [[Build Mode]] 是互补的双模式工作流:
- Plan Mode = 规划、提案、审核
- Build Mode = 执行、实施、交付
## Related Concepts
- [[Build Mode]] — 构建模式,执行实际代码修改
- [[Vibe Coding]] — Plan Mode 是 Vibe Coding 工作流的关键环节
- [[AGENTS.md]] — 项目上下文定义,帮助 Plan Mode 生成更准确的方案
## Aliases
- Plan Mode (OpenCode)
- 计划模式