docs(trusty-mpm): move worktree/checkout discipline from CLAUDE.md into tm-pr-workflow - #5008
Open
bobmatnyc wants to merge 1 commit into
Open
docs(trusty-mpm): move worktree/checkout discipline from CLAUDE.md into tm-pr-workflow#5008bobmatnyc wants to merge 1 commit into
bobmatnyc wants to merge 1 commit into
Conversation
Owner's ruling: checkout behavior belongs in the workflow skill, not CLAUDE.md. Moves the generic worktree/checkout rules (main checkout inspection-only, branch off origin/main, one branch per reviewable outcome, worktree-is-ephemeral/branch-is-durable, cleanup order, subagent confinement) into tm-pr-workflow's Worktree Discipline section, so every project deploying the skill gets them. The repo-specific bits (cargo install cdhash cache hazard, the stash-first fallback with its cargo install example) move to docs/reference/worktree-discipline.md, merged into the existing page rather than duplicated. CLAUDE.md's Parallel Worktree Discipline section is now a 3-line pointer naming the skill and the reference doc. 🤖🤖🤖 Generated with trusty-mpm — https://github.com/bobmatnyc/trusty-tools
bobmatnyc
force-pushed
the
docs/worktree-discipline-to-skill
branch
from
August 6, 2026 14:00
3ea39e1 to
8e4fa2b
Compare
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.
Moves checkout/worktree discipline out of root
CLAUDE.mdinto the bundledtm-pr-workflowskill, per the owner's ruling: "the CLAUDE.md rule doesn't belong there. Checkout behavior should be in the workflow skill."What moved, and where
CLAUDE.md's## Parallel Worktree Disciplinesection (~95 lines) is now a 3-line pointer namingtm-pr-workflowanddocs/reference/worktree-discipline.md.Generic rules →
crates/trusty-mpm/src/assets/skills/tm-pr-workflow.md(bundled source, not a deployed copy), expanding its existing "Worktree Discipline" section:origin/main:HEAD; always fetch before branchinggit worktree remove --forcefirst,git branch -D+git push origin --deletelast (branch is the only durable copy until squash-merge)Rust/macOS-specific bits →
docs/reference/worktree-discipline.md(already existed, already linked fromCLAUDE.md— merged in, not a third copy):cargo install --path .claude/worktrees/<dirname>/crates/<name> --lockedas the preferred install pattern, cross-referencingrelease-workflow.md's existing cdhash explanation instead of restating itcargo install --path crates/<name> --lockedexampleRule inventory → destination mapping
origin/main:HEAD, fetch before branchingcargo installfrom worktree, not main checkout (cdhash)release-workflow.mdinstead of duplicating the cdhash explanationdocs/reference/worktree-discipline.mdAmbiguous call: the stash-first "if you absolutely must run a command from the main checkout" rule is generic in principle but its only illustration was
cargo install. Kept the pattern generic in the skill and left the concretecargo installcase in the reference doc.Gates (docs/skill-source change — no Cargo/Rust source touched)
Changelog fragment:
crates/trusty-mpm/changelog.d/5008-worktree-discipline-to-skill.md.🤖🤖🤖 Generated with trusty-mpm — https://github.com/bobmatnyc/trusty-tools