Skip to content

Park abandoned work on a branch or worktree, never with git stash - #734

Merged
mergify[bot] merged 1 commit into
mainfrom
stack/EdbertChan/feat/memory-rules-into-catstack/park-abandoned-work-branch-worktree-never-git--d0971253
Sep 17, 2026
Merged

mergify[bot] merged 1 commit into
mainfrom
stack/EdbertChan/feat/memory-rules-into-catstack/park-abandoned-work-branch-worktree-never-git--d0971253

Conversation

@EdbertChan

@EdbertChan EdbertChan commented Sep 17, 2026

Copy link
Copy Markdown
Owner

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

  • No change to cat-mode's own WIP rule.
  • The rule text still names git stash outright, 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 after

  • tests/test_install.py generated Cursor rule test now expects WIP branch and no git stash push

  • Every step in .github/workflows/ci.yml ran 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.yml reproduced 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 one

  • The two rules that disagreed, on main before this PR: corpus/skills/cat-mode/SKILL.md:155 ("Never git stash + checkout the primary checkout") and corpus/CLAUDE.learned.md:28 ("park the partial tree (git stash push -u ...)").

Revert Plan

Revert Plan
  • Safe to revert? Yes
  • Revert command: git revert <sha>
  • Post-revert steps: rerun ./install.sh so installed copies match
  • Data migration? No

🤖 Generated with Claude Code

@EdbertChan

EdbertChan commented Sep 17, 2026

Copy link
Copy Markdown
Owner Author

This pull request is part of a Mergify stack:

# Pull Request Link
1 Park abandoned work on a branch or worktree, never with git stash #734 👈
2 Count a background job as the wakeup behind an ETA, and call the time an estimate #735
3 Run list loops under bash, not zsh #736
4 Read a script's whole body before asking to run it #737
5 Reconcile declared intent, code, and result when finishing a merge #738
6 Keep approved fix-later items in every status update #739
7 Search saved memory both ways before a deep dive #740

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
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
EdbertChan force-pushed the stack/EdbertChan/feat/memory-rules-into-catstack/park-abandoned-work-branch-worktree-never-git--d0971253 branch from c2194f6 to 39d3655 Compare September 17, 2026 04:23
@EdbertChan

Copy link
Copy Markdown
Owner Author

Revision history

# Type Changes Reason Date
1 initial c2194f6 2026-09-17 04:23 UTC
2 rebase c2194f6 → 39d3655 (rebase only) 2026-09-17 04:23 UTC

@mergify

mergify Bot commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

Queued — the merge queue status continues in this comment ↓.

@EdbertChan

Copy link
Copy Markdown
Owner Author

@Mergifyio queue admin-bypass

@mergify

mergify Bot commented Sep 17, 2026

Copy link
Copy Markdown
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
  • check-success = lint
  • check-success = test
  • check-success = validate

@EdbertChan

Copy link
Copy Markdown
Owner Author

Mergify repair stopped: PR #734 is ready to land, but upper stack PR(s) #736, #738 are open without admin-bypass; a human must decide whether to include them in the admin-bypass landing stack or land them separately.

@mergify
mergify Bot merged commit d7cbe27 into main Sep 17, 2026
5 of 9 checks passed
@mergify mergify Bot removed the queued label Sep 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant