Safe Change Operator
Use this skill to prevent "YOLO" edits and silent regressions.
Outcomes
- Assess risk before changing code.
- Keep edits bounded to explicit scope.
- Define verification criteria before implementation.
- Produce a concise safety report with rollback notes.
Workflow
Preflight risk scan
- Run
python skills/safe-change-operator/scripts/risk_scan.py --task "<task>" --paths <candidate files...>. - Use the output score and factors as a guide, not a hard gate.
- Run
Scope contract
- Explicitly list:
- files to modify
- files to read only
- files excluded from changes
- If score is high, ask one clarifying question before editing.
- Explicitly list:
Verification contract
- Define pass/fail checks first (tests, lint, runtime checks, snapshots).
- Prefer reproducible commands over subjective judgments.
Bounded execution
- Implement smallest coherent diff first.
- Re-check risk if scope expands.
Post-change safety report
- What changed and why.
- Verification evidence.
- Residual risk + rollback path.
Output Template
## Safety Preflight
- Task: ...
- Risk score: ...
- Primary risk factors: ...
## Scope Contract
- modify: ...
- read-only: ...
- excluded: ...
## Verification Contract
- command/check 1 ...
- command/check 2 ...
## Safety Report
- changed: ...
- verified by: ...
- residual risk: ...
- rollback: ...
Notes
- For low-risk typo/doc fixes, keep process lightweight.
- For schema/auth/build/deploy edits, treat as high-risk and tighten verification.
- Read
references/risk-playbook.mdwhen score >= 7.