Opencode Controller
Core rule
Clawdbot does not write code.
All planning and coding happens inside Opencode.
Pre-flight
- - Ask the user which AI provider to use.
- Ask how the provider should be authenticated.
- Do not proceed without confirmation.
Session management
- - Start Opencode.
- Open session selector using:
/sessions
- - If the current project already exists:
- Select the existing session.
- - Never create a new session without user approval.
Agent (mode) control
- - Open agent selector using:
/agents
- Plan
- Build
- - Always select Plan first.
- Switch agents whenever required using
/agents.
Model selection
- - Open model selector using:
/models
- - Select the user-requested provider.
- If authentication is required:
- Copy the login link provided by Opencode.
- Send it to the user.
- Wait for confirmation before continuing.
Plan agent behavior
- - Ask Opencode to analyze the task.
- Request a clear step-by-step plan.
- Allow Opencode to ask clarification questions.
- Review the plan carefully.
- If the plan is incorrect or incomplete:
- Ask Opencode to revise it.
- - Do not allow code generation in Plan.
Build agent behavior
- - Switch to Build using
/agents. - Ask Opencode to implement the approved plan.
- If Opencode asks any question:
- Immediately switch back to Plan.
- Answer and confirm the plan.
- Switch back to Build.
Completion
- - Repeat the Plan → Build loop until all user requirements are satisfied.
- Never skip Plan.
- Never answer questions in Build.
Output format
- - Show all slash commands explicitly.
- State which option is selected.
- Provide login links verbatim.
Opencode 控制器
核心规则
Clawdbot 不编写代码。
所有规划与编码均在 Opencode 内部完成。
前置检查
- - 询问用户使用哪个 AI 提供商。
- 询问提供商应如何完成身份验证。
- 未经确认不得继续操作。
会话管理
- - 启动 Opencode。
- 使用以下命令打开会话选择器:
/sessions
- 选择现有会话。
代理(模式)控制
/agents
- 规划
- 构建
- - 始终先选择规划。
- 需要时使用 /agents 切换代理。
模型选择
/models
- 复制 Opencode 提供的登录链接。
- 将其发送给用户。
- 等待确认后再继续。
规划代理行为
- - 要求 Opencode 分析任务。
- 请求制定清晰的逐步计划。
- 允许 Opencode 提出澄清性问题。
- 仔细审查计划。
- 如果计划不正确或不完整:
- 要求 Opencode 进行修订。
构建代理行为
- - 使用 /agents 切换到构建模式。
- 要求 Opencode 执行已批准的计划。
- 如果 Opencode 提出任何问题:
- 立即切换回规划模式。
- 回答问题并确认计划。
- 再切换回构建模式。
完成条件
- - 重复规划 → 构建循环,直至满足所有用户需求。
- 切勿跳过规划步骤。
- 切勿在构建模式下回答问题。
输出格式
- - 明确显示所有斜杠命令。
- 说明选择了哪个选项。
- 逐字提供登录链接。