pre-edit-safety-gatelisted
Install: claude install-skill rexleimo/harness-cli
# Mutation Safety Preflight
Run this preflight before a cohesive code, workflow, or migration change. Its
purpose is to establish a current baseline and a maintainable design; it is not
a per-keystroke approval system.
## 1. Establish a Safe Baseline
1. Inspect the worktree with `git status --short`, the current branch, and its
upstream before changing files.
2. When the worktree is clean and the branch has an upstream, run
`git pull --ff-only` to obtain the latest code without creating a merge.
3. If the worktree is dirty, the branch has no upstream, or fast-forwarding
fails, do not stash, reset, rebase, force-pull, or discard work. Record the
condition and continue only within the known baseline when doing so is safe.
4. Update the CRG code graph before planning. Then use the graph to locate the
relevant module, callers, dependencies, and existing tests. If CRG is not
available, record that fact and use targeted `rg` searches plus local tests
as the fallback.
## 2. Decide the Appropriate Change Shape
Plan before a cohesive edit batch, not before every file save. First state the
requested public behavior, its owning domain or layer, the relevant existing
modules, and the focused verification command. Then decide which shape is
supported by the evidence:
- **Local change.** Use when the existing module owns the behavior and can
express the request without duplicating responsibility or leaking internals.
- **Extend or reuse.** Use an existing domai