Repository navigation
docs(workflow): root feature branches off dash, never main - #48
Merged
Merged
Conversation
Feature branches previously rooted off `main` to stay upstream-PR-able. That bought little and cost a lot: the `.claude/` toolkit lives on `dash`, so every feature branch started without it and needed a manual `git restore --source=dash` to make slash commands load; branches also started without the fork's merged features, so work was written against a codebase the fork does not actually run. Feature branches now always root off `dash`. Upstreaming stays possible — it just extracts the feature's own diff (`git diff dash...feat/<feature>`, whose merge-base is a `dash` commit) instead of relying on the branch point, which also drops the "merging dash pollutes the upstream diff" caveat that /finish-prs and /github-review-pr had to carry. Upstream still reaches features only through dash: upstream/main -> main -> dash -> feat/*.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Feature branches now always root off
dash, never offmain.The old rule rooted them off
mainto keep them upstream-PR-able. That boughtlittle and cost a lot:
.claude/toolkit is committed ondash, so every feature branch startedwithout it.
CLAUDE.mdcarried a whole subsection teaching you togit restore --source=dash --worktree -- .claude CLAUDE.mdand then remembernever to commit the result.
main-rooted branch starts without the fork's merged features, so work getswritten against a codebase the fork does not actually run.
/finish-prsand/github-review-prboth had to carry a caveat that mergingdashinto a feature branch "pollutes its upstream diff".Rooting off
dashremoves all three.Upstreaming still works
This is the one thing the old rule was actually protecting, so it is replaced
rather than dropped.
.claude/rules/upstream-sync.mdnow extracts the feature'sown diff instead of relying on the branch point:
The three-dot
dash...feat/<feature>diffs frommerge-base(dash, feat/<feature>)to the branch tip. The merge-base is a commit on
dash, so fork identity, thetoolkit, and other merged features all fall out of the diff.
This was verified empirically, not assumed — including the case that could
plausibly break it (a branch that merged
dashforward, withdashhaving movedon afterwards):
feat work 1dash work 1feat work 2dash work 2git diff --stat tmp-dash...tmp-featreturned exactlyFEATURE_A.txt+FEATURE_B.txt. The scratch branches were deleted afterwards.Files changed
CLAUDE.md/lfgrow; toolkit section now says "inherited automatically".claude/rules/git-workflow.mdNEVER root off mainrule.claude/rules/upstream-sync.mddashnotmain, rewrote "Upstreaming a feature".claude/commands/lfg.md.claude/commands/finish-prs.md.claude/commands/github-review-pr.md.claude/commands/github-review-comments.md,architect.md,security.mdRemaining
git merge mainreferences are all the legitimatedash<-mainsync path and were deliberately left alone. Upstream now reaches a feature
branch only through dash:
upstream/main->main->dash->feat/*.Deviations & judgment calls
change where branches root, not to abandon upstreaming.
merge --squashontomainwould now drag all ofdashinto the PR, so it had to be replaced withthe three-dot extraction. If upstreaming is in fact dead for this fork, that
whole section can go — say so and I will drop it.
git restore --source=dashsnippet inCLAUDE.md, rescoped topr/<feature>and oldmain-rooted branches. It is still the only way to getthe toolkit onto a
main-rooted branch, which the upstreaming flow creates./perf's "baseline vsmain" untouched — that is a benchmarkreference point, not a branch-rooting rule.
lib/ortest/was touched.