Skip to content

Add configurable git branch templates for monorepos#3293

Draft
PascalThuet wants to merge 1 commit into
github:mainfrom
PascalThuet:feat/3081-monorepo-branch-template
Draft

Add configurable git branch templates for monorepos#3293
PascalThuet wants to merge 1 commit into
github:mainfrom
PascalThuet:feat/3081-monorepo-branch-template

Conversation

@PascalThuet

Copy link
Copy Markdown
Contributor

Summary

  • Adds git extension branch_template config with {author}, {app}, {number}, and {slug} tokens, plus branch_prefix as a shorthand namespace.
  • Applies the template in both Bash and PowerShell feature-branch scripts while keeping the default {number}-{slug} behavior unchanged.
  • Makes feature number extraction, branch-number scanning, and validation tolerant of path-style branch namespaces.

Why

Monorepo installs can have separate Spec Kit projects but one shared root Git branch namespace. This lets projects opt into names like jdoe/app-a/008-guided-tour without requiring separate Git repositories or changing downstream feature path resolution.

Fixes #3081.

Implementation note

This follows the concrete use case and change-surface analysis in #3081 (comment). That comment is relevant because it identifies the desired {author}/{app}/{number}-{slug} shape and notes that downstream commands already resolve feature directories through .specify/feature.json / SPECIFY_FEATURE_DIRECTORY, so branch creation and validation are the main places that need to become namespace-aware.

Validation

  • .venv/bin/python -m pytest tests/extensions/git/test_git_extension.py tests/test_timestamp_branches.py -q

Disclosure

Prepared on behalf of @PascalThuet by Codex (model: GPT-5, autonomous). The commit includes an Assisted-by: trailer.

Assisted-by: Codex (model: GPT-5, autonomous)
@mnriem

mnriem commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator

I realize this still a draft, but I wanted to make sure that you should merge the template into the git-config.yml for ease of use

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.

Monorepo: feature branches share the root repo's branch namespace (no per-project Git scoping)

2 participants