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

42 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: "Build Mode"
type: concept
tags: [opencode, ai, workflow, coding]
sources: [如何在ubuntu上安装opencode并配置vibe-kanban]
last_updated: 2026-04-27
---
## Overview
**Build Mode** 是 OpenCode 的构建模式,是 Plan Mode 的互补模式。通过 Tab 键从 [[Plan Mode]] 切换回来后进入此模式,此时 OpenCode 具有完整的文件写入权限,可以执行实际的代码修改。
## How It Works
1. 在 [[Plan Mode]] 中确认了实现方案后
2.**Tab** 键切换到 Build Mode屏幕右下角指示器会变化
3. 告诉 OpenCode "Sounds good! Go ahead and make the changes."
4. OpenCode 执行代码变更
5. 如需调整,可使用 `/undo` 命令撤销最近修改
## Safety Features
- `/undo`:撤销最近一次的代码修改,支持多次连续撤销
- `/redo`:重新执行被撤销的修改
- 可在 Plan/Build 模式间自由切换Plan 模式下不会意外修改代码
## Relationship to Plan Mode
Build Mode 是 [[Vibe Coding]] 工作流的执行环节:
- [[Plan Mode]] = 规划、提案、审核
- Build Mode = 执行、实施、交付
## Related Concepts
- [[Plan Mode]] — 计划模式,生成实现方案不写代码
- [[Vibe Coding]] — Build Mode 是 Vibe Coding 工作流的关键环节
- [[AGENTS.md]] — 项目上下文定义,帮助 Build Mode 准确实施代码变更
## Aliases
- Build Mode (OpenCode)
- 构建模式