Support Spec Kit workflows in the release zips, catalogs and install check

Merged
PO
14d ago
+121-21

What has been implemented

The release build, the catalogs and the install check handle Spec Kit workflows, so that a bundle can install workflows from the opsmill catalogs, as it installs extensions and presets.

  • A workflow in workflows/<id>/ gets its own zip and an entry in catalog/workflow-catalog.json.
  • Projects declare the opsmill workflow catalog in .specify/workflow-catalogs.yml, with the other catalog files.
  • The install check checks that each workflow a bundle pins is installed at that version, and that Spec Kit loads it.

Before: what a bundle can install from the opsmill catalogs

The release build and the catalogs handle extensions, presets and bundles. A bundle cannot pin a workflow: a workflow has no zip and no catalog entry.

flowchart LR
	B["bundle opsmill-sdd"] --> E["extension-catalog.json"]
	B --> P["preset-catalog.json"]
	B -.-> W["workflow:<br>no zip, no catalog entry"]
	classDef ext fill:#dcfce7,stroke:#16a34a,color:#14532d
	classDef preset fill:#ffedd5,stroke:#ea580c,color:#7c2d12
	classDef bad fill:#fee2e2,stroke:#dc2626,color:#7f1d1d
	class E ext
	class P preset
	class W bad

After: how a workflow reaches a project

A workflow follows the same path as an extension or a preset, from its folder to the project, and the install check covers it.

flowchart LR
	W["workflows/ID/workflow.yml"] --> Z["zip ID-VERSION.zip"]
	Z --> C["catalog/workflow-catalog.json<br>url and requires"]
	C --> D["project:<br>.specify/workflow-catalogs.yml"]
	D --> I["specify bundle install"]
	I --> K{"install check"}
	K --> K1["installed at the<br>pinned version"]
	K --> K2["Spec Kit loads<br>the workflow"]
	classDef workflow fill:#dcfce7,stroke:#16a34a,color:#14532d
	classDef good fill:#dcfce7,stroke:#16a34a,color:#14532d
	class W,Z,C workflow
	class K1,K2 good

How a workflow entry differs from the other catalog entries

  • The zip URL is in url, not download_url (Spec Kit workflows reference).
  • The entry's requires must be the workflow's whole requires. Spec Kit 1.2.4 refuses the install otherwise, with "Downloaded workflow requirements do not match the selected catalog release".

Folders structure

  • catalog/workflow-catalog.json and catalog/specify/workflow-catalogs.yml: the workflow catalog and the file that a project copies, new
  • .github/scripts/repo/: the Workflow component class
  • .github/scripts/install_check/: checks the workflows that a bundle installs

How to review

  1. 9e61711 adds workflows to the component classes, the catalogs and the install check, and documents the new catalog file. No repo component has a workflow yet: #41 adds them. To review.

šŸ¤– Generated with Claude Code