A pre-implementation discovery loop that runs BEFORE any edit, which none of the green-gate loops cover. Each pass greps for one more usage layer of the target symbol — direct callers, re-exports, tests that pin its contract, shared utilities it depends on — and records the contract each expects. It loops until a fresh search surfaces no new caller, i.e. the blast radius is closed, and only then greenlights the edit.
Loop
- Goal
- a complete, written map of every caller, re-export, test, and shared util that depends on the target symbol, with the contract each expects
- Exit when
- a fresh search for the symbol and its re-exports surfaces zero call sites not already in the map
Check between iterations
git grep -n -w "$SYMBOL" -- '*.ts' '*.tsx' '*.svelte' '*.js' '*.py' '*.go' '*.rs' | wc -l
$
Kickoff prompt
Start the "Read Callers Before Write" loop.
Goal: a complete, written map of every caller, re-export, test, and shared util that depends on the target symbol, with the contract each expects
Max iterations: 5
Between iterations run: git grep -n -w "$SYMBOL" -- '*.ts' '*.tsx' '*.svelte' '*.js' '*.py' '*.go' '*.rs' | wc -l
Exit when: a fresh search for the symbol and its re-exports surfaces zero call sites not already in the map
Step 1: Grep the whole repo for the target symbol and its re-exports, open each hit, and write down the contract that caller relies on before changing a single line.
›