Skip to content

Commit e2c0f86

Browse files
sidtheoneclaude
authored andcommitted
feat: add configurable interaction_style with platform-specific structured question directives
Add a new `interaction_style` config setting (open/structured) to module.yaml that controls how agents ask questions. When set to "structured", agents use numbered option lists; when "open" (default), they use natural conversation. Platform-specific templates for Claude Code use `AskUserQuestion` tool, Gemini uses `ask_user`, OpenCode uses `question` tool, and default/kiro/ other platforms use generic structured options. Changes: - Add interaction_style to src/core/module.yaml (between output_folder and tool_supports_subagents) - Add RULE directive to all 27+ IDE templates across 7 platforms - Add interaction_style to activation-rules, activation-steps, handlers, workflow.xml, and agent-command-header - Create dedicated Claude Code templates (claude-agent, claude-task, claude-tool, claude-workflow, claude-workflow-yaml) replacing symlinks - Add claude template_type to platform-codes.yaml - Update codex.js installer for claude support - Document interaction_style in install-bmad.md Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent efc69ff commit e2c0f86

45 files changed

Lines changed: 164 additions & 14 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

docs/how-to/install-bmad.md

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,24 @@ Each tool has its own way of integrating commands. The installer creates tiny pr
5757

5858
The installer shows available modules. Select whichever ones you need — most users just want **BMad Method** (the software development module).
5959

60-
### 5. Follow the Prompts
60+
### 5. Configure Settings
6161

62-
The installer guides you through the rest — custom content, settings, etc.
62+
The installer prompts you for core settings that control how agents behave:
63+
64+
| Setting | Default | Description |
65+
| ------- | ------- | ----------- |
66+
| **User Name** | `BMad` | What agents call you — use your name or a team name |
67+
| **Communication Language** | `English` | Language agents use when chatting with you |
68+
| **Document Output Language** | `English` | Language for generated documents and artifacts |
69+
| **Output Folder** | `_bmad-output` | Where agents save generated files |
70+
| **Interaction Style** | `structured` | How agents ask you questions (see below) |
71+
72+
**Interaction Style** controls how agents present choices:
73+
74+
- **Structured** (recommended) — Agents present numbered option lists for every question, using your IDE's native question tool when available. This keeps conversations focused and reduces ambiguity.
75+
- **Open** — Agents ask natural conversational questions. More flexible but can lead to longer back-and-forth.
76+
77+
These settings are saved to `_bmad/<module>/config.yaml` and can be changed later by editing that file and rerunning the installer.
6378

6479
## What You Get
6580

src/core/module.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,16 @@ output_folder:
2424
default: "_bmad-output"
2525
result: "{project-root}/{value}"
2626

27+
interaction_style:
28+
prompt: "How should agents ask you questions?"
29+
default: "open"
30+
result: "{value}"
31+
single-select:
32+
- value: "open"
33+
label: "Open - Natural conversational questions (recommended)"
34+
- value: "structured"
35+
label: "Structured - Numbered option lists"
36+
2737
tool_supports_subagents:
2838
prompt: "Subagents are supported by the LLM or Tool I will be using?"
2939
default: true

src/core/tasks/workflow.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
<objective>Execute given workflow by loading its configuration, following instructions, and producing output</objective>
33

44
<llm critical="true">
5+
<mandate>RULE: Check your stored {interaction_style} session variable from activation step 2. When its value is "structured", EVERY question to the user MUST use the native question tool. No exceptions. No inline prompts. When {interaction_style} is "open", ask questions naturally in conversation. If you cannot determine {interaction_style}, default to open mode.</mandate>
56
<mandate>Always read COMPLETE files - NEVER use offset/limit when reading any workflow related files</mandate>
67
<mandate>Instructions are MANDATORY - either as file path, steps or embedded list in YAML, XML or markdown</mandate>
78
<mandate>Execute ALL steps in instructions IN EXACT ORDER</mandate>

src/utility/agent-components/activation-rules.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<rules>
22
<r>ALWAYS communicate in {communication_language} UNLESS contradicted by communication_style.</r>
3+
<r>Check your stored {interaction_style} session variable from activation step 2. When its value is "structured", EVERY question to the user MUST use structured options with a numbered list unless the workflow or user explicitly requests free-form input. If you cannot determine {interaction_style}, default to open mode.</r>
34
<r> Stay in character until exit selected</r>
45
<r> Display Menu items as the item dictates and in the order given.</r>
56
<r> Load files ONLY when executing a user chosen workflow or a command requires it, EXCEPTION: agent activation step 2 config.yaml</r>

src/utility/agent-components/activation-steps.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<step n="1">Load persona from this current agent file (already in context)</step>
22
<step n="2">🚨 IMMEDIATE ACTION REQUIRED - BEFORE ANY OUTPUT:
33
- Load and read {project-root}/_bmad/{{module}}/config.yaml NOW
4-
- Store ALL fields as session variables: {user_name}, {communication_language}, {output_folder}
4+
- Store ALL fields as session variables: {user_name}, {communication_language}, {output_folder}, {interaction_style}, {document_output_language}
55
- VERIFY: If config not loaded, STOP and report error to user
66
- DO NOT PROCEED to step 3 until config is successfully loaded and variables stored
77
</step>
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
You must fully embody this agent's persona and follow all activation instructions, steps and rules exactly as specified. NEVER break character until given an exit command.
2+
3+
RULE: Check your stored {interaction_style} session variable from activation step 2. When its value is "structured", EVERY question to the user MUST call the AskUserQuestion tool. Do NOT write questions as plain text. No exceptions. If you cannot determine {interaction_style}, default to open mode.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<handler type="action">
22
When menu item has: action="#id" → Find prompt with id="id" in current agent XML, follow its content
33
When menu item has: action="text" → Follow the text directly as an inline instruction
4+
RULE: Check your stored {interaction_style} session variable from activation step 2. When its value is "structured", ALL questions to the user MUST use the AskUserQuestion tool. No plain text prompts. If you cannot determine {interaction_style}, default to open mode.
45
</handler>

src/utility/agent-components/handler-exec.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@
33
1. Read fully and follow the file at that path
44
2. Process the complete file and follow all instructions within it
55
3. If there is data="some/path/data-foo.md" with the same item, pass that data path to the executed file as context.
6+
4. RULE: Check your stored {interaction_style} session variable from activation step 2. When its value is "structured", ALL questions to the user MUST use the AskUserQuestion tool. No plain text prompts. If you cannot determine {interaction_style}, default to open mode.
67
</handler>

src/utility/agent-components/handler-multi.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,5 @@
1010
- For workflow="path/to/workflow.yaml": follow the `handler type="workflow"` instructions
1111
- For action="...": Perform the specified action directly
1212
5. Support both exact matches and fuzzy matching based on the match attribute
13-
6. If no handler matches, prompt user to choose from available options
13+
6. If no handler matches, prompt user to choose from available options using the AskUserQuestion tool when interaction_style is "structured"
1414
</handler>

src/utility/agent-components/handler-validate-workflow.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
1. You MUST LOAD the file at: {project-root}/_bmad/core/tasks/validate-workflow.xml
44
2. READ its entire contents and EXECUTE all instructions in that file
55
3. Pass the workflow, and also check the workflow yaml validation property to find and load the validation schema to pass as the checklist
6-
4. The workflow should try to identify the file to validate based on checklist context or else you will ask the user to specify
6+
4. The workflow should try to identify the file to validate based on checklist context or else ask the user to specify using the AskUserQuestion tool when interaction_style is "structured"
77
</handler>

0 commit comments

Comments
 (0)