diff options
| author | Paul Buetow <paul@buetow.org> | 2026-03-24 18:57:17 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-03-24 18:57:17 +0200 |
| commit | 98d52f5c8eb5ed7242db390a0b760eb1b918997f (patch) | |
| tree | 6e75a50ea877f54ae5123b5e40f7db7909f82a2d /hyperstack.rb | |
| parent | c1461b28a13758f3f9934cccaf9fb5b341716aa1 (diff) | |
plan-mode: prevent overwriting unrelated existing plan files
Each plan mode session now tracks an activePlanFile. On first write
the target path is adopted as the active plan for that session. Any
subsequent write or edit to a different, already-existing plan file
in ~/.pi/plans is blocked with a clear message directing the agent to
create a new file instead.
Behaviour summary:
- New file → always allowed; becomes the active plan.
- Same file again → always allowed (updating the current plan).
- Different existing file → blocked unless explicitly the active plan.
- activePlanFile is persisted across session restores and reset to
undefined whenever plan mode is entered fresh via /plan.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'hyperstack.rb')
0 files changed, 0 insertions, 0 deletions
