Refactoring: Describe the repo's components in a module shared by the CI scripts
Merged
PO
14d ago+315+315+012345678901234567890123456789-218-218-012345678901234567890123456789
What has been implemented
The CI scripts read the repo's extension, presets and bundles through one shared module, so that the install check and the release build in #30 use the same description of each component.
Before: code dependencies on the manifests
The install check reads the manifests with its own classes, and the other scripts import its helpers.
flowchart LR
subgraph IC["install_check/"]
R["repo.py<br>YamlFile, Manifests, SpeckitFloor"]
C["components.py<br>Extension, Preset, Bundle<br>read their manifest, install, check"]
end
A["repo_audit/, audit_repos.py,<br>check_install.py"] --> R
C --> R
R --> M[("extension.yml<br>preset.yml<br>bundle.yml")]
C --> M
classDef install fill:#ffedd5,stroke:#ea580c,color:#7c2d12
class R,C install
After: code dependencies on the shared module
One module describes each component. The install check, the audit and the release build in #30 read it.
flowchart LR
subgraph REPO["repo/"]
CO["components.py<br>Component: Extension, Preset, Bundle"]
F["files.py<br>YamlFile, FrontMatter, Snapshot"]
end
IC["install_check/<br>ExtensionInstall, PresetInstall, BundleInstall"] --> CO
A["repo_audit/, check_install.py<br>SpeckitFloor"] --> CO
D["distribution/ in #30<br>zips and catalogs"] -.-> CO
CO --> F
F --> M[("extension.yml<br>preset.yml<br>bundle.yml")]
classDef shared fill:#dcfce7,stroke:#16a34a,color:#14532d
class CO,F shared
Structure
Component classes
Component is abstract. Each subclass gives its kind, its manifest key and its commands:
| Class | Manifest | Folder | Commands |
|---|---|---|---|
Extension | extension.yml | the repo root | provides.commands |
Preset | presets/<id>/preset.yml | presets/<id>/ | its templates of type command |
Bundle | bundles/<id>/bundle.yml | bundles/<id>/ | none |
#30 adds to these classes the files of each zip and what each component provides.
CI
No change of behaviour: the install check installs and checks the same components as before, on the minimum Spec Kit version.
Folders structure
.github/scripts/repo/: the component classes and the file readers, new.github/scripts/install_check/: builds its checks from the component classes;SpeckitFloormoves tospeckit.py.github/scripts/tests/components/: the tests ofComponentsandSnapshot, new
How to review
Read the commits in order:
- 9a25459 moves
YamlFile,FrontMatterandSnapshotfrominstall_check/repo.pytorepo/files.py, unchanged. To skim. - ac9c76d adds the abstract
ComponentwithExtension,PresetandBundle, andComponents, which lists them in a repo.SpeckitFloornow reads these classes. To review closely. - 73b6c2a makes the install check build its checks from these classes, with
ExtensionInstall,PresetInstallandBundleInstall, and removesManifests. To review.
š¤ Generated with Claude Code