Replies: 3 comments
-
|
PR #1941 is in flight to move the Git functionality wholesale to a new extension. This is to facilitate isolating Git related functionality to this extension so it does not touch core files and to make it possible for something to NOT use it altogether. Would that serve your purpose? |
Beta Was this translation helpful? Give feedback.
-
|
Thanks for pointing to #1941, @mnriem. The direction makes sense. Isolating git operations into an extension is a cleaner foundation than scattering branch logic across core files. That said, a full Two narrower capabilities would close the gap, and they'd fit naturally into the git extension:
Both are additive and backward-compatible. Happy to contribute them as a follow-up once #1941 lands, if that works for you. |
Beta Was this translation helpful? Give feedback.
-
|
That is what presets are for. If you need a slight variation of any extension for your own organization you can overlay your own specific preset. See https://github.com/github/spec-kit/tree/main/presets Would that work for your scenario? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Context
I maintain cc-sdd, a Claude Code plugin that adds trait overlays on top of spec-kit. It uses spec-kit's core workflow as-is (
speckit.specify,speckit.plan,speckit.tasks,speckit.implement). The plugin adds quality gates, parallel implementation via agent teams, and git worktree isolation.The worktrees trait creates a sibling git worktree after
speckit.specify. This lets the user continue planning and implementing in an isolated directory without disrupting other Claude Code sessions onmain.Problem
create-new-feature.shcurrently couples two concerns:git checkout -b)This coupling blocks a workflow where the worktree and branch get created before
speckit.specifyruns. Two specific issues:Standalone worktree creation: A user runs
/sdd:worktree create "feature description"to set up branch + worktree upfront. They then run/speckit.specifyinside the worktree. Butcreate-new-feature.shfails with "Branch already exists" because the branch was created externally.Branch name prediction: To create the worktree, we need the branch name before
speckit.specifyruns. The only way to get it today is callingcreate-new-feature.sh, which also creates the branch as a side effect.Related Issues
This touches on a recurring theme in the spec-kit issue tracker:
git worktreeSupport for Concurrent/Parallel Agent Execution #1476 - Native git worktree support for concurrent agent execution: the parallel agent isolation use case that our worktrees trait addressesbranchStrategy: "auto" | "none" | "manual"--no-branchflagOur proposal complements these requests. Rather than disabling branch creation entirely, we're asking for the ability to decouple name allocation from branch creation, which would also help resolve several of the issues above.
Proposal
Two small changes would enable these use cases:
1. Dry-run / name-only mode
A
--dry-runor--name-onlyflag that runs the number allocation and name generation but skips branch creation and spec directory setup:External tools could then predict the branch name without side effects.
2. Tolerate pre-existing branches
When
create-new-feature.shdetects that the target branch already exists and we're already on it, it should treat that as a no-op instead of failing. The script would still create the spec directory and template if they're missing.This would let
speckit.specifywork correctly inside a worktree created externally with the right branch name.Alternatives Considered
create-new-feature.shfrom the plugin, then restoringmain. That's the current approach for the post-specify worktree flow. It works, but it forces a specific ordering (specify first, worktree second) that doesn't fit every workflow.Impact
Both changes are backward-compatible and don't affect existing workflows. The
--dry-runflag would also help other extensions that need to pre-allocate or preview branch names, such as CI integrations or project dashboards.Happy to contribute a PR if the maintainers agree with the direction.
Beta Was this translation helpful? Give feedback.
All reactions