一键导入
speckit-branch-convention-validate
Check all feature branches and spec folders against the configured naming convention
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Check all feature branches and spec folders against the configured naming convention
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Create or update the project constitution from interactive or provided principle inputs, ensuring all dependent templates stay in sync.
Connect to the running Redmine instance and log in via the Playwright MCP browser, using REDMINE_PLAYRIGHT_URL/REDMINE_PLAYRIGHT_USER/REDMINE_PLAYRIGHT_PASSWORD environment variables. Use whenever the user asks to open, check, access, or test something in the running Redmine UI (e.g. verifying a feature in the browser, taking a screenshot of a page, manually exercising a flow).
Stage the current changes and create a git commit with a properly formatted English message. Use whenever the user asks to commit, save, or check in their work. Picks a Conventional-Commits-style prefix (fix:, feat:, refactor:, docs:, test:, chore:, style:, perf:) based on the actual diff, keeps the first line a concise summary, and adds a bullet list of details only when the change touches several things.
Execute the implementation plan by processing and executing all tasks defined in tasks.md
Execute the implementation planning workflow using the plan template to generate design artifacts.
Create or update the feature specification from a natural language feature description.
| name | speckit-branch-convention-validate |
| description | Check all feature branches and spec folders against the configured naming convention |
| compatibility | Requires spec-kit project structure with .specify/ directory |
| metadata | {"author":"github-spec-kit","source":"branch-convention:commands/speckit.branch-convention.validate.md"} |
Check all existing feature branches and spec folders against the configured naming convention. Reports compliance status and identifies violations.
$ARGUMENTS
You MUST consider the user input before proceeding (if not empty). The user may specify a specific branch to validate (e.g., "003-user-auth") or "all" to check everything.
.specify/ directory.specify/branch-convention.yml{seq}-{kebab} for both branch and folder)Load convention: Read .specify/branch-convention.yml and extract:
branch_pattern — the expected branch naming patternfolder_pattern — the expected spec folder naming patternCollect branches and folders: Gather all feature-related items:
main, master, develop)specs/Validate each item: For every branch and folder, check:
| Check | Rule | Example Violation |
|---|---|---|
| Pattern match | Branch matches branch_pattern structure | user-auth missing sequence number |
| Type prefix | If pattern includes {type}, prefix must be in type_prefix map | feature/003-auth instead of feat/003-auth |
| Sequence format | {seq} must be zero-padded to seq_padding digits | 3-auth instead of 003-auth |
| Length limit | Branch name must not exceed max_length characters | 003-very-long-branch-name-that-exceeds-limit... |
| Case rule | If lowercase: true, no uppercase characters (except ticket IDs) | 003-User-Auth |
| Separator | Words must use configured separator | 003_user_auth when separator is - |
| Branch-folder sync | Branch name and folder name must be derivable from same source | Branch feat/003-auth but folder 004-auth |
| Ticket format | If pattern includes {ticket}, must match ticket_pattern regex | proj-142 when pattern requires [A-Z]+-[0-9]+ |
Output compliance report:
# Branch Convention Compliance Report
**Convention**: {preset name or "custom"}
**Branch pattern**: {branch_pattern}
**Folder pattern**: {folder_pattern}
## Results
| Branch | Folder | Status | Issues |
|--------|--------|--------|--------|
| feat/003-user-auth | 003-user-auth | ✅ Compliant | — |
| 004-chat-system | 004-chat-system | ⚠️ Non-compliant | Missing type prefix |
| feat/5-api | 5-api | ⚠️ Non-compliant | Sequence not zero-padded |
## Summary
- **Total**: {N} branches
- **Compliant**: {X} ✅
- **Non-compliant**: {Y} ⚠️
- **Orphaned folders** (no branch): {Z}
## Recommended Actions
1. Run `/speckit.branch-convention.rename` to fix non-compliant items
Report: Output the compliance report. Do not modify any files — this command is read-only.