diff --git a/CHANGELOG.md b/CHANGELOG.md index 9946548..27663f0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/README.md b/README.md index 0ee6f63..5d6ab4e 100644 --- a/README.md +++ b/README.md @@ -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: diff --git a/extension.yml b/extension.yml index ec6752f..786d96f 100644 --- a/extension.yml +++ b/extension.yml @@ -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" @@ -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"