Description
Add aict glob <pattern> which expands glob patterns and returns matched paths with full file metadata — same attributes as ls output.
Motivation
Shell glob expansion happens before the tool runs, stripping the original pattern from output. aict glob solves three problems:
- Pattern is preserved in the XML
pattern attribute for traceability
- Each match includes
size, language, mime, modified metadata
- Consistent cross-platform behavior — Windows shell globbing differs from Unix
Usage
aict glob "src/**/*.go"
aict glob "**/*_test.go" --json
Proposed XML Output
<glob pattern="src/**/*.go" matched="42" timestamp="1746123456">
<file name="main.go" absolute="/project/src/main.go"
size_bytes="2048" language="go" mime="text/x-go"
modified="1746120000" modified_ago_s="3456"/>
</glob>
Implementation Notes
- Use
path/filepath.Glob for single * patterns
- Add
** recursive glob support manually (stdlib doesn't support **)
- Empty match should produce valid XML with
matched="0"
Related
tools/find/find.go (similar traversal logic), Phase 4 ROADMAP.md
Description
Add
aict glob <pattern>which expands glob patterns and returns matched paths with full file metadata — same attributes aslsoutput.Motivation
Shell glob expansion happens before the tool runs, stripping the original pattern from output.
aict globsolves three problems:patternattribute for traceabilitysize,language,mime,modifiedmetadataUsage
Proposed XML Output
Implementation Notes
path/filepath.Globfor single*patterns**recursive glob support manually (stdlib doesn't support**)matched="0"Related
tools/find/find.go(similar traversal logic), Phase 4 ROADMAP.md