Skip to content

fix: add disable-model-invocation to all generated slash commands#1501

Merged
bmadcode merged 2 commits intobmad-code-org:mainfrom
alexeyv:fix/disable-model-invocation-slash-commands
Jan 31, 2026
Merged

fix: add disable-model-invocation to all generated slash commands#1501
bmadcode merged 2 commits intobmad-code-org:mainfrom
alexeyv:fix/disable-model-invocation-slash-commands

Conversation

@alexeyv
Copy link
Copy Markdown
Collaborator

@alexeyv alexeyv commented Jan 31, 2026

Summary

  • Adds disable-model-invocation: true to YAML frontmatter in all generated slash commands (agents, workflows, tasks/tools)
  • Prevents Claude from auto-invoking BMad skills without explicit user request — these are interactive workflows with side effects that should only run when the user deliberately triggers them
  • Covers all Claude Code templates, Codex templates, Anti-Gravity templates, and inline generators (task-tool-command-generator.js, codex.js, _config-driven.js)
  • Skips non-Claude-Code platforms (Gemini TOML, Windsurf) where this field is not applicable

Testing

  • Claude Code: Tested with a subagent prompt designed to trigger skill auto-invocation. Claude correctly identified all matching skills but did not invoke any — waited for explicit user instruction instead.
  • Anti-Gravity: Says it would respect this constraint, but in practice it is a gray area — as expected.
  • Codex: Could not test — Codex installer is currently broken.

Test plan

  • Run npm run test — all tests pass
  • Install to a fresh project with Claude Code and verify generated commands contain disable-model-invocation: true
  • Install to a fresh project with Anti-Gravity and verify generated commands contain disable-model-invocation: true
  • Verify Claude Code does not auto-invoke any BMad skill in a new session

Prevents Claude from auto-invoking BMad skills without explicit user
request. Adds disable-model-invocation: true frontmatter to all
command templates and inline generators for Claude Code and Codex.
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Jan 31, 2026

📝 Walkthrough

Walkthrough

This pull request adds a disable-model-invocation: true front-matter flag consistently across multiple IDE template and generator configuration files to disable model invocation by default in generated content.

Changes

Cohort / File(s) Summary
Core Generators & Config
tools/cli/installers/lib/ide/_config-driven.js, codex.js, shared/task-tool-command-generator.js
Added disable-model-invocation: true to YAML front-matter in generator and configuration files that produce or configure template content.
Template Files - Default Agents & Workflows
tools/cli/installers/lib/ide/templates/combined/default-agent.md, combined/default-workflow-yaml.md, combined/default-workflow.md
Added disable-model-invocation: true front-matter flag to default agent and workflow templates.
Template Files - Commands & Workflows
tools/cli/installers/lib/ide/templates/agent-command-template.md, workflow-command-template.md, workflow-commander.md
Added disable-model-invocation: true front-matter flag to command and workflow command templates.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Suggested reviewers

  • bmadcode
🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: adding a disable-model-invocation flag to all generated slash commands across templates and generators.
Description check ✅ Passed The description is clearly related to the changeset, providing context about why the flag is being added and how it prevents unintended model invocation.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@alexeyv
Copy link
Copy Markdown
Collaborator Author

alexeyv commented Jan 31, 2026

@CodeRabbit review

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Jan 31, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@bmadcode bmadcode merged commit 5322042 into bmad-code-org:main Jan 31, 2026
5 checks passed
bmadcode pushed a commit that referenced this pull request Feb 1, 2026
### 🎁 Features
* Add generate-project-context workflow
* Shard market research customer analysis

### 🐛 Bug Fixes
* Fix npm install peer dependency issues (PR #1476)
* Fix leaked source paths in PRD validation report (#1481)
* Fix orphaned market research customer analysis (#1486)
* Fix duplicate 2-letter brainstorming code (BS → BSP)
* Fix tech writer sidecar functionality (#1487)
* Fix relative paths in workflow steps (#1497, #1498)
* Fix party-mode workflow file extension (#1499)
* Fix generated slash commands (#1501)
* Fix agent scan and help CSV files
* Fix HELP_STEP placeholder replacement (#1437)

### 📚 Documentation
* Add exact slash commands to Getting Started guide (#1505)
* Remove .claude/commands from version control (#1506)

### 🔧 Maintenance
* Update Starlight to 0.37.5
* Add GitHub issue templates
dickymoore pushed a commit to dickymoore/BMAD-METHOD that referenced this pull request Feb 6, 2026
…ad-code-org#1501)

Prevents Claude from auto-invoking BMad skills without explicit user
request. Adds disable-model-invocation: true frontmatter to all
command templates and inline generators for Claude Code and Codex.

Co-authored-by: Brian <bmadcode@gmail.com>
dickymoore pushed a commit to dickymoore/BMAD-METHOD that referenced this pull request Feb 6, 2026
### 🎁 Features
* Add generate-project-context workflow
* Shard market research customer analysis

### 🐛 Bug Fixes
* Fix npm install peer dependency issues (PR bmad-code-org#1476)
* Fix leaked source paths in PRD validation report (bmad-code-org#1481)
* Fix orphaned market research customer analysis (bmad-code-org#1486)
* Fix duplicate 2-letter brainstorming code (BS → BSP)
* Fix tech writer sidecar functionality (bmad-code-org#1487)
* Fix relative paths in workflow steps (bmad-code-org#1497, bmad-code-org#1498)
* Fix party-mode workflow file extension (bmad-code-org#1499)
* Fix generated slash commands (bmad-code-org#1501)
* Fix agent scan and help CSV files
* Fix HELP_STEP placeholder replacement (bmad-code-org#1437)

### 📚 Documentation
* Add exact slash commands to Getting Started guide (bmad-code-org#1505)
* Remove .claude/commands from version control (bmad-code-org#1506)

### 🔧 Maintenance
* Update Starlight to 0.37.5
* Add GitHub issue templates
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants