diff --git a/AGENTS.md b/AGENTS.md index 7367e56..46490ff 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -47,3 +47,11 @@ - After changes, run `dotnet build`. If MCP wiring changed, also run the inspector. - Output in Russian. Keep code in English. Keep comments and commit messages in Russian. - If the request is broad or underspecified, ask one short clarifying question first. Otherwise act on the best reasonable assumption. + +### OpenCode: Question First +- Before replying with a prose list of options, use OpenCode `question` whenever there are 2+ meaningful options and the user has not already chosen a direction. +- Apply this aggressively for choices about architecture, config, output format, priorities, naming, and execution direction. +- Skip `question` only when the request is already specific, only one valid answer exists, or the choice is cosmetic and does not affect execution. +- After the user answers, continue immediately and do not restate the same options in prose. +- If `question` is unavailable, ask one short plain-text question. +- If a blocking choice is needed before using a subagent, ask it in the primary agent first. diff --git a/docs/opencode/question-policy.md b/docs/opencode/question-policy.md new file mode 100644 index 0000000..9db1645 --- /dev/null +++ b/docs/opencode/question-policy.md @@ -0,0 +1,26 @@ +# OpenCode Question Policy + +Prefer `question` over prose option lists when clarification will materially change the result. + +## When To Use `question` +- Use it when there are 2+ meaningful and mutually exclusive options. +- Use it when the answer changes architecture, config, output format, naming, priorities, workflow direction, or another blocking implementation choice. +- Ask in the primary agent before delegating to a subagent if the answer must steer delegated work. + +## When Not To Use `question` +- Skip it when the user already gave a specific direction. +- Skip it when only one valid answer exists. +- Skip it when the choice is cosmetic and does not affect execution. + +## How To Ask +- Ask 2-4 options per question. +- Put the recommended option first. +- Keep labels short and descriptions to one sentence each. +- Combine related blocking decisions into one `question` call when possible, with at most 3 questions in the dialog. +- Do not print a prose preface like `Вот варианты:` before calling the tool. +- Do not add an `Other` or `Другое` option unless free-form input is not available; the OpenCode UI already supports custom input. + +## After The Answer +- Continue the task immediately. +- Do not repeat the full option list in prose unless the user asks for a recap. +- If `question` is unavailable, ask one short plain-text question instead. diff --git a/opencode.json b/opencode.json index ab67b11..1060a82 100644 --- a/opencode.json +++ b/opencode.json @@ -2,5 +2,11 @@ "$schema": "https://opencode.ai/config.json", "model": "ollama/qwen3.5-agent", "small_model": "ollama/qwen3.5-agent", - "instructions": [ "AGENTS.md" ] + "instructions": [ + "AGENTS.md", + "docs/opencode/question-policy.md" + ], + "permission": { + "question": "allow" + } }