Skip to content

Add aict glob tool for cross-platform pattern expansion with file metadata #28

@github-actions

Description

@github-actions

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:

  1. Pattern is preserved in the XML pattern attribute for traceability
  2. Each match includes size, language, mime, modified metadata
  3. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions