mirror of
https://github.com/instructkr/claude-code.git
synced 2026-04-06 11:18:51 +03:00
PARITY.md still flags missing plan/worktree entry-exit tools. This change adds EnterPlanMode and ExitPlanMode to the Rust tool registry, stores reversible worktree-local state under .claw/tool-state, and restores or clears the prior local permission override on exit. The round-trip tests cover both restoring an existing local override and cleaning up a tool-created override from an empty local state. Constraint: Must keep the override worktree-local and reversible without mutating higher-scope settings Rejected: Reuse Config alone with no state file | exit could not safely restore absent-vs-local overrides Confidence: high Scope-risk: narrow Reversibility: clean Directive: Keep plan-mode state tracking aligned with settings.local.json precedence before adding worktree enter/exit tools Tested: cargo test -p tools Not-tested: interactive CLI prompt-mode invocation of the new tools