Problem
grep output is a raw match dump (no line numbers or file headers), which is
hard for the model and the user to navigate in big codebases. list_dir
also lists build artifacts and __pycache__ instead of the meaningful tree.
Proposed approach
- grep: prefix matches with
path:line: and group by file (respecting a
reasonable result cap).
list_dir: skip __pycache__, .git, and entries matched by .gitignore
(a lightweight parser, or respect it when a .gitignore exists).
Where to look
gcode/tools.py:242-285 (_grep_python), :169-191 (list_dir)
Acceptance criteria
grep output includes path:line:content; capped so context isn't blown.
list_dir omits ignored/transient entries.
Difficulty
Low — good first issue.
Problem
grepoutput is a raw match dump (no line numbers or file headers), which ishard for the model and the user to navigate in big codebases.
list_diralso lists build artifacts and
__pycache__instead of the meaningful tree.Proposed approach
path:line:and group by file (respecting areasonable result cap).
list_dir: skip__pycache__,.git, and entries matched by.gitignore(a lightweight parser, or respect it when a
.gitignoreexists).Where to look
gcode/tools.py:242-285(_grep_python),:169-191(list_dir)Acceptance criteria
grepoutput includespath:line:content; capped so context isn't blown.list_diromits ignored/transient entries.Difficulty
Low — good first issue.