main is the only long-lived branch. It must build and have green tests at every
commit, and it is what gets tagged.
That obligation is on you, not on CI: the hosted runners cannot build this package yet
(see the CI section of the README). Before opening a PR, run swift build && swift test
and swift-format lint --strict locally. CI will catch formatting drift and malformed
source; it will not catch a type error.
Work on short-lived branches that branch from the latest main:
feature/<short-description> new capability
fix/<short-description> bug fix
chore/<short-description> build, CI, dependencies
docs/<short-description> documentation only
test/<short-description> tests only
refactor/<short-description> behaviour-preserving change
One concern per branch. If a review comment needs a substantial new change, add it as a second commit rather than amending — the reviewer can see the change react to feedback.
Name branches after the issue where one exists: feature/lsp-completion for issue #12.
git checkout main && git pullgit checkout -b feature/lsp-completion- Work, committing in Conventional Commits form.
swift build && swift testandswift-format lint --strictlocally before pushing.git push -u origin feature/lsp-completion- Open a PR against
main. Fill in the template. - After review, squash-merge or merge with a merge commit. Squash for a branch with noisy intermediate commits; merge when reviewers want the sequence preserved.
- Delete the branch.
mainmoves on.
If a PR changes what the code does, update the .md files in the same PR. See
AGENTS.md for which file covers which kind of change. A stale
CURRENT_STATE.md or MEMORY.md costs the next person real
time.
Never rewrite history on a pushed branch. Use git revert.
The project has one active line of work. A develop branch means every change has to be
merged twice and every bug fix has to be applied in two places. If two features need to be
in flight at once, branch both from main and merge them in whichever order they finish —
Git handles that fine, and it keeps main always deployable.
If that stops being true — releases on a cadence, or several people on unrelated features —
revisit then and introduce a release/* line instead.