From 85e81389ee3d72e0530f8cd877580f511ee2e32f Mon Sep 17 00:00:00 2001 From: sidtheone Date: Sat, 28 Feb 2026 12:36:54 +0100 Subject: [PATCH] feat: add dedicated Claude Code templates with AskUserQuestion tool Create claude-specific template set (agent, task, tool, workflow, workflow-yaml) that explicitly references the `AskUserQuestion` tool, matching how gemini/kiro/opencode each have their own templates with IDE-specific tool names. - Change Claude Code template_type from "default" to "claude" in platform-codes.yaml - Replace symlinks with real template files - Create new claude-task.md and claude-tool.md - default-* templates remain as generic fallbacks for cursor, auggie, and other IDEs using numbered-list wording - Fix default-tool.md RULE placement (move before execution instructions) Co-Authored-By: Claude Opus 4.6 --- .../cli/installers/lib/ide/platform-codes.yaml | 2 +- .../lib/ide/templates/combined/claude-agent.md | 18 +++++++++++++++++- .../lib/ide/templates/combined/claude-task.md | 12 ++++++++++++ .../lib/ide/templates/combined/claude-tool.md | 12 ++++++++++++ .../templates/combined/claude-workflow-yaml.md | 17 ++++++++++++++++- .../ide/templates/combined/claude-workflow.md | 9 ++++++++- .../lib/ide/templates/combined/default-tool.md | 4 ++-- 7 files changed, 68 insertions(+), 6 deletions(-) mode change 120000 => 100644 tools/cli/installers/lib/ide/templates/combined/claude-agent.md create mode 100644 tools/cli/installers/lib/ide/templates/combined/claude-task.md create mode 100644 tools/cli/installers/lib/ide/templates/combined/claude-tool.md mode change 120000 => 100644 tools/cli/installers/lib/ide/templates/combined/claude-workflow-yaml.md mode change 120000 => 100644 tools/cli/installers/lib/ide/templates/combined/claude-workflow.md diff --git a/tools/cli/installers/lib/ide/platform-codes.yaml b/tools/cli/installers/lib/ide/platform-codes.yaml index 4e6ca8070..b8881216b 100644 --- a/tools/cli/installers/lib/ide/platform-codes.yaml +++ b/tools/cli/installers/lib/ide/platform-codes.yaml @@ -39,7 +39,7 @@ platforms: description: "Anthropic's official CLI for Claude" installer: target_dir: .claude/commands - template_type: default + template_type: claude ancestor_conflict_check: true cline: diff --git a/tools/cli/installers/lib/ide/templates/combined/claude-agent.md b/tools/cli/installers/lib/ide/templates/combined/claude-agent.md deleted file mode 120000 index 9f6c17b45..000000000 --- a/tools/cli/installers/lib/ide/templates/combined/claude-agent.md +++ /dev/null @@ -1 +0,0 @@ -default-agent.md \ No newline at end of file diff --git a/tools/cli/installers/lib/ide/templates/combined/claude-agent.md b/tools/cli/installers/lib/ide/templates/combined/claude-agent.md new file mode 100644 index 000000000..858d41276 --- /dev/null +++ b/tools/cli/installers/lib/ide/templates/combined/claude-agent.md @@ -0,0 +1,17 @@ +--- +name: '{{name}}' +description: '{{description}}' +--- + +You must fully embody this agent's persona and follow all activation instructions exactly as specified. NEVER break character until given an exit command. + +RULE: When interaction_style is "structured", EVERY question to the user MUST call the `AskUserQuestion` tool unless the workflow or user explicitly requests free-form input. + + +1. LOAD the FULL agent file from {project-root}/{{bmadFolderName}}/{{path}} +2. READ its entire contents - this contains the complete agent persona, menu, and instructions +3. FOLLOW every step in the section precisely +4. DISPLAY the welcome/greeting as instructed +5. PRESENT the numbered menu +6. WAIT for user input before proceeding + diff --git a/tools/cli/installers/lib/ide/templates/combined/claude-task.md b/tools/cli/installers/lib/ide/templates/combined/claude-task.md new file mode 100644 index 000000000..80cfb07cf --- /dev/null +++ b/tools/cli/installers/lib/ide/templates/combined/claude-task.md @@ -0,0 +1,12 @@ +--- +name: '{{name}}' +description: '{{description}}' +--- + +# {{name}} + +RULE: When interaction_style is "structured", EVERY question to the user MUST call the `AskUserQuestion` tool unless the workflow or user explicitly requests free-form input. + +Read the entire task file at: {project-root}/{{bmadFolderName}}/{{path}} + +Follow all instructions in the task file exactly as written. diff --git a/tools/cli/installers/lib/ide/templates/combined/claude-tool.md b/tools/cli/installers/lib/ide/templates/combined/claude-tool.md new file mode 100644 index 000000000..bbd4637ae --- /dev/null +++ b/tools/cli/installers/lib/ide/templates/combined/claude-tool.md @@ -0,0 +1,12 @@ +--- +name: '{{name}}' +description: '{{description}}' +--- + +# {{name}} + +RULE: When interaction_style is "structured", EVERY question to the user MUST call the `AskUserQuestion` tool unless the workflow or user explicitly requests free-form input. + +Read the entire tool file at: {project-root}/{{bmadFolderName}}/{{path}} + +Follow all instructions in the tool file exactly as written. diff --git a/tools/cli/installers/lib/ide/templates/combined/claude-workflow-yaml.md b/tools/cli/installers/lib/ide/templates/combined/claude-workflow-yaml.md deleted file mode 120000 index 11f78e1d4..000000000 --- a/tools/cli/installers/lib/ide/templates/combined/claude-workflow-yaml.md +++ /dev/null @@ -1 +0,0 @@ -default-workflow-yaml.md \ No newline at end of file diff --git a/tools/cli/installers/lib/ide/templates/combined/claude-workflow-yaml.md b/tools/cli/installers/lib/ide/templates/combined/claude-workflow-yaml.md new file mode 100644 index 000000000..9345f5462 --- /dev/null +++ b/tools/cli/installers/lib/ide/templates/combined/claude-workflow-yaml.md @@ -0,0 +1,16 @@ +--- +name: '{{name}}' +description: '{{description}}' +--- + +RULE: When interaction_style is "structured", EVERY question to the user MUST call the `AskUserQuestion` tool unless the workflow or user explicitly requests free-form input. + +IT IS CRITICAL THAT YOU FOLLOW THESE STEPS - while staying in character as the current agent persona you may have loaded: + + +1. Always LOAD the FULL @{project-root}/{{bmadFolderName}}/core/tasks/workflow.xml +2. READ its entire contents - this is the CORE OS for EXECUTING the specific workflow-config @{project-root}/{{bmadFolderName}}/{{path}} +3. Pass the yaml path @{project-root}/{{bmadFolderName}}/{{path}} as 'workflow-config' parameter to the workflow.xml instructions +4. Follow workflow.xml instructions EXACTLY as written to process and follow the specific workflow config and its instructions +5. Save outputs after EACH section when generating any documents from templates + diff --git a/tools/cli/installers/lib/ide/templates/combined/claude-workflow.md b/tools/cli/installers/lib/ide/templates/combined/claude-workflow.md deleted file mode 120000 index 8d4ae5238..000000000 --- a/tools/cli/installers/lib/ide/templates/combined/claude-workflow.md +++ /dev/null @@ -1 +0,0 @@ -default-workflow.md \ No newline at end of file diff --git a/tools/cli/installers/lib/ide/templates/combined/claude-workflow.md b/tools/cli/installers/lib/ide/templates/combined/claude-workflow.md new file mode 100644 index 000000000..375d7c261 --- /dev/null +++ b/tools/cli/installers/lib/ide/templates/combined/claude-workflow.md @@ -0,0 +1,8 @@ +--- +name: '{{name}}' +description: '{{description}}' +--- + +RULE: When interaction_style is "structured", EVERY question to the user MUST call the `AskUserQuestion` tool unless the workflow or user explicitly requests free-form input. + +IT IS CRITICAL THAT YOU FOLLOW THIS COMMAND: LOAD the FULL @{project-root}/{{bmadFolderName}}/{{path}}, READ its entire contents and follow its directions exactly! diff --git a/tools/cli/installers/lib/ide/templates/combined/default-tool.md b/tools/cli/installers/lib/ide/templates/combined/default-tool.md index 7de248337..8e217cfe1 100644 --- a/tools/cli/installers/lib/ide/templates/combined/default-tool.md +++ b/tools/cli/installers/lib/ide/templates/combined/default-tool.md @@ -5,8 +5,8 @@ description: '{{description}}' # {{name}} +RULE: When interaction_style is "structured", questions to the user MUST use structured options with a numbered list unless the workflow or user explicitly requests free-form input. + Read the entire tool file at: {project-root}/{{bmadFolderName}}/{{path}} Follow all instructions in the tool file exactly as written. - -RULE: When interaction_style is "structured", questions to the user MUST use structured options with a numbered list unless the workflow or user explicitly requests free-form input.