Skip to content

fix: register preset-provided namespaced commands#2863

Open
wondr-wclabs wants to merge 1 commit into
github:mainfrom
wondr-wclabs:fix/2862-preset-three-part-commands
Open

fix: register preset-provided namespaced commands#2863
wondr-wclabs wants to merge 1 commit into
github:mainfrom
wondr-wclabs:fix/2862-preset-three-part-commands

Conversation

@wondr-wclabs
Copy link
Copy Markdown

Summary

Fixes #2862.

Preset command registration was treating every speckit.<domain>.<command> name as an extension command override. That made valid preset-provided commands, such as speckit.extendedflow.reviewer, disappear whenever .specify/extensions/<domain>/ did not exist.

This changes the missing-extension guard so it applies only when the preset is actually targeting an extension command:

  • the template explicitly declares replaces: speckit.<ext-id>.<command>; or
  • the template uses a composition strategy (prepend, append, or wrap) that needs a lower-priority base command.

A default replace command with a three-part name and no replaces entry is now treated as preset-provided and is registered normally. The existing extension-override behavior is preserved by making the override tests explicit through replaces.

Validation

  • uv sync --extra test
  • uv run python -m pytest tests/test_presets.py -k "extension_command or three_part_preset_command" -q — 6 passed
  • uv run python -m pytest tests/test_presets.py -q — 273 passed
  • uv run specify --help
  • git diff --check
  • uv run python -m pytest -q — 3576 passed, 45 skipped

AI assistance disclosure

This PR was developed with AI assistance from Codex/ChatGPT for codebase inspection, implementation, and validation. I reviewed the resulting diff and test output before submitting.

@wondr-wclabs wondr-wclabs requested a review from mnriem as a code owner June 5, 2026 04:50
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.

Bug: preset commands with 3-part names (speckit.<domain>.<cmd>) silently skipped during registration

1 participant