The bash file extraction utility (src/utils/bash-file-extract.ts) detects file paths written by common bash commands (redirects, cp, mv, rm, touch, etc.). Two common write patterns are missing: ln -sf target link_path (creates/overwrites a symlink) and truncate -s 0 file (empties a file). Adding these patterns would improve the file-change tracking accuracy for sessions where agents use these commands.
Relevant files:
src/utils/bash-file-extract.ts — add new regex patterns to the WRITE_PATTERNS array
test/ — add corresponding test cases (can be in an existing or new test file)
Acceptance criteria:
extractBashWritePaths('ln -sf /usr/bin/node /usr/local/bin/node') returns ['/usr/local/bin/node']
extractBashWritePaths('truncate -s 0 /var/log/app.log') returns ['/var/log/app.log']
- At least 4 new test cases covering these patterns (with flags, multiple args, etc.)
npm test passes
The bash file extraction utility (
src/utils/bash-file-extract.ts) detects file paths written by common bash commands (redirects, cp, mv, rm, touch, etc.). Two common write patterns are missing:ln -sf target link_path(creates/overwrites a symlink) andtruncate -s 0 file(empties a file). Adding these patterns would improve the file-change tracking accuracy for sessions where agents use these commands.Relevant files:
src/utils/bash-file-extract.ts— add new regex patterns to theWRITE_PATTERNSarraytest/— add corresponding test cases (can be in an existing or new test file)Acceptance criteria:
extractBashWritePaths('ln -sf /usr/bin/node /usr/local/bin/node')returns['/usr/local/bin/node']extractBashWritePaths('truncate -s 0 /var/log/app.log')returns['/var/log/app.log']npm testpasses