Pre-edit scout
A small local model editing brownfield code can’t see what depends on it, so it breaks callers it never read and then burns repair turns fixing the regressions. The scout removes that blind spot: before the first edit, it hands the model the blast radius of the files it’s about to change.
tsforge "rename area() to rect()" --files "src/geometry.ts" --scoutWhat it adds
Section titled “What it adds”For each editable file that already exists, scout computes (type-exactly, from the TypeScript LanguageService) who calls that file’s exports, and seeds it into the opening context:
Blast radius: who calls the files you're about to change (type-exact; check these for regressions before editing):src/geometry.ts:- area → src/floorplan.ts:12; src/report.ts:48That’s the same caller signal tsforge review uses, applied before the edit instead of after.
Deterministic by design
Section titled “Deterministic by design”Scout makes no model call: it’s pure compiler facts (the divergence from Codebuff’s LLM file-picker). It’s:
- Opt-in: off unless you pass
--scout(or a recipe sets"scout": true). Runs stay fast by default. - Brownfield only: it does nothing on a from-scratch build (there are no callers yet) or when there’s no
tsconfig.json. A non-TS editable file (.json,.md) is skipped, never a crash. - Bounded: capped in files probed and total size; if it hits the size cap it trims to the last whole line and appends
… [scout truncated], so the model never sees a half-written call site.
Scout seeds the opening prompt of a one-shot drive-to-green run (tsforge "task" --files … --scout, or a recipe run with "scout": true). Interactive sessions gather context conversationally, so the flag doesn’t apply there. Passing --scout to an interactive session prints a note saying so rather than silently ignoring it.