feat(workspace): opt-in /resume stash for the clean-tree guard - #24
Merged
Conversation
The writer clean-tree guard pauses on a dirty tree so the recorded diff stays attributable to the writer alone. Add an opt-in convenience: `/resume stash` tucks the user's uncommitted work into a git stash (excluding `.curator/`, so Curator's own ledger is never swept) and re-runs the writer on a clean baseline; the user restores later with `git stash pop`. Pair it with a clearer dirty-pause card that names shell-valid commands (`/resume stash` | `/resume continue`) instead of a bare `/resume`. Deliberate ceilings: no auto-pop (avoids mid-loop merge conflicts), and the stash return is advisory — the clean-tree guard remains the fail-safe, so a failed or empty stash simply re-pauses. Both documented in code. Also document the future multi-worktree parallel model in docs/future-optimizations.html — the V1 direction that supersedes this guard. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
What
The writer clean-tree guard pauses on a dirty tree so the recorded
git diffstays attributable to the writer alone. This adds an opt-in convenience so dogfooding doesn't require a manual commit/stash:/resume stashtucks the user's uncommitted work into a git stash (excluding.curator/via an explicit pathspec, so Curator's own ledger is never swept) and re-runs the writer on a clean baseline. Restore later withgit stash pop./resume stash|/resume continue) instead of a bare/resume.Deliberate ceilings (documented in code)
Also
Documents the future multi-worktree parallel model in
docs/future-optimizations.html(the V1 direction that supersedes this guard).Tests
pytest -p no:cacheprovider -q→ 362 passed;ruff check src testsclean. (362, not 367 — this branch is offdev, which doesn't include the unrelated TUI-toolcall commit's ~5 tests.) New tests cover the stash helper, the.curator/exclusion, the pause-card metadata, and the end-to-end/resume stash.🤖 Generated with Claude Code