Opencode
Core rule
For any problem related to coding of a repository, please use opencode directly, the major burden of question-answering and coding should be given to opencode which is very capable to do it well.
Your job to pass the question to opencode, digest the result from opencode and select what to do next (plan or build) based on the result from opencode.
All planning and coding happens inside Opencode.
Usages
- plan
- build
- - Always select Plan first.
- plan agent: run with INLINECODE0
- build agent: run with INLINECODE1
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
- - 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.
Opencode
核心规则
对于任何与仓库编码相关的问题,请直接使用 opencode。问答和编码的主要任务应交给 opencode,它完全有能力出色地完成这些工作。
你的职责是将问题传递给 opencode,消化 opencode 返回的结果,并根据该结果决定下一步行动(规划或构建)。
所有规划和编码工作均在 Opencode 内部进行。
使用方法
- plan
- build
- - 始终先选择 Plan。
- plan 代理:运行 cd [仓库目录] && opencode run [指令/问题] --continue --agent plan
- build 代理:运行 cd [仓库目录] && opencode run [指令/问题] --continue --agent build
Plan 代理行为
- - 要求 Opencode 分析任务。
- 请求制定清晰的逐步计划。
- 允许 Opencode 提出澄清性问题。
- 仔细审查计划。
- 如果计划不正确或不完整:
- 要求 Opencode 进行修改。
Build 代理行为
- - 要求 Opencode 执行已批准的计划。
- 如果 Opencode 提出任何问题:
- 立即切换回 Plan。
- 回答问题并确认计划。
- 切换回 Build。
完成
- - 重复 Plan → Build 循环,直到满足所有用户需求。
- 切勿跳过 Plan。
- 在 Build 阶段切勿回答问题。