Skip to content

Commit 40e48ed

Browse files
mnriemCopilotCopilot
authored
feat: add category and effect as first-class fields in extension schema (#2899)
* 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>
1 parent 45b88f6 commit 40e48ed

7 files changed

Lines changed: 340 additions & 7 deletions

File tree

.github/skills/add-community-extension/SKILL.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,8 @@ Use the existing entries as the format template. Required fields:
7070
"documentation": "<documentation>",
7171
"changelog": "<changelog>",
7272
"license": "<license>",
73+
"category": "<category>",
74+
"effect": "<effect>",
7375
"requires": {
7476
"speckit_version": "<speckit_version>"
7577
},
@@ -87,6 +89,9 @@ Use the existing entries as the format template. Required fields:
8789
}
8890
```
8991

92+
**Category** — free-form string; common values: `docs`, `code`, `process`, `integration`, `visibility`
93+
**Effect** — one of: `read-only`, `read-write`
94+
9095
If the extension has optional tool dependencies, add a `"tools"` array inside `"requires"`:
9196

9297
```json
@@ -113,8 +118,8 @@ Determine the category and effect from the extension's behavior:
113118
| <Name> | <Description> | `<category>` | <Effect> | [<repo-name>](<repository-url>) |
114119
```
115120

116-
**Category**one of: `docs`, `code`, `process`, `integration`, `visibility`
117-
**Effect**`Read-only` (produces reports only) or `Read+Write` (modifies project files)
121+
**Category**free-form; common values: `docs`, `code`, `process`, `integration`, `visibility`
122+
**Effect**write canonical values `read-only` or `read-write` in `extension.yml` and `catalog.community.json`; use `Read-only`/`Read+Write` only for the docs table display
118123

119124
### 6. Commit, push, and open PR
120125

docs/community/extensions.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,21 @@
77

88
The following community-contributed extensions are available in [`catalog.community.json`](https://github.com/github/spec-kit/blob/main/extensions/catalog.community.json):
99

10-
**Categories:**
10+
**Categories** (common values, but any string is allowed):
1111

1212
- `docs` — reads, validates, or generates spec artifacts
1313
- `code` — reviews, validates, or modifies source code
1414
- `process` — orchestrates workflow across phases
1515
- `integration` — syncs with external platforms
1616
- `visibility` — reports on project health or progress
1717

18-
**Effect:**
18+
**Effect** (canonical `extension.yml`/catalog values):
1919

20-
- `Read-only` — produces reports without modifying files
21-
- `Read+Write` — modifies files, creates artifacts, or updates specs
20+
- `read-only` — produces reports without modifying files (displayed as `Read-only` in the table)
21+
- `read-write` — modifies files, creates artifacts, or updates specs (displayed as `Read+Write` in the table)
22+
23+
> [!TIP]
24+
> Extension authors can declare `category` and `effect` in their `extension.yml` under the `extension:` block. These fields are also available in `catalog.community.json` for tooling and the CLI (`specify extension info`).
2225
2326
| Extension | Purpose | Category | Effect | URL |
2427
|-----------|---------|----------|--------|-----|

0 commit comments

Comments
 (0)