Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## 1.2.2 (2026-04-14)

### Added
- Restored `modifies_hooks`: on install (with consent), disables `before_specify -> speckit.git.feature` so the primary checkout can stay on a stable branch while worktrees own feature branches. Requires Spec Kit with `modifies_hooks` support ([github/spec-kit#2209](https://github.com/github/spec-kit/pull/2209)).

## 1.2.1 (2026-04-14)

### Removed
Expand Down
21 changes: 20 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,29 @@ dotworktrees_dir: ".worktrees"
| `/speckit.worktrees.list` | Dashboard: status, artifacts, tasks | No |
| `/speckit.worktrees.clean` | Remove merged/stale worktrees | Yes |

## Hook
## Hooks

**`after_specify`** — automatically creates a worktree after a new feature is specified. Controlled by the `auto_create` config value.

## Hook overrides

This extension declares `modifies_hooks` in `extension.yml` to **disable** the git extension's `before_specify -> speckit.git.feature` hook on install. This keeps the primary checkout on a stable branch (e.g. `main`) while worktrees handle feature branch isolation.

During `specify extension add`, you will see a consent prompt:

```
Extension 'worktrees' requests the following hook modifications:

Hook Target Extension Command Action Reason
before_specify git speckit.git.feature disable Worktree-parallel keeps primary checkout...

Apply these modifications? [Y/n]:
```

Answering **Y** disables the hook. Answering **N** installs the extension without modifying hooks (you can disable it manually in `.specify/extensions.yml`). Removing the extension via `specify extension remove worktrees` restores the original hook state.

**Requires**: Spec Kit with `modifies_hooks` support (see [github/spec-kit#2209](https://github.com/github/spec-kit/pull/2209)).

## Script usage

The bash script can be called directly for automation:
Expand Down
9 changes: 8 additions & 1 deletion extension.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ schema_version: "1.0"
extension:
id: worktrees
name: "Worktrees"
version: "1.2.1"
version: "1.2.2"
description: "Default-on worktree isolation for parallel agents — sibling or nested layout"
author: "dango85"
repository: "https://github.com/dango85/spec-kit-worktree-parallel"
Expand Down Expand Up @@ -44,6 +44,13 @@ lifecycle:
script: scripts/bash/post-install.sh
description: "Add .worktrees/ to .gitignore so worktree directories are never committed to the main repo"

modifies_hooks:
- hook: before_specify
extension: git
command: speckit.git.feature
action: disable
reason: "Worktree-parallel keeps primary checkout on a stable branch (e.g. main); branch creation is handled by git worktree add -b during after_specify"

tags:
- "worktree"
- "git"
Expand Down
Loading