git-commit-organizer
Git commit organizer
Branch and slug
The work starts on a named branch. Ask the user for the branch name if they did not give one. Suggest feat/<slug> for a feature and fix/<slug> for a bug (bug-intake), with a short kebab-case slug.
The slug is the part after the prefix. For example, the slug of feat/order-cancel is order-cancel. Reuse it everywhere so all artifacts of one piece of work are easy to find:
| Artifact | Path |
|---|---|
| Spec and plan (features) | docs/<slug>-spec.md, docs/<slug>-plan.md |
| Bug report (bugs) | .scratchpad/<slug>/bug-report.md |
| Working files | .scratchpad/<slug>/ |
| Work items | label or tag <slug> |
Create the branch before the first change. Never commit feature work on the default branch. One piece of work has one branch. The steps of a plan and the fixes of a change list are commits on it, not branches of their own.
Sometimes the environment or the user fixes a branch name that says nothing about the feature (for example a name that a cloud session assigns). Do not rename it and do not create a second branch. Choose a descriptive slug for the feature, write Branch and Slug as two separate rows in progress.md, and use that slug for every artifact. Documents that show a branch name show the real branch.