mirror of
https://github.com/github/spec-kit.git
synced 2026-07-03 20:36:23 +08:00
* feat: add category and effect as first-class fields in extension schema 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 `category` and `effect` to 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 info` CLI 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> * fix: make category free-form, keep effect validated 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> * fix: address PR review feedback - 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> * fix: update category docstring to reflect free-form semantics Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * docs: clarify canonical extension effect values --------- Co-authored-by: Manfred Riem <mnriem@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Extension Template
Starter template for creating a Spec Kit extension.
Quick Start
-
Copy this template:
cp -r extensions/template my-extension cd my-extension -
Customize
extension.yml:- Change extension ID, name, description
- Update author and repository
- Define your commands
-
Create commands:
- Add command files in
commands/directory - Use Markdown format with YAML frontmatter
- Add command files in
-
Create config template:
- Define configuration options
- Document all settings
-
Write documentation:
- Update README.md with usage instructions
- Add examples
-
Test locally:
cd /path/to/spec-kit-project specify extension add --dev /path/to/my-extension -
Publish (optional):
- Create GitHub repository
- Create release
- Submit to catalog (see EXTENSION-PUBLISHING-GUIDE.md)
Files in This Template
extension.yml- Extension manifest (CUSTOMIZE THIS)config-template.yml- Configuration template (CUSTOMIZE THIS)commands/example.md- Example command (REPLACE THIS)README.md- Extension documentation (REPLACE THIS)LICENSE- MIT License (REVIEW THIS)CHANGELOG.md- Version history (UPDATE THIS).gitignore- Git ignore rules
Customization Checklist
- Update
extension.ymlwith your extension details - Change extension ID to your extension name
- Update author information
- Define your commands
- Create command files in
commands/ - Update config template
- Write README with usage instructions
- Add examples
- Update LICENSE if needed
- Test extension locally
- Create git repository
- Create first release
Need Help?
- Development Guide: See EXTENSION-DEVELOPMENT-GUIDE.md
- API Reference: See EXTENSION-API-REFERENCE.md
- Publishing Guide: See EXTENSION-PUBLISHING-GUIDE.md
- User Guide: See EXTENSION-USER-GUIDE.md
Template Version
- Version: 1.0.0
- Last Updated: 2026-01-28
- Compatible with Spec Kit: >=0.1.0