spec-kit icon indicating copy to clipboard operation
spec-kit copied to clipboard

Add Claude no-model-invocation integration option

Open wondr-wclabs opened this issue 5 months ago • 0 comments

Fixes #2654.

Summary

Adds a Claude-specific --no-model-invocation integration option so users can install Spec Kit's Claude skills as user-invocable only:

specify init my-project --integration claude --integration-options="--no-model-invocation"

The option defaults to the current behavior, so generated Claude skills still use disable-model-invocation: false unless the flag is explicitly supplied.

Rationale

The main issue in #2654 is Claude's skill-listing budget in larger monorepos. Only changing the core Claude setup() path would leave skills generated later by the bundled agent-context extension, extension commands, or preset overrides as model-invocable, which partially defeats the opt-out. This threads parsed integration options through shared skill post-processing so the same Claude flag is applied consistently to:

  • core Spec Kit Claude skills generated during init/upgrade
  • bundled extension skills such as speckit-agent-context-update
  • extension and preset-generated SKILL.md files

The raw and parsed integration options are also mirrored into init-options.json, while integration.json remains the structured integration-state source used by install/upgrade/switch flows. That lets later skill writers read the active option without needing to know the integration-state schema directly.

Validation

  • uv sync --extra test
  • uv run python -m pytest tests/integrations/test_integration_claude.py -q
  • uv run python -m pytest tests/test_extension_skills.py -k "no_model_invocation or skill_md_has_parseable_yaml" -q
  • uv run python -m pytest tests/integrations/test_integration_subcommand.py -q
  • uv run python -m pytest tests/test_extension_skills.py -q
  • uv run python -m pytest tests/integrations/test_integration_copilot.py tests/integrations/test_integration_base_skills.py -q
  • uv run python -m pytest tests/test_presets.py -q
  • uv run specify --help
  • git diff --check
  • uv run python -m pytest -q (3609 passed, 45 skipped)

AI disclosure

This PR was developed with assistance from OpenAI Codex. I reviewed the implementation and validation results before submitting.

wondr-wclabs avatar Jun 05 '26 10:06 wondr-wclabs