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

fix(workflows): expose workflow/step catalog add metadata options

Open WOLIKIMCHENG opened this issue 4 months ago • 4 comments

Description

workflow catalog add and workflow step catalog add only exposed url and optional --name, even though the underlying workflow/step catalog config already supports priority, install_allowed, and description, and the sibling preset/extension catalog commands already expose those knobs.

This change keeps the fix narrow:

  • add --priority, --install-allowed/--no-install-allowed, and --description to both workflow catalog add commands
  • extend WorkflowCatalog.add_catalog() and StepCatalog.add_catalog() with backward-compatible optional overrides
  • preserve existing workflow/step defaults when callers do not pass overrides:
    • priority still defaults to max + 1
    • install_allowed still defaults to true
    • description still defaults to an empty string

Testing

  • uv run specify --help
  • .venv/bin/python -m pytest tests/test_workflows.py -k "WorkflowCatalog or StepCatalog" -v — 37 passed
  • .venv/bin/specify workflow catalog add --help
  • .venv/bin/specify workflow step catalog add --help

WOLIKIMCHENG avatar Jul 07 '26 04:07 WOLIKIMCHENG

Addressed the priority validation feedback in the latest commit. Workflow and step catalog priority overrides are now normalized before persistence, and I added regression coverage for both add and load paths.

WOLIKIMCHENG avatar Jul 10 '26 06:07 WOLIKIMCHENG

Addressed the remaining Copilot feedback by widening WorkflowCatalog.add_catalog and StepCatalog.add_catalog priority annotations to int | str | None, matching the existing numeric-string normalization behavior.

WOLIKIMCHENG avatar Jul 11 '26 13:07 WOLIKIMCHENG

Updated the branch with latest main and addressed the Copilot feedback around catalog metadata argument passing, priority normalization, bool rejection, and priority type annotations.

WOLIKIMCHENG avatar Jul 13 '26 07:07 WOLIKIMCHENG

Please address Copilot feedback

mnriem avatar Jul 13 '26 19:07 mnriem

Addressed the remaining Copilot docs feedback for workflow catalog add.

Updated docs/reference/workflows.md to document:

  • --priority <N>
  • --install-allowed / --no-install-allowed
  • --description <text>

This keeps the workflow reference aligned with the current CLI and with the existing catalog option tables in the presets/extensions docs.

WOLIKIMCHENG avatar Jul 14 '26 02:07 WOLIKIMCHENG

Please address Copilot feedback

mnriem avatar Jul 14 '26 13:07 mnriem

Closing this because #3419 superseded the workflow catalog metadata CLI option portion of this PR.

The remaining catalog priority validation concern is now covered separately in #3526, so I’m not going to keep this broader PR open.

WOLIKIMCHENG avatar Jul 15 '26 07:07 WOLIKIMCHENG