extensions/git/commands/speckit.git.validate.md
Validate that the current Git branch follows the expected feature branch naming conventions.
git rev-parse --is-inside-work-tree 2>/dev/null[specify] Warning: Git repository not detected; skipped branch validation
Get the current branch name:
git rev-parse --abbrev-ref HEAD
The branch name's final path segment must start with one of these feature markers:
[0-9]{3,}- (e.g., 001-feature-name, 042-fix-bug, 1000-big-feature, jdoe/web/008-guided-tour)[0-9]{8}-[0-9]{6}- (e.g., 20260319-143022-feature-name, jdoe/web/20260319-143022-feature-name)If on a feature branch (matches either pattern):
✓ On feature branch: <branch-name>specs/:
specs/<prefix>-* where prefix matches the numeric portion, regardless of branch namespace prefixesspecs/<prefix>-* where prefix matches the YYYYMMDD-HHMMSS portion, regardless of branch namespace prefixes✓ Spec directory found: <path>⚠ No spec directory found for prefix <prefix>If NOT on a feature branch:
✗ Not on a feature branch. Current branch: <branch-name>Feature branches should be named like: 001-feature-name, 20260319-143022-feature-name, or <namespace>/001-feature-nameIf Git is not installed or the directory is not a Git repository:
SPECIFY_FEATURE environment variable as a fallback