Files

640 B

Before any edit on a file you haven't touched recently: py_check_syntax, get_file_slice, check the contract

Rule 2. Verify Before Editing

Before ANY edit to a function you haven't touched recently:

  1. Run: py_check_syntax on src/<file>.py
  2. Get current state with get_file_slice (the exact lines you're about to touch)
  3. Read the contract: does this function/field/method's signature, yield shape, or return type have callers I need to update?

DO NOT use git checkout or git restore to revert your way to a clean state. That destroys in-progress work. If a previous edit left the file in a broken state, ask the user.