You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: add branch naming convention to AGENTS.md and CONTRIBUTING.md (#2678)
- AGENTS.md: branch naming as a requirement for AI coding agents
- CONTRIBUTING.md: branch naming as a recommendation for human contributors
- Convention: <type>/<number>-<short-slug> where number is issue or PR number
Closes#2677
| `community/` | Community catalog additions | `community/2492-add-mde-extension` |
398
+
| `chore/` | Maintenance, tooling, CI | `chore/2366-editorconfig` |
399
+
400
+
**Rules:**
401
+
402
+
1. Always include the issue or PR number immediately after the prefix — this is what makes branches traceable
403
+
2. Use kebab-case for the slug
404
+
3. Keep the slug short — enough to identify the work without looking up the issue
405
+
406
+
---
407
+
382
408
## Common Pitfalls
383
409
384
410
1. **Using shorthand keys for CLI-based integrations**: For CLI-based integrations (`requires_cli: True`), the `key` must match the executable name (e.g., `"cursor-agent"` not `"cursor"`). `shutil.which(key)` is used for CLI tool checks — mismatches require special-case mappings. IDE-based integrations (`requires_cli: False`) are not subject to this constraint.
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+15-1Lines changed: 15 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -38,7 +38,7 @@ On [GitHub Codespaces](https://github.com/features/codespaces) it's even simpler
38
38
1. Fork and clone the repository
39
39
1. Configure and install the dependencies: `uv sync --extra test`
40
40
1. Make sure the CLI works on your machine: `uv run specify --help`
41
-
1. Create a new branch: `git checkout -b my-branch-name`
41
+
1. Create a new branch: `git checkout -b <type>/<number>-<short-slug>` (see [Branch naming](#branch-naming) below)
42
42
1. Make your change, add tests, and make sure everything still works
43
43
1. Test the CLI functionality with a sample project if relevant
44
44
1. Push to your fork and submit a pull request
@@ -55,6 +55,20 @@ Here are a few things you can do that will increase the likelihood of your pull
55
55
- Write a [good commit message](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html).
56
56
- Test your changes with the Spec-Driven Development workflow to ensure compatibility.
57
57
58
+
### Branch naming
59
+
60
+
We recommend naming branches as `<type>/<number>-<short-slug>`, where `<number>` is the issue or PR number (whichever comes first) and `<type>` is one of:
61
+
62
+
| Prefix | When to use | Example |
63
+
|---|---|---|
64
+
|`feat/`| New features |`feat/2342-workflow-cli-alignment`|
|`community/`| Community catalog additions |`community/2492-add-mde-extension`|
68
+
|`chore/`| Maintenance, tooling, CI |`chore/2366-editorconfig`|
69
+
70
+
Including the issue or PR number makes branches traceable — especially useful since the project uses squash merges and `git branch --merged` won't detect merged branches. If you start with a PR (no issue), use the PR number once it's assigned.
0 commit comments