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
{{ message }}
Repository navigation
docs(git): never stash — the stack is shared repo-wide, park work as a wip commit (#14078) - #15037
Ask 3 of #14078 — "stop the source" — was the only part of that umbrella still unaddressed after
its 18 rescued stashes were triaged. The umbrella's own wording: "Sessions should commit
incrementally on their own worktree branch instead of stashing, since the stack is shared. Worth a
line in the git/worktree developer doc."
The doc already had half of it. CLAUDE_GIT.md step 2 of the Pre-Flight Checklist says to read git stash list and ask before proceeding if it is non-empty. What it never said is that you must
not write to the stack — which is the behaviour that produced 113 entries over three months. A
reader who follows the checklist literally learns to be careful about someone else's stash and
learns nothing about creating their own.
So the gap is a rule, not a warning: never stash, park work as a wip: commit on your own branch.
That also lines up with the surrounding protocol, which already tells sessions to leave nothing
uncommitted and to give WIP a wip: prefix — stashing is the one path that quietly opts out of
every ownership guarantee the worktree mandate provides.
I put it next to Branch Safety rather than inside the checklist because it is a standing prohibition
with a recovery procedure, not a per-task step, and the checklist entry now links to it so the
existing step gains the missing half without growing.
The recovery half matters as much as the prohibition. Someone will find a non-empty stack, and the
wrong instinct is to clear it. The section says what #14078 actually did: rescue each entry to a
branch, open an issue naming that branch, and drop only what is demonstrably present in base.
Without that, "never stash" reads as "so delete the ones you find".
docs/developer/CLAUDE_GIT.md Pre-Flight step 2 — now links to that section, so the "read the
stack" step points at the "do not write to it" rule.
CLAUDE.md — the CLAUDE_GIT.md trigger row gains "stashing", so the rule is reachable from
the index by the word someone would actually be looking for.
Verification
Docs only — no code, no behaviour change, nothing to execute.
Anchor checked: the section heading ## Never Stash (#14078) renders as #never-stash-14078,
which is the link target used in Pre-Flight step 2.
Both edited files were verified to contain the intended text after the edit; the CLAUDE.md
trigger row was matched exactly before replacement, so a silent no-op was not possible.
Review verdict: MERGE, with one MEDIUM finding I have fixed in this PR rather than deferring — because leaving it would have undermined the doctrine the PR exists to establish.
The contradiction.docs/developer/CLAUDE_WORKFLOW.md:118 said "Do NOT create/apply/drop git stashunless explicitly requested" — a conditional permission — while the new CLAUDE_GIT.md:91 says "Never git stash" unconditionally. Two docs disagreeing on whether stash is ever permitted is exactly the documentation-fork case: coverage unions, but conflicting claims resolve against reality, and reality here is #14078's 113 unowned entries, one of which was hiding a security fix. Replaced the conditional line with the absolute rule plus a cross-link to the canonical section.
Second, smaller fix. The git restore --staged --worktree prohibition was filed under "Never Stash" as "the same reason in miniature" — but it never touches refs/stash. It is a different destructive-discard risk: it resets your own index and worktree from HEAD. The prohibition is right; the stated mechanism was not. Now says what it actually does, and why to back files up first.
The core claim checks out.refs/stash is a single ref in the repository's common .git directory — unlike HEAD and the index, which git worktree add gives each worktree its own copy of. So every stash list/push/pop/drop/apply reads and writes the one shared stack from any linked worktree. The doctrine is accurate, which matters: an overstated rule gets disbelieved and ignored.
The alternative it offers is real too — the wip: convention it points at already exists at CLAUDE_WORKFLOW.md:98, and the recovery procedure mirrors what #14078's own triage actually did, verified against the 19 rescued/stash-* branches in this clone.
Refs #14078 is correct: this delivers ask 3 (document the rule). Asks 1 and 2 — the inventory and the per-entry disposition — were resolved outside this diff, with 17 of #14082–#14099 closed and #14087 open because it turned out to be a real security finding, now #15023.
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
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.
Thinking Path
Ask 3 of #14078 — "stop the source" — was the only part of that umbrella still unaddressed after
its 18 rescued stashes were triaged. The umbrella's own wording: "Sessions should commit
incrementally on their own worktree branch instead of stashing, since the stack is shared. Worth a
line in the git/worktree developer doc."
The doc already had half of it.
CLAUDE_GIT.mdstep 2 of the Pre-Flight Checklist says to readgit stash listand ask before proceeding if it is non-empty. What it never said is that you mustnot write to the stack — which is the behaviour that produced 113 entries over three months. A
reader who follows the checklist literally learns to be careful about someone else's stash and
learns nothing about creating their own.
So the gap is a rule, not a warning: never stash, park work as a
wip:commit on your own branch.That also lines up with the surrounding protocol, which already tells sessions to leave nothing
uncommitted and to give WIP a
wip:prefix — stashing is the one path that quietly opts out ofevery ownership guarantee the worktree mandate provides.
I put it next to Branch Safety rather than inside the checklist because it is a standing prohibition
with a recovery procedure, not a per-task step, and the checklist entry now links to it so the
existing step gains the missing half without growing.
The recovery half matters as much as the prohibition. Someone will find a non-empty stack, and the
wrong instinct is to clear it. The section says what #14078 actually did: rescue each entry to a
branch, open an issue naming that branch, and drop only what is demonstrably present in base.
Without that, "never stash" reads as "so delete the ones you find".
What Changed
docs/developer/CLAUDE_GIT.md— new "Never Stash (chore(git): 113 stashes — 18 stranded, now rescued to branches; each needs an owner and a verdict #14078)" section: the stack is sharedrepo-wide; never
stash, neverpop/drop/clear/apply, nevergit restore --staged --worktree; park work as awip:commit instead. Carries the concretecost (113 entries, 18 rescued, 17 already landed, 1 a security gap — security(bedrock): AWS credentials no longer read from the secrets manager — SecretsService path and audit trail dropped in a formatting auto-fix #15023) so it reads as a
post-mortem rather than a preference, and gives the rescue-not-sweep procedure for a stack you
inherit.
docs/developer/CLAUDE_GIT.mdPre-Flight step 2 — now links to that section, so the "read thestack" step points at the "do not write to it" rule.
CLAUDE.md— theCLAUDE_GIT.mdtrigger row gains "stashing", so the rule is reachable fromthe index by the word someone would actually be looking for.
Verification
## Never Stash (#14078)renders as#never-stash-14078,which is the link target used in Pre-Flight step 2.
CLAUDE.mdtrigger row was matched exactly before replacement, so a silent no-op was not possible.
rescued to
rescued/*branches, 17 of those closed as landed/superseded/obsolete with per-fileevidence, and rescued stash: issue-MVA-3047: 17e4c442b feat(chat): context overflow protection — auto-summarize conve #14087 left open over the Bedrock credential-audit gap now tracked as security(bedrock): AWS credentials no longer read from the secrets manager — SecretsService path and audit trail dropped in a formatting auto-fix #15023.
Model Used
Claude Opus 5 (1M context)
Refs #14078