Deprecate branch name prefixes#182
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Removes stack branch prefixes and numbered naming, making branch names verbatim and simplifying automatic naming.
Changes:
- Removes prefix/numbered state, flags, and JSON output.
- Generates
MM-DD-slugnames with underscore separators. - Updates prompts, tests, documentation, and agent guidance.
Show a summary per file
| File | Description |
|---|---|
AGENTS.md |
Updates branch utility documentation. |
README.md |
Documents prefix-free workflows. |
cmd/add.go |
Simplifies branch-name resolution. |
cmd/add_test.go |
Tests verbatim and automatic names. |
cmd/init.go |
Removes prefix and numbered initialization. |
cmd/init_test.go |
Updates initialization coverage. |
cmd/submit.go |
Stops copying removed naming state. |
cmd/utils.go |
Simplifies text prompting. |
cmd/view.go |
Removes prefix from JSON output. |
cmd/view_test.go |
Updates JSON output tests. |
docs/src/content/docs/guides/workflows.md |
Revises abbreviated workflows. |
docs/src/content/docs/reference/cli.md |
Updates CLI reference. |
internal/branch/name.go |
Revises slug and date naming. |
internal/branch/name_test.go |
Tests new slug rules. |
internal/config/config.go |
Simplifies the input test hook. |
internal/stack/schema.json |
Removes obsolete schema properties. |
internal/stack/stack.go |
Removes obsolete stack fields. |
internal/stack/stack_test.go |
Updates persistence tests. |
skills/gh-stack/SKILL.md |
Updates agent workflow guidance. |
Review details
- Files reviewed: 19/19 changed files
- Comments generated: 1
- Review effort level: Medium
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.
The stack branch-name prefix (and the coupled
--numberednaming) has caused more confusion than it was worth. The behavior was inconsistent — the interactive prompter applied a prefix while explicit names didn't, and passing an already-qualified name double-applied it (gh stack add refactor/foo→feat/refactor/foo, #152). This removes the concept entirely: from local stack state, the prompts, theinit/addflags, and everywhere it was referenced.Behavior
Branch names are now used exactly as given — nothing is ever prepended or transformed.
gh stack add refactor/foocreatesrefactor/foo.-mwithout a name — auto-generated from the commit message asMM-DD-slug(e.g.07-15-add_login). The slug uses underscores as its word separator, preserves any real hyphens from the message, and is capped at 30 characters.Old stack files that still carry
prefix/numberedkeys keep loading fine — the fields are ignored and dropped on the next save.Changes
Remove the prefix concept
internal/stack/stack.go,schema.json— drop thePrefixandNumberedfields from theStackmodel and schema.cmd/init.go— remove the-p, --prefixand-n, --numberedflags, the numbered-branch path, prefix validation, and the interactive "use as a prefix?" detection.cmd/add.go— collapse branch-name resolution to the three cases above and deleteapplyPrefix.cmd/submit.go,cmd/view.go— stop carrying the prefix through the fork-a-merged-stack path and drop theprefixfield fromgh stack view --json.internal/branch/name.go— deleteResolveBranchName,NextNumberedName, andFollowsNumbering.Clean up branch auto-naming
internal/branch/name.go—DateSlugnow uses anMM-DDprefix (no year);Slugifyseparates words with underscores (keeping literal hyphens) and truncates to 30 characters.cmd/utils.go,internal/config/config.go— simplify the prompt helper topromptInputand drop the now-unused prefill parameter fromInputFn.Update docs
README.md,docs/src/content/docs/reference/cli.md,docs/src/content/docs/guides/workflows.md,skills/gh-stack/SKILL.md,AGENTS.md— remove the prefix/numbered flags, examples, and theprefixJSON field, and refresh the auto-naming description.Testing
-mdate-slug generation, and the newMM-DD+ underscore + 30-char slug rules.go test -race -count=1 ./...andgo vet ./...are clean, and the changed files passgofmt.Stack created with GitHub Stacks CLI • Give Feedback 💬