Park abandoned work on a branch or worktree, never with git stash - #734
Merged
Conversation
2 tasks
Owner
Author
|
This pull request is part of a Mergify stack:
|
This was referenced Sep 17, 2026
The learned Session hygiene rule told the agent to park with git stash push, which cat-mode forbids for a checkout another writer may share. Name a WIP branch or its own worktree instead, and add a test that no always-loaded rule surface recommends git stash push. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Change-Id: Id0971253de9ad12e6be487d8f9a965f7bfa261cf
EdbertChan
changed the base branch from
stack/EdbertChan/feat/memory-rules-into-catstack/classify-corpus-claude-learned-md-corpus-lesson--b8058de4
to
main
September 17, 2026 04:23
EdbertChan
force-pushed
the
stack/EdbertChan/feat/memory-rules-into-catstack/park-abandoned-work-branch-worktree-never-git--d0971253
branch
from
September 17, 2026 04:23
c2194f6 to
39d3655
Compare
Owner
Author
Revision history
|
Contributor
|
Queued — the merge queue status continues in this comment ↓. |
Owner
Author
|
@Mergifyio queue admin-bypass |
Contributor
Merge Queue Status
This pull request spent 7 minutes 36 seconds in the queue, including 7 minutes 7 seconds running CI. Required conditions to merge
|
6 tasks
Owner
Author
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
When you drop a half-done plan, the agent now parks the leftover edits on a work-in-progress branch or its own copy of the repo. It never stashes them.
One always-loaded rule already banned stashing a shared checkout, because a stash there grabs another session's edits too. The hygiene rule said the opposite. Now both agree.
Review Claim
No rule file that loads on every session tells the agent to park work by stashing it.
Review Lane
behavior
Review Unit
corpus-lesson
Safety Invariant
Only the parking sentence changes; the rule still requires parking the tree and saying where it went.
Slice Rationale
One contradicting sentence and the test that keeps the surfaces consistent.
Non-goals
git stashoutright, so the agent knows which command to avoid.Test Plan
Test Plan
python3 -m unittest tests.test_parking_rule_never_stashes: 2 failures before the rule change, pass aftertests/test_install.pygenerated Cursor rule test now expectsWIP branchand nogit stash pushEvery step in
.github/workflows/ci.ymlran locally on the full stack with rc=0:run_all_tests.sh,check_no_tracked_local_artifacts,check_hook_test_coverage,check_no_silent_hook_except,check_rules_are_wired,check_skills_three_harnesses,check_ecosystem_boundaries,check_skill_file_refs,check_skill_test_coverage,check_skill_test_debt_no_growth,check_skill_trigger_mechanism,check_dora_baseline,check_no_dated_provenance,check_no_new_comments,ruff check . --select E9,F,shellcheck install.sh.github/workflows/pr-body.ymlreproduced locally against this body:node engine/skills/draft-pr/scripts/validate-pr-body.mjs --body-file <body> --changed-files-file <files>fails on the old body, passes on this oneThe two rules that disagreed, on main before this PR:
corpus/skills/cat-mode/SKILL.md:155("Nevergit stash+checkoutthe primary checkout") andcorpus/CLAUDE.learned.md:28("park the partial tree (git stash push -u ...)").Revert Plan
Revert Plan
git revert <sha>./install.shso installed copies match🤖 Generated with Claude Code