Skip to content

feat: add create_branch tool to repos toolset - #2

Merged
wuqunfei merged 6 commits into
mainfrom
feature/create-branch-tool
Aug 6, 2026
Merged

feat: add create_branch tool to repos toolset#2
wuqunfei merged 6 commits into
mainfrom
feature/create-branch-tool

Conversation

@wuqunfei

@wuqunfei wuqunfei commented Aug 6, 2026

Copy link
Copy Markdown
Owner

Summary

  • Adds a create_branch write tool to the repos toolset, wrapping octokit's git.createRef. Resolves the from input (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 at refs/heads/<branch>.
  • Non-404 errors from the branch-lookup step propagate immediately rather than being silently reinterpreted as "must be a SHA."
  • Bumps tool-count references (104 → 105) and write-tool-count references (28 → 29) across README.md, package.json, and manifest.json.
  • Stops tracking docs/ (internal design specs/plans), matching the existing .husky/ precedent.

Test plan

  • npm test — 224/224 tests passing (23 files), including 6 new tests for create_branch: happy-path branch resolution, SHA fallback on 404, non-404 error propagation, downstream createRef failure, and read-only/read-write permission gating
  • npm run typecheck — clean
  • npm run lint — clean
  • Verified via buildServer that read-only registers 76 tools, read-write registers 105 tools, with zero duplicate tool names
  • Went through full design spec → implementation plan → subagent-driven execution with per-task review and a final whole-branch review; two doc-accuracy gaps (manifest.json stale "104", README's stale "28 mutating tools") were caught by the final review and fixed in a follow-up commit

wu.qunfei@gmail.com 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.
@wuqunfei
wuqunfei merged commit 6b49615 into main Aug 6, 2026
1 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant