You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
enhancement: replace LLM watch assessment with deterministic AST classifier #71
The watch assessment prompt asks “does this diff touch anything browser-visible?” — which, in many cases, has a fairly deterministic answer.
For example:
import-only changes, type edits, cosmetic JSX attributes, lock files → typically no
event handlers, async logic, new components → typically yes
This could potentially be handled via an AST-based classifier (e.g., using ts-morph) by mapping diff lines to structural regions. That would keep it fast (~10ms), avoid network calls, and reduce reliance on the LLM for straightforward cases.
The LLM could still be useful for ambiguous scenarios (e.g., indirect runtime effects, config changes), but a hybrid approach might reduce overall cost and latency.
A first pass at this is going out now on main — added a deterministic classifier that runs before the LLM assessment. When all changed files match known non-browser patterns (docs, lockfiles, CI config, editor config, .gitignore, etc.), the LLM call is skipped entirely and the change is classified as "skip". (2d29862c)
The LLM is still used for ambiguous cases. A deeper AST-based tier could be added later for type-only or comment-only changes in .ts/.tsx files.
Activity
feat: add deterministic skip rules to watch assessment to reduce LLM …
feat: add deterministic skip rules to watch assessment to reduce LLM …
aidenybai commentedon Apr 4, 2026
A first pass at this is going out now on main — added a deterministic classifier that runs before the LLM assessment. When all changed files match known non-browser patterns (docs, lockfiles, CI config, editor config,
.gitignore, etc.), the LLM call is skipped entirely and the change is classified as "skip". (2d29862c)The LLM is still used for ambiguous cases. A deeper AST-based tier could be added later for type-only or comment-only changes in
.ts/.tsxfiles.Shanvit7 commentedon Apr 4, 2026
Makes sense as a first pass - skipping obvious cases before hitting the LLM feels like the right split.
AST layer for
.ts/.tsxcould be a good next step later.