feat: add category and effect as first-class fields in extension schema by mnriem · Pull Request #2899 · github/spec-kit (original) (raw)
Add category and effect as optional fields in the extension schema
(extension.yml) and community catalog (catalog.community.json).
Schema changes:
- Valid categories: docs, code, process, integration, visibility
- Valid effects: read-only, read-write
- Both fields are optional (backward-compatible with existing extensions)
- Validation raises ValidationError for invalid values when present
Propagation:
- Added
categoryandeffectto all 108 entries in catalog.community.json (populated from the existing docs/community/extensions.md table) - Updated extension template with commented category/effect fields
- Updated add-community-extension skill with new JSON template fields
- Updated
specify extension infoCLI output to display category/effect - Added properties to ExtensionManifest class
Tests:
- test_valid_category: all 5 category values pass
- test_valid_effect: both effect values pass
- test_invalid_category: invalid value raises ValidationError
- test_invalid_effect: invalid value raises ValidationError
- test_category_and_effect_optional: omitting fields still works
Closes #2874
Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com
AI review requested due to automatic review settings
Category is a free-form string (only validated as non-empty when present), while effect remains restricted to 'read-only' or 'read-write'.
Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com
- Add type guard before 'in' check for effect to prevent TypeError on unhashable YAML values (list/dict)
- Comment out category/effect in template so authors must opt in
- Use VALID_EFFECTS constant in test instead of hard-coded values
Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com
Copilot AI review requested due to automatic review settings
Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com
mnriem deleted the mnriem/feat-2874-extension-category-effect-fiel branch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
[ Show hidden characters]({{ revealButtonHref }})