Skip to content

Commit 956727e

Browse files
committed
Merge upstream/main (v0.5.1) - preserve fork customizations
2 parents 99af8cc + 2972dec commit 956727e

53 files changed

Lines changed: 4087 additions & 101 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,16 @@ All notable changes to the Specify CLI and templates are documented here.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to to [Semantic Versioning](https://semver.org/spec/v2.0.0/).
77

8+
## [0.4.0] - 2026-04-08
9+
10+
### Changed
11+
12+
- **Upstream merge**: Synced with github/spec-kit (v0.5.1)
13+
- Added git extension stage 2 (GIT_BRANCH_NAME override, --force, auto-install tests)
14+
- Added Branch Convention community extension
15+
- Fixed alias compatibility for community extensions
16+
- **Test fixes**: Updated tests to match upstream validation messages and behavior
17+
818
## [0.3.11] - 2026-04-04
919

1020
### Added

FORK.md

Lines changed: 73 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,4 +371,76 @@ uv run pytest
371371
uv run pytest
372372
```
373373
3. **Check for conflicts**: `grep -rn "<<<<<<" src/`
374-
4. **Review recent changes**: `git log --oneline -10`
374+
4. **Review recent changes**: `git log --oneline -10`
375+
376+
## Post-Merge Issues and Fixes
377+
378+
This section documents issues encountered during upstream merges and how to resolve them.
379+
380+
### Issue 1: Duplicate Validation Code Blocks
381+
382+
**Problem**: During merge conflict resolution in `extensions.py`, the validation logic was duplicated - resulting in two blocks of similar code where only one should exist.
383+
384+
**Location**: `src/specify_cli/extensions.py` lines ~569-625
385+
386+
**Symptom**: Tests failed with:
387+
```
388+
ValidationError: Invalid command 'speckit.git.feature': must follow pattern '{extension}.{command}'
389+
```
390+
391+
**Root Cause**: The conflict resolution kept both "ours" and "theirs" versions of the validation code, creating a second block that incorrectly validated commands using the alias pattern instead of the command pattern.
392+
393+
**Fix**: Remove the duplicate validation block (the second one that re-validates using alias pattern).
394+
395+
**Prevention**: After any merge with conflicts in `extensions.py`:
396+
- Search for duplicate code blocks: `grep -n "if kind ==" src/specify_cli/extensions.py`
397+
- Verify both command and alias patterns work correctly
398+
399+
### Issue 2: Alias Namespace Strictness
400+
401+
**Problem**: After fixing the duplicate code, aliases like `speckit.shortcut` failed because the namespace check expected aliases to match the extension ID exactly.
402+
403+
**Symptom**:
404+
```
405+
ValidationError: Alias 'speckit.shortcut' must use extension namespace 'alias-shortcut'
406+
```
407+
408+
**Root Cause**: The validation logic applied namespace checking to aliases with the same strictness as commands, but aliases can use any prefix (they're short-form alternatives).
409+
410+
**Fix**: Only apply namespace validation to commands, not aliases:
411+
```python
412+
# Skip namespace validation for aliases - they can use any prefix
413+
if kind == "command":
414+
if namespace != manifest.id:
415+
raise ValidationError(...)
416+
```
417+
418+
### Issue 3: Test Message Mismatches
419+
420+
**Problem**: Tests failed because upstream changed validation error messages.
421+
422+
**Examples**:
423+
- "must provide at least one command" → "must provide at least one command or hook"
424+
- Fork allowed short aliases, upstream rejected them
425+
426+
**Fix**:
427+
- Update test assertions to match current validation messages
428+
- Change test behavior to match fork's intended functionality (e.g., allow short aliases)
429+
430+
### Verification Commands
431+
432+
After any merge, always verify:
433+
```bash
434+
# Verify patterns
435+
python3 -c "
436+
from src.specify_cli import ACCENT_COLOR
437+
from src.specify_cli.extensions import EXTENSION_COMMAND_NAME_PATTERN
438+
print('ACCENT_COLOR:', ACCENT_COLOR)
439+
print('Pattern:', EXTENSION_COMMAND_NAME_PATTERN.pattern)
440+
"
441+
# Expected: ACCENT_COLOR: #f47721
442+
# Expected: Pattern: ^(?:speckit|adlc)\.([a-z0-9-]+)\.([a-z0-9-]+)$
443+
444+
# Run tests
445+
uv run pytest tests/test_extensions.py -v
446+
```

extensions/EXTENSION-API-REFERENCE.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ defaults: # Optional, default configuration values
108108
#### `hooks`
109109

110110
- **Type**: object
111-
- **Keys**: Event names (e.g., `after_specify`, `after_plan`, `after_tasks`, `after_implement`, `before_commit`)
111+
- **Keys**: Event names (e.g., `after_specify`, `after_plan`, `after_tasks`, `after_implement`, `before_analyze`)
112112
- **Description**: Hooks that execute at lifecycle events
113113
- **Events**: Defined by core spec-kit commands
114114

@@ -559,8 +559,16 @@ Standard events (defined by core):
559559
- `after_tasks` - After task generation
560560
- `before_implement` - Before implementation
561561
- `after_implement` - After implementation
562-
- `before_commit` - Before git commit *(planned - not yet wired into core templates)*
563-
- `after_commit` - After git commit *(planned - not yet wired into core templates)*
562+
- `before_analyze` - Before cross-artifact analysis
563+
- `after_analyze` - After cross-artifact analysis
564+
- `before_checklist` - Before checklist generation
565+
- `after_checklist` - After checklist generation
566+
- `before_clarify` - Before spec clarification
567+
- `after_clarify` - After spec clarification
568+
- `before_constitution` - Before constitution update
569+
- `after_constitution` - After constitution update
570+
- `before_taskstoissues` - Before tasks-to-issues conversion
571+
- `after_taskstoissues` - After tasks-to-issues conversion
564572

565573
### Hook Configuration
566574

extensions/EXTENSION-DEVELOPMENT-GUIDE.md

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -177,9 +177,9 @@ Compatibility requirements.
177177

178178
What the extension provides.
179179

180-
**Required sub-fields**:
180+
**Optional sub-fields**:
181181

182-
- `commands`: Array of command objects (must have at least one)
182+
- `commands`: Array of command objects (at least one command or hook is required)
183183

184184
**Command object**:
185185

@@ -196,12 +196,19 @@ Integration hooks for automatic execution.
196196

197197
Available hook points:
198198

199-
- `after_tasks`: After `/speckit.tasks` completes
200-
- `after_implement`: After `/speckit.implement` completes (future)
199+
- `before_specify` / `after_specify`: Before/after specification generation
200+
- `before_plan` / `after_plan`: Before/after implementation planning
201+
- `before_tasks` / `after_tasks`: Before/after task generation
202+
- `before_implement` / `after_implement`: Before/after implementation
203+
- `before_analyze` / `after_analyze`: Before/after cross-artifact analysis
204+
- `before_checklist` / `after_checklist`: Before/after checklist generation
205+
- `before_clarify` / `after_clarify`: Before/after spec clarification
206+
- `before_constitution` / `after_constitution`: Before/after constitution update
207+
- `before_taskstoissues` / `after_taskstoissues`: Before/after tasks-to-issues conversion
201208

202209
Hook object:
203210

204-
- `command`: Command to execute (must be in `provides.commands`)
211+
- `command`: Command to execute (typically from `provides.commands`, but can reference any registered command)
205212
- `optional`: If true, prompt user before executing
206213
- `prompt`: Prompt text for optional hooks
207214
- `description`: Hook description

extensions/EXTENSION-USER-GUIDE.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -403,8 +403,10 @@ settings:
403403
404404
# Hook configuration
405405
# Available events: before_specify, after_specify, before_plan, after_plan,
406-
# before_tasks, after_tasks, before_implement, after_implement
407-
# Planned (not yet wired into core templates): before_commit, after_commit
406+
# before_tasks, after_tasks, before_implement, after_implement,
407+
# before_analyze, after_analyze, before_checklist, after_checklist,
408+
# before_clarify, after_clarify, before_constitution, after_constitution,
409+
# before_taskstoissues, after_taskstoissues
408410
hooks:
409411
after_tasks:
410412
- extension: jira

extensions/catalog.community.json

Lines changed: 108 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"schema_version": "1.0",
3-
"updated_at": "2026-04-03T12:35:01Z",
3+
"updated_at": "2026-04-08T00:00:00Z",
44
"catalog_url": "https://raw.githubusercontent.com/github/spec-kit/main/extensions/catalog.community.json",
55
"extensions": {
66
"aide": {
@@ -106,6 +106,73 @@
106106
"created_at": "2026-03-03T00:00:00Z",
107107
"updated_at": "2026-03-03T00:00:00Z"
108108
},
109+
"branch-convention": {
110+
"name": "Branch Convention",
111+
"id": "branch-convention",
112+
"description": "Configurable branch and folder naming conventions for /specify with presets and custom patterns.",
113+
"author": "Quratulain-bilal",
114+
"version": "1.0.0",
115+
"download_url": "https://github.com/Quratulain-bilal/spec-kit-branch-convention/archive/refs/tags/v1.0.0.zip",
116+
"repository": "https://github.com/Quratulain-bilal/spec-kit-branch-convention",
117+
"homepage": "https://github.com/Quratulain-bilal/spec-kit-branch-convention",
118+
"documentation": "https://github.com/Quratulain-bilal/spec-kit-branch-convention/blob/main/README.md",
119+
"changelog": "https://github.com/Quratulain-bilal/spec-kit-branch-convention/blob/main/CHANGELOG.md",
120+
"license": "MIT",
121+
"requires": {
122+
"speckit_version": ">=0.4.0"
123+
},
124+
"provides": {
125+
"commands": 3,
126+
"hooks": 1
127+
},
128+
"tags": [
129+
"branch",
130+
"naming",
131+
"convention",
132+
"gitflow",
133+
"workflow"
134+
],
135+
"verified": false,
136+
"downloads": 0,
137+
"stars": 0,
138+
"created_at": "2026-04-08T00:00:00Z",
139+
"updated_at": "2026-04-08T00:00:00Z"
140+
},
141+
"canon": {
142+
"name": "Canon",
143+
"id": "canon",
144+
"description": "Adds canon-driven (baseline-driven) workflows: spec-first, code-first, spec-drift. Requires Canon Core preset installation.",
145+
"author": "Maxim Stupakov",
146+
"version": "0.1.0",
147+
"download_url": "https://github.com/maximiliamus/spec-kit-canon/releases/download/v0.1.0/spec-kit-canon-v0.1.0.zip",
148+
"repository": "https://github.com/maximiliamus/spec-kit-canon",
149+
"homepage": "https://github.com/maximiliamus/spec-kit-canon",
150+
"documentation": "https://github.com/maximiliamus/spec-kit-canon/blob/master/README.md",
151+
"changelog": "https://github.com/maximiliamus/spec-kit-canon/blob/master/CHANGELOG.md",
152+
"license": "MIT",
153+
"requires": {
154+
"speckit_version": ">=0.4.3"
155+
},
156+
"provides": {
157+
"commands": 16,
158+
"hooks": 0
159+
},
160+
"tags": [
161+
"process",
162+
"baseline",
163+
"canon",
164+
"drift",
165+
"spec-first",
166+
"code-first",
167+
"spec-drift",
168+
"vibecoding"
169+
],
170+
"verified": false,
171+
"downloads": 0,
172+
"stars": 0,
173+
"created_at": "2026-03-29T00:00:00Z",
174+
"updated_at": "2026-03-29T00:00:00Z"
175+
},
109176
"checkpoint": {
110177
"name": "Checkpoint Extension",
111178
"id": "checkpoint",
@@ -232,8 +299,8 @@
232299
"id": "confluence",
233300
"description": "Create, read, and update Confluence docs for your project",
234301
"author": "aaronrsun",
235-
"version": "1.1.0",
236-
"download_url": "https://github.com/aaronrsun/spec-kit-confluence/archive/refs/tags/v1.1.0.zip",
302+
"version": "1.1.1",
303+
"download_url": "https://github.com/aaronrsun/spec-kit-confluence/archive/refs/tags/v1.1.1.zip",
237304
"repository": "https://github.com/aaronrsun/spec-kit-confluence",
238305
"homepage": "https://github.com/aaronrsun/spec-kit-confluence",
239306
"documentation": "https://github.com/aaronrsun/spec-kit-confluence/blob/main/README.md",
@@ -1032,7 +1099,39 @@
10321099
"created_at": "2026-03-14T00:00:00Z",
10331100
"updated_at": "2026-03-14T00:00:00Z"
10341101
},
1035-
"repoindex":{
1102+
"refine": {
1103+
"name": "Spec Refine",
1104+
"id": "refine",
1105+
"description": "Update specs in-place, propagate changes to plan and tasks, and diff impact across artifacts.",
1106+
"author": "Quratulain-bilal",
1107+
"version": "1.0.0",
1108+
"download_url": "https://github.com/Quratulain-bilal/spec-kit-refine/archive/refs/tags/v1.0.0.zip",
1109+
"repository": "https://github.com/Quratulain-bilal/spec-kit-refine",
1110+
"homepage": "https://github.com/Quratulain-bilal/spec-kit-refine",
1111+
"documentation": "https://github.com/Quratulain-bilal/spec-kit-refine/blob/main/README.md",
1112+
"changelog": "https://github.com/Quratulain-bilal/spec-kit-refine/blob/main/CHANGELOG.md",
1113+
"license": "MIT",
1114+
"requires": {
1115+
"speckit_version": ">=0.4.0"
1116+
},
1117+
"provides": {
1118+
"commands": 4,
1119+
"hooks": 2
1120+
},
1121+
"tags": [
1122+
"refine",
1123+
"iterate",
1124+
"propagation",
1125+
"workflow",
1126+
"specifications"
1127+
],
1128+
"verified": false,
1129+
"downloads": 0,
1130+
"stars": 0,
1131+
"created_at": "2026-04-08T00:00:00Z",
1132+
"updated_at": "2026-04-08T00:00:00Z"
1133+
},
1134+
"repoindex": {
10361135
"name": "Repository Index",
10371136
"id": "repoindex",
10381137
"description": "Generate index of your repo for overview, architecture and module",
@@ -1047,7 +1146,7 @@
10471146
"requires": {
10481147
"speckit_version": ">=0.1.0",
10491148
"tools": [
1050-
{
1149+
{
10511150
"name": "no need",
10521151
"version": ">=1.0.0",
10531152
"required": false
@@ -1401,8 +1500,8 @@
14011500
"id": "v-model",
14021501
"description": "Enforces V-Model paired generation of development specs and test specs with full traceability.",
14031502
"author": "leocamello",
1404-
"version": "0.4.0",
1405-
"download_url": "https://github.com/leocamello/spec-kit-v-model/archive/refs/tags/v0.4.0.zip",
1503+
"version": "0.5.0",
1504+
"download_url": "https://github.com/leocamello/spec-kit-v-model/archive/refs/tags/v0.5.0.zip",
14061505
"repository": "https://github.com/leocamello/spec-kit-v-model",
14071506
"homepage": "https://github.com/leocamello/spec-kit-v-model",
14081507
"documentation": "https://github.com/leocamello/spec-kit-v-model/blob/main/README.md",
@@ -1412,7 +1511,7 @@
14121511
"speckit_version": ">=0.1.0"
14131512
},
14141513
"provides": {
1415-
"commands": 9,
1514+
"commands": 14,
14161515
"hooks": 1
14171516
},
14181517
"tags": [
@@ -1426,7 +1525,7 @@
14261525
"downloads": 0,
14271526
"stars": 0,
14281527
"created_at": "2026-02-20T00:00:00Z",
1429-
"updated_at": "2026-02-22T00:00:00Z"
1528+
"updated_at": "2026-04-06T00:00:00Z"
14301529
},
14311530
"verify": {
14321531
"name": "Verify Extension",
@@ -1491,6 +1590,5 @@
14911590
"created_at": "2026-03-16T00:00:00Z",
14921591
"updated_at": "2026-03-16T00:00:00Z"
14931592
}
1494-
14951593
}
14961594
}

0 commit comments

Comments
 (0)