Inspect State Before Mutating
VCS-INSPECT-STATE-BEFORE-MUTATING
Summary
Inspect working-copy, stack, bookmark, conflict, and unowned state before mutation. Current state keeps edits scoped and avoids rewriting work the agent did not inspect.
Rule
Inspect working-copy and stack state before mutating.
Why
Before creating, squashing, rebasing, publishing, or editing files, the agent needs to know the current working copy, parent, bookmarks, conflicts, and unowned changes. Mutating first risks mixing tasks or rewriting work it did not inspect.
Helps
- Keeps changes scoped and avoids surprises from hidden graph or working-copy state.
Limits
Tiny read-only tasks do not need full graph inspection. Inspect before commands that alter files, changes, bookmarks, remotes, or publication state.
Agent Instruction
Before creating, squashing, rebasing, publishing, or editing files, the agent needs to know the
current working copy, parent, bookmarks, conflicts, and unowned changes, inspect working-copy and
stack state before mutating.Mechanisms
Supported by jj status, jj log, jj bookmark list, jj diff --stat, and explicit path review
before editing.