Expand description
Scan the workspace for files relevant to the task.
Two-pass strategy:
-
Mentioned files. Walk the workspace once for source files (extensions in
SCAN_EXTENSIONS); if the task prompt mentions any of their relative paths, file names, or stems, return only those (precision wins for targeted refactors like “rename greet to hello in src/lib.rs”). -
Fallback. If no file matches, return every source file in the workspace (rg-style: skip
target/,node_modules/, and hidden dirs). The prompt builder applies theDEFAULT_CONTEXT_CAP_CHARSbudget on top, so even a large workspace gets bounded context.
Paths returned are relative to the workspace root so the prompt and the apply step can share the same identifiers.
Functions§
- scan_
workspace_ for_ files - Two-pass scan: prefer mentioned files; fall back to all source.