feat: add --allow-model-invocation flag for agent-orchestrated workflows#2099
Open
srobroek wants to merge 1 commit intogithub:mainfrom
Open
feat: add --allow-model-invocation flag for agent-orchestrated workflows#2099srobroek wants to merge 1 commit intogithub:mainfrom
srobroek wants to merge 1 commit intogithub:mainfrom
Conversation
Add `--allow-model-invocation` flag to `specify init` that controls whether generated SKILL.md files get `disable-model-invocation: false` (allowing the AI model to invoke skills programmatically) or `true` (requiring explicit user invocation). Changes: - Add `--allow-model-invocation` CLI option to `specify init` command - Persist flag in `.specify/init-options.json` - Update `build_skill_frontmatter()` to read `allow_model_invocation` from init-options and conditionally set `disable-model-invocation` - Update `ClaudeIntegration.setup()` to conditionally inject the flag based on the persisted option - Extension and preset installs automatically respect the setting - Add comprehensive test coverage for the new functionality The flag defaults to false (skills disabled for model invocation) to maintain backward compatibility and prevent unexpected behavior. Fixes github#2098
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
--allow-model-invocationflag tospecify init.specify/init-options.jsonbuild_skill_frontmatter()reads the option and conditionally setsdisable-model-invocationImplementation Details
The flag defaults to
false(skills disabled for model invocation) to maintain backward compatibility. When a user runs:The generated SKILL.md files will have
disable-model-invocation: false, allowing the AI model to invoke speckit skills programmatically for agent-orchestrated workflows.Changes
--allow-model-invocationoption tospecify initcommand.specify/init-options.jsonfor consistent behaviorCommandRegistrar.build_skill_frontmatter()now accepts optionalproject_rootparameter and reads init-options to determine the flag valueClaudeIntegration.setup()conditionally injectsdisable-model-invocationbased on the persisted optionTesting
All existing tests pass, plus 4 new tests covering:
build_skill_frontmatter()respects init-options.jsonpytest tests/integrations/test_integration_claude.py::TestAllowModelInvocation -xvs # 4 passedFixes #2098
AI Disclosure (per CONTRIBUTING.md): Claude Code was used for code generation. Changes were reviewed and tested by the submitter.