feat: add create_branch tool to repos toolset - #2
Merged
Conversation
added 6 commits
August 6, 2026 17:29
Specifies a new create_branch tool for the repos toolset that wraps octokit's git.createRef, resolving a branch name or commit SHA into the target SHA before creating the ref.
Internal superpowers specs and plans are local working docs, not meant to ship in the repo — matches the precedent set for .husky/ (24076d4 previously deleted the docs/ folder entirely for the same reason). The spec file itself remains on disk locally, just untracked.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
create_branchwrite tool to therepostoolset, wrapping octokit'sgit.createRef. Resolves thefrominput (a branch name or commit SHA) into a target SHA by trying a branch lookup first and falling back to treating it as a raw SHA on a 404, then creates the new branch atrefs/heads/<branch>.docs/(internal design specs/plans), matching the existing.husky/precedent.Test plan
npm test— 224/224 tests passing (23 files), including 6 new tests forcreate_branch: happy-path branch resolution, SHA fallback on 404, non-404 error propagation, downstreamcreateReffailure, and read-only/read-write permission gatingnpm run typecheck— cleannpm run lint— cleanbuildServerthat read-only registers 76 tools, read-write registers 105 tools, with zero duplicate tool names